Astro::Telescope(3pm)

πŸ“¦ version 0.71, in alpine 3.24

πŸ’… Astro::Telescope(3pm) β€” the perl one, from User Contributed Perl Documentation

okay bestie, settle in, because this page is literally the entire personality of a telescope in one Perl class πŸŽ€ (and yes, Astro::Telescope is the actual module name, 3pm just means it's a Perl manpage, iykyk)


✨ NAME ✨

Astro::Telescope β€” a class for obtaining telescope information πŸ‘‘

πŸ¦‹ SYNOPSIS πŸ¦‹

  use Astro::Telescope;

  $tel = new Astro::Telescope( 'UKIRT' );

  $latitude = $tel->lat;
  $longitude = $tel->long;
  $altitude = $tel->alt;

  %limits = $tel->limits;

  @telescopes = Astro::Telescope->telNames();

like, that's it. that's the whole vibe. 🌸

πŸ’– DESCRIPTION πŸ’–

So this is a class that handles the properties of individual telescopes β€” the stuff like longitude, latitude, height and observational limits. no cap, that's the whole job. 🫢


🌈 METHODS 🌈

πŸŽ€ Constructor

  • new β€” creates a shiny new telescope object ✨. It takes the telescope abbreviation as the single argument.
  $tel = new Astro::Telescope( 'VLA' );

An argument must be supplied β€” it's not optional, bestie. And it returns undef if the telescope is not recognized. πŸ’€

Now, if you supply more than one argument, the assumption is that you, the user, are supplying the telescope details yourself. In that case, Name and Long must be supplied, plus one of these three options:

  • the geodetic latitude and altitude (Lat and Alt β€” but ngl, if Alt is not supplied it defaults to zero and this class will issue a warning πŸ™ˆ)
  • the geocentric latitude and distance (GeocLat and GeocDist)
  • the parallax coefficients (Parallax)

The units, and this is important so listen up: 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 );

🧚 Accessor Methods

  • name β€” returns the abbreviated name of the telescope. It's the same as whatever you gave the constructor (although it will be upper-cased, because we're shouting it πŸ“£).

And plot twist: the object can be reconfigured to a whole new telescope by supplying a new abbreviation to this method.

  $tel->name('JCMT');

The object will not change state if the name is not known. so don't try it. 🚫

  • fullname β€” returns the full name of the telescope. For example, if the abbreviated name is JCMT this will return JCMT 15 metre. iconic. ⭐
  • obscode β€” 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.
  • long β€” longitude of the telescope (east +ve, and yes that means positive east πŸ’…). By default this is in radians.

You can supply an argument of d or s to retrieve the value in decimal degrees or sexagesimal string format respectively.

 $string = $tel->long("s");
  • lat β€” geodetic latitude of the telescope. 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.

  $deg = $tel->lat("d");
  • alt β€” altitude of the telescope in metres above mean sea level. ⛰️
  • parallax β€” returns 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'). yes, the C/S order is the opposite of how they're listed, and that's just how it is, don't @ me 🌍
  @parallax = $tel->parallax;
  • geoc_lat β€” returns the geocentric latitude. 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.

  $deg = $tel->geoc_lat("d");
  • geoc_dist β€” returns the distance from the centre of the Earth. By default this is in metres. πŸ§šβ€β™€οΈ
  $geoc_dist = $tel->geoc_dist;
  • obsgeo β€” returns the cartesian coordinates of the observatory. These are exactly 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.

  • limits β€” returns the telescope limits. 🚧
  %limits = $tel->limits;

The limits come back as a hash with these keys:

  • type β€” 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.
  • el β€” elevation limit of the telescope. Value is a hash with keys max and min. Units are in radians. Only used if type is AZEL.
  • ha β€” 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.
  • dec β€” 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 β€” and, direct quote energy, 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.

But wait, there's more: if limits have been explicitly associated with this object using the setlimits method, then those limits will be returned. main character limits only. πŸ‘‘

  • setlimits β€” this method lets you set limits for this telescope object explicitly. The contents of the limits hash must be those described by the limits method (and they will then be returned by the limits method). Limits set this way override the built-in limits. πŸ’…
  $tel->setlimits( %limits );
⚠️ Limits will be cleared if the object is reconfigured (e.g. by setting the obscode). so like, set them last, bestie 😭

🌟 Class Methods

  • telNames β€” obtain a sorted list of all supported telescope names. πŸŽ€
  @names = Astro::Telescope->telNames;

Currently it only returns the PAL names, and only if Astro::PAL is available. If it is not available, you get an empty list back. that's it, no drama. 🫢


πŸ“ REQUIREMENTS πŸ“

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). 🌈

πŸ‘‘ AUTHORS πŸ‘‘

Tim Jenness <t.jenness@jach.hawaii.edu>, Brad Cavanagh <b.cavanagh@jach.hawaii.edu>

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.


and that's the whole page, bestie ✨ β€” brought to you by perl v5.42.2, dated 2026-02-15, and archived forever under Astro::Telescope(3pm). go point a telescope at something pretty for me πŸŒŒπŸ’–

πŸ“¦ where this page comes from