ACID_code.MaskingLines
- class ACID_code.MaskingLines(lines: dict)[source]
A simple class to expose the telluric lines when called in Config. This will help to store telluric lines as a dictionary. With a default itercall to list the line-wise elements, but a dictionary index to also store the width of the line, which can then allow for masking Hydrogen lines with much wider masks.
Sets the lines attribute after validating the input lines dictionary. The format is specified in
Acid.- lines
- get_masks(x, with_names=False) list | dict[source]
Generates masks for the given input array x based on the stored lines and widths.
- Parameters:
x (
array-like) – The input array for which to generate masks.with_names (
bool, optional) – Whether to return a dictionary with line names as keys. Useful if plotting. Default is False.
- Returns:
A list of masks (ie list of 1D mask arrays) or a dictionary of masks keyed by line names.
- Return type:
list | dict
- static validate_lines(input_lines: dict | MaskingLines) dict[source]
Standard method to validate linelist input, the format is quite flexible for convenience, but the output is always a standardised dictionary. See Using your own line masks