Skip to content

Commit

Permalink
fix: reset user-defined data before preprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Aug 16, 2021
1 parent 7179840 commit b2ed54b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
instead, apply smoothing directly to AFMData subclass
- ref: rename `require_steps` to `steps_required` in preprocessing
decorator
- setup: bump afmformats from 0.16.0 to 0.16.3
- setup: bump afmformats from 0.16.0 to 0.16.4
3.0.0
- BREAKING CHANGE: The contact point estimation method "scheme_2020"
has been removed, although it has been the default for some time.
Expand Down
6 changes: 6 additions & 0 deletions nanite/preproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ class instance. If you are using this class directly and
"Please use 'identifiers' instead of 'preproc_names'!",
DeprecationWarning)
details = {}
# Reset all user-defined data of the dataset, because we
# probably edited "tip position", "force", etc. If this
# is too slow in the future, then we would have to remember
# the previous preprocessing pipeline (such code is currently
# implemented on the other side in `indent.py` (2021-08-16).
apret.reset_data()
for ii, pid in enumerate(identifiers):
if pid in IndentationPreprocessor.available():
meth = IndentationPreprocessor.get_func(pid)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
license="GPL v3",
description=description,
long_description=open('README.rst').read() if exists('README.rst') else '',
install_requires=["afmformats>=0.16.3",
install_requires=["afmformats>=0.16.4",
"h5py>=2.8.0",
"lmfit>=1",
"numpy>=1.16.0", # cython build
Expand Down

0 comments on commit b2ed54b

Please sign in to comment.