Skip to content

Commit

Permalink
Merge branch 'master' into plotting_update
Browse files Browse the repository at this point in the history
  • Loading branch information
matteopilz authored Jan 17, 2024
2 parents 88e3ac2 + 27dfc2a commit 59dea57
Show file tree
Hide file tree
Showing 9 changed files with 380 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code-blocks-linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v35
uses: tj-actions/changed-files@v41
with:
dir_names_max_depth: 0
files: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v35
uses: tj-actions/changed-files@v41
with:
dir_names_max_depth: 0
files: |
Expand Down
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 59dea57

Please sign in to comment.