NAME

Astro::Coords::Equatorial - Manipulate equatorial coordinates

SYNOPSIS

  $c = new Astro::Coords::Equatorial( name => 'blah',
				      ra   => '05:22:56',
				      dec  => '-26:20:40.4',
				      type => 'B1950'
				      units=> 'sexagesimal');

DESCRIPTION

This class is used by Astro::Coords for handling coordinates specified in a fixed astronomical coordinate frame.

METHODS

Constructor

new

Instantiate a new object using the supplied options.

  $c = new Astro::Coords::Equatorial(
			  name =>
                          ra =>
                          dec =>
			  long =>
			  lat =>
			  type =>
			  units =>
                         );

ra and dec are used for HMSDeg systems (eg type=J2000). Long and Lat are used for degdeg systems (eg where type=galactic). type can be "galactic", "j2000", "b1950", and "supergalactic". The units can be specified as "sexagesimal" (when using colon or space-separated strings), "degrees" or "radians". The default is determined from context. The name is just a string you can associate with the sky position.

All coordinates are converted to FK5 J2000.

Currently the FK4 1950 to FK5 J2000 assumes no parallax or proper motion correction.

Usually called via Astro::Coords.

Accessor Methods

ra

Retrieve the Right Ascension (FK5 J2000). Default is to return it in radians.

The optional hash arguments can have the following keys:

format

The required formatting for the declination:

radians     - (the default)
degrees     - decimal
sexagesimal - a string (hours/minutes/seconds)
hours       - decimal hours
array       - a ref to an array containing hour/min/sec
dec

Retrieve the declination (FK5 J2000). Default is to return it in radians.

$dec = $c->dec( format => "sexagesimal" );

The optional hash arguments can have the following keys:

format

The required formatting for the declination:

radians     - (the default)
degrees     - decimal
sexagesimal - a string (degrees/minutes/seconds)
array       - a ref to an array containing sign/degrees/min/sec

General Methods

array

Return back 11 element array with first 3 elements being the coordinate type (RADEC) and the ra/dec coordinates in J2000 (radians).

This method returns a standardised set of elements across all types of coordinates.

glong

Return Galactic longitude. Arguments are similar to those specified for "dec".

$glong = $c->glong( format => "s" );
glat

Return Galactic latitude. Arguments are similar to those specified for "dec".

$glat = $c->glat( format => "s" );
sglong

Return SuperGalactic longitude. Arguments are similar to those specified for "dec".

$sglong = $c->sglong( format => "s" );
sglat

Return SuperGalactic latitude. Arguments are similar to those specified for "dec".

$glat = $c->sglat( format => "s" );
type

Returns the generic type associated with the coordinate system. For this class the answer is always "RADEC".

This is used to aid construction of summary tables when using mixed coordinates.

stringify

A string representation of the object.

Returns RA and Dec (J2000) in string format.

summary

Return a one line summary of the coordinates. In the future will accept arguments to control output.

$summary = $c->summary();

Private Methods

_glonglat

Calculate Galactic longitude and latitude.

($long, $lat) = $c->_glonglat;
_sglonglat

Calculate Super Galactic longitude and latitude.

($slong, $slat) = $c->_sglonglat;
_apparent

Return the apparent RA and Dec (in radians) for the current coordinates and time.

NOTES

Usually called via Astro::Coords.

REQUIREMENTS

Astro::SLA is used for all internal astrometric calculations.

AUTHOR

Tim Jenness <tjenness@cpan.org>

COPYRIGHT

Copyright (C) 2001-2003 Particle Physics and Astronomy Research Council. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.