create_new_measurement

specatalog.crud_db.create.create_new_measurement(data)[source]

Create a new database entry for the measurement table.

The entry is created and the measurement_path is set automatically from the MEASUREMTS_PATH and the measurement-id.

The entry is added and commited.

Parameters:

data (MeasurementModel) – Model from models.creation_pydantic_measurements. The subclass of the model classifies the experement e.g. cwEPR or trEPR.

Raises:

ValueError – A ValueError is raised in case the molecular id is not existent in the data base.

Returns:

measurement – Object from the models.mesurements.Measurement class (=sqalchemy model) the subclass is dependent on the chosen method.

Return type:

Measurement