UVVis
- class specatalog.models.measurements.UVVis(**kwargs)[source]
UVvis measurement.
This subclass of
Measurementrepresents 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 inmeasurementswheremethod='uvvis'is therefore automatically loaded as aUVVisinstance.- id
Primary key linked to
measurements.idwith 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
idcorresponds directly to the entry in the mainmeasurementstable 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'>