CR2RE Pipeline Reference Manual 1.6.2
Functions
Barycentric correction

This module contains a function to derives the barycentric correction of an observation, i.e. the wavelength shift to apply to a spectrum to compensate for the motion of the observer with respect to the barycenter of the solar system, by using the ERFA (Essential Routines for Fundamental Astronomy) library. ERFA is a C library containing key algorithms for astronomy, and is based on the SOFA library published by the International Astronomical Union (IAU). More...

Functions

cpl_error_code hdrl_barycorr_compute (double ra, double dec, const cpl_table *eop_table, double mjdobs, double time_to_mid_exposure, double longitude, double latitude, double elevation, double pressure, double temperature, double humidity, double wavelength, double *barycorr)
 Derives the barycentric correction using the erfa function eraApco13(). The latter For a terrestrial observer, prepare star-independent astrometry parameters for transformations between ICRS and observed coordinates. ERFA models are used to obtain the Earth ephemeris, CIP/CIO and refraction constants.
 

Detailed Description

This module contains a function to derives the barycentric correction of an observation, i.e. the wavelength shift to apply to a spectrum to compensate for the motion of the observer with respect to the barycenter of the solar system, by using the ERFA (Essential Routines for Fundamental Astronomy) library. ERFA is a C library containing key algorithms for astronomy, and is based on the SOFA library published by the International Astronomical Union (IAU).

Function Documentation

◆ hdrl_barycorr_compute()

cpl_error_code hdrl_barycorr_compute ( double  ra,
double  dec,
const cpl_table *  eop_table,
double  mjdobs,
double  time_to_mid_exposure,
double  longitude,
double  latitude,
double  elevation,
double  pressure,
double  temperature,
double  humidity,
double  wavelength,
double *  barycorr 
)

Derives the barycentric correction using the erfa function eraApco13(). The latter For a terrestrial observer, prepare star-independent astrometry parameters for transformations between ICRS and observed coordinates. ERFA models are used to obtain the Earth ephemeris, CIP/CIO and refraction constants.

Parameters
raTarget right ascension (J2000) [deg]
decTarget declination (J2000) [deg]
eop_tableEarth orientation parameter
mjdobsStart of observation [days]
time_to_mid_exposureTime to mid exposure, e.g. EXPTIME/2. [s]
longitudeTelescope geodetic longitude (+ = East ) [deg]
latitudeTelescope geodetic latitude (+ = North) [deg]
elevationTelescope elevation above sea level [m]
pressurePressure at the observer [hPa == mbar]
temperatureAmbient temperature at the observer [deg C]
humidityRelative humidity at the observer [range 0 - 1]
wavelengthObserving wavelength [micrometer]
barycorrOutput: Computed barycentric correction [m/s]
Returns
CPL_ERROR_NONE if everything is ok, an error code otherwise
Note
Please check the notes in the eraApco13() function.

Definition at line 205 of file hdrl_barycorr.c.

References hdrl_parameter_delete(), and hdrl_spectrum1D_resample_interpolate_parameter_create().