Instruments#
Data loading interfaces for data from different spectrographs. Each spectrograph is represented as a different class, with all providing the same user-interface (after they load all the necessary information from disk).
Note
During the years, the supported spectrographs have been (or will be) subjected to technical interventions, leading to changes in the instrumental profile. If SBART creates a stellar template that mixes information from before and after (such interventions), we will be adding noise into the model (as the spectral shape will be different)
To avoid such issues, we introduce the concept of “subInstruments”, which define individual data-sets within a spectrograph’s lifespan. Thus, for each sub-Instrument, we create individual templates and extract independent radial velocities. For more details on the dates used to delimit the data-sets, we refer to the docs of the individual instruments.
- class ESPRESSO#
Bases:
ESO_PIPELINE
Interface to handle ESPRESSO observations (S2D and S1D).
With ESPRESSO data we are considering 3 sub-Instruments:
ESPRESSO18 - Before 2019-06-27
ESPRESSO19 - Before 2020-12-18
ESPRESSO21 - Until the ends of time (hopefully)
User parameters:
Parameter name
Mandatory
Default Value
Valid Values
Comment
Note
Also check the User parameters of the parent classes for further customization options of SBART
- sub_instruments = {'ESPRESSO18': datetime.datetime(2019, 6, 27, 0, 0), 'ESPRESSO19': datetime.datetime(2020, 12, 18, 0, 0), 'ESPRESSO21': datetime.datetime(9999, 12, 31, 23, 59, 59, 999999)}#
- __init__(file_path, user_configs=None, reject_subInstruments=None, frameID=None, quiet_user_params=True)#
- Parameters:
file_path – Path to the S2D (or S1D) file.
user_configs (
Optional
[Dict
[str
,Any
]]) – Dictionary whose keys are the configurable options of ESPRESSO (check above)reject_subInstruments (
Optional
[Iterable
[str
]]) – Iterable of subInstruments to fully rejectframeID (
Optional
[int
]) – ID for this observation. Only used for organization purposes byDataClass
- load_telemetry_info(header)#
Loads (at least) the following keywords:
relative humidity
ambient temperature, in Celsius
airmass
Detector
- Parameters:
header –
- check_header_QC_ESO_DRS(header)#
- build_mask(bypass_QualCheck=False)#
Build a spectral mask based on the S2D data
- Parameters:
bypass_QualCheck (bool, optional) – Do not check the QUAL_DATA array for non-zero values, by default False
- Return type:
None
- class HARPS#
Bases:
Frame
Interface to handle HARPS data; S1D not supported!
This class also defines 2 sub-Instruments:
HARPSpre - Before 2015-05-29
HARPSpost - Until the ends of time (hopefully)
The steps to load the S2D data are described in the HARPS DRS manual. The summary is:
Construct the wavelength solution & correct from BERV
Load instrumental drift
Construct flux noises:
Table 10 of the user manual gives max RON of 7.07 for red detector
Noise = sqrt(obj + sky + n*dark*expTime + nBinY*ron^2)
User parameters:
Currently there are no HARPS-specific parameters
Note: Check the User parameters of the parent classes for further customization options of SBART
- sub_instruments = {'HARPSpost': datetime.datetime(9999, 12, 31, 23, 59, 59, 999999), 'HARPSpre': datetime.datetime(2015, 5, 29, 0, 0)}#
- __init__(file_path, user_configs=None, reject_subInstruments=None, frameID=None, quiet_user_params=True)#
- Parameters:
file_path – Path to the S2D (or S1D) file.
user_configs (
Optional
[Dict
[str
,Any
]]) – Dictionary whose keys are the configurable options of ESPRESSO (check above)reject_subInstruments – Iterable of subInstruments to fully reject
frameID – ID for this observation. Only used for organization purposes by
DataClass
- get_spectral_type()#
Custom adaptation for HARPS, as the S2D files are marked as “e2ds” Raises an error for all other files, as we are missing a S1D implementation!
- Return type:
str
- find_files(file_name)#
Find the CCF and the S2D files, which should be stored inside the same folder
- build_HARPS_wavelengths(hdr)#
Compute the wavelength solution to this given spectra (EQ 4.1 of DRS manual) Convert from air wavelenbgths to vacuum
- load_instrument_specific_KWs(header)#
Load the KW values that can not be loaded in a general fashion (e.g. needs UT number or units) To be overriden by the different instruments :param header: [description] :type header: [type]
- load_ccf_data()#
Load the necessarfy CCF data from the file!
- Return type:
None
- load_S2D_data()#
Loads the spectra
- close_arrays()#
Close the arrays that are currently open in memory. Next time we try to access them, the disk file will be re-opened. Saves RAM at the cost of more I/O operations
Available Instruments#
Interface to handle ESPRESSO observations (S2D and S1D). |
|
Interface to handle HARPS data; S1D not supported! |