AbsorptionBands
- class pyarts3.arts.AbsorptionBands(*args, **kwargs)
A map of
QuantumIdentifiertoAbsorptionBandOverview
Method
Remove all items
Method
Clear the linemixing data from all bands by removing it from the inner line shape models
Method
Return the total number of lines
Method
Extend variable from file.
Method
Extract absorption bands for a given species or isotope.
Method
Returns an iterable view of the map’s items.
Method
Keep the frequencies within the specified range
Method
Wraps calling percentile_hitran_s followed by remove_hitran_s.
Method
Returns an iterable view of the map’s keys.
Method
Merge the other absorption bands into this
Method
Map of HITRAN linestrengths at a given percentile
Method
Read variable from file.
Method
Removes all lines with a weaker HITRAN-like line strength than those provided by the remove map.
Method
Saves variable to file.
Method
Computes the line-by-line model absorption in 1/m
Method
Update the map with element from arg
Method
Returns an iterable view of the map’s values.
Static Method
Create variable from file.
Static Data
pyarts3.arts.AbsorptionBands.ItemViewStatic Data
pyarts3.arts.AbsorptionBands.KeyViewStatic Data
pyarts3.arts.AbsorptionBands.ValueViewOperator
__contains__(self, arg: object, /) -> boolOperator
__delitem__(self, arg: pyarts3.arts.QuantumIdentifier, /) -> NoneOperator
Return self==value.
Operator
__format__(self, arg: str, /) -> strOperator
Return self>=value.
Operator
__getitem__(self, arg: pyarts3.arts.lbl.line_key, /) -> floatOperator
Return self>value.
Operator
Return hash(self).
Operator
Overloaded function.
Operator
__iter__(self) -> collections.abc.Iterator[pyarts3.arts.QuantumIdentifier]Operator
Return self<=value.
Operator
__len__(self) -> intOperator
Return self<value.
Operator
Return self!=value.
Operator
__repr__(self) -> strOperator
__setitem__(self, arg0: pyarts3.arts.lbl.line_key, arg1: float, /) -> NoneOperator
__str__(self) -> strConstructors
- __init__(self) None
- __init__(self, arg: AbsorptionBands) None
- __init__(self, arg: dict[QuantumIdentifier, AbsorptionBand], /) None
- __init__(self) None
- __init__(self, arg: AbsorptionBands) None
Overloaded function.
__init__(self) -> None
Default constructor
__init__(self, arg: pyarts3.arts.AbsorptionBands) -> None
Copy constructor
__init__(self, arg: dict[pyarts3.arts.QuantumIdentifier, pyarts3.arts.AbsorptionBand], /) -> None
Construct from a dictionary
__init__(self) -> None__init__(self, arg: pyarts3.arts.AbsorptionBands) -> None
Methods
- clear_linemixing(self) int
Clear the linemixing data from all bands by removing it from the inner line shape models
- Returns:
count – The number of removed variables.
- Return type:
- count_lines(self, spec: SpeciesEnum = 'AIR') int
Return the total number of lines
- extendxml(self, file: str) str
Extend variable from file.
The content of the file is added to the existing variable.
- Parameters:
file (str) – A file that can be read.
- Raises:
RuntimeError – For any failure to read.
- Returns:
file – The file path found (may differ from input due to environment variables).
- Return type:
- extract_species(self, spec: SpeciesEnum | SpeciesIsotope) AbsorptionBands
Extract absorption bands for a given species or isotope.
- Parameters:
vkey (SpeciesEnum or SpeciesIsotope) – The species or isotope to extract
- Returns:
The extracted absorption bands
- Return type:
- keep_frequencies(self, fmin: float = -inf, fmax: float = inf) None
Keep the frequencies within the specified range
- keep_hitran_s(self, approximate_percentile: float | Mapping[SpeciesEnum, float], T0: float = 296.0) None
Wraps calling percentile_hitran_s followed by remove_hitran_s.
- merge(self, other: AbsorptionBands) tuple[int, int]
Merge the other absorption bands into this
If the key in the other absorption bands already exists in this, the lines with the same local quantum numbers are overwritten by those of the other absorption bands.
- Parameters:
other (AbsorptionBands) – The other absorption bands to merge into this
- percentile_hitran_s(self, approximate_percentile: float | Mapping[SpeciesEnum, float], T0: float = 296.0) dict[SpeciesEnum, float]
Map of HITRAN linestrengths at a given percentile
Note
The percentile is approximated by floating point arithmetic on the sorted HITRAN line strenght values.
- readxml(self, file: str) str
Read variable from file.
- Parameters:
file (str) – A file that can be read.
- Raises:
RuntimeError – For any failure to read.
- Returns:
file – The file path found (may differ from input due to environment variables).
- Return type:
- remove_hitran_s(self, remove: Mapping[SpeciesEnum, float], T0: float = 296.0) None
Removes all lines with a weaker HITRAN-like line strength than those provided by the remove map.
- savexml(self, file: str, type: str = 'ascii', clobber: bool = True) str
Saves variable to file.
- Parameters:
file (str) – The path to which the file is written. Note that several of the options might modify the name or write more files.
type (str, optional) – Type of file to save. See
FileTypefor options. Defaults is “ascii”.clobber (bool, optional) – Overwrite existing files or add new file with modified name? Defaults is True.
- Raises:
RuntimeError – For any failure to write.
- Returns:
file – The file saved. May differ from input.
- Return type:
- spectral_propmat(self, f: pyarts3.arts.AscendingGrid, atm: pyarts3.arts.AtmPoint, spec: pyarts3.arts.SpeciesEnum = "AIR", path_point: pyarts3.arts.PropagationPathPoint = [unknown, unknown, 0, 0, 0, 0, 0, 1, 1], abs_ecs_data: pyarts3.arts.LinemixingEcsData = pyarts3.arts.LinemixingEcsData({}), no_negative_absorption: int = 1, **kwargs = {}) PropmatVector
Computes the line-by-line model absorption in 1/m
The method accepts any number of kwargs to be compatible with similar methods for computing the propagation matrix.
- Parameters:
f (AscendingGrid) – Frequency grid [Hz]
atm (AtmPoint) – Atmospheric point
spec (~pyarts3.arts.SpeciesEnum, optional) – Species to use. Defaults to all species.
path_point (~pyarts3.arts.PropagationPathPoint, optional) – The path point. Default is POS [0, 0, 0], LOS [0, 0].
abs_ecs_data (~pyarts3.arts.LinemixingEcsData, optional) – The ECS data. Default is empty.
no_negative_absorption (~pyarts3.arts.Index, optional) – If 1, the absorption is set to zero if it is negative. The default is 1.
- Returns:
spectral_propmat – Propagation matrix by frequency [1/m]
- Return type:
- update(self, arg: AbsorptionBands, /) None
Update the map with element from arg
Static Methods
- fromxml(file: str) AbsorptionBands
Create variable from file.
- Parameters:
file (str) – A file that can be read
- Raises:
RuntimeError – For any failure to read.
- Returns:
artstype – The variable created from the file.
- Return type:
Operators
- __contains__(self, arg: QuantumIdentifier, /) bool
- __contains__(self, arg: object, /) bool
- __delitem__(self, arg: QuantumIdentifier, /) None
- __eq__(value, /)
Return self==value.
- __ge__(value, /)
Return self>=value.
- __getitem__(self, arg: QuantumIdentifier, /) AbsorptionBand
- __getitem__(self, arg: line_key, /) float
- __gt__(value, /)
Return self>value.
- __hash__()
Return hash(self).
- __init__(self) None
- __init__(self, arg: AbsorptionBands) None
- __init__(self, arg: dict[QuantumIdentifier, AbsorptionBand], /) None
- __init__(self) None
- __init__(self, arg: AbsorptionBands) None
Overloaded function.
__init__(self) -> None
Default constructor
__init__(self, arg: pyarts3.arts.AbsorptionBands) -> None
Copy constructor
__init__(self, arg: dict[pyarts3.arts.QuantumIdentifier, pyarts3.arts.AbsorptionBand], /) -> None
Construct from a dictionary
__init__(self) -> None__init__(self, arg: pyarts3.arts.AbsorptionBands) -> None
- __iter__(self) Iterator[QuantumIdentifier]
- __le__(value, /)
Return self<=value.
- __lt__(value, /)
Return self<value.
- __ne__(value, /)
Return self!=value.
- __setitem__(self, arg0: QuantumIdentifier, arg1: AbsorptionBand, /) None
- __setitem__(self, arg0: line_key, arg1: float, /) None
- class pyarts3.arts.AbsorptionBands.ItemView
- class pyarts3.arts.AbsorptionBands.KeyView
- class pyarts3.arts.AbsorptionBands.ValueView