NAME

ftcoco - Convert between galactic, equatorial and ecliptic coordinates

USAGE

ftcoco infile outfile incoord outcoord

DESCRIPTION

The ftcoco task converts between galactic, equatorial and ecliptic coordinate systems. The coordinates may either explicitly entered on the command line, or multiple values in a FITS table may be converted at once. All input and output coordinates must be in units of degrees.

The user must specify the coordinate system being converted from and converted to. The coordinate systems are indicated by letter codes. Please see the following table for the meanings.
Coordinate SystemCode
EquatorialR
GalacticG
EclipticE

If the user specifies an infile of NONE, then the input coordinates are expected to be given explicitly on the command line as (lon1,lat1). The results will be printed to the standard output (if chatter >= 2), and the result values will be stored in the parameter file as (lon2,lat2).

If the user specifies a valid FITS input file, then lon1 and lat1 should refer to the name of the input coordinates (either column names or keywords); and lon2 and lat2 should give the names of the output columns or keywords.

Please note: this task converts between representations in the same fundamental coordinate system. I.e. either FK4-to-FK4 or FK5-to-FK5. The task is not sophisticated enough to convert between FK4 and FK5.

PARAMETERS

infile [filename]
Name of input file, NONE or the empty string. The file should contain the appropriate input columns. In the case of "NONE" or the emptry string, the input coordinates must be specified by the lat1 and lon1 parameters.
outfile [filename]
Name of output file. The output columns will be created. It is allowed for infile and outfile to be the same file, either by naming the file again explicitly or by specifying "INFILE", but then you will probably need to set clobber=YES. This parameter is ignored if infile=NONE.
incoord [string]
Letter code which specifies the input coordinate system (see table above).
outcoord [string]
Letter code which specifies the output coordinate system (see table above).
lon1="RA_OBJ" [string]
Either the name of the input longitude column/keyword (if infile is a file); or the input longitude in degrees (if infile is NONE). If infile is NONE, the user will be prompted for a value. Note that if this column already exists in the input file, it should be of floating point type.
lat1="DEC_OBJ" [string]
Either the name of the input latitude column/keyword (if infile is a file); or the input latitude in degrees (if infile is NONE). If infile is NONE, the user will be prompted for a value. Note that if this column already exists in the input file, it should be of floating point type.
lon2="GLON_OBJ" [string]
The name of the output longitude column/keyword (if infile is a file). If infile is NONE, the output longitude will be stored in the parameter in the parameter file. Note that if this column already exists in the input file, it should be of floating point type.
lat2="GLAT_OBJ" [string]
The name of the output latitude column/keyword (if infile is a file). If infile is NONE, the output latitude will be stored in the parameter in the parameter file. Note that if this column already exists in the input file, it should be of floating point type.
(radecsys="FK5") [string]
The name of the fundamental coordinate system, either "FK4" or "FK5". The definitions of galactic and ecliptic coordinates are slightly different in the two systems. Note: the coordinates can't be changed from FK4 to FK5 or the reverse.
(clobber = NO) [boolean]
If the output file already exists, then setting "clobber = yes" will cause it to be overwritten.

(chatter = 2) [integer, 0 - 5]
Amount of verbosity of the task. For chatter=0, no output is printed. For chatter=2 and infile=NONE, the result coordinates are output to the standard output. For chatter=5, debugging output is printed.

(history = YES) [boolean]
If history = YES, then a set of HISTORY keywords will be written to the header of the specified HDU in the output file to record the value of all the task parameters that were used to produce the output file.

EXAMPLES

1. Convert RA/Dec to galactic longitude/latitude. Uses the default column names of RA/DEC_OBJ and GLON/GLAT_OBJ.

     ftcoco infile.fits outfile.fits R G
2. Convert galactic longitude/latitude to RA/Dec, with the output columns being RA_NOM, DEC_NOM.

     ftcoco infile.fits outfile.fits G R lon2=RA_NOM lat2=DEC_NOM
3. Convert RA/Dec to galactic coordinates on the console. The values are also stored in the lon2 and lat2 parameters in the parameter file.

     ftcoco NONE NONE R G 25.752 -12.147
      ----> RESULT:
     164.349365661267 -70.7478234599643

SEE ALSO

LAST MODIFIED

Mar 2011