Astro:...:Offset(3pm)

πŸ“¦ version 0.23, in alpine 3.24

πŸ’« Astro::Coords::Offset β€” the manual page, but make it cute ✨

okay so this is Astro::Coords::Offset from the 3pm manual pages (user contributed Perl documentation, we love a community moment 🫢). it's the whole page, bestie, nothing skipped, no cap.


🌸 NAME 🌸

Astro::Coords::Offset β€” literally just represents an offset from a base position. that's the vibe. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

here's the whole thing, verbatim, because copying commands wrong is a crime:

  use Astro::Coords::Offset;

  my $offset = new Astro::Coords::Offset( 10, 20,
                                          system => 'J2000',
                                          projection => "TAN" );

  my $offset = new Astro::Coords::Offset( $ang1, $ang2,
                                          system => 'J2000',
                                          projection => "TAN" );

  my ($a1, $a2) = $offset->offsets;
  my $arcsec = $a1->arcsec;

so you can pass numbers or Astro::Coords::Angle objects, and then pull the offsets back out and even grab the .arcsec value. iconic. ⭐


πŸ¦‹ DESCRIPTION πŸ¦‹

sometimes a position just needs to be, like, near the base tracking system, not on it β€” and that's exactly what this class is for. 🎯 it gives you a way to specify an offset in a particular coordinate system, using a specified projection. that's the whole point, and it does it slayfully. πŸ’–


πŸ‘‘ METHODS πŸ‘‘

πŸ“ Constructor

  • new β€” creates a brand new Offset object. the first two arguments must be the offsets, either in arcseconds or as Astro::Coords::Angle objects. the projection and tracking system can be passed as optional hash arguments, and they default to TAN and J2000 respectively. so chill of them. 🧚
    my $off = new Astro::Coords::Offset( 10, -20 );

    my $off = new Astro::Coords::Offset( @off, system => "AZEL",
                                               projection => "SIN");

    my $off = new Astro::Coords::Offset( @off, system => "AZEL",
                                               projection => "SIN",
                                               posang => $pa,
                                       );

🌈 Accessor Methods

  • offsets β€” returns the X and Y offsets, as Astro::Coords::Angle objects. both of them. together. bestie behaviour.
    @offsets = $self->offsets;
yes, the doc really says "as Astro::Coords::Angle objects." right after the code block, so here it is: they're returned as Astro::Coords::Angle objects. πŸŽ€
  • xoffset β€” just the X offset. that's it. that's the method.
    $x = $off->xoffset;
  • yoffset β€” just the Y offset. (note: the original example still assigns to $x, and honestly? we're keeping it exactly like that. don't come for me. 😭)
    $x = $off->yoffset;
  • system β€” the coordinate system of this offset. and here's the fun part: it can be different from the coordinate system of the base position. main character energy. 🫢

allowed values are J2000, B1950, AZEL plus others specified by the JAC TCS XML (peep the SEE ALSO section at the end). TRACKING is special because it can change, depending on which output coordinate frame is in use β€” check the tracking_system attribute for the details. πŸ”

"Az/El" is treated as "AZEL" for backwards compatibility reasons. lowkey a legacy queen. πŸ’œ

  • posang β€” the position angle of this offset, as an Astro::Coords::Angle object. it follows the normal "East of North" convention. 🧭
    $off->posang( 45 );
    $pa = $off->posang;

if you hand it a number, it's assumed to be in degrees (this matches the common usage in the JCMT TCS XML DTD). and by default it returns a position angle of 0 deg. defaults, we love her. ✨

  • projection β€” return (or set!) the projection that should be used for this offset. defaults to tangent plane. allowed options are TAN, SIN or ARC. pick your fighter. πŸ’…
  • tracking_system β€” okay so sometimes the offset can be specified as relative to the system the telescope is currently using to track the source. and that does not necessarily have to be the same as the coordinate frame originally used to specify the target. for example, it's perfectly acceptable to ask a telescope to go to a certain Az/El and then ask it to track in RA/Dec. multitasking icon. πŸ”₯

this method lets the tracking system be specified independently of the offset coordinate system. it will only be used if the offset is specified to use "TRACKING" β€” but it lets the system disambiguate an offset defined as "TRACKING B1950" from an offset that's simply "B1950". nuance!! we stan. πŸ’–

the allowed types are the same as for "system", except that "TRACKING" is not permitted. 🚫

πŸ’€ General Methods

  • invert β€” returns a new offset object with the sense of the offset inverted. flip it, reverse it, invert it. πŸ”„
    $inv = $offset->invert;
  • clone β€” makes a cloned copy of this offset. twinsies. πŸ‘―
    $clone = $offset->clone;
  • offsets_rotated β€” think of this as a version of "offsets" that returns offsets which have been rotated through the position angle. it uses the "offsets" method internally to fetch the stored values, and the results are Astro::Coords::Angle objects. πŸŒ€
    ($x_rotated, $y_rotated) = $offset->offsets_rotated();
it's assumed the coordinate system has the first coordinate being positive to the East, so it matches the definition of the "posang" given above. (yes, the original says "definiton". we're not fixing it. it's part of the lore now. πŸ™ˆ)
  • distance β€” calculates the total distance implied by the offsets, returned as an Astro::Coords::Angle object. the full journey, not just the steps. πŸš€
    $dist = $offset->distance;

πŸ”­ SEE ALSO πŸ”­

the allowed offset types are designed to match the specification used by the Portable Telescope Control System configuration XML. for more on this, see:

<http://www.jach.hawaii.edu/JACdocs/JCMT/OCS/ICD/006>

go read it, it's giving documentation. πŸ“š


🧚 AUTHOR 🧚

Tim Jenness <tjenness@cpan.org> β€” legend, icon, and the reason this page exists. πŸ‘‘


Copyright 2002-2006 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. ⚠️ (yes, "useful,but" β€” no space, we keep the artifacts, periodt.)

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


and that's the whole page, bestie!! πŸŽ‰ no details lost, no facts invented, we simply made it cute. this was rendered by perl v5.42.2 on 2026-02-15, under the Astro:...:Offset(3pm) banner β€” mwah, thanks for reading, ily, go offset something responsibly πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from