NAME

AXAFCoords - transform between various coordinate systems


SYNOPSIS

  use AXAFCoords;
  use AXAFCoords qw( :consts );
  ($el, $az) = osac_polar_2_osac_elaz( $theta, $phi );
  ($theta, $phi ) = osac_elaz_2_osac_polar( $el, $az );
  ($theta, $phi ) = osac_polar_2_HSC11( $theta, $phi );
  ($theta, $phi ) = HSC11_2_osac_polar( $theta, $phi );
  ($el, $az) = pitchyaw_2_osac_elaz( $pitch, $yaw );
  ($x, $y ) = osac_elaz_2_xy( $el, $az, $z );
  ($x, $y ) = raygen_polar_2_xy( $theta, $phi, $z );
  ($el, $az) = raygen_polar_2_raygen_elaz( $theta, $phi );
  ($theta, $phi) = raygen_elaz_2_raygen_polar( $el, $az );
  ($theta, $phi) = osac_polar_2_raygen_polar( $theta, $phi );
  ($theta, $phi) = raygen_polar_2_osac_polar( $theta, $phi );
  ($theta, $phi) = MSC_to_raygen_polar( $theta, $phi );
  ($theta, $phi) = raygen_polar_to_MSC( $theta, $phi );


DESCRIPTION

The AXAFCoords module provides routines to convert between various coordinate systems. Currently, it primarily handles source position coordinates. All of its routines are imported into the caller's namespace. There are also constants which may be of use; they are not imported automatically; use the tag ':consts' to access them (as shown in the SYNOPSIS section above.


CONSTANTS

$PI
$PI = 3.14159265358979323846

$sec2rad
factor to convert from seconds of arc to radians

$min2rad
factor to convert from minutes of arc to radians

$deg2rad
factor to convert from degrees to radians

HRMAPlateScale
HRMA plate scale in um/arcsec

ACISPixelSize_um
ACISPixelSize_as
ACIS pixel size in um or arcseconds

HRCPixelSize_um
HRCPixelSize_as
HRC pixel size in um or arcseconds


FUNCTIONS

osac_polar_2_osac_elaz
        ( $el, $az ) = osac_polar_2_osac_elaz( $theta, $phi );

Convert from OSAC polar coordinates to OSAC elevation and azimuth. All angles are in radians. Input angles are reduced such that 0 <= phi < 2pi and 0 <= theta <= pi/2

osac_polar_2_raygen_polar
        ( $theta, $phi ) = osac_polar_2_raygen_polar( $theta, $phi );

Convert from OSAC polar coordinates (which indicate the direction that the ray is travelling to) to raygen polar coordinates, which indicate the direction the ray is travelling from. All angles are in radians.

raygen_polar_2_raygen_elaz
        ( $el, $az ) = raygen_polar_2_raygen_elaz( $theta, $phi );

Convert from raygen polar coordinates to raygen elevation and azimuth. All angles are in radians. Input angles are reduced such that 0 <= phi < 2pi and 0 <= theta <= pi/2

raygen_polar_2_osac_polar
        ( $theta, $phi ) = raygen_polar_2_osac_polar( $theta, $phi );

Convert from raygen polar coordinates (which indicate the direction that the ray is travelling from) to OSAC polar coordinates, which indicate the direction the ray is travelling to. All angles are in radians.

osac_elaz_2_osac_polar
        ( $theta, $phi ) = osac_elaz_2_osac_polar( $el, $az );

Convert from OSAC elevation and azimuth to OSAC polar coordinates. All angles are in radians. Input angles are reduced to be 0 <= angle <= pi/2.

raygen_elaz_2_raygen_polar
        ( $theta, $phi ) = raygen_elaz_2_raygen_polar( $el, $az );

Convert from raygen elevation and azimuth to raygen polar coordinates. All angles are in radians. Input angles are reduced to be 0 <= angle <= pi/2.

osac_polar_2_HSC11
        ( $theta, $phi ) = osac_polar_2_HSC11( $theta, $phi )

Convert from OSAC polar coordinates to HRMA Left Handed Spherical Coordinates (AXAF-HSC-1.1). All angles are in radians.

HSC11_2_osac_polar
        ( $theta, $phi ) = HSC11_2_osac_polar( $theta, $phi )

convert from AXAF-HSC-1.1 to OSAC polar coordinates. All angles are in radians.

pitchyaw_2_osac_elaz
        ( $el, $az ) = pitchyaw_2_osac_elaz( $pitch, $yaw )

convert from XRCF pitch and yaw to OSAC elevation and azimuth. Pitch and Yaw are in minutes of arc; the output angles are in radians.

osac_elaz_2_xy
        ( $x, $y ) = osac_elaz_2_xy( $el, $az, $z )

convert from OSAC elevation and azimuth to OSAC X and Y at a particular OSAC Z. All angles are in radians.

raygen_polar_2_xy
        ( $x, $y ) = raygen_polar_2_xy( $theta, $phi, $z )

convert from raygen theta and phi to OSAC X and Y at a particular OSAC Z. All angles are in radians.

raygen_polar_to_MSC
        ( $theta, $phi ) = raygen_polar_to_MSC( $theta, $phi )

convert from raygen theta and phi to Mirror Spherical Coordinate theta and phi. All angles are in radians.

MSC_to_raygen_polar
        ( $theta, $phi ) = MSC_to_raygen_polar( $theta, $phi )

convert from Mirror Spherical Coordinate theta and phi to raygen theta and phi. All angles are in radians.


Author

Diab Jerius ( djerius@cfa.harvard.edu )


Revision

$Id: AXAFCoords.pm,v 1.15 2005/10/18 15:27:54 dj Exp $