NAME
Astro::Coords::Interpolated - Specify astronomical coordinates using two reference positions
SYNOPSIS
$c = new Astro::Coords::Elements( elements => \%elements );
DESCRIPTION
This class is used by Astro::Coords
for handling coordinates for moving sources specified as two coordinates at two epochs.
METHODS
Constructor
- new
-
Instantiate a new object using the supplied options.
$c = new Astro::Coords::Interpolated( ra1 => '05:22:56', dec1 => '-26:20:44.4', mjd1 => 52440.5, ra2 => '05:23:56', dec2 => '-26:20:50.4', mjd2 => 52441.5, units => );
Returns undef on error. The positions are assumed to be apparent RA/Dec. Units are optional (see
Astro::Coords::Equatorial
).
Accessor Methods
- ra1
-
Apparent Right Ascension of first reference position. Defaults to radians.
$ra = $c->ra1( %opts );
Type of returned value is controlled with the same options as defined in
Astro::Coords::Equatorial
. - dec1
-
Apparent declination of first reference position. Default is to return it in radians.
$dec = $c->dec1( format => "sexagesimal" );
- mjd1
-
Time (MJD) when the first reference position was valid.
- ra2
-
Apparent Right Ascension of second reference position. Defaults to radians.
$ra = $c->ra2( %opts );
Type of returned value is controlled with the same options as defined in
Astro::Coords::Equatorial
. - dec2
-
Apparent declination of second reference position. Default is to return it in radians.
$dec = $c->dec2( format => "sexagesimal" );
- mjd2
-
Time (MJD) when the second reference position was valid.
General Methods
- array
-
Return back 11 element array with first element containing the string "INTERP", the next ten elements as undef.
This method returns a standardised set of elements across all types of coordinates.
The original design did not contain this type of coordinate specification and so the array returned can not yet include it. Needs more work to integrate into the other coordinate systems.
- type
-
Returns the generic type associated with the coordinate system. For this class the answer is always "INTERP".
This is used to aid construction of summary tables when using mixed coordinates.
It could be done using isa relationships.
- stringify
-
Stringify overload. Just returns the type.
- summary
-
Return a one line summary of the coordinates. In the future will accept arguments to control output.
$summary = $c->summary();
- _apparent
-
Return the apparent RA and Dec (in radians) for the current coordinates and time.
($ra,$dec) = $c->_apparent();
Returns empty list on error.
Apparent RA/Dec is obtained by linear interpolation from the reference positions. If the requested time lies outside the reference times the position will be extrapolated.
NOTES
Usually called via Astro::Coords
. This is the coordinate style used by SCUBA instead of using orbital elements.
Apparent RA/Decs suitable for use in this class can be obtained from http://ssd.jpl.nasa.gov/.
SEE ALSO
REQUIREMENTS
Does not use any external SLALIB routines.
AUTHOR
Tim Jenness <t.jenness@jach.hawaii.edu>
COPYRIGHT
Copyright (C) 2001-2002 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.