NAME

Astro::Coords::Interpolated - Specify astronomical coordinates using two reference positions

SYNOPSIS

  $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,);

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 for the telescope location. Units are optional (see Astro::Coords::Equatorial).

Accessor Methods

ra1

Apparent Right Ascension of first reference position.

$ra = $c->ra1( %opts );

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

dec1

Apparent declination of first reference position.

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

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

mjd1

Time (MJD) when the first reference position was valid.

ra2

Apparent Right Ascension of second reference position.

$ra = $c->ra2( format => 'rad' );

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

dec2

Apparent declination of second reference position.

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

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

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 (as two Astro::Coords::Angle objects) for the current coordinates and time.

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

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.

apply_offset

Overrided method to warn if Astro::Coords::apply_offset is called on this subclass.

NOTES

Usually called via Astro::Coords. This is the coordinate style used by SCUBA for non-sidereal sources 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

Astro::Coords::Elements

REQUIREMENTS

Does not use any external PAL routines.

AUTHOR

Tim Jenness <tjenness@cpan.org>

COPYRIGHT

Copyright (C) 2012 Science and Technology Facilities Council. 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