Task#
- class Task[source]#
Bases:
Config
Rolling Alpha Shape for a Spectral Improved Normalisation Estimator (RASSINE)
^ .-=-. .-==-. {} __ .' O o '. / ^ ) { } .' O'. / o .-. O \ / .--`\ { } / .-. o\ /O / \ o\ /O / ^ (RASSSSSSINE) \ `-` / \ O`-'o / \ O`-`o / jgs `-.-` '.____.' `.____.'
Authors: Michael Cretignier, Jeremie Francfort and Denis Rosset
- ini_strict_sections_: ClassVar[Sequence[str]] = ['rassine']#
Names of additional sections to parse in configuration files, unknown keys error
- ini_relaxed_sections_: ClassVar[Sequence[str]] = ['rassine']#
Names of sections to parse in configuration files, with unknown keys ignored
- config: Sequence[pathlib.Path][Sequence[Path]]#
Use the specified configuration files.
Files can be separated by commas/the command can be invoked multiple times.
- pickle_protocol: PickleProtocol[PickleProtocol]#
Pickle protocol version to use
- logging_level: LoggingLevel[LoggingLevel]#
Logging level to use
- input_spectrum: Optional[pathlib.Path][Optional[Path]]#
Path of the spectrum pickle
Either a path to a spectrum pickle needs to be provided, or one needs to provide the –input-table, –input-folder and inputs (positional) arguments
Note that input_spectrum is a path relative to “root” and “input_folder”
- input_table: Optional[pathlib.Path][Optional[Path]]#
Table of stacked spectra from which to read the individual file names
- input_folder: Optional[pathlib.Path][Optional[Path]]#
Relative path to the folder containing the stacked spectra
- input_indices: Sequence[int][Sequence[int]]#
Indices of spectrum to process
If provided, then input_table and input_folder must be provided If not provided, then input_spectrum must be provided
- output_pattern: str[str]#
Pattern to use for the RASSINE output filename
The “{}” part will be replaced by the input filename stem
- input_anchor_pickle: Optional[pathlib.Path][Optional[Path]]#
Put a RASSINE output file that will fix the value of the 7 parameters to the same value than in the anchor file
- output_anchor_ini: Optional[pathlib.Path][Optional[Path]]#
Optional INI output anchor file that can be used as an input configuration file
Only valid if input_spectrum is used and not the multi-spectrum reduction
- output_plot_folder: Optional[pathlib.Path][Optional[Path]]#
Where to put the output plot, if empty no plot is produced
The plot name will be derived from the spectrum name, with a “_output.png” suffix
- output_plot_pattern: str[str]#
Pattern to use for the RASSINE output filename
The “{}” part will be replaced by the input filename stem
- par_stretching: Union[float, rassine.rassine.parsing.Auto][Union[float, Auto]]#
Scaling of the flux axis compared to the wavelength axis. The format of the automatic mode is’auto x’ with x a 1 decimal positive float number. x = 0.0 means high tension, whereas x = 1.0 mean low tension.
PARAMETER 1
- par_smoothing_box: Union[Literal['auto'], int][Union[Literal['auto'], int]]#
half-window of the box used to smooth (1 => no smoothing, ‘auto’ available)
PARAMETER 2
- par_smoothing_kernel: Literal['rectangular', 'gaussian', 'savgol', 'erf', 'hat_exp'][~typing.Literal['rectangular', 'gaussian', 'savgol', 'erf', 'hat_exp']]#
To use the automatic mode which apply a Fourier filtering use ‘erf ‘ or ‘hat exp’ kernel and ‘auto’ in par smoothing box. Else, use ‘rectangular’, ‘gaussian’, ‘savgol’. Developers advise the ‘savgol’ kernel except if the user is dealing with spectra spanning low and high SNR range.
- par_fwhm: Union[Literal['auto'], float][Union[Literal['auto'], float]]#
FWHM of the CCF of the spectrum in km/s. The user can let ‘auto’ to let RASSINE determine this value by itself.
PARAMETER 3
- CCF_mask: str[str]#
CCF mask used to determine the FWHM. RASSINE construct its own mask by default. The user can specify its own mask which should be placed in the CCF MASK directory. Only needed if par_fwhm is in ‘auto’
- par_R: Union[Literal['auto'], float][Union[Literal['auto'], float]]#
Minimum radius of the rolling pin in angstrom and in the extreme blue (‘auto’ available)
PARAMETER 4
- par_Rmax: Union[Literal['auto'], float][Union[Literal['auto'], float]]#
Maximum radius of the rolling pin in angstrom in the extreme blue (‘auto’ available)
PARAMETER 5
- par_reg_nu: Union[rassine.rassine.parsing.RegPoly, rassine.rassine.parsing.RegSigmoid][Union[RegPoly, RegSigmoid]]#
Penality-radius law
poly_d (d the degree of the polynome x**d) or sigmoid_c_s where c is the center and s the steepness
PARAMETER 6
- mask_telluric: Sequence[Tuple[float, float]][Sequence[Tuple[float, float]]]#
a list of left and right borders to eliminate from the mask of the CCF only if CCF = ‘master’ and par_fwhm = ‘auto’
- synthetic_spectrum: bool[bool]#
True if working with a noisy-free synthetic spectra in order to inject a small noise for numerical stability
- interpolation: Literal['cubic', 'linear'][~typing.Literal['cubic', 'linear']]#
Define the interpolation for the continuum displayed in the subproducts
note that at the end a cubic and linear interpolation are saved in ‘output’ regardless this value
- denoising_dist: int[int]#
Half window of the area used to average the number of point around the local max for the continuum
- count_out_lim: int[int]#
Number of outliers clipping in automatic mode (put at least 1 if Automatic mode)
- __init__(config, root, pickle_protocol, logging_level, input_spectrum, input_table, input_folder, input_indices, output_folder, output_pattern, input_anchor_pickle, output_anchor_ini, output_plot_folder, output_plot_pattern, par_stretching, par_vicinity, par_smoothing_box, par_smoothing_kernel, par_fwhm, CCF_mask, par_R, par_Rmax, par_reg_nu, mask_telluric, synthetic_spectrum, interpolation, denoising_dist, count_cut_lim, count_out_lim, random_seed)#