ACID_code.LineList
- class ACID_code.LineList(ll: dict)[source]
A class to expose the linelist when called in Data. Has validation methods and easy indexing for plotting and other uses.
- ll
- static validate_linelist(linelist) tuple[ndarray, ndarray][source]
Validates the linelist according to the description in
Acid, and returns the linelist wavelengths and depths as numpy arrays. This is used internally in the set_linelist method.
- static drop_invalid_lines(wavelengths: ACID_code.Array1D, depths: ACID_code.Array1D, return_mask: bool = False, verbose: IntLike | bool | str = None) tuple[source]
Removes NaN, non-finite, negative, and greater than 1 values from the wavelengths and depths arrays. This is used internally in the set_linelist method.
- Parameters:
wavelengths (
np.ndarray) – The array of linelist wavelengths.depths (
np.ndarray) – The array of linelist depths.return_mask (
bool, optional) – If True, also returns the boolean mask of valid lines. Default is False.verbose (
int,bool, orstr, optional) – The verbosity level for printing warnings about dropped lines. Same format asAcid. Default is 2 as per config defaults.
- Returns:
If return_mask is True, returns a tuple of (wavelengths, depths, mask). Otherwise, returns a tuple of (wavelengths, depths) with invalid lines removed.
- Return type:
tupleornp.ndarray