Skip to content

Commit

Permalink
Merge pull request #26 from JuBiotech/fix-docs-glitches
Browse files Browse the repository at this point in the history
Fix docs glitches
  • Loading branch information
Y0dler authored Oct 13, 2024
2 parents 1bf693a + ce3eafc commit 0c081d9
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 51 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_static_path: List[str] = []
43 changes: 25 additions & 18 deletions peak_performance/models.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
"""
PeakPerformance
Copyright (C) 2023 Forschungszentrum Jülich GmbH
# PeakPerformance
# Copyright (C) 2023 Forschungszentrum Jülich GmbH

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
This module contains functions for creating various kinds of peak models and to make initial guesses for their parameters.
"""

from enum import Enum
Expand All @@ -28,12 +29,19 @@


class ModelType(str, Enum):
"""Class containing all implemented model types."""
"""Enum of default model types."""

Normal = "normal"
"""Shape of a Gaussian Normal PDF."""

SkewNormal = "skew_normal"
"""Shape of a skewed Normal PDF."""

DoubleNormal = "double_normal"
"""Superposition of two ``Normal`` peaks."""

DoubleSkewNormal = "double_skew_normal"
"""Superposition of two ``SkewedNormal`` peaks."""


def guess_noise(intensity):
Expand Down Expand Up @@ -392,10 +400,9 @@ def std_skew_calculation(scale, alpha):
Skewness parameter of the skew normal distribution.
Returns
----------
-------
std
Standard deviation of a skew normal distribution.
-------
"""
return np.sqrt(scale**2 * (1 - (2 * alpha**2) / ((alpha**2 + 1) * np.pi)))

Expand All @@ -414,7 +421,7 @@ def mean_skew_calculation(loc, scale, alpha):
Skewness parameter of the skew normal distribution.
Returns
----------
-------
mean
Arithmetic mean of a skew normal distribution.
"""
Expand Down Expand Up @@ -488,7 +495,7 @@ def height_calculation(area, loc, scale, alpha, mode_skew):
Mode of the skew normal distribution.
Returns
----------
-------
mean
Arithmetic mean of a skew normal distribution.
"""
Expand Down
39 changes: 20 additions & 19 deletions peak_performance/pipeline.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
"""
PeakPerformance
Copyright (C) 2023 Forschungszentrum Jülich GmbH
# PeakPerformance
# Copyright (C) 2023 Forschungszentrum Jülich GmbH

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Defines steps for a pipeline to process LC-MS-MS data.
"""

import importlib
Expand Down Expand Up @@ -1186,7 +1187,7 @@ def pipeline(
Data format (suffix) of the raw data, default is '.npy'.
Returns
----------
-------
path_results
Path variable pointing to the newly created folder for this batch.
"""
Expand Down Expand Up @@ -1223,7 +1224,7 @@ def pipeline_restart(
Path variable pointing to the directory of the broken PeakPerformance batch
Returns
----------
-------
path_results_new
Path variable pointing to the newly created folder for the restarted batch.
"""
Expand Down Expand Up @@ -1322,7 +1323,7 @@ def parse_files_for_model_selection(signals: pandas.DataFrame) -> Dict[str, str]
DataFrame containing the signals tab of Template.xlsx.
Returns
----------
-------
files_for_selection
Dict with file names as keys and unique identifiers as values.
"""
Expand Down Expand Up @@ -1429,7 +1430,7 @@ def model_selection_check(
to be accepted.
Returns
----------
-------
selected_model
Name of the selected model type.
"""
Expand Down Expand Up @@ -1472,7 +1473,7 @@ def selection_loop(
"waic": widely applicable information criterion)
Returns
----------
-------
result_df
DataFrame containing the ranking and scores of the model selection.
model_dict
Expand Down Expand Up @@ -1564,7 +1565,7 @@ def model_selection(path_raw_data: Union[str, os.PathLike], *, ic: str = "loo"):
"waic": widely applicable information criterion)
Returns
----------
-------
comparison_results
DataFrame containing all rankings from model selection.
model_dict
Expand Down
27 changes: 14 additions & 13 deletions peak_performance/plots.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
"""
PeakPerformance
Copyright (C) 2023 Forschungszentrum Jülich GmbH
# PeakPerformance
# Copyright (C) 2023 Forschungszentrum Jülich GmbH

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Functions for preparing diagnostic and QC plots.
"""

import os
Expand Down

0 comments on commit 0c081d9

Please sign in to comment.