Tim Jenness > Astro-Coords > Astro::Coords::Equatorial

Download:
Astro-Coords-0.18.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.07   Source  

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');

  $c = new Astro::Coords::Equatorial( name => 'Vega',
                                      ra => ,
                                      dec => ,
                                      type => 'J2000',
                                      units => 'sex',
                                      pm => [ 0.202, 0.286],
                                      parallax => 0.13,
                                      epoch => 2004.529,
                                      );

  $c = new Astro::Coords( ra => '16h24m30.2s',
                          dec => '-00d54m2s',
                          type => 'J2000',
                          rv => 31,
                          vdefn => 'RADIO',
                          vframe => 'LSRK' );

DESCRIPTION ^

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

You are not expected to use this class directly, the Astro::Coords class should be used for all access (the Astro::Coords constructor is treated as a factory constructor).

If proper motions and parallax information are supplied with a coordinate it is assumed that the RA/Dec supplied is correct for the given epoch. An equinox can be specified through the 'type' constructor, where a 'type' of 'J1950' would be Julian epoch 1950.0.

METHODS ^

Constructor

new

Instantiate a new object using the supplied options.

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

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 [epoch 2000.0] internally.

Units of parallax are arcsec. Units of proper motion are arcsec/year (no correction for declination; tropical year for B1950, Julian year for J2000). If proper motions are supplied they must both be supplied in a reference to an array:

  pm => [ 0.13, 0.45 ],

If parallax and proper motions are given, the ra/dec coordinates are assumed to be correct for the specified EQUINOX (Epoch = 2000.0 for J2000, epoch = 1950.0 for B1950) unless an explicit epoch is specified. If the epoch is supplied it is assumed to be a Besselian epoch for FK4 coordinates and Julian epoch for all others.

Radial velocities can be specified using hash arguments:

  rv  =>  radial velocity (km/s)
  vdefn => velocity definition (RADIO, OPTICAL, RELATIVSTIC) [default: OPTICAL]
  vframe => velocity reference frame (HEL,GEO,TOP,LSRK,LSRD) [default: HEL]

Note that the radial velocity is only used to calculate position if parallax or proper motions are also supplied. These values will be used for calculating a doppler correction.

Additionally, a redshift can be specified:

  redshift => 2.3

this overrides rv, vdefn and vframe. A redshift is assumed to be an optical velocity in the heliocentric frame.

Usually called via Astro::Coords as a factor method.

Accessor Methods

radec

Retrieve the Right Ascension and Declination (FK5 J2000) for the date stored in the datetime method. Defaults to current date if no time is stored in the object.

  ($ra, $dec) = $c->radec();

For J2000 coordinates without proper motions or parallax, this will return the same values as returned from the radec2000 method.

An explicit equinox can be supplied as either Besselian or Julian epoch:

  ($ra, $dec) = $c->radec( 'B1950' );
  ($ra, $dec) = $c->radec( 'J2050' );
  ($ra, $dec) = $c->radec( 'B1900' );

Defaults to 'J2000'. Note that the epoch (as stored in the datetime attribute) is required when converting from FK5 to FK4 so calling this method with 'B1950' will not be the same as calling the radec1950 method unless the datetime epoch is B1950.

Coordinates are returned as two Astro::Coords::Angle objects.

ra

Retrieve the Right Ascension (FK5 J2000) for the date stored in the datetime method. Defaults to current date if no time is stored in the object.

  $ra = $c->ra( format => 's' );

For J2000 coordinates without proper motions or parallax, this will return the same values as returned from the ra2000 method.

See "NOTES" in Astro::Coords for details on the supported format specifiers and default calling convention.

dec

Retrieve the Declination (FK5 J2000) for the date stored in the datetime method. Defaults to current date if no time is stored in the object.

  $dec = $c->dec( format => 's' );

For J2000 coordinates without proper motions or parallax, this will return the same values as returned from the dec2000 method.

See "NOTES" in Astro::Coords for details on the supported format specifiers and default calling convention.

radec2000

Retrieve the Right Ascension (FK5 J2000, epoch 2000.0). Default is to return it as an Astro::Coords::Angle::Hour object.

Proper motions and parallax are taken into account (although this may happen in the object constructor). Use the radec method if you want J2000, reference epoch.

  ($ra, $dec) = $c->radec2000;

Results are returned as Astro::Coords::Angle objects.

ra2000

Retrieve the Right Ascension (FK5 J2000, epoch 2000.0). Default is to return it as an Astro::Coords::Angle::Hour object.

Proper motions and parallax are taken into account (although this may happen in the object constructor). Use the ra method if you want J2000, reference epoch.

  $ra = $c->ra2000( format => "s" );

See "NOTES" in Astro::Coords for details on the supported format specifiers and default calling convention.

dec2000

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

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

Proper motions and parallax are taken into account (although this may happen in the object constructor). Use the dec method if you want J2000, reference epoch.

See "NOTES" in Astro::Coords for details on the supported format specifiers and default calling convention.

parallax

Retrieve (or set) the parallax of the target. Units should be given in arcseconds. There is no default.

  $par = $c->parallax();
  $c->parallax( 0.13 );
pm

Proper motions in units of arcsec / Julian year (not corrected for declination).

  @pm = $self->pm();
  $self->pm( $pm1, $pm2);

If the proper motions are not defined, an empty list will be returned.

General Methods

apparent

Return the apparent RA and Dec as two Astro::Coords::Angle objects for the current coordinates and time.

 ($ra_app, $dec_app) = $self->apparent();
array

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

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

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();
set_vel_pars

Set the velocity parameters.

  $c->set_vel_pars( $rv, $vdefn, $vframe );

This does not include redshift.

NOTES ^

Usually called via Astro::Coords.

REQUIREMENTS ^

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

AUTHOR ^

Tim Jenness <tjenness@cpan.org>

Proper motion, equinox and epoch support added by Brad Cavanagh <b.cavanagh@jach.hawaii.edu>

COPYRIGHT ^

Copyright (C) 2001-2005 Particle Physics and Astronomy Research Council. All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place,Suite 330, Boston, MA 02111-1307, USA

syntax highlighting: