%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  1990,2004 European Southern Observatory
%.IDENT      converrade.hlq
%.AUTHOR     K. Banse, ESO
%.KEYWORDS   MIDAS, help files, CONVERT/RADEC
%.PURPOSE    On-line help file for the command: CONVERT/RADEC
%.VERSION    040308	last modif
%----------------------------------------------------------------
\se
SECTION./RADE
\es\co
CONVERT/RADEC						8-MAR-2004  KB
\oc\su
CONVERT/RADEC  ref_frame direction in_opt input [output]
	conversion from decimal world coordinates to RA, DEC (and vice versa)
\us\pu
Purpose:    
          Convert pixels from/to decimal world coordinates to/from RA, DEC.
\up\sy
Syntax:     
          CONVERT/RADEC ref_frame direction in_opt input [output]
\ys\pa
          ref_frame = name of the correcponding image frame
\ap\pa
          direction = TO or FROM the RA,DEC representation; (default = TO)
		   for TO the coords are in the format: xcoord,ycoord
		   for FROM in the format: hrs,min,sec,deg,dmin,dsec
\ap\pa
          in_opt = Table (a), File (ASCII) (b) 
		   or String (cooord string) (c);
		   defaulted to String
\ap\pa
	  input = input specs
		  table (with type!),in_columns (a),
		  or name of ASCII file (b),
		  or coord string(c)
\ap\pa
	  output = labels of result columns (a),
		   or name of result file,[option] (b),
		   with option = FULL to include input coord string
		   in output file
\ap\sa
See also: 
          CONVERT/COORDS
\as\no
Note:  
             This command is just a wrapper around the command 
	  CONVERT/COORDS to enable the conversion for a sequence of 
	  world coords.
	    For the table option (b), the result columns must exist
	  already. Also, if the RA, DEC values are stored in the table as
	  sexagesimal values in only 2 columns (e.g. from GET/CURSOR), 
	  only these columns should be given as input (FROM direction).
            The double keyword OUTPUTD holds results of last conversion:
	  OUTPUTD(1,2) the decimal x,y coords and OUTPUT(4-6),
          OUTPUTD(7-9) the components of the RA, DEC representation.
	    If param `output' is omitted, results are just displayed.
\on\exs
Examples:
\ex
          CONVERT/RADEC fors.fits to ? 57.210487,-0.97601925
            Convert the decimal coords of FITS image `fors.fits' 
	    to RA and DEC, resulting output is
            RA, DEC: 3:48:50.52,-0:58:33.67
            and the keyword OUTPUTD holds in elements 1 - 9:
            57.210487488432435,-0.9760192515391457,1,
            3,48,50.52,
            0,58,33.67,
\xe \ex
          CONVERT/RADEC flames to table coords.tbl,:xcoord,:ycoord
	                :ra,:ram,:ras,:dec,:decm,:decs
            Convert the decimal coords of image `flames.bdf' 
	    stored in columns :XCOORD, :YCOORD of table `coords.tbl' 
	    to RA and DEC, and store the RA, DEC components in the already
	    existing(!) columns :RA, :RAM, :RAS, :DEC, :DECM, :DECS of
	    same table `coords.tbl'.
\xe \ex
          CONVERT/RADEC flames from table 
		        coords.tbl,:ra,:ram,:ras,:dec,:decm,:decs
            Convert the coords of image `flames.bdf' stored in the
	    columns :RA, :RAM, :RAS, :DEC, :DECM, :DECS of
            table `coords.tbl' to decimal coords and just display them.
\xe \ex
          CONVERT/RADEC uves03.fits from table coords.tbl,:ra,:dec
            Convert the coords of FITS image `uves03.fits' stored in 
	    sexagesimal form in the two columns :RA, :DEC of table `coords.tbl'
	    to decimal coords and just display them.
\xe \ex
          CONVERT/RADEC uves_020627 from file uves_coords.dat deccoords.dat
            Convert the world coords of `uves_020627.bdf' stored in 
	    ASCII file `uves_coords.dat' in the format
	    hrs:min:sec,deg:dmin:dsec
	    per line of the file `uves_coords.dat'. Store resulting 
	    decimal world coords in file `deccoords.dat' in the format
	    xcoord,ycoord.
\xe \ex
          CONVERT/RADEC uves_020627 from f uves_coords.dat deccoords.dat,full
            As above but output file has records in the format
	    hrs:min:sec,deg:dmin:dsec => xcoord,ycoord.
\xe \sxe
