Skip to content

Commit

Permalink
Spectramerger sprint (#426)
Browse files Browse the repository at this point in the history
* Spectra Merging part has been added. How to list parameters is added in Parameter Handling section

* Files has been added

* Jihyungs comments addressed

* Linting errors addressed

* Linting errors addressed 2
  • Loading branch information
KyowonJeong authored Jan 11, 2024
1 parent e40c469 commit 27dfc2a
Show file tree
Hide file tree
Showing 7 changed files with 378 additions and 3 deletions.
Binary file added docs/source/user_guide/img/spec_averaging.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/user_guide/img/spec_merging_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/user_guide/img/spec_merging_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/user_guide/img/spec_merging_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/source/user_guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ headings and structure.
smoothing
centroiding
spectrum_normalization
spectrum_merging
charge_isotope_deconvolution
feature_detection
map_alignment
Expand Down
32 changes: 29 additions & 3 deletions docs/source/user_guide/parameter_handling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ The param object can be copy and merge in to other param object as
.. code-block:: python
:linenos:
# print the key and values pairs stored in a Param object
# print the key and value pairs stored in a Param object
def printParamKeyAndValues(p):
if p.size():
for i in p.keys():
print("Key:", i, "Value:", p[i])
else:
print("no data availabe")
print("no data available")
new_p = oms.Param()
Expand All @@ -76,7 +76,6 @@ The param object can be copy and merge in to other param object as
print(" print the key and values pairs stored in a Param object p ")
printParamKeyAndValues(p)
In param object the keys values can be remove by key_name or prefix as

.. code-block:: python
Expand All @@ -100,3 +99,30 @@ In param object the keys values can be remove by key_name or prefix as
print("Keys and values after deleting all entries.")
printParamKeyAndValues(new_p) # All keys of new_p deleted
For the algorithms that inherit :py:class:`~.DefaultParamHandler`, the users can list all parameters along with their descriptions by using, for instance, the following simple function.

.. code-block:: python
:linenos:
# print all parameters
def printParams(p):
if p.size():
for i in p.keys():
print(
"Param:", i, "Value:", p[i], "Description:", p.getDescription(i)
)
else:
print("no data available")
# print all parameters in GaussFilter class
gf = oms.GaussFilter()
printParams(gf.getParameters())
.. code-block:: output
Param: b'gaussian_width' Value: 0.2 Description: Use a gaussian filter width which has approximately the same width as your mass peaks (FWHM in m/z).
Param: b'ppm_tolerance' Value: 10.0 Description: Gaussian width, depending on the m/z position.
The higher the value, the wider the peak and therefore the wider the gaussian.
Param: b'use_ppm_tolerance' Value: false Description: If true, instead of the gaussian_width value, the ppm_tolerance is used. The gaussian is calculated in each step anew, so this is much slower.
Param: b'write_log_messages' Value: false Description: true: Warn if no signal was found by the Gauss filter algorithm.
Loading

0 comments on commit 27dfc2a

Please sign in to comment.