Skip to content

Commit

Permalink
bugfix: lengths of peak_labels and peak_models differ (issue #12)
Browse files Browse the repository at this point in the history
  • Loading branch information
patquem committed Apr 22, 2024
1 parent aebbb52 commit 2bd4e0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fitspy/app/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from threading import Thread
import glob
from pathlib import Path
from copy import deepcopy
import numpy as np

from fitspy.spectra import Spectra
Expand Down Expand Up @@ -215,8 +216,7 @@ def get_ncpus(self, nfiles):
def apply_model(self, model_dict=None, fnames=None, selection=False,
fit_only=False):
""" Apply model to the selected spectra """

model_dict = model_dict or self.model_dict
model_dict = model_dict or deepcopy(self.model_dict)

if model_dict is None:
showerror(message='No model has been loaded')
Expand Down

0 comments on commit 2bd4e0a

Please sign in to comment.