pyrad.lbl.tips module

exception pyrad.lbl.tips.MoleculeNotFound[source]

Bases: Exception

class pyrad.lbl.tips.TotalPartitionFunction(molecule, database=None)[source]

Bases: object

Total partition function, using data from TIPS 2017 (doi: 10.1016/j.jqsrt.2017.03.045).

data

Numpy array of total partition function values (isotopologue, temperature).

molecule

Molecule chemical formula.

temperature

Numpy array of temperatures [K].

create_database(database)[source]

Creates/ingests data into a SQLite database.

Parameters

database – Path to SQLite database that will be create/added to.

download_from_web()[source]

Downloads the data from the internet.

property isotopologue
load_from_database(database)[source]

Loads data from a previously created SQLite database.

Parameters

database – Path to SQLite database.

parse_records(records)[source]

Parses all database records and stores the data.

Parameters

records – A list of iterable database record values.

read_from_dataset(path)[source]

Reads in total partition function table.

Parameters

path – Path to input file.

static records(response, molecule)[source]

Parses the HTTP table for all records related to the input molecule.

Parameters
  • response – A http.client.HTTPResponse object.

  • molecule – Molecule id.

Yields

A list of floats from a record from the http table.

Raises

MoleculeNotFound – Failed to find the input molecule.

total_partition_function(temperature, isotopologue)[source]

Interpolates the total partition function values from the TIPS 2017 table.

Parameters
  • temperature – Temperature [K].

  • isotopologue – Isotopologue id.

Returns

Total partition function.

write_to_netcdf(path)[source]

Writes data to a netCDF dataset.

Parameters

path – Name of the netCDF4 file that will be created.