Skip to content

Commit 1d48c1a

Browse files
committed
Add documentation
1 parent ff29855 commit 1d48c1a

3 files changed

Lines changed: 46 additions & 16 deletions

File tree

corems/encapsulation/factory/parameters.py

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,36 @@
55
from corems.encapsulation.factory.processingSetting import DataInputSetting
66

77
def reset_ms_parameters():
8-
"""Reset the parameters to the default values"""
8+
"""Reset the MSParameter class to the default values"""
99
MSParameters.molecular_search = MolecularFormulaSearchSettings()
1010
MSParameters.transient = TransientSetting()
1111
MSParameters.mass_spectrum = MassSpectrumSetting()
1212
MSParameters.ms_peak = MassSpecPeakSetting()
1313
MSParameters.data_input = DataInputSetting()
1414

15+
def reset_gcms_parameters():
16+
"""Reset the GCMSParameters class to the default values"""
17+
GCMSParameters.molecular_search = CompoundSearchSettings()
18+
GCMSParameters.gc_ms = GasChromatographSetting()
19+
20+
def reset_lcms_parameters():
21+
"""Reset the LCMSParameters class to the default values"""
22+
LCMSParameters.lc_ms = LiquidChromatographSetting()
23+
LCMSParameters.mass_spectrum = MassSpectrumSetting()
24+
LCMSParameters.ms_peak = MassSpecPeakSetting()
25+
LCMSParameters.ms1_molecular_search = MolecularFormulaSearchSettings()
26+
LCMSParameters.ms2_molecular_search = MolecularFormulaSearchSettings()
27+
1528
class MSParameters:
1629
"""MSParameters class is used to store the parameters used for the processing of the mass spectrum
1730
1831
Each attibute is a class that contains the parameters for the processing of the mass spectrum, see the corems.encapsulation.factory.processingSetting module for more details.
1932
33+
Parameters
34+
----------
35+
use_defaults: bool, optional
36+
if True, the class will be instantiated with the default values, otherwise the current values will be used. Default is False.
37+
2038
Attributes
2139
-----------
2240
molecular_search: MolecularFormulaSearchSettings
@@ -29,6 +47,11 @@ class MSParameters:
2947
MassSpecPeakSetting object
3048
data_input: DataInputSetting
3149
DataInputSetting object
50+
51+
Notes
52+
-----
53+
One can use the use_defaults parameter to reset the parameters to the default values.
54+
Alternatively, to use the current values - modify the class's contents before instantiating the class.
3255
"""
3356

3457
molecular_search = MolecularFormulaSearchSettings()
@@ -56,12 +79,22 @@ class GCMSParameters:
5679
5780
Each attibute is a class that contains the parameters for the processing of the data, see the corems.encapsulation.factory.processingSetting module for more details.
5881
82+
Parameters
83+
----------
84+
use_defaults: bool, optional
85+
if True, the class will be instantiated with the default values, otherwise the current values will be used. Default is False.
86+
5987
Attributes
6088
-----------
6189
molecular_search: MolecularFormulaSearchSettings
6290
MolecularFormulaSearchSettings object
6391
gc_ms: GasChromatographSetting
6492
GasChromatographSetting object
93+
94+
Notes
95+
-----
96+
One can use the use_defaults parameter to reset the parameters to the default values.
97+
Alternatively, to use the current values - modify the class's contents before instantiating the class.
6598
"""
6699

67100
molecular_search = CompoundSearchSettings()
@@ -80,6 +113,11 @@ class LCMSParameters:
80113
81114
Each attibute is a class that contains the parameters for the processing of the data, see the corems.encapsulation.factory.processingSetting module for more details.
82115
116+
Parameters
117+
----------
118+
use_defaults: bool, optional
119+
if True, the class will be instantiated with the default values, otherwise the current values will be used. Default is False.
120+
83121
Attributes
84122
-----------
85123
lc_ms: LiquidChromatographSetting
@@ -92,6 +130,11 @@ class LCMSParameters:
92130
MolecularFormulaSearchSettings object
93131
ms2_molecular_search: MolecularFormulaSearchSettings
94132
MolecularFormulaSearchSettings object
133+
134+
Notes
135+
-----
136+
One can use the use_defaults parameter to reset the parameters to the default values.
137+
Alternatively, to use the current values - modify the class's contents before instantiating the class.
95138
"""
96139
lc_ms = LiquidChromatographSetting()
97140
mass_spectrum = MassSpectrumSetting()

examples/scripts/MSParams_example.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This script demonstrates how to set global parameters and instantiate a mass spectrum object using them
2+
13
from corems.encapsulation.factory.parameters import MSParameters
24
from corems.transient.input.brukerSolarix import ReadBrukerSolarix
35

examples/scripts/TransientSettings_example.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)