pychell API reference¶
Forward Models¶
Model Components¶
-
class
pychell.rvs.model_components.BasicFringingModel(blueprint, wave_bounds, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.EmpiricalMultA basic Fabry-Perot cavity model.
-
class
pychell.rvs.model_components.EmpiricalMult(blueprint, wave_bounds, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.MultModelComponentBase class for an empirically derived multiplicative (or log-additive) spectral component (i.e., based purely on parameters, no templates involved).
-
class
pychell.rvs.model_components.FullBlazeModel(blueprint, wave_bounds, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.EmpiricalMultA full blaze transmission model. A sinc^(d) and an additive cubic spline correction are used.
-
n_splines¶ The number of wavelength splines.
Type: int
-
n_delay_splines¶ The number of iterations to delay the splines.
Type: int
-
splines_enabled¶ Whether or not the splines are enabled.
Type: bool
-
blaze_wave_estimate¶ The estimate of the blaze wavelegnth. If not provided, defaults to the average of the wavelength grid provided in the build method.
Type: bool
-
spline_set_points¶ The location of the spline knots.
Type: np.ndarray
-
-
class
pychell.rvs.model_components.GasCellModel(blueprint, wave_bounds, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.TemplateMultA gas cell model which is consistent across orders.
-
class
pychell.rvs.model_components.GasCellModelOrderDependent(blueprint, wave_bounds, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.TemplateMultA gas cell model which is not consistent across orders.
-
class
pychell.rvs.model_components.LSFHermiteModel(blueprint, dl, nx_model, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.LSFModelA Hermite Gaussin LSF model. The model is a sum of Gaussians of constant width but coefficients to enforce orthonormality.
-
hermdeg¶ The degree of the hermite model
Type: int
-
-
class
pychell.rvs.model_components.LSFModel(blueprint, dl, nx_model, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.SpectralComponentA base class for an LSF (line spread function) model.
-
compress¶ The number of lsf points is equal to the number of model pix / compress.
Type: int
-
dl¶ The step size of the high resolution fidicual wavelength grid the model is convolved on. Must be evenly spaced.
Type: float
-
nx_model¶ The number of model pixels in the high resolution fidicual wavelength grid.
Type: float
-
nx¶ The number of points in the lsf grid.
Type: int
-
x¶ The lsf grid.
Type: np.ndarray
-
-
class
pychell.rvs.model_components.LSFModelKnown(blueprint, dl, nx_model, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.LSFModelA container for a known LSF. In reality this can and probably should not be used and avoided.
-
class
pychell.rvs.model_components.MultModelComponent(blueprint, wave_bounds, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.SpectralComponentBase class for a multiplicative (or log-additive) spectral component.
-
wave_bounds¶ The approximate left and right wavelength endpoints of the considered data.
Type: list
-
flux_logspace¶ Whether or not this model is generated in logspace. It is recommended the log is accounted for in the corresponding build_full method, not here (for now).
Type: bool
-
base_par_names¶ The base parameter names (constant) for this model.
Type: list
-
par_names¶ The full parameter names for this specific run.
Type: list
-
-
class
pychell.rvs.model_components.ResidualBlazeModel(blueprint, wave_bounds, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.EmpiricalMultResidual blaze transmission model, ideally used after a flat field correction. A quadratic and an additive cubic spline correction are used.
-
n_splines¶ The number of wavelength splines.
Type: int
-
n_delay_splines¶ The number of iterations to delay the splines.
Type: int
-
splines_enabled¶ Whether or not the splines are enabled.
Type: bool
-
blaze_wave_estimate¶ The estimate of the blaze wavelegnth. If not provided, defaults to the average of the wavelength grid provided in the build method.
Type: bool
-
spline_set_points¶ The location of the spline knots.
Type: np.ndarray
-
-
class
pychell.rvs.model_components.SpectralComponent(blueprint, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
objectBase class for a general spectral component model.
-
blueprint¶ The blueprints to construct this component from.
Type: dict
-
order_num¶ The image order number.
Type: int
-
enabled¶ Whether or not this model is enabled.
Type: bool
-
name¶ The name of this model, may be anything.
Type: str
Base initialization for a model component.
Parameters: - blueprint (dict) – The blueprints to construct this component from.
- order_num (int) – The image order number.
-
-
class
pychell.rvs.model_components.StarModel(blueprint, wave_bounds, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.TemplateMultA star model which may or may not have started from a synthet template.
-
class
pychell.rvs.model_components.StarModelOrderDependent(blueprint, wave_bounds, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.SpectralComponentA star model which is order dependent. For now this is only used for Minerva-Australis.
-
class
pychell.rvs.model_components.TelluricModelTAPAS(blueprint, wave_bounds, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.TemplateMultA telluric model based on Templates obtained from TAPAS. These templates should be pre-fetched from TAPAS and specific to the observatory. Each species has a unique depth, but the model is locked to a common Doppler shift.
-
species¶ The names (strings) of the telluric species.
Type: list
-
n_species¶ The number of telluric species.
Type: int
-
species_enabled¶ A dictionary with species as keys, and boolean values for items (True=enabled, False=disabled)
Type: bool
-
species_input_files¶ A list of input files (strings) for the individual species.
Type: list
-
-
class
pychell.rvs.model_components.TemplateMult(blueprint, wave_bounds, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.MultModelComponentA base class for a template based multiplicative model.
-
input_file¶ If provided, stores the full path + filename of the input file.
Type: str
-
-
class
pychell.rvs.model_components.WaveModelKnown(blueprint, wave_bounds, pix_bounds, nx, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.WavelengthSolutionModelClass for a wavelength solution which starts from some pre-derived solution (say a ThAr lamp).
-
n_splines¶ The number of wavelength splines.
Type: int
-
n_delay_splines¶ The number of iterations to delay the splines.
Type: int
-
splines_enabled¶ Whether or not the splines are enabled.
Type: bool
-
spline_pixel_set_points¶ The location of the spline knots.
Type: np.ndarray
-
-
class
pychell.rvs.model_components.WaveSolModelFull(blueprint, wave_bounds, pix_bounds, nx, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.WavelengthSolutionModelClass for a full wavelength solution. A “base” solution is provided by a quadratic through set points, and a cubic spline offset is added on to capture any local perturbations.
-
n_splines¶ The number of wavelength splines.
Type: int
-
n_delay_splines¶ The number of iterations to delay the splines.
Type: int
-
splines_enabled¶ Whether or not the splines are enabled.
Type: bool
-
base_pixel_set_points¶ The three pixel points to use as set points in the quadratic.
Type: np.ndarray
-
base_wave_zero_points¶ Estimates of the corresonding zero points of base_pixel_set_points.
Type: np.ndarray
-
spline_pixel_set_points¶ The location of the spline knots.
Type: np.ndarray
-
-
class
pychell.rvs.model_components.WavelengthSolutionModel(blueprint, wave_bounds, pix_bounds, nx, order_num=None, wave_logspace=False, flux_logspace=False)¶ Bases:
pychell.rvs.model_components.SpectralComponentA base class for a wavelength solution (i.e., conversion from pixels to wavelength).
-
pix_bounds¶ The left and right pixel bounds which correspond to wave_bounds.
Type: list
-
nx¶ The total number of data pixels.
Type: int
-