Documentation for Molecule
Bases: BaseModel
has_retention_time
property
Checks if the molecule has a retention time defined. And if so, it is assumed that the molecule is present in the chromatogram.
create_standard(areas, concs, conc_unit, ph, temperature, temp_unit='C', visualize=True)
Creates a linear standard from the molecule's calibration data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
areas
|
list[float]
|
The areas of the molecule. |
required |
concs
|
list[float]
|
The concentrations of the molecule. |
required |
conc_unit
|
UnitDefinitionAnnot
|
The unit of the concentration. |
required |
ph
|
float
|
The pH of the solution. |
required |
temperature
|
float
|
The temperature of the solution. |
required |
temp_unit
|
UnitDefinitionAnnot
|
The unit of the temperature. |
'C'
|
visualize
|
bool
|
Whether to visualize the standard. |
True
|
Returns:
Name | Type | Description |
---|---|---|
Calibration |
Calibration
|
The created Calibration instance. |
from_standard(standard, init_conc, conc_unit)
classmethod
Creates a Molecule instance from a Calibration instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
standard
|
Calibration
|
The calibration instance to create the molecule from. |
required |
init_conc
|
float
|
The initial concentration of the molecule. |
required |
conc_unit
|
UnitDefinitionAnnot
|
The unit of the concentration. |
required |
Returns:
Name | Type | Description |
---|---|---|
Molecule |
Molecule
|
The created Molecule instance. |
read_json(path)
classmethod
Creates a Molecule instance from a JSON file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
The path to the JSON file. |
required |
Returns:
Name | Type | Description |
---|---|---|
Molecule |
Molecule
|
The created Molecule instance. |
save_json(path)
Saves the Molecule instance to a JSON file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
The path to the JSON file. |
required |
Returns:
Type | Description |
---|---|
None
|
None |