|
X-shooter Pipeline Reference Manual 3.8.15
|
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 | xsh_baryvel (const cpl_propertylist *raw_header, double *bary_corr, double *helio_corr) |
| Compute velocity correction. | |
| double | xsh_baryvel_correct_value (double value, double correction) |
| double | xsh_baryvel_get_correction_factor (cpl_propertylist *keys, xsh_bary_corr_param *bary_corr_param) |
| cpl_error_code | xsh_baryvel_adjust_header (cpl_propertylist *header, const char *keyword, double barycorr) |
| cpl_error_code | xsh_baryvel_set_specsys (cpl_propertylist *header, xsh_bary_corr_param *bary_param) |
| cpl_error_code | xsh_baryvel_correct_header (cpl_propertylist *header, cpl_propertylist *bary_header, xsh_bary_corr_param *bary_param) |
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 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 1166 of file xsh_baryvel.c.
|
static |
compute rectangular heliocentric and barycentric components of the earth's orbital velocity
| 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 607 of file xsh_baryvel.c.
References N.
Referenced by compxy().
|
static |
Compute velocity correction.
| 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 273 of file xsh_baryvel.c.
References barvel(), and M_PI.
Referenced by xsh_baryvel().
|
static |
convert degrees -> degrees, minutes, seconds
| in_val | the value to convert |
| degs | (output) degrees (integer) |
| minutes | (output) minutes (integer) |
| seconds | (output) seconds (fractional) |
Definition at line 1155 of file xsh_baryvel.c.
References deg2hms().
Referenced by xsh_baryvel().
|
static |
convert hours -> degrees, minutes, seconds
| 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 1178 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.
| raw_header | input FITS header |
| bary_corr | (output) baryocentric correction |
| helio_corr | (output) heliocentric correction |
Definition at line 95 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().
| cpl_error_code xsh_baryvel_adjust_header | ( | cpl_propertylist * | header, |
| const char * | keyword, | ||
| double | barycorr | ||
| ) |
Definition at line 1279 of file xsh_baryvel.c.
References xsh_baryvel_correct_value().
Referenced by xsh_baryvel_correct_header().
| cpl_error_code xsh_baryvel_correct_header | ( | cpl_propertylist * | header, |
| cpl_propertylist * | bary_header, | ||
| xsh_bary_corr_param * | bary_param | ||
| ) |
Definition at line 1310 of file xsh_baryvel.c.
References check, xsh_baryvel_adjust_header(), xsh_baryvel_get_correction_factor(), and xsh_baryvel_set_specsys().
Referenced by xsh_add_product_image(), xsh_add_product_orders_spectrum(), xsh_add_product_pre(), and xsh_add_product_spectrum().
| double xsh_baryvel_correct_value | ( | double | value, |
| double | correction | ||
| ) |
Definition at line 1250 of file xsh_baryvel.c.
Referenced by xsh_baryvel_adjust_header().
| double xsh_baryvel_get_correction_factor | ( | cpl_propertylist * | keys, |
| xsh_bary_corr_param * | bary_corr_param | ||
| ) |
Definition at line 1257 of file xsh_baryvel.c.
References BARY_CORR_BARY, BARY_CORR_HELIO, xsh_bary_corr_param::corr_method, XSH_QC_VRAD_BARYCOR, and XSH_QC_VRAD_HELICOR.
Referenced by xsh_baryvel_correct_header().
| cpl_error_code xsh_baryvel_set_specsys | ( | cpl_propertylist * | header, |
| xsh_bary_corr_param * | bary_param | ||
| ) |
Definition at line 1294 of file xsh_baryvel.c.
References BARY_CORR_BARY, BARY_CORR_HELIO, BARY_CORR_NONE, and xsh_bary_corr_param::corr_method.
Referenced by xsh_baryvel_correct_header().