#include <math.h>
#include <lal/LALStdlib.h>
#include <lal/LALConstants.h>
#include <lal/SkyCoordinates.h>
Include dependency graph for CelestialCoordinates.c:

Go to the source code of this file.
Defines | |
| #define | LAL_ALPHAGAL (3.366032942) |
| #define | LAL_DELTAGAL (0.473477302) |
| #define | LAL_LGAL (0.576) |
Functions | |
| NRCSID (CELESTIALCOORDINATESC,"$Id: CelestialCoordinates.c,v 1.9 2007/06/08 14:41:47 bema Exp $") | |
| void | LALGalacticToEquatorial (LALStatus *stat, SkyPosition *output, SkyPosition *input) |
| void | LALEquatorialToGalactic (LALStatus *stat, SkyPosition *output, SkyPosition *input) |
| void | LALEclipticToEquatorial (LALStatus *stat, SkyPosition *output, SkyPosition *input) |
| void | LALEquatorialToEcliptic (LALStatus *stat, SkyPosition *output, SkyPosition *input) |
D.
These functions perform the specified coordinate transformation on the contents of input and store the result in *output. The two pointers may point to the same object, in which case the conversion is done in place. The functions will also check input->system and set output->system as appropriate.
These routines are collected together because they involve fixed, absolute coordinate systems, so the transformations require no additional parameters such as the time or site of observation. We also note that there are no direct conversions between Galactic and ecliptic coordinates. At the risk of additional computational overhead, it is simple to use the equatorial coordinate system as an intermediate step.
input->system and set output->system as appropriate.These routines are collected together because they involve fixed, absolute coordinate systems, so the transformations require no additional parameters such as the time or site of observation. We also note that there are no direct conversions between Galactic and ecliptic coordinates. At the risk of additional computational overhead, it is simple to use the equatorial coordinate system as an intermediate step.
Galactic coordinates: The following formulae relate Galactic latitude
and longitude
to declination
and right ascension
:
where
can be thought of as the argument of the complex number
; unlike
, it ranges over the full range
instead of just half of it. The inverse transformations are:
In these equations we have defined the orientation of the Galaxy with the following parameters (which should eventually be placed in LALConstants.h:
The ascending node of the Galactic plane is defined as the direction along the intersection of the Galactic and equatorial planes where rotation in the positive sense about the Galactic
axis carries a point from the southern to northern equatorial hemisphere. That is, if
points in the direction
(celestial north), and
points in the direction
(Galactic north), then
points along the ascending node.
Ecliptic coordinates: The following formulae relate Ecliptic latitude
and longitude
to declination
and right ascension
:
The inverse transformations are:
Here
is the obliquity (inclination) of the ecliptic plane, which varies over time; at epoch J200 it has a mean value of:
Definition in file CelestialCoordinates.c.
| #define LAL_ALPHAGAL (3.366032942) |
Definition at line 153 of file CelestialCoordinates.c.
| #define LAL_DELTAGAL (0.473477302) |
Definition at line 154 of file CelestialCoordinates.c.
| #define LAL_LGAL (0.576) |
Definition at line 155 of file CelestialCoordinates.c.
| NRCSID | ( | CELESTIALCOORDINATESC | , | |
| "$Id: CelestialCoordinates. | c, | |||
| v 1.9 2007/06/08 14:41:47 bema Exp $" | ||||
| ) |
| void LALGalacticToEquatorial | ( | LALStatus * | stat, | |
| SkyPosition * | output, | |||
| SkyPosition * | input | |||
| ) |
Definition at line 160 of file CelestialCoordinates.c.
| void LALEquatorialToGalactic | ( | LALStatus * | stat, | |
| SkyPosition * | output, | |||
| SkyPosition * | input | |||
| ) |
Definition at line 208 of file CelestialCoordinates.c.
| void LALEclipticToEquatorial | ( | LALStatus * | stat, | |
| SkyPosition * | output, | |||
| SkyPosition * | input | |||
| ) |
Definition at line 256 of file CelestialCoordinates.c.
| void LALEquatorialToEcliptic | ( | LALStatus * | stat, | |
| SkyPosition * | output, | |||
| SkyPosition * | input | |||
| ) |
Definition at line 301 of file CelestialCoordinates.c.
1.5.2