Astro::Telescope - class for obtaining telescope information
$tel = new Astro::Telescope( 'UKIRT' );
$latitude = $tel->lat;
$longitude = $tel->long;
$altitude = $tel->alt;
%limits = $tel->limits;
@telescopes = Astro::Telescope->telNames();
A class for handling properties of individual telescopes such as longitude, latitude, height and observational limits.
Create a new telescope object. Takes the telescope abbreviation as the single argument.
$tel = new Astro::Telescope( 'VLA' );
An argument must be supplied. Returns undef if the telescope is not recognized.
If more than one argument is supplied the assumption is that the user is supplying telescope details. In that case, "Name" and "Long" must be supplied, and either the geodetic latitude and altitude ("Lat" and "Alt" -- but if "Alt" is not supplied it will default to zero and this class will issue a warning), the geocentric latitude and distance ("GeocLat" and "GeocDist"), or the parallax coefficients ("Parallax") must be supplied. Latitudes and longitudes must be given in radians, altitude and distance in metres, and the parallax constants in units of Earth radii.
$tel = new Astro::Telescope('telescope');
$tel = new Astro::Telescope(Name => 'JCMT', Long => $long, Lat => $lat );
Returns the abbreviated name of the telescope. This is the same as that given to the constructor (although it will be upper-cased).
The object can be reconfigured to a new telescope by supplying a new abbreviation to this method.
The object will not change state if the name is not known.
Returns the full name of the telescope. For example, if the abbreviated name is "JCMT" this will return "JCMT 15 metre".
Returns or sets the IAU observatory code as listed at http://cfa-www.harvard.edu/iau/lists/ObsCodes.html. The object will not change state if the observatory code is not known.
Longitude of the telescope (east +ve). By default this is in radians.
An argument of "d" or "s" can be supplied to retrieve the value in decimal degrees or sexagesimal string format respectively.
$string = $tel->long("s");
Geodetic latitude of the telescope. By default this is in radians.
$deg = $tel->lat("d");
Altitude of the telescope in metres above mean sea level.
Return the parallax constants, rho*sin(phi') and rho*cos(phi'), where rho is the geocentric radius in Earth radii and phi' is the geocentric latitude. Returned as a hash where 'Par_C' is rho*sin(phi') and 'Par_S' is rho*cos(phi').
@parallax = $tel->parallax;
Return the geocentric latitude. By default this is in radians.
$deg = $tel->geoc_lat("d");
Return the distance from the centre of the Earth. By default this is in metres.
$geoc_dist = $tel->geoc_dist;
Return the cartesian coordinates of the observatory. These are the form required for specifying coordinates in the FITS OBSGEO-X, OBSGEO-Y and OBSGEO-Z header items.
($x, $y, $z) = $tel->obsgeo;
Values are returned in metres.
Return the telescope limits.
%limits = $tel->limits;
The limits are returned as a hash with the following keys:
Specifies the way in which the limits are specified. Effectively the telescope mount. Values of "AZEL" (for altaz telescopes) and "HADEC" (for equatorial telescopes) are currently supported.
Elevation limit of the telescope. Value is a hash with keys max and min. Units are in radians. Only used if type is AZEL.
Hour angle limit of the telescope. Value is a hash with keys max and min. Units are in radians. Only used if type is HADEC.
Declination limit of the telescope. Value is a hash with keys max and min. Units are in radians. Only used if type is HADEC.
Only some telescopes have limits defined (please send patches with new limits if you know them). If limits are not available for this telescope limits corresponding to "above the horizon" are returned.
If limits have been explicitly associated with this object using the setlimits method then those limits will be returned.
This method allows limits for this telescope object to be set explicitly. The contents of the limits hash must be those described by the limits method and will be returned by the limits method). Limits set in this way will override built-in limits.
$tel->setlimits( %limits );
Limits will be cleared if the object is reconfigured (eg by setting the obscode).
Obtain a sorted list of all supported telescope names.
@names = Astro::Telescope->telNames;
Currently only returns the PAL names, and only if Astro::PAL is available. If it is not available, return an empty list.
The list of telescope properties is currently obtained from those provided by PAL (Astro::PAL) and also from the Minor Planet Center (http://www.cfa.harvard.edu/iau/lists/ObsCodes.html).
Tim Jenness <email@example.com>, Brad Cavanagh <firstname.lastname@example.org>
Copyright (C) 2007, 2008, 2010, 2012 Science and Technology Facilities Council. Copyright (C) 1998-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 same terms as Perl itself.
To install Astro::Telescope, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.