UVVis

class specatalog.models.measurements.UVVis(**kwargs)[source]

UVvis measurement.

This subclass of Measurement represents an UVvis experiment. This model adds the UVvis-specific parameter dim_cuvette.

The model participates in SQLAlchemy polymorphism using the "uvvis" polymorphic_identity. Any row in measurements where method='uvvis' is therefore automatically loaded as a UVVis instance.

id

Primary key linked to measurements.id with cascading delete.

Type:

int

dim_cuvette

Dimension of the cuvette.

Type:

str

Notes

  • The tablename is uvvis.

  • All shared measurement metadata (temperature, solvent, operator, timestamps, file path, etc.) are inherited from Measurement.

  • The id corresponds directly to the entry in the main measurements table via single-table inheritance.

Examples

Creating an UVvis measurement:

>>> from measurements import UVVis
>>> from molecules import Molecule
>>> mol = Molecule(name="PDI-TEMPO")
>>> m = UVVis(
...     molecule=mol,
...     method="uvvis",
...     temperature=298,
...     solvent="Toluene",
...     date=date(2025, 4, 12),
...     measured_by="Bob",
...     path="/data/M21/measurement_M21.h5",
...     corrected=False,
...     evaluated=False,
...     dim_cuvette = "1cm"
... )
>>> session.add(m)
>>> session.commit()

Loading via polymorphism:

>>> m = session.query(Measurement).filter_by(id=21).one()
>>> type(m)
<class 'models.UVVis'>