Main Page | Class List | Directories | File List | Class Members | File Members

ObitSkyGeom.h File Reference

Celestial coordinates utility module. More...

#include "Obit.h"
#include "ObitErr.h"

Go to the source code of this file.

Enumerations

enum  obitSkyGeomProj {
  OBIT_SkyGeom_SIN = 0, OBIT_SkyGeom_TAN, OBIT_SkyGeom_ARC, OBIT_SkyGeom_NCP,
  OBIT_SkyGeom_GLS, OBIT_SkyGeom_MER, OBIT_SkyGeom_AIT, OBIT_SkyGeom_STG
}
 enum for SkyGeom projection types. More...

Functions

void ObitSkyGeomShiftXY (gdouble ra, gdouble dec, gfloat rotate, gdouble shiftRA, gdouble shiftDec, gfloat *xShift, gfloat *yShift)
 Public: Determine shift between two positions.
void ObitSkyGeomXYShift (gdouble ra, gdouble dec, gfloat xShift, gfloat yShift, gfloat rotate, gdouble *shiftRA, gdouble *shiftDec)
 Public: Determine result of a shift to a position.
void ObitSkyGeomShiftSIN (gdouble ra, gdouble dec, gfloat rotate, gdouble xra, double xdec, gfloat dxyzc[3])
 Public: Get shift parameters for -SIN projection.
void ObitSkyGeomShiftNCP (gdouble ra, gdouble dec, gfloat rotate, gdouble xra, double xdec, gfloat dxyzc[3])
 Public: Get shift parameters for -NCP projection.
void ObitSkyGeomNewPos (ObitSkyGeomProj Proj, gdouble ra0, gdouble dec0, gdouble l, gdouble m, gdouble *raout, gdouble *decout, gint *ierr)
 Public: Returns astronomical coordinates given direction cosines, projection.
gint ObitSkyGeomWorldPos (gfloat xpix, gfloat ypix, gdouble xref, gdouble yref, gfloat xrefpix, gfloat yrefpix, gfloat xinc, gfloat yinc, gfloat rot, gchar *type, gdouble *xpos, gdouble *ypos)
 Public: accurate position for pixel coordinates.
gint ObitSkyGeomCDpos (gfloat xpix, gfloat ypix, gdouble xref, gdouble yref, gfloat xrefpix, gfloat yrefpix, gfloat xinc, gfloat yinc, gfloat rot, gfloat cd1[2], gfloat cd2[2], gchar *type, gdouble *xpos, gdouble *ypos)
 Public: Position for pixel coordinates from IRAF style CD matrix.
gint ObitSkyGeomXYpix (gdouble xpos, gdouble ypos, gdouble xref, gdouble yref, gfloat xrefpix, gfloat yrefpix, gfloat xinc, gfloat yinc, gfloat rot, gchar *type, gfloat *xpix, gfloat *ypix)
 Public: Pixel coordinates for an RA and Dec.
gint ObitSkyGeomCDpix (gdouble xpos, gdouble ypos, gdouble xref, gdouble yref, gfloat xrefpix, gfloat yrefpix, gfloat xinc, gfloat yinc, gfloat rot, gfloat icd1[2], gfloat icd2[2], gchar *type, gfloat *xpix, gfloat *ypix)
 Public:pixel coordinates for an RA and Dec from IRAF style CD matrix.
gint ObitSkyGeomWorldPosLM (gdouble dx, gdouble dy, gdouble xref, gdouble yref, gfloat xinc, gfloat yinc, gfloat rot, gchar *type, gdouble *xpos, gdouble *ypos)
 Public: Position for pixel coordinates from offsets from the reference position.
gint ObitSkyGeomXYPixLM (gdouble xpos, gdouble ypos, gdouble xref, gdouble yref, gfloat xinc, gfloat yinc, gfloat rot, gchar *type, gdouble *dx, gdouble *dy)
 Public: Coordinate offsets for an RA and Dec.
void ObitSkyGeomBtoJ (gdouble *ra, gdouble *dec)
 Public: Precess B1950 to J2000 coordinates.
void ObitSkyGeomJtoB (gdouble *ra, gdouble *dec)
 Public: Precess J2000 to B1950 coordinates.
void ObitSkyGeomEq2Gal (gdouble *RALong, gdouble *DecLat)
 Public: Convert Equatorial (B1950) to Galactic coordinates.
void ObitSkyGeomGal2Eq (gdouble *RALong, gdouble *DecLat)
 Public: Convert Galactic to Equatorial (B1950).
void ObitSkyGeomEq2Ec (gdouble *RALong, gdouble *DecLat, gfloat epoch)
 Public: Convert Equatorial to Ecliptic coordinates.
void ObitSkyGeomEc2Eq (gdouble *RALong, gdouble *DecLat, gfloat epoch)
 Public: Convert Ecliptic to Equatorial.
void ObitSkyGeomRADec2Zern (gdouble ra, gdouble dec, gfloat xshift, gfloat yshift, gfloat *xzer, gfloat *yzer, gint *ierr)
 Public: Projection to Zernike plane.


Detailed Description

Celestial coordinates utility module.

This file contains utility functions for celestial coordinates


Enumeration Type Documentation

enum obitSkyGeomProj
 

enum for SkyGeom projection types.

Enumeration values:
OBIT_SkyGeom_SIN  -SIN Sin projection
OBIT_SkyGeom_TAN  -TAN Tan projection
OBIT_SkyGeom_ARC  -ARC Arc projection
OBIT_SkyGeom_NCP  -NCP NCP (WSRT) projection
OBIT_SkyGeom_GLS  -GLS Global sinusoid projection
OBIT_SkyGeom_MER  -MER Mercator projection
OBIT_SkyGeom_AIT  -AIT Aitoff projection
OBIT_SkyGeom_STG  -STG Stereographic projection


Function Documentation

void ObitSkyGeomBtoJ gdouble *  ra,
gdouble *  dec
 

Public: Precess B1950 to J2000 coordinates.

J. Condon Taken from FITSview family

Parameters:
ra in/out Right Ascension in degrees
dec in/out Declination in degrees

gint ObitSkyGeomCDpix gdouble  xpos,
gdouble  ypos,
gdouble  xref,
gdouble  yref,
gfloat  xrefpix,
gfloat  yrefpix,
gfloat  xinc,
gfloat  yinc,
gfloat  rot,
gfloat  icd1[2],
gfloat  icd2[2],
gchar *  type,
gfloat *  xpix,
gfloat *  ypix
 

Public:pixel coordinates for an RA and Dec from IRAF style CD matrix.

Note: xinc, yinc, and rot can be derived from cd1 and cd2 and should be compatible with them. Taken from FITSview family

Parameters:
xpos x (RA) coordinate (deg)
ypos y (dec) coordinate (deg)
xref x reference coordinate value (deg)
yref y reference coordinate value (deg)
xrefpix x reference pixel
yrefpix y reference pixel
xinc x coordinate increment (deg)
yinc y coordinate increment (deg)
rot rotation (deg) (from N through E)
type projection type code e.g. "-SIN" Does: -SIN, -TAN, -ARC, -NCP, -GLS, -MER, -AIT projections anything else is linear
cd1 first column of CD matrix
cd2 second column of CD matrix
xpix [out] x pixel number (RA or long without rotation)
ypix [out] y pixel number (dec or lat without rotation)
Returns:
0 if successful otherwise: 1 = angle too large for projection 2 = bad values

gint ObitSkyGeomCDpos gfloat  xpix,
gfloat  ypix,
gdouble  xref,
gdouble  yref,
gfloat  xrefpix,
gfloat  yrefpix,
gfloat  xinc,
gfloat  yinc,
gfloat  rot,
gfloat  cd1[2],
gfloat  cd2[2],
gchar *  type,
gdouble *  xpos,
gdouble *  ypos
 

Public: Position for pixel coordinates from IRAF style CD matrix.

Note: xinc, yinc, and rot can be derived from cd1 and cd2 and should be compatible with them. Taken from FITSview family

Parameters:
xpix x pixel number (RA or long without rotation)
ypix y pixel number (dec or lat without rotation)
xref x reference coordinate value (deg)
yref y reference coordinate value (deg)
xrefpix x reference pixel
yrefpix y reference pixel
xinc x coordinate increment (deg)
yinc y coordinate increment (deg)
rot rotation (deg) (from N through E)
type projection type code e.g. "-SIN" Does: -SIN, -TAN, -ARC, -NCP, -GLS, -MER, -AIT projections anything else is linear
cd1 first column of CD matrix
cd2 second column of CD matrix
xpos [out] x (RA) coordinate (deg)
ypos [out]y (dec) coordinate (deg)
Returns:
0 if successful otherwise: 1 = angle too large for projection;

void ObitSkyGeomEc2Eq gdouble *  RALong,
gdouble *  DecLat,
gfloat  epoch
 

Public: Convert Ecliptic to Equatorial.

Parameters:
RALong in/out Right Ascension/longitude in degrees
DecLat in/out Declination.latitude in degrees
epoch Epoch of the coordinates to transform

void ObitSkyGeomEq2Ec gdouble *  RALong,
gdouble *  DecLat,
gfloat  epoch
 

Public: Convert Equatorial to Ecliptic coordinates.

Parameters:
RALong in/out Right Ascension/longitude in degrees
DecLat in/out Declination.latitude in degrees
epoch Epoch of the coordinates to transform

void ObitSkyGeomEq2Gal gdouble *  RALong,
gdouble *  DecLat
 

Public: Convert Equatorial (B1950) to Galactic coordinates.

Parameters:
RALong in/out Right Ascension/longitude in degrees
DecLat in/out Declination.latitude in degrees

void ObitSkyGeomGal2Eq gdouble *  RALong,
gdouble *  DecLat
 

Public: Convert Galactic to Equatorial (B1950).

Parameters:
RALong in/out Right Ascension/longitude in degrees
DecLat in/out Declination.latitude in degrees

void ObitSkyGeomJtoB gdouble *  ra,
gdouble *  dec
 

Public: Precess J2000 to B1950 coordinates.

void ObitSkyGeomNewPos ObitSkyGeomProj  Proj,
gdouble  ra0,
gdouble  dec0,
gdouble  l,
gdouble  m,
gdouble *  raout,
gdouble *  decout,
gint *  ierr
 

Public: Returns astronomical coordinates given direction cosines, projection.

the direction cosine l is assumed to be positive to the east; m is positive to the north. the routine works for 4 kinds of projective geometries and for celestial, ecliptic, or galactic coordinate systems. this subroutine always uses an accurate computation. All angles in this subroutine are in radians. Adapted from the AIPSish NEWPOS.FOR.

Parameters:
Proj Projection type (Aitoff and Mercator not supported)
ra0 coordinate reference right ascension (longitude)
dec0 coordinate reference declination (latitude)
l cosine angle of displacement to east
m cosine angle of displacement to north
raout [out] right ascension or longitude at (l,m)
decout [out] declination or latitude at (l,m)
ierr [out] error condition: 0 = ok, 1 = l,m crazy, 2 = bad type, 3 = answer undefined

void ObitSkyGeomRADec2Zern gdouble  ra,
gdouble  dec,
gfloat  xshift,
gfloat  yshift,
gfloat *  xzer,
gfloat *  yzer,
gint *  ierr
 

Public: Projection to Zernike plane.

The output coordinates are normalized to unity at a 10 deg radius from the reference position. The coordinates are projected onto a plane tangent to the sky at the reference position. Routine translated from the AIPSish ZERGEOM.FOR/RD2ZER

Parameters:
ra Right Ascention of reference position (deg)
dec Declination of reference position (deg)
xshift Shift in X (RA) to desired position (deg)
yshift Shift in Y (Dec) to desired position (deg)
xzer [out] x-coordinate on Zernike plane
yzer [out] y-coordinate on Zernike plane
ierr 0 ok, 1 out of range

void ObitSkyGeomShiftNCP gdouble  ra,
gdouble  dec,
gfloat  rotate,
gdouble  xra,
double  xdec,
gfloat  dxyzc[3]
 

Public: Get shift parameters for -NCP projection.

Adapted from the AIPSish SHINCP.FOR.

Parameters:
ra Initial RA in degrees: reference position
dec Initial Declination in degrees
rotate Image rotation in degrees
xra RA of shifted point in degrees
xdec Declination of shifted point in degrees
dxyzc (out) Phase term for Position offsets in x,y,z

void ObitSkyGeomShiftSIN gdouble  ra,
gdouble  dec,
gfloat  rotate,
gdouble  xra,
double  xdec,
gfloat  dxyzc[3]
 

Public: Get shift parameters for -SIN projection.

Adapted from the AIPSish SHISIN.FOR.

Parameters:
ra Initial RA in degrees: reference position
dec Initial Declination in degrees
rotate Image rotation in degrees
xra RA of shifted point in degrees
xdec Declination of shifted point in degrees
dxyzc (out) Phase term for Position offsets in x,y,z (2pi turns)

void ObitSkyGeomShiftXY gdouble  ra,
gdouble  dec,
gfloat  rotate,
gdouble  shiftRA,
gdouble  shiftDec,
gfloat *  xShift,
gfloat *  yShift
 

Public: Determine shift between two positions.

The shift is in (possibly) rotated coordinates. Adopted from the AIPSish SHFTXY.FOR

Parameters:
ra Initial Right Ascension in deg.
dec Initial declination in deg.
rotate Rotation of field, to E from N, deg.
shiftRA Shifted Right Ascension in deg.
shiftDec Shifted declination in deg.
xShift (out) Shift from ra to shiftRA in deg.
yShift (out) Shift from dec to shiftDec in deg.

gint ObitSkyGeomWorldPos gfloat  xpix,
gfloat  ypix,
gdouble  xref,
gdouble  yref,
gfloat  xrefpix,
gfloat  yrefpix,
gfloat  xinc,
gfloat  yinc,
gfloat  rot,
gchar *  type,
gdouble *  xpos,
gdouble *  ypos
 

Public: accurate position for pixel coordinates.

Taken from FITSview family

Parameters:
xpix x pixel number (RA or long without rotation)
ypix y pixel number (dec or lat without rotation)
xref x reference coordinate value (deg)
yref y reference coordinate value (deg)
xrefpix x reference pixel
yrefpix y reference pixel
xinc x coordinate increment (deg)
yinc y coordinate increment (deg)
rot rotation (deg) (from N through E)
type projection type code e.g. "-SIN" Does: -SIN, -TAN, -ARC, -NCP, -GLS, -MER, -AIT projections anything else is linear
xpos [out] x (RA) coordinate (deg)
ypos [out]y (dec) coordinate (deg)
Returns:
0 if successful otherwise: 1 = angle too large for projection;

gint ObitSkyGeomWorldPosLM gdouble  dx,
gdouble  dy,
gdouble  xref,
gdouble  yref,
gfloat  xinc,
gfloat  yinc,
gfloat  rot,
gchar *  type,
gdouble *  xpos,
gdouble *  ypos
 

Public: Position for pixel coordinates from offsets from the reference position.

Taken from FITSview family

Parameters:
dx x coordinate offset (RA or long)
dy y coordinate offset (dec or lat)
xref x reference coordinate value (deg)
yref y reference coordinate value (deg
xinc x coordinate increment (deg)
yinc y coordinate increment (deg)
rot rotation (deg) (from N through E)
type projection type code e.g. "-SIN" Does: -SIN, -TAN, -ARC, -NCP, -GLS, -MER, -AIT projections anything else is linear
xpos [out] x (RA) coordinate (deg)
ypos [out] y (dec) coordinate (deg)
Returns:
0 if successful otherwise: 1 = angle too large for projection;

gint ObitSkyGeomXYpix gdouble  xpos,
gdouble  ypos,
gdouble  xref,
gdouble  yref,
gfloat  xrefpix,
gfloat  yrefpix,
gfloat  xinc,
gfloat  yinc,
gfloat  rot,
gchar *  type,
gfloat *  xpix,
gfloat *  ypix
 

Public: Pixel coordinates for an RA and Dec.

Parameters:
xpos x (RA) coordinate (deg)
ypos y (dec) coordinate (deg)
xref x reference coordinate value (deg)
yref y reference coordinate value (deg)
xrefpix x reference pixel
yrefpix y reference pixel
xinc x coordinate increment (deg)
yinc y coordinate increment (deg)
rot rotation (deg) (from N through E)
type projection type code e.g. "-SIN" Does: -SIN, -TAN, -ARC, -NCP, -GLS, -MER, -AIT projections anything else is linear
xpix [out] x pixel number (RA or long without rotation)
ypix [out] y pixel number (dec or lat without rotation)
Returns:
0 if successful otherwise: 1 = angle too large for projection 2 = bad values

gint ObitSkyGeomXYPixLM gdouble  xpos,
gdouble  ypos,
gdouble  xref,
gdouble  yref,
gfloat  xinc,
gfloat  yinc,
gfloat  rot,
gchar *  type,
gdouble *  dx,
gdouble *  dy
 

Public: Coordinate offsets for an RA and Dec.

Parameters:
xpos x (RA) coordinate (deg)
ypos y (dec) coordinate (deg)
xref x reference coordinate value (deg)
yref y reference coordinate value (deg)
xrefpix x reference pixel
yrefpix y reference pixel
xinc x coordinate increment (deg)
yinc y coordinate increment (deg)
rot rotation (deg) (from N through E)
type projection type code e.g. "-SIN" Does: -SIN, -TAN, -ARC, -NCP, -GLS, -MER, -AIT projections anything else is linear
xpix [out] x pixel number (RA or long without rotation)
ypix [out] y pixel number (dec or lat without rotation)
Returns:
0 if successful otherwise: 1 = angle too large for projection 2 = bad values

void ObitSkyGeomXYShift gdouble  ra,
gdouble  dec,
gfloat  xShift,
gfloat  yShift,
gfloat  rotate,
gdouble *  shiftRA,
gdouble *  shiftDec
 

Public: Determine result of a shift to a position.

The shift is in (possibly) rotated coordinates. Adopted from the AIPSish XYSHFT.FOR

Parameters:
ra Initial Right Ascension in deg.
dec Initial declination in deg.
xShift Shift from ra to shiftRA in deg.
yShift Shift from dec to shiftDec in deg.
rotate Rotation of field, to E from N, deg.
shiftRA (out) Shifted Right Ascension in deg.
shiftDec (out) Shifted declination in deg.


Generated on Fri Aug 31 22:13:07 2007 for Obit by  doxygen 1.3.9.1