Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
rev: v1.19.1
hooks:
- id: mypy
exclude: 'test_.*?\.py$'
Expand Down
56 changes: 28 additions & 28 deletions peak_performance/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,13 @@ def define_model_normal(time: np.ndarray, intensity: np.ndarray) -> pm.Model:
"""
slope_guess, intercept_guess, noise_width_guess = initial_guesses(time, intensity)
with pm.Model() as pmodel:
# add observations to the pmodel as ConstantData
pm.ConstantData("time", time)
pm.ConstantData("intensity", intensity)
# add guesses to the pmodel as ConstantData
pm.ConstantData("intercept_guess", intercept_guess)
pm.ConstantData("slope_guess", slope_guess)
noise_guess = pm.ConstantData("noise_width_guess", noise_width_guess)
# add observations to the pmodel as Data
pm.Data("time", time)
pm.Data("intensity", intensity)
# add guesses to the pmodel as Data
pm.Data("intercept_guess", intercept_guess)
pm.Data("slope_guess", slope_guess)
noise_guess = pm.Data("noise_width_guess", noise_width_guess)

# priors plus error handling in case of mathematically impermissible values
baseline_intercept = pm.Normal(
Expand Down Expand Up @@ -351,13 +351,13 @@ def define_model_double_normal(time: np.ndarray, intensity: np.ndarray) -> pm.Mo
slope_guess, intercept_guess, noise_width_guess = initial_guesses(time, intensity)
coords = {"subpeak": [0, 1]}
with pm.Model(coords=coords) as pmodel:
# add observations to the pmodel as ConstantData
pm.ConstantData("time", time)
pm.ConstantData("intensity", intensity)
# add guesses to the pmodel as ConstantData
pm.ConstantData("intercept_guess", intercept_guess)
pm.ConstantData("slope_guess", slope_guess)
noise_guess = pm.ConstantData("noise_width_guess", noise_width_guess)
# add observations to the pmodel as Data
pm.Data("time", time)
pm.Data("intensity", intensity)
# add guesses to the pmodel as Data
pm.Data("intercept_guess", intercept_guess)
pm.Data("slope_guess", slope_guess)
noise_guess = pm.Data("noise_width_guess", noise_width_guess)

# priors
baseline_intercept = pm.Normal(
Expand Down Expand Up @@ -559,13 +559,13 @@ def define_model_skew(time: np.ndarray, intensity: np.ndarray) -> pm.Model:
"""
slope_guess, intercept_guess, noise_width_guess = initial_guesses(time, intensity)
with pm.Model() as pmodel:
# add observations to the pmodel as ConstantData
pm.ConstantData("time", time)
pm.ConstantData("intensity", intensity)
# add guesses to the pmodel as ConstantData
pm.ConstantData("intercept_guess", intercept_guess)
pm.ConstantData("slope_guess", slope_guess)
noise_guess = pm.ConstantData("noise_width_guess", noise_width_guess)
# add observations to the pmodel as Data
pm.Data("time", time)
pm.Data("intensity", intensity)
# add guesses to the pmodel as Data
pm.Data("intercept_guess", intercept_guess)
pm.Data("slope_guess", slope_guess)
noise_guess = pm.Data("noise_width_guess", noise_width_guess)

# priors plus error handling in case of mathematically impermissible values
baseline_intercept = pm.Normal(
Expand Down Expand Up @@ -675,13 +675,13 @@ def define_model_double_skew_normal(time: np.ndarray, intensity: np.ndarray) ->
slope_guess, intercept_guess, noise_width_guess = initial_guesses(time, intensity)
coords = {"subpeak": [0, 1]}
with pm.Model(coords=coords) as pmodel:
# add observations to the pmodel as ConstantData
pm.ConstantData("time", time)
pm.ConstantData("intensity", intensity)
# add guesses to the pmodel as ConstantData
pm.ConstantData("intercept_guess", intercept_guess)
pm.ConstantData("slope_guess", slope_guess)
noise_guess = pm.ConstantData("noise_width_guess", noise_width_guess)
# add observations to the pmodel as Data
pm.Data("time", time)
pm.Data("intensity", intensity)
# add guesses to the pmodel as Data
pm.Data("intercept_guess", intercept_guess)
pm.Data("slope_guess", slope_guess)
noise_guess = pm.Data("noise_width_guess", noise_width_guess)

# priors plus error handling in case of mathematically impermissible values
baseline_intercept = pm.Normal(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "peak_performance"
version = "0.7.2"
version = "0.7.3"
authors = [
{name = "Jochen Nießer", email = "j.niesser@fz-juelich.de"},
{name = "Michael Osthege", email = "m.osthege@fz-juelich.de"},
Expand Down
Loading