SBART.template_creation.TelluricModel#
Classes
The TelluricModel is responsible for the creation of the telluric template for each sub-Instrument. |
- class TelluricModel#
Bases:
TemplateFramework
The TelluricModel is responsible for the creation of the telluric template for each sub-Instrument. This object supports the following user parameters:
User parameters:
Parameter name
Mandatory
Default Value
Valid Values
Comment
CREATION_MODE
True
tapas / telfit
Which telluric template to create [1]
APPLICATION_MODE
False
removal
removal / correction
How to use the template [2]
EXTENSION_MODE
False
lines
lines / window
How to account for BERV changes [3]
[1] Currently, SBART supports the usage of the following templates:
“tapas” :
TelfitTelluric
“telfit”:
TapasTelluric
[2] Either uses the template to correct or to remove the telluric templates. Possible values:
“removal” - the selected source of the transmittance spectra is used to build a binary template
“correction” - the template will be used to correct the stellar spectra. Currently, this is not yet supported
[3] The way with which we account for BERV variations after creating the “master” binary template. Can take the following values:
“lines” - It is shifted to match the BERV of all available observations and the N_obs templates are combined into a final binary template
“window” - We search the points in which the binary mask is set to 1. We then Doppler shift those wavelengths by the maximum BERV varation that we suffer during a year (~30 km/s).
Note: Also check the User parameters of the parent classes for further customization options of SBART
- model_type = 'Telluric'#
- template_map = {'Tapas': <class 'SBART.template_creation.telluric_templates.telluric_from_tapas.TapasTelluric'>, 'Telfit': <class 'SBART.template_creation.telluric_templates.telluric_from_telfit.TelfitTelluric'>}#
- __init__(usage_mode, root_folder_path, user_configs)#
Instantiation of the object:
- Parameters:
usage_mode (str) – How to telluric templates will be applied to the data. If ‘individual’ -> template applied to its own subInstrument If ‘merged’, we use a template built from merging the templates from all subInstruments
root_folder_path (Union [str, pathlib.Path]) – Path to the folder inside which SBART will store its outputs
user_configs (Optional[Dict[str, Any]]) – Dictionary with the keys and values of the user parameters that have been described above
- request_template(subInstrument)#
Returns the template for a given sub-Instrument. :type subInstrument:
str
:param subInstrument: “name” of the subInstrument :type subInstrument: str- Return type:
Requested telluric Template
- Generate_Model(dataClass, telluric_configs, force_computation=False, store_templates=True)#
Generate a telluric model for all subInstruments with data, as defined in the parent implementation. Afterwards, allow to combine the telluric model of all sub-Instruments into a single telluric binary model which will then be used for all available observations.
[Warning: the combination is yet to be implemented]
- Parameters:
dataClass (
DataClass
) – DataClass with the observationstelluric_configs (dict) – Dictionary with the parameters needed to control the creation of the telluric template, following the specifications of the templates.
force_computation (bool) – If False, it will attempt to lead the telluric template from disk before trying to compute them. If True, always compute telluric template, even if it exists
- Return type:
None
- merge_templates()#
Merge the telluric template of all sub-Instruments to create a master telluric binary template
- Raises:
NotImplementedError – The method is yet to be implemented
- Return type:
None
- property is_for_removal: bool#
returns: True if the template will be used to remove telluric features :rtype: bool
- property is_for_correction: bool#
returns: True if the template will be used to correct telluric features :rtype: bool