LAL  7.5.0.1-bede9b2

Detailed Description

Automatically converts among sky coordinate systems.

Author
Creighton, T. D.

The function LALConvertSkyCoordinates() transforms the contents of *input to the system specified in *params, storing the result in *output (which may point to the same object as *input for an in-place transformation). The routine makes calls to the functions in CelestialCoordinates.c and TerrestrialCoordinates.c as required; the *params object must store any data fields required by these functions, or an error will occur.

The function LALNormalizeSkyPosition() "normalizes" any given (spherical) sky-position (in radians), which means it projects the angles into \([0, 2\pi) \times [-\pi/2, \pi/2]\) if they lie outside.

Algorithm

LALConvertSkyCoordinates() is structured as a simple loop over transformations, each of which moves the output sky position one step closer to the desired final coordinates system. The usual "flow" of the algorithm is:

although one can also convert directly between equatorial and horizon coordinate systems if params->zenith is given in equatorial coordinates (i.e. if its longitudinal coordinate is the local mean sidereal time rather than the geographic longitude of the observer). This leads to the only error checking done within this function: when transforming to horizon coordinates, it checks that params->zenith is either in sky-fixed equatorial or Earth-fixed geographic coordinates. Other than this, error checking is left to the secondary function call; if a parameter is absent or poorly formatted, the called function will return an error.

Prototypes

void LALConvertSkyCoordinates (LALStatus *stat, SkyPosition *output, SkyPosition *input, ConvertSkyParams *params)
 
void LALNormalizeSkyPosition (LALStatus *stat, SkyPosition *posOut, const SkyPosition *posIn)
 
void XLALNormalizeSkyPosition (double *restrict longitude, double *restrict latitude)
 If sky-position is not in the canonical range \((\alpha,\delta)\in [0,2\pi]\times[-\pi/2, \pi/2]\), normalize it by mapping it into this coordinate-interval. More...
 

Function Documentation

◆ LALConvertSkyCoordinates()

void LALConvertSkyCoordinates ( LALStatus stat,
SkyPosition output,
SkyPosition input,
ConvertSkyParams params 
)
See also
See documentation in Module SkyCoordinates.c

Definition at line 73 of file SkyCoordinates.c.

◆ LALNormalizeSkyPosition()

void LALNormalizeSkyPosition ( LALStatus stat,
SkyPosition posOut,
const SkyPosition posIn 
)
Deprecated:
Use XLALNormalizeSkyPosition() instead.
Parameters
statpointer to LALStatus structure
[out]posOutnormalized sky-position
[in]posIngeneral sky-position

Definition at line 166 of file SkyCoordinates.c.

◆ XLALNormalizeSkyPosition()

void XLALNormalizeSkyPosition ( double *restrict  longitude,
double *restrict  latitude 
)

If sky-position is not in the canonical range \((\alpha,\delta)\in [0,2\pi]\times[-\pi/2, \pi/2]\), normalize it by mapping it into this coordinate-interval.

Based on Alicia's function with some additional "unwinding" added.

Parameters
[in,out]longitudesky-position longitude to normalize
[in,out]latitudesky-position latitude to normalize

Definition at line 195 of file SkyCoordinates.c.