Skip to content

Update the calibration GUI once per event and show results of table actions - #73

Merged
uellue merged 5 commits into
LiberTEM:mainfrom
uellue:gui-events
Oct 15, 2026
Merged

uellue merged 5 commits into
LiberTEM:mainfrom
uellue:gui-events

Conversation

@uellue

@uellue uellue commented Oct 15, 2026

Copy link
Copy Markdown
Member

Replaces the double update and double push per GUI event with a single update that calls the data callbacks explicitly, and shows results and errors of the table actions in the GUI.

Changes

  • One data update and push per event, see the docstring of update_with_force()
  • Status message next to each table with the fit residual or the error of its actions
  • README describes Model4DSTEM.lambdify() and the numeric example

Behavior changes

  • GUI events are faster, since the UDFs run once instead of twice per event
  • The cross-correlation refinement updates the frames and plots in a notebook
  • Applying a table without points shows an error instead of doing nothing
  • In focus, model changes keep the feature selection on the detector unchanged, as moving the feature does
  • The sections of the GUI are in their order from before the cleanup PR again

Review notes

  • Event handling was tested by hand in a notebook; the tests run without a browser and check the callbacks with a held Bokeh document
  • The layout still moves slightly when a status message appears or disappears

🤖 Generated with Claude Code

uellue and others added 5 commits October 15, 2026 15:39
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… model changes

Changes of the model moved it to the beam center in focus, while a new feature
position left it unchanged. It isn't defined in focus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In a notebook, Panel holds the document and push() only sends the collected
changes, while Bokeh doesn't call on_change callbacks during a hold. The data
was updated twice, during and outside the hold, and pushed twice, the second
time from a thread. Now it is updated and pushed once, and the callbacks are
called explicitly during a hold, see update_with_force().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The instructions keep the plot names from the reorder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Errors only appeared in the log, and the residuals of the fits weren't shown.
The status next to each table disappears on the next change.

Behavior changes:
- Applying a table without points shows an error instead of doing nothing
- The cross-correlation refinement updates the frames and plots in a notebook

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.65%. Comparing base (c991632) to head (2e4f9d1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #73      +/-   ##
==========================================
+ Coverage   96.18%   96.65%   +0.46%     
==========================================
  Files          14       14              
  Lines        2124     2151      +27     
  Branches      191      192       +1     
==========================================
+ Hits         2043     2079      +36     
+ Misses         51       47       -4     
+ Partials       30       25       -5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uellue
uellue merged commit 5331351 into LiberTEM:main Oct 15, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant