opendrift.models.openoil.adios.models.common.measurement
Generic Measurement Types
These are structures that handle an individual measurment:
They have a value, a unit type and a unit.
They can be converted to other units if need be.
They can accommodate a single value, or a range of values
They can also accommodate a standard deviation and number of replicates.
Module Contents
Classes
Data structure to hold a value with a unit |
|
This is a type for data with no unit at all. |
|
This is a type that can be converted to generic fractional amounts, |
|
Data structure to hold a value with a unit |
|
Data structure to hold a value with a unit |
|
Data structure to hold a value with a unit |
|
Data structure to hold a value with a unit |
|
Data structure to hold a value with a unit |
|
Data structure to hold a value with a unit |
|
This is a type for data that could be any unit_type |
|
Data structure to hold a value with a unit |
|
Data structure to hold a value with a unit |
|
Data structure to hold a value with a unit |
|
Data structure to hold a value with a unit |
|
Data structure to hold a value with a unit |
|
Data structure to hold a value with a unit |
|
Data structure to hold a value with a unit |
- class opendrift.models.openoil.adios.models.common.measurement.Temperature[source]
Bases:
MeasurementBase
Data structure to hold a value with a unit
This accommodates both a single value and a range of values
There is some complexity here, so everything is optional
NOTE: another reason for everything to be optional is that when working with the web client, empty measurements can be created and saved before the values are filled in.
- NOTES:
If there is a value, there should be no min_value or max_value If there is only a min or max, then it is interpreted as greater than or less than
There needs to be validation on that!
Fixme: maybe there could be a default unit for each unit type?
- unit_type = 'temperature'
- fixCK = False
- __post_init__()[source]
this here so that it can get overidden in subclasses
it appears dataclasses don’t add it to __init__ unless it’s here
- convert_to(new_unit)[source]
Convert this Measurement object to the specified new unit
The object is mutated in place.
If the conversion can not be performed, an Exception will be raised, and the object not altered.
This will also return the object (self) – but that is a deprecated feature – do not use it!
If you want a new object, use converted_to instead
- class opendrift.models.openoil.adios.models.common.measurement.Unitless[source]
Bases:
MeasurementBase
This is a type for data with no unit at all.
- unit_type = 'unitless'
- convert_to(*args, **kwargs)[source]
Convert this Measurement object to the specified new unit
The object is mutated in place.
If the conversion can not be performed, an Exception will be raised, and the object not altered.
This will also return the object (self) – but that is a deprecated feature – do not use it!
If you want a new object, use converted_to instead
- class opendrift.models.openoil.adios.models.common.measurement.Dimensionless[source]
Bases:
MeasurementBase
This is a type that can be converted to generic fractional amounts, but does not refer to a particular measurable quantity.
- unit_type = 'dimensionless'
- class opendrift.models.openoil.adios.models.common.measurement.Time[source]
Bases:
MeasurementBase
Data structure to hold a value with a unit
This accommodates both a single value and a range of values
There is some complexity here, so everything is optional
NOTE: another reason for everything to be optional is that when working with the web client, empty measurements can be created and saved before the values are filled in.
- NOTES:
If there is a value, there should be no min_value or max_value If there is only a min or max, then it is interpreted as greater than or less than
There needs to be validation on that!
Fixme: maybe there could be a default unit for each unit type?
- unit_type = 'time'
- class opendrift.models.openoil.adios.models.common.measurement.Length[source]
Bases:
MeasurementBase
Data structure to hold a value with a unit
This accommodates both a single value and a range of values
There is some complexity here, so everything is optional
NOTE: another reason for everything to be optional is that when working with the web client, empty measurements can be created and saved before the values are filled in.
- NOTES:
If there is a value, there should be no min_value or max_value If there is only a min or max, then it is interpreted as greater than or less than
There needs to be validation on that!
Fixme: maybe there could be a default unit for each unit type?
- unit_type = 'length'
- class opendrift.models.openoil.adios.models.common.measurement.Mass[source]
Bases:
MeasurementBase
Data structure to hold a value with a unit
This accommodates both a single value and a range of values
There is some complexity here, so everything is optional
NOTE: another reason for everything to be optional is that when working with the web client, empty measurements can be created and saved before the values are filled in.
- NOTES:
If there is a value, there should be no min_value or max_value If there is only a min or max, then it is interpreted as greater than or less than
There needs to be validation on that!
Fixme: maybe there could be a default unit for each unit type?
- unit_type = 'mass'
- class opendrift.models.openoil.adios.models.common.measurement.Concentration[source]
Bases:
MeasurementBase
Data structure to hold a value with a unit
This accommodates both a single value and a range of values
There is some complexity here, so everything is optional
NOTE: another reason for everything to be optional is that when working with the web client, empty measurements can be created and saved before the values are filled in.
- NOTES:
If there is a value, there should be no min_value or max_value If there is only a min or max, then it is interpreted as greater than or less than
There needs to be validation on that!
Fixme: maybe there could be a default unit for each unit type?
- unit_type = 'concentration'
- class opendrift.models.openoil.adios.models.common.measurement.MassFraction[source]
Bases:
MeasurementBase
Data structure to hold a value with a unit
This accommodates both a single value and a range of values
There is some complexity here, so everything is optional
NOTE: another reason for everything to be optional is that when working with the web client, empty measurements can be created and saved before the values are filled in.
- NOTES:
If there is a value, there should be no min_value or max_value If there is only a min or max, then it is interpreted as greater than or less than
There needs to be validation on that!
Fixme: maybe there could be a default unit for each unit type?
- unit_type = 'massfraction'
- class opendrift.models.openoil.adios.models.common.measurement.VolumeFraction[source]
Bases:
MeasurementBase
Data structure to hold a value with a unit
This accommodates both a single value and a range of values
There is some complexity here, so everything is optional
NOTE: another reason for everything to be optional is that when working with the web client, empty measurements can be created and saved before the values are filled in.
- NOTES:
If there is a value, there should be no min_value or max_value If there is only a min or max, then it is interpreted as greater than or less than
There needs to be validation on that!
Fixme: maybe there could be a default unit for each unit type?
- unit_type = 'volumefraction'
- class opendrift.models.openoil.adios.models.common.measurement.AnyUnit(*args, **kwargs)[source]
Bases:
MeasurementBase
This is a type for data that could be any unit_type
- class opendrift.models.openoil.adios.models.common.measurement.Density[source]
Bases:
MeasurementBase
Data structure to hold a value with a unit
This accommodates both a single value and a range of values
There is some complexity here, so everything is optional
NOTE: another reason for everything to be optional is that when working with the web client, empty measurements can be created and saved before the values are filled in.
- NOTES:
If there is a value, there should be no min_value or max_value If there is only a min or max, then it is interpreted as greater than or less than
There needs to be validation on that!
Fixme: maybe there could be a default unit for each unit type?
- unit_type = 'density'
- class opendrift.models.openoil.adios.models.common.measurement.DynamicViscosity[source]
Bases:
MeasurementBase
Data structure to hold a value with a unit
This accommodates both a single value and a range of values
There is some complexity here, so everything is optional
NOTE: another reason for everything to be optional is that when working with the web client, empty measurements can be created and saved before the values are filled in.
- NOTES:
If there is a value, there should be no min_value or max_value If there is only a min or max, then it is interpreted as greater than or less than
There needs to be validation on that!
Fixme: maybe there could be a default unit for each unit type?
- unit_type = 'dynamicviscosity'
- class opendrift.models.openoil.adios.models.common.measurement.KinematicViscosity[source]
Bases:
MeasurementBase
Data structure to hold a value with a unit
This accommodates both a single value and a range of values
There is some complexity here, so everything is optional
NOTE: another reason for everything to be optional is that when working with the web client, empty measurements can be created and saved before the values are filled in.
- NOTES:
If there is a value, there should be no min_value or max_value If there is only a min or max, then it is interpreted as greater than or less than
There needs to be validation on that!
Fixme: maybe there could be a default unit for each unit type?
- unit_type = 'kinematicviscosity'
- class opendrift.models.openoil.adios.models.common.measurement.Pressure[source]
Bases:
MeasurementBase
Data structure to hold a value with a unit
This accommodates both a single value and a range of values
There is some complexity here, so everything is optional
NOTE: another reason for everything to be optional is that when working with the web client, empty measurements can be created and saved before the values are filled in.
- NOTES:
If there is a value, there should be no min_value or max_value If there is only a min or max, then it is interpreted as greater than or less than
There needs to be validation on that!
Fixme: maybe there could be a default unit for each unit type?
- unit_type = 'pressure'
- class opendrift.models.openoil.adios.models.common.measurement.NeedleAdhesion[source]
Bases:
MeasurementBase
Data structure to hold a value with a unit
This accommodates both a single value and a range of values
There is some complexity here, so everything is optional
NOTE: another reason for everything to be optional is that when working with the web client, empty measurements can be created and saved before the values are filled in.
- NOTES:
If there is a value, there should be no min_value or max_value If there is only a min or max, then it is interpreted as greater than or less than
There needs to be validation on that!
Fixme: maybe there could be a default unit for each unit type?
- unit_type = 'needleadhesion'
- class opendrift.models.openoil.adios.models.common.measurement.InterfacialTension[source]
Bases:
MeasurementBase
Data structure to hold a value with a unit
This accommodates both a single value and a range of values
There is some complexity here, so everything is optional
NOTE: another reason for everything to be optional is that when working with the web client, empty measurements can be created and saved before the values are filled in.
- NOTES:
If there is a value, there should be no min_value or max_value If there is only a min or max, then it is interpreted as greater than or less than
There needs to be validation on that!
Fixme: maybe there could be a default unit for each unit type?
- unit_type = 'interfacialtension'
- class opendrift.models.openoil.adios.models.common.measurement.AngularVelocity[source]
Bases:
MeasurementBase
Data structure to hold a value with a unit
This accommodates both a single value and a range of values
There is some complexity here, so everything is optional
NOTE: another reason for everything to be optional is that when working with the web client, empty measurements can be created and saved before the values are filled in.
- NOTES:
If there is a value, there should be no min_value or max_value If there is only a min or max, then it is interpreted as greater than or less than
There needs to be validation on that!
Fixme: maybe there could be a default unit for each unit type?
- unit_type = 'angularvelocity'