Skip to content

Commit

Permalink
reg: explicitly reset the fit properties when applying preprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Aug 16, 2021
1 parent e89a20b commit 94885fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nanite/indent.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ def apply_preprocessing(self, preprocessing=None, options=None,
or (not self._preprocessing_details and ret_details)):
# Remember initial fit parameters for user convenience
fp = self.fit_properties
# Reset fit properties
fp.reset()
# Set preprocessing options
fp["preprocessing"] = preprocessing
fp["preprocessing_options"] = options
# Reset rating
Expand All @@ -96,8 +99,6 @@ def apply_preprocessing(self, preprocessing=None, options=None,
# make sure the fitting axes are defined
if ax in fp and not fp[ax] in self:
fp.pop(ax)
# Set new fit properties
self.fit_properties = fp

# remember preprocessing
self.preprocessing = preprocessing
Expand Down

0 comments on commit 94885fd

Please sign in to comment.