Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integer sigma in multi-broadening functions #35

Merged
merged 1 commit into from
Jul 27, 2023
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
4 changes: 2 additions & 2 deletions src/aiida_vibroscopy/utils/broadenings.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def multilorentz(x_range: np.ndarray, peaks: list[float], intensities: list[floa
raise ValueError("length of `gammas` and `peaks` doesn't match")
sigmas = deepcopy(gammas)
else:
sigmas = float(gammas)
sigmas = [float(gammas) for _ in peaks]

if len(intensities) != len(peaks):
raise ValueError("length of `intensities` and `peaks` doesn't match")
Expand Down Expand Up @@ -164,7 +164,7 @@ def multilvoigt(
raise ValueError("length of `gammas_lorentz` and `peaks` doesn't match")
sigmas = deepcopy(gammas_lorentz)
else:
sigmas = float(gammas_lorentz)
sigmas = [float(gammas_lorentz) for _ in peaks]

if len(intensities) != len(peaks):
raise ValueError("length of `intensities` and `peaks` doesn't match")
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_broadening.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _generate_lorentz_inputs(multi=False):
x_range = np.arange(0, 100, 0.1)
peak = 50.0
intensity = 1.0
sigma = 10.0
sigma = 10

if multi:
peak = [20.0, 30.0, 40.0]
Expand Down
Loading