This function computes, as a function of galactic coordinates, the angle between a vector pointing towards the galactic north pole and a vector pointing towards the North Celestial Pole. This can be used to orient images aligned to ecliptic and galactic coordinate systems.
This has not been tested for accuracy higher than roughly .5 degrees. I wouldn't use this to determine the orientation of spectra slits or other high precision tasks without testing first.
Uses a spherical trig identity taken from wikipedia.org/wiki/Great-circle_distance
The clockwise rotation that aligns the galactic north pole with the NCP (in J2000 coordinates). In radians by default.
- l in required
Galactic longitude. Radians are assumed unless /DEGREE is set.
- b in required
Galactic latitude. Radians are assumed unless /DEGREE is set.
- degree in optional
If set, the input and output are given in degrees.
Written by: Chris Beaumont, May 2008. June 2008 Added /degree keyword. cnb
|Modifcation date:||Mon Mar 22 16:17:13 2010|