Function: VELPRO
Purpose: Transformation from velocity to grid coordinates and vv.
File: velpro.c
Author: K.G. Begeman
Use: INTEGER VELPRO( COORD1, Input DOUBLE PRECISION
COORD2, Output DOUBLE PRECISION
CRVAL , Input DOUBLE PRECISION
CDELT , Input DOUBLE PRECISION
DRVAL , Input DOUBLE PRECISION
FREQ0 , Input DOUBLE PRECISION
VELSYS, Input INTEGER
DIR ) Input INTEGER
VELPRO Returns:
0: transformation successful
9: unknown velocity system
10: rest frequency less than zero
11: crval equal to zero
12: cdelt equal to zero
COORD1 Input velocity in m/s or grid.
COORD2 Output grid coordinate or velocity in m/s.
CRVAL Observed frequency in Hz at channel reference pixel.
CDELT Grid separation in Hz.
DRVAL Velocity at reference frequency in m/s.
FREQ0 Rest frequency in Hz.
If FREQ0 is 0.0, the new (correct)
definition is used, if FREQ0 greater than 0.0,
the old (approximate) definition is used.
VELSYS Velocity system of input coordinates:
1 = optical definition
2 = radio definition
DIR Direction of transform:
DIR == 0: velocity -> grid
DIR != 0: grid -> velocity
Updates: Dec 8, 1989: KGB, Document created.