Velocity correction

Defines

#define MIDAS_BUG   0

Functions

static void deg2dms (double in_val, double *degs, double *minutes, double *seconds)
 convert degrees -> degrees, minutes, seconds
static void deg2hms (double in_val, double *hours, double *minutes, double *seconds)
 convert hours -> degrees, minutes, seconds
static void compxy (double inputr[19], char inputc[4], double outputr[4], double utr, double mod_juldat)
 Compute velocity correction.
static void barvel (double DJE, double DEQ, double DVELH[4], double DVELB[4])
 compute rectangular heliocentric and barycentric components of the earth's orbital velocity
void xsh_baryvel (const cpl_propertylist *raw_header, double *bary_corr, double *helio_corr)
 Compute velocity correction.

Detailed Description

Compute barycentric, heliocentric velocity corrections

The code in this source file is a 1-to-1 translation of MIDAS COMPUT/BARYCOR as defined in /prim/general/src/compxy.for (only the necessary parts were translated). The code is not meant to be particularly readable/maintainable. To understand the computation the best starting point is probably P. Stumpff, A&A Suppl. Ser. 41, pp. 1-8 (1980)


Define Documentation

#define MIDAS_BUG   0

To get the exact same behaviour as MIDAS this should be define'd to 1. (Fixing it does not seem to make a difference in the resulting numbers but do it anyway)

Definition at line 1162 of file xsh_baryvel.c.


Function Documentation

static void barvel ( double  DJE,
double  DEQ,
double  DVELH[4],
double  DVELB[4] 
) [static]

compute rectangular heliocentric and barycentric components of the earth's orbital velocity

Parameters:
DJE Julian date
DEQ ???
DVELH (output) heliocentric velocity
DVELB (output) barycentric velocity

REFERENCE : STUMPFF P. ASTRON. ASTOPHYS. SUPPL. 41,1,1980 MODIFICATION : D. GILLET 1983-9-15

Definition at line 604 of file xsh_baryvel.c.

Referenced by compxy().

static void compxy ( double  inputr[19],
char  inputc[4],
double  outputr[4],
double  utr,
double  mod_juldat 
) [static]

Compute velocity correction.

Parameters:
inputr input parameters
inputc input parameters
outputr output parameters
utr observation time (seconds)
mod_juldat observation modified julian date

INPUTR/R/1/3 date: year,month,day INPUTR/R/4/3 universal time: hour,min,sec INPUTR/R/7/3 EAST longitude of observatory: degree,min,sec !! NOTE INPUTR/R/10/3 latitude of observatory: degree,min,sec INPUTR/R/13/3 right ascension: hour,min,sec INPUTR/R/16/3 declination: degree,min,sec OUTPUTD/D/1/1 barycentric correction to time (days) OUTPUTD/D/2/1 heliocentric correction to time (days) OUTPUTR/R/1/1 barycentric correction to radial velocity (km/s) OUTPUTR/R/2/1 heliocentric correction to radial velocity (km/s) OUTPUTR/R/3/1 diurnal rotation of the earth

Definition at line 270 of file xsh_baryvel.c.

References barvel(), and M_PI.

Referenced by xsh_baryvel().

static void deg2dms ( double  in_val,
double *  degs,
double *  minutes,
double *  seconds 
) [static]

convert degrees -> degrees, minutes, seconds

Parameters:
in_val the value to convert
degs (output) degrees (integer)
minutes (output) minutes (integer)
seconds (output) seconds (fractional)

Definition at line 1151 of file xsh_baryvel.c.

References deg2hms().

Referenced by xsh_baryvel().

static void deg2hms ( double  in_val,
double *  hours,
double *  minutes,
double *  seconds 
) [static]

convert hours -> degrees, minutes, seconds

Parameters:
in_val the value to convert
hours (output) hours (integer). 360 degrees correspond to 24 h
minutes (output) minutes (integer)
seconds (output) seconds (fractional)

360 deg corresponds to 24 h=> 15 deg corresponds to 1 h

Definition at line 1174 of file xsh_baryvel.c.

References xsh_round_double().

Referenced by deg2dms(), and xsh_baryvel().

void xsh_baryvel ( const cpl_propertylist *  raw_header,
double *  bary_corr,
double *  helio_corr 
)

Compute velocity correction.

Parameters:
raw_header input FITS header
bary_corr (output) baryocentric correction
helio_corr (output) heliocentric correction

Definition at line 92 of file xsh_baryvel.c.

References check_msg, compxy(), deg2dms(), deg2hms(), xsh_msg_debug, xsh_msg_warning, xsh_pfits_get_dec(), xsh_pfits_get_geolat(), xsh_pfits_get_geolon(), xsh_pfits_get_mjdobs(), xsh_pfits_get_ra(), and xsh_pfits_get_utc().

Referenced by xsh_rectify_orders().


Generated on 9 Mar 2011 for X-shooter Pipeline Reference Manual by  doxygen 1.6.1