AbsorptionBands

class pyarts.arts.AbsorptionBands(*args, **kwargs)

A map of QuantumIdentifier to AbsorptionBand

Workspace variables of type AbsorptionBands

Overview

Method

clear()

Remove all items

Method

clear_linemixing()

Clear the linemixing data from all bands by removing it from the inner line shape models

Method

count_lines()

Return the total number of lines

Method

items()

Returns an iterable view of the map’s items.

Method

keep_hitran_s()

Wraps calling percentile_hitran_s followed by remove_hitran_s.

Method

keys()

Returns an iterable view of the map’s keys.

Method

merge()

Merge the other absorption bands into this

Method

percentile_hitran_s()

Map of HITRAN linestrengths at a given percentile

Method

readxml()

Read variable from file

Method

remove_hitran_s()

Removes all lines with a weaker HITRAN-like line strength than those provided by the remove map.

Method

savexml()

Saves variable to file

Method

update()

Update the map with element from arg

Method

values()

Returns an iterable view of the map’s values.

Static Method

fromxml()

Create variable from file

Static Data

pyarts.arts.AbsorptionBands.ItemView

<class ‘pyarts.arts.AbsorptionBands.ItemView’> - nb_type_0

Static Data

pyarts.arts.AbsorptionBands.KeyView

<class ‘pyarts.arts.AbsorptionBands.KeyView’> - nb_type_0

Static Data

pyarts.arts.AbsorptionBands.ValueView

<class ‘pyarts.arts.AbsorptionBands.ValueView’> - nb_type_0

Operator

__contains__()

__contains__(self, arg: object, /) -> bool

Operator

__delitem__()

__delitem__(self, arg: pyarts.arts.QuantumIdentifier, /) -> None

Operator

__eq__()

Return self==value.

Operator

__ge__()

Return self>=value.

Operator

__getitem__()

__getitem__(self, arg: pyarts.arts.lbl.line_key, /) -> float

Operator

__getstate__()

Helper for pickle.

Operator

__gt__()

Return self>value.

Operator

__hash__()

Return hash(self).

Operator

__iter__()

__iter__(self) -> collections.abc.Iterator[pyarts.arts.QuantumIdentifier]

Operator

__le__()

Return self<=value.

Operator

__len__()

__len__(self) -> int

Operator

__lt__()

Return self<value.

Operator

__ne__()

Return self!=value.

Operator

__setitem__()

__setitem__(self, arg0: pyarts.arts.lbl.line_key, arg1: float, /) -> None

Constructors

__init__(self) None
__init__(self, arg: pyarts.arts.AbsorptionBands) None
__init__(self, arg: dict[pyarts.arts.QuantumIdentifier, pyarts.arts.AbsorptionBand], /) None
__init__(self) None
__init__(self, arg: pyarts.arts.AbsorptionBands) None

Overloaded function.

  1. __init__(self) -> None

Default constructor

  1. __init__(self, arg: pyarts.arts.AbsorptionBands) -> None

Copy constructor

  1. __init__(self, arg: dict[pyarts.arts.QuantumIdentifier, pyarts.arts.AbsorptionBand], /) -> None

Construct from a dictionary

  1. __init__(self) -> None

  2. __init__(self, arg: pyarts.arts.AbsorptionBands) -> None

Methods

clear(self) None

Remove all items

clear_linemixing(self) int

Clear the linemixing data from all bands by removing it from the inner line shape models

Returns:

int

Return type:

The number of removed variables

count_lines(self, spec: pyarts.arts.SpeciesEnum = 'AIR') int

Return the total number of lines

items(self) pyarts.arts.AbsorptionBands.ItemView

Returns an iterable view of the map’s items.

keep_hitran_s(self, approximate_percentile: float | collections.abc.Mapping[pyarts.arts.SpeciesEnum, float], T0: float = 296.0) None

Wraps calling percentile_hitran_s followed by remove_hitran_s.

Parameters:
  • percentile (float or dict) – See percentile_hitran_s.

  • T0 (float) – The reference temperature. Defaults to 296.0.

keys(self) pyarts.arts.AbsorptionBands.KeyView

Returns an iterable view of the map’s keys.

merge(self, other: pyarts.arts.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 | collections.abc.Mapping[pyarts.arts.SpeciesEnum, float], T0: float = 296.0) dict[pyarts.arts.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.

Parameters:
  • percentile (float or dict) – The percentile to keep. If a float, the same percentile is used for all species. If a dict, the species are mapped to their respective percentiles. Values must be [0, 100].

  • T0 (float) – The reference temperature. Defaults to 296.0.

readxml(self, file: str) None

Read variable from file

Parameters:

file (str) – A file that can be read

On Error:

Throws RuntimeError for any failure to read

remove_hitran_s(self, remove: collections.abc.Mapping[pyarts.arts.SpeciesEnum, float], T0: float = 296.0) None

Removes all lines with a weaker HITRAN-like line strength than those provided by the remove map.

Parameters:
  • remove (dict) – The species to keep with their respective minimum HITRAN-like line strengths

  • T0 (float) – The reference temperature. Defaults to 296.0.

savexml(self, file: str, type: str = 'ascii', clobber: bool = True) None

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) – Type of file to save. See FileType for options.

  • clobber (bool) – Overwrite existing files or add new file with modified name?

On Error:

Throws RuntimeError for any failure to save

update(self, arg: pyarts.arts.AbsorptionBands, /) None

Update the map with element from arg

values(self) pyarts.arts.AbsorptionBands.ValueView

Returns an iterable view of the map’s values.

Static Methods

fromxml(file: str) pyarts.arts.AbsorptionBands

Create variable from file

Parameters:

file (str) – A file that can be read

On Error:

Throws RuntimeError for any failure to read

Operators

__contains__(self, arg: pyarts.arts.QuantumIdentifier, /) bool
__contains__(self, arg: object, /) bool
__delitem__(self, arg: pyarts.arts.QuantumIdentifier, /) None
__eq__(value, /)

Return self==value.

__ge__(value, /)

Return self>=value.

__getitem__(self, arg: pyarts.arts.QuantumIdentifier, /) pyarts.arts.AbsorptionBand
__getitem__(self, arg: pyarts.arts.lbl.line_key, /) float
__getstate__()

Helper for pickle.

__gt__(value, /)

Return self>value.

__hash__()

Return hash(self).

__iter__(self) collections.abc.Iterator[pyarts.arts.QuantumIdentifier]
__le__(value, /)

Return self<=value.

__len__(self) int
__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

__setitem__(self, arg0: pyarts.arts.QuantumIdentifier, arg1: pyarts.arts.AbsorptionBand, /) None
__setitem__(self, arg0: pyarts.arts.lbl.line_key, arg1: float, /) None