barycentric_correction¶
Compute the barycentric (or heliocentric) correction and Julian date, and shift the spectrum.
| Category | Corrections |
| Backend | astropy - wraps the domain-standard astropy implementation |
| Version | 1.1.0 |
| Reads | ctx.spectrum (a Spectrum1D) |
| Writes | metrics.barycentric_velocity_kms, metrics.bjd_tdb, spectrum |
The observer location defaults to the geocentre; set latitude/longitude/elevation for the diurnal term (up to ~0.5 km/s). Uses astropy's SkyCoord.radial_velocity_correction and Time.light_travel_time. kind='barycentric' (default) emits metrics.bjd_tdb and a BJD_TDB header card; kind='heliocentric' emits metrics.hjd_utc, an HJD card and the BeSS BSS_VHEL card (BSS_VHEL is heliocentric by definition — the kernel refuses to fill it from a barycentric velocity, the two differ by up to ~13 m/s). BSS_VHEL carries the applied velocity when apply_shift is true, else 0 (BeSS convention for an uncorrected product). The Julian date is computed at MID-exposure: start time + exposure_seconds/2, falling back to the FITS EXPTIME when the parameter is null, and to 0 (start = mid) when neither exists.
Parameters¶
| Parameter | Default | Required | Description |
|---|---|---|---|
ra_deg |
None |
- | Target right ascension (deg); falls back to the FITS RA keyword. |
dec_deg |
None |
- | Target declination (deg); falls back to the FITS DEC keyword. |
obstime |
None |
- | Start-of-exposure time (ISO-8601); falls back to FITS DATE-OBS. |
latitude_deg |
0.0 |
- | Observer geodetic latitude (deg). |
longitude_deg |
0.0 |
- | Observer geodetic longitude (deg, east positive). |
elevation_m |
0.0 |
- | Observer elevation above the ellipsoid (m). |
apply_shift |
True |
- | If true, Doppler-shift the wavelength axis to the chosen frame. |
kind |
'barycentric' |
- | 'barycentric' (default; emits BJD_TDB) or 'heliocentric' (emits HJD and the BeSS BSS_VHEL card). |
exposure_seconds |
None |
- | Exposure duration (s), used to compute the Julian date at mid-exposure; null falls back to the FITS EXPTIME keyword, then to 0. |
Use it¶
{
"tool": "barycentric_correction",
"arguments": {
"session_id": "<session_id>",
"params": {
"ra_deg": null,
"dec_deg": null,
"obstime": null,
"latitude_deg": 0.0,
"longitude_deg": 0.0,
"elevation_m": 0.0,
"apply_shift": true,
"kind": "barycentric",
"exposure_seconds": null
}
}
}
Every algorithm is an MCP tool of the same name; describe_algorithm returns
this page's metadata as JSON.
References¶
- astropy.coordinates SkyCoord.radial_velocity_correction
- Wright & Eastman 2014, PASP 126, 838 — barycentric correction precision
- Eastman, Siverd & Gaudi 2010, PASP 122, 935 — BJD_TDB as the unambiguous time standard (HJD/UTC ambiguities reach the minute).
Related algorithms¶
air_to_vacuum- Convert the wavelength axis from air to vacuum wavelengths.doppler_shift- Doppler-shift the wavelength axis by a radial velocity.extinction_correct_easyspec- Apply atmospheric extinction correction toctx.spectrumvia easyspec.fit_telluric_scaling- Fit the airmass that best matches a telluric template toctx.spectrum.remove_telluric_division- Remove telluric absorption by dividing the science spectrum by a reference.synth_telluric- Generate a synthetic telluric transmission spectrum.vacuum_to_air- Convert the wavelength axis from vacuum to air wavelengths.