Opacity#

Atom#

dace_query.opacity.atom.Atom: AtomClass = <dace_query.opacity.atom.AtomClass object>#

This is a singleton instance of the AtomClass class.

To use it, simply import it :

from dace_query.opacity import Atom
class dace_query.opacity.atom.AtomClass(dace_instance=None)#

Bases: object

The atom class Use to retrieve atom data from the opacity module.

Tip

An atom instance is already provided, to use it:

from dace_query.opacity import Atom
download(atom, charge, line_list, version, temperature_boundaries, pressure_boundaries, output_directory=None, output_filename=None)#

Download data for a specified atom.

Parameters:
  • atom (str) – The name of the atom to retrieve data from

  • charge (str) – The charge

  • line_list (str) – The line_list / data source

  • version (str) – The version

  • temperature_boundaries (tuple[int, int]) – The temperature boundaries

  • pressure_boundaries (tuple[float, float]) – The pressure boundaries

  • output_directory (Optional[str]) – The directory where files will be saved

  • output_filename (Optional[str]) – The filename for the download

Return type:

None

Returns:

None

Downloading data for a specific atom
from dace_query.opacity import Atom
Atom.download(atom='Lu', charge=0, line_list='Kurucz',version=1.0,temperature_boundaries=(2500, 2600),pressure_boundaries= (-8, -8),output_directory='/tmp',output_filename='test_atom.tar.gz')
get_data(atom, charge, line_list, version, temperature, pressure_exponent, output_format=None)#

Retrieve data from an atom in the chosen format.

All available formats are defined in this section (see Output formats).

Parameters:
  • atom (str) – The atom to retrieve data from

  • charge (str) – The charge

  • line_list (str) – The line list / data source

  • version (str) – The version

  • temperature (int) – The temperature

  • pressure_exponent (float) – The pressure exponent

  • output_format (Optional[str]) – Type of data returns

Returns:

The desired data in the chosen output format

Return type:

dict[str, ndarray] or DataFrame or Table or dict

Getting data for a specific atom
from dace_query.opacity import Atom
values = Atom.get_data(atom='Lu', charge=0, line_list='Kurucz',version=1.0, temperature=2500, pressure_exponent=-8)
get_high_resolution_data(atom, charge, line_list, version, temperature, pressure_exponent, wavenumber_boundaries, output_format=None)#

Retrieve high resolution data from an atom in the chosen format.

All available formats are defined in this section (see Output formats).

Parameters:
  • atom (str) – The atom to retrieve high resolution data from

  • charge (str) – The charge

  • line_list (str) – The line list / data source

  • version (str) – The version

  • temperature (int) – The temperature

  • pressure_exponent (float) – The pressure exponent

  • wavenumber_boundaries (tuple[float, float]) – The range min and max to extract from the binary high resolution file

  • output_format (Optional[str]) – Type of data returns

Returns:

The desired data in the chosen output format

Return type:

dict[str, ndarray] or DataFrame or Table or dict

Getting high resolution data for a specific atom
from dace_query.opacity import Atom
values = Atom.get_high_resolution_data('Lu', 0, 'Kurucz', 1.0, 2500, -8, (1.01, 3.02))
interpolate(atom, charge, line_list, version, interpol_temperatures, output_directory=None, output_filename=None)#

Compute interpolation for an atom.

Parameters:
  • atom (str) – The atom

  • charge (str) – The charge

  • line_list (str) – The line list / data sourcoe

  • version (str) – The version

  • interpol_temperatures (list) – The interpol temperatures

  • output_directory (Optional[str]) – The directory where files will be saved

  • output_filename (Optional[str]) – The filename for the download

Return type:

None

Returns:

None

Interpolating data for a specific atom
from dace_query.opacity import Atom
Atom.interpolate('Lu', 0, 'Kurucz', 1.0, [2510], output_directory='/tmp', output_filename='opacity_atom_interpolate.tar.gz')
query_database(limit=10000, filters=None, sort=None, output_format=None)#

Query the atom database to retrieve data in the chosen format.

Filters and sorting order can be applied to the query via named arguments (see Filtering and sorting).

All available formats are defined in this section (see Output formats).

Parameters:
  • limit (Optional[int]) – Maximum number of rows to return

  • filters (Optional[dict]) – Filters to apply to the query

  • sort (Optional[dict]) – Sort order to apply to the query

  • output_format (Optional[str]) – Type of data returns

Returns:

The desired data in the chosen output format

Return type:

dict[str, ndarray] or DataFrame or Table or dict

Getting all atom data
from dace_query.opacity import Atom
values = Atom.query_database()

Molecule#

dace_query.opacity.molecule.Molecule: MoleculeClass = <dace_query.opacity.molecule.MoleculeClass object>#

This is a singleton instance of the MoleculeClass class.

To use it, simply import it :

from dace_query.opacity import Molecule
class dace_query.opacity.molecule.MoleculeClass(dace_instance=None)#

Bases: object

The molecule class. Use to retrieve data from the molecule module.

Tip

A molecule instance is already provided, to use it:

from dace_query.opacity import Molecule
download(isotopologue, line_list, version, temperature_boundaries, pressure_boundaries, output_directory=None, output_filename=None)#

Download data of a specified molecule from the opacity module.

Parameters:
  • isotopologue (str) – The isotopologue to retrieve data from

  • line_list (str:) – The line list / data source

  • version (str) – The version

  • temperature_boundaries (tuple[int, int]) – The temperature boundaries

  • pressure_boundaries (tuple[float, float]) – The pressure boundaries

  • output_directory (Optional[str]) – The directory where files will be saved

  • output_filename (Optional[str]) – The filename for the download

Return type:

None

Returns:

None

Downloading a specific molecule
from dace_query.opacity import Molecule
Molecule.download('1H2-16O', 'POKAZATEL', 1.0, (2500, 2600), (2.5, 3), output_directory='/tmp', output_filename='test_molecule.tar.gz')
get_data(isotopologue, line_list, version, temperature, pressure_exponent, output_format=None)#

Retrieve data from an isotopologue in the chosen format.

All available formats are defined in this section (see Output formats).

Parameters:
  • isotopologue (str) – The isotopologue to retrieve data from

  • line_list (str) – The line list

  • version (str) – The version

  • temperature (int) – The temperature

  • pressure_exponent (float) – The pressure exponent

  • output_format (Optional[str]) – Type of data returns

Returns:

The desired data in the chosen output format

Return type:

dict[str, ndarray] or DataFrame or Table or dict

Getting data for a specific molecule
from dace_query.opacity import Molecule
values = Molecule.get_data('1H2-16O', 'POKAZATEL', 1.0, 300, -1.33)
get_high_resolution_data(isotopologue, line_list, version, temperature, pressure_exponent, wavenumber_boundaries, output_format=None)#

Retrieve high resolution data from a molecule in the chosen format.

All available formats are defined in this section (see Output formats).

Parameters:
  • isotopologue (str) – The isotopologue to retrieve high resolution data from

  • line_list (str) – The line list

  • version (str) – The version

  • temperature (int) – The temperature

  • pressure_exponent (float) – The pressure exponent

  • wavenumber_boundaries (tuple[float, float]) – The range min and max to extract from the binary high resolution file

  • output_format (Optional[str]) – Type of data returns

Returns:

The desired data in the chosen output format

Return type:

dict[str, ndarray] or DataFrame or Table or dict

Getting high resolution data for a specific molecule
from dace_query.opacity import Molecule
values =  Molecule.get_high_resolution_data('1H2-16O', 'POKAZATEL', 1.0, 300, -1.33, (1.01, 3.02))
interpolate(isotopologue, line_list, version, interpol_temperatures, interpol_pressures, output_directory=None, output_filename=None)#

Compute interpolation for an isotopologue.

Parameters:
  • isotopologue (str) – The isotopologue

  • line_list (str) – The line list / data source

  • version (str) – The version

  • interpol_temperatures (list) – The interpol temperatures

  • interpol_pressures (list) – The interpol pressures

  • output_directory (Optional[str]) – The directory where files will be saved

  • output_filename (Optional[str]) – The filename for the download

Returns:

None

Computing interpolation for a specific molecule
from dace_query.opacity import Molecule
Molecule.interpolate('1H2-16O', 'POKAZATEL', 1.0, [110], [0.4], output_directory='/tmp', output_filename='opacity_molecule_interpolate.tar.gz')
query_database(limit=10000, filters=None, sort=None, output_format=None)#

Query the molecule opacity database to retrieve data in the chosen format.

Filters and sorting order can be applied to the query via named arguments (see Filtering and sorting).

All available formats are defined in this section (see Output formats).

Parameters:
  • limit (Optional[int]) – Maximum number of rows to return

  • filters (Optional[dict]) – Filters to apply to the query

  • sort (Optional[dict]) – Sort order to apply to the query

  • output_format (Optional[str]) – Type of data returns

Returns:

The desired data in the chosen output format

Return type:

dict[str, ndarray] or DataFrame or Table or dict

Getting all data from the molecule database
from dace_query.opacity import Molecule
values = Molecule.query_database()