Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save GUI state with snapped images #279

Merged
merged 6 commits into from
Dec 1, 2022
Merged

Save GUI state with snapped images #279

merged 6 commits into from
Dec 1, 2022

Conversation

ziw-liu
Copy link
Contributor

@ziw-liu ziw-liu commented Nov 16, 2022

Resolves #262.

@ziw-liu ziw-liu self-assigned this Nov 16, 2022
@ziw-liu ziw-liu added the enhancement New feature or request label Nov 16, 2022
@ziw-liu ziw-liu added this to the 0.3.0 milestone Nov 16, 2022
@deprecated-napari-hub-preview-bot
Copy link

deprecated-napari-hub-preview-bot bot commented Nov 16, 2022

Preview page for your plugin is ready here:
https://preview.napari-hub.org/mehta-lab/recOrder/279
Updated: 2022-11-18T18:00:31.822881

@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2022

Codecov Report

Merging #279 (86f9a37) into main (d91889a) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

❗ Current head 86f9a37 differs from pull request most recent head 4d4857f. Consider uploading reports for the commit 4d4857f to get more accurate results

@@           Coverage Diff            @@
##            main    #279      +/-   ##
========================================
- Coverage   4.37%   4.36%   -0.02%     
========================================
  Files         22      22              
  Lines       4979    4992      +13     
========================================
  Hits         218     218              
- Misses      4761    4774      +13     
Impacted Files Coverage Δ
recOrder/acq/acquisition_workers.py 0.00% <0.00%> (ø)
recOrder/calib/calibration_workers.py 0.00% <0.00%> (ø)
recOrder/plugin/main_widget.py 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ziw-liu ziw-liu marked this pull request as ready for review November 17, 2022 17:47
@talonchandler
Copy link
Collaborator

When I acquired a background I received:
AttributeError: 'MainWidget' object has no attribute 'phase_regularizer'
because phase_regularizer hadn't been created yet.

I added a one-line fix calling enter_phase_denoiser in the main_widget constructor.

@talonchandler
Copy link
Collaborator

talonchandler commented Nov 18, 2022

@Soorya19Pradeep @edyoshikun this PR addresses one of the issues we've run into recently: what parameters did you choose in recOrder when you acquired and reconstructed an image?

Our solution for 0.3.0 is to save a gui_state.yml file with each acquisition. Here's an example of one of these files:

Run Calibration:
  Swing: 0.1
  Wavelength: 532
  Illumination Scheme: 4-State
  Calibration Mode: MM-Voltage
  Config Group: Channel
Capture Background:
  Background Folder Name: BG
  Number of Images to Average: 5
Acquisition Settings:
  Z Start: -10.0
  Z End: 10.0
  Z Step: 1.0
  Acquisition Mode: 2D
  BF Channel: BF
General Reconstruction Settings:
  Background Correction: None
  Background Path: C:\Users\LabelFree
  Wavelength: 532
  Objective NA: 1.3
  Condenser NA: 0.5
  Camera Pixel Size: 6.9
  RI of Objective Media: 1.3
  Magnification: 60.0
  Orientation Offset: false
Phase Reconstruction Settings:
  Z Padding: 0
  Regularizer: Tikhonov
  Strength: 0.0001

Any comments @edyoshikun @Soorya19Pradeep? Does this solve most of the issues we've encountered?

This solution is a stop-gap on the way to 1.0.0 where we are aiming for the complete reconstruction to be exactly reproducible very quickly. For now, we think it's important to save the GUI state so that you can modify recOrder scripts.

Copy link
Collaborator

@talonchandler talonchandler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works really well...and I've received positive feedback from in-person conversations. Merging now...

@talonchandler talonchandler merged commit 4d94480 into main Dec 1, 2022
@talonchandler talonchandler deleted the save-gui-state branch December 1, 2022 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GUI state is not saved with data
3 participants