Skip to content

Commit

Permalink
enh: only show exact sneddon model sneddon_spher in developer mode
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Aug 1, 2021
1 parent 87a4acc commit 9797af5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.9.4
- enh: only show exact sneddon model "sneddon_spher" in developer
mode to avoid confusion
0.9.3
- fix: possible fix for TypeError in InfDoubleSpinBox
- setup: bump afmformats from 0.14.3 to 0.15.0 as well as
Expand Down
5 changes: 5 additions & 0 deletions docs/sec_interface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,8 @@ Under *Edit | Developer mode*, you can enable developer mode which will:
`afmformats #15 <https://github.com/AFM-analysis/afmformats/issues/15>`_.
- Slow down loading of large datasets (because the modality has to be
determined first).
- Add the force-distance fitting model :ref:`sneddon_spher
<nanite:sec_ref_model_sneddon_spher>` to the list of available fit models
(it is excluded by default, because it is virtually identical to the
:ref:`sneddon_spher_approx <nanite:sec_ref_model_sneddon_spher_approx>`
model which is much faster).
5 changes: 5 additions & 0 deletions pyjibe/fd/tab_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ def __init__(self, *args, **kwargs):
id_para = 0
# Model selection
models_av = list(nmodel.models_available.keys())
# Exact spherical model is only available in developer mode
settings = QtCore.QSettings()
settings.setIniCodec("utf-8")
if not bool(int(settings.value("developer mode", "0"))):
models_av.remove("sneddon_spher")
models_av.sort(key=lambda x: nmodel.models_available[x].model_name)
for ii, key in enumerate(models_av):
model = nmodel.models_available[key]
Expand Down

0 comments on commit 9797af5

Please sign in to comment.