optmat.gas.reduction#

From a gas dataset’s printed values to the per-particle polarizability.

A refractivity measured at a stated pressure and temperature, a polarizability in some unit, a molar refractivity or a refractivity per density each imply the per-particle dipole polarizability at their frequency. The conversion needs the number density the source meant (real-gas unless the source reduced with the ideal gas, optmat.gas.eos) and, for a refractivity, Lorentz-Lorenz with the gas’s refractivity virial term (optmat.gas.lorentz_lorenz, optmat.gas.virial).

Module Attributes

POLARIZABILITY_UNITS

Factors from each polarizability unit of the vocabulary to C m^2/V.

Functions

density_at_state(dataset)

Return the number density the source meant at the dataset's state.

polarizability(dataset)

Return the per-particle polarizability each value implies.

polarizability_uncertainty(dataset)

Return the one-sigma uncertainty of polarizability().

refractivity_at(dataset[, state])

Return n - 1 of the real gas at state implied by each value.

optmat.gas.reduction.POLARIZABILITY_UNITS: Final[dict[str, float]] = {'SI': 1.0, 'angstrom3': 1.1126500562018528e-40, 'au': 1.6487772721219234e-41, 'cm3': 1.1126500562018525e-16}#

Factors from each polarizability unit of the vocabulary to C m^2/V.

optmat.gas.reduction.density_at_state(dataset)[source]#

Return the number density the source meant at the dataset’s state.

Parameters:
datasetDataset

A dataset with a state.

Returns:
float

Number density, m^-3: real-gas unless the source reduced with the ideal gas.

Raises:
DataError

If the dataset has no state.

optmat.gas.reduction.polarizability(dataset)[source]#

Return the per-particle polarizability each value implies.

Parameters:
datasetDataset

A dataset of one of POLARIZABILITY_QUANTITIES.

Returns:
numpy.ndarray

Dipole polarizability, C m^2/V.

Raises:
DataError

If the quantity does not determine the polarizability by itself.

optmat.gas.reduction.polarizability_uncertainty(dataset)[source]#

Return the one-sigma uncertainty of polarizability().

Every conversion is linear in the value to within n - 1 (1e-3), so the relative uncertainty carries over.

Parameters:
datasetDataset

A dataset of one of POLARIZABILITY_QUANTITIES.

Returns:
numpy.ndarray

One-sigma uncertainty, C m^2/V; NaN where none is stated.

optmat.gas.reduction.refractivity_at(dataset, state=State(pressure=101325.0, temperature=273.15))[source]#

Return n - 1 of the real gas at state implied by each value.

Parameters:
datasetDataset

A dataset of one of POLARIZABILITY_QUANTITIES.

stateState, optional

The state to evaluate at; 0 degrees C and 1 atm by default.

Returns:
numpy.ndarray

n - 1 from the polarizability by Lorentz-Lorenz at the real-gas density, with the gas’s refractivity virial term.