Skip to content

Commit

Permalink
fix: check for identical label when updating parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Jan 4, 2022
1 parent 11ab446 commit f079a78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
0.11.1
- fix: check for identical label when updating parameters
(previously, a parameter that starts with the label of another
parameter got assigned the wrong boundaries)
- enh: allow to hide model parameters via key names (#20)
- enh: show hidden parameters in developer mode
- ref: code-cleanup and simplification using latest nanite version
Expand Down
4 changes: 3 additions & 1 deletion pyjibe/fd/tab_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,10 @@ def fit_parameters(self):
hrname = model.parameter_names[ii]
si_unit = model.parameter_units[ii]
scale = units.hrscale(hrname, si_unit=si_unit)
label = units.hrscname(hrname, si_unit=si_unit)
for rr in range(itab.rowCount()):
# search for a row matching the parameter `p`
if itab.verticalHeaderItem(rr).text().startswith(hrname):
if itab.verticalHeaderItem(rr).text() == label:
# update parameter `p`
state = itab.item(rr, 0).checkState()
if state == QtCore.Qt.Unchecked:
Expand All @@ -322,6 +323,7 @@ def fit_update_parameters(self, fdist):
"""Update the ancillary and initial parameters in the UI"""
dev_mode = bool(int(self.settings.value("developer mode", "0")))
model_key = self.fit_model.model_key

# set the model
# - resets params_initial if model changed
# - important for computing ancillary parameters
Expand Down

0 comments on commit f079a78

Please sign in to comment.