UVES Pipeline Reference Manual  5.4.0
Macros | Functions
Velocity correction

Macros

#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 uves_baryvel (const uves_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)


Macro Definition 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 1180 of file uves_baryvel.c.


Function Documentation

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

convert degrees -> degrees, minutes, seconds

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

Definition at line 1169 of file uves_baryvel.c.

References deg2hms().

Referenced by uves_baryvel().

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

convert hours -> degrees, minutes, seconds

Parameters:
in_valthe 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 1192 of file uves_baryvel.c.

Referenced by deg2dms(), and uves_baryvel().

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

Compute velocity correction.

Parameters:
inputrinput parameters
inputcinput parameters
outputroutput parameters
utrobservation time (seconds)
mod_juldatobservation 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 288 of file uves_baryvel.c.

References barvel().

Referenced by uves_baryvel().

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:
DJEJulian 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 622 of file uves_baryvel.c.

Referenced by compxy().

void uves_baryvel ( const uves_propertylist raw_header,
double *  bary_corr,
double *  helio_corr 
)

Compute velocity correction.

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

Definition at line 120 of file uves_baryvel.c.

References check, compxy(), deg2dms(), deg2hms(), uves_msg_debug, uves_pfits_get_dec(), uves_pfits_get_geolat(), uves_pfits_get_geolon(), uves_pfits_get_mjdobs(), uves_pfits_get_ra(), and uves_pfits_get_utc().

Referenced by uves_qclog_add_sci().