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

scanning probe dataclasses and back scan functionality #97

Merged
merged 108 commits into from
Aug 19, 2024

Conversation

qku
Copy link
Contributor

@qku qku commented Sep 8, 2023

Description

Interface

  • add new ScanSettings dataclass to hold all settings of a scanning probe measurement (closes [New Feature] scanning probe toolchain: ScanSettings #90)
  • decorate ScannerChannel, ScannerAxis, ScanConstraints and ScanData with dataclass, replace type checks by type annotations
  • implement new scanning probe dataclass hierarchy: ScanConstraints holds ScannerAxis and ScannerChannel instances, ScanData holds ScanSettings instance, ScanData does not need to hold complete ScanConstraints
  • add checker and clipping methods to ScanConstraints
  • introduce scan_settings attribute to ScanningProbeInterface
  • introduce back scan data and back scan settings getter and setter methods (closes Implement "backscan" functionality with ni interfuse. #63)
  • extend constraints with respect to configurable backward scans: add new enum BackScanCapability

Logic and GUI

  • adapt scanning probe dummy and NI scanning probe interfuse to interface changes
  • remove bool indicators (closes Scanning probe interface still uses boolean indicators for failures etc. #64)
  • refactor scanning probe logic, optimize logic and related GUI modules in preparation for configurable back scans
  • improve scanning probe dummy: new image generator class, more realistic forward and backward scan simulation
  • add widgets to configure back scan resolution and frequency from scanning GUI.
  • add config option to save backward scan data to scanning data logic.
  • improve handling of errors during start of a scan

Motivation and Context

This refactoring was initially motivated by an extension of the scanning probe measurement toolchain to scans which are not confocal/spacial. It was decided later that this is not a good design choice. However, introducing a ScanSettings dataclass allowed to add backward scanning functionality (see #63) and enabled a major refactoring of the entire toolchain towards improved code readability.

How Has This Been Tested?

This was tested with the dummy as well as nidaq hardware. There are unit tests for parts of the dataclasses.

Types of changes

  • Bug fix
  • New feature
  • Breaking change (Causes existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • I have documented my changes in /docs/changelog.md.
  • My change requires additional/updated documentation.
  • I have updated the documentation accordingly.
  • I have added/updated the config example for any module docstrings as necessary.
  • I have checked that the change does not contain obvious errors
    (syntax, indentation, mutable default values, etc.).
  • I have tested my changes using 'Load all modules' on the default dummy configuration.
  • All changed Jupyter notebooks have been stripped of their output cells.

@qku
Copy link
Contributor Author

qku commented Sep 8, 2023

this addresses #90

@qku qku marked this pull request as draft September 11, 2023 09:37
@qku
Copy link
Contributor Author

qku commented Jul 1, 2024

Thank you very much for the detailed feedback @timoML ! I am glad that overall everything works for you. I addressed your feedback in the last four commits. I hope the commit messages speak for themselves. Let me know if you find anything else!

@qku
Copy link
Contributor Author

qku commented Aug 6, 2024

@timoML i tested the current status on a confocal setup with NI card. Everything is working as expected.

@timoML timoML self-requested a review August 7, 2024 07:53
timoML
timoML previously approved these changes Aug 7, 2024
Copy link
Contributor

@timoML timoML left a comment

Choose a reason for hiding this comment

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

I tested it on my setup with a nicard; works fine. Thank you for this big contribution.

Neverhorst
Neverhorst previously approved these changes Aug 12, 2024
@qku
Copy link
Contributor Author

qku commented Aug 19, 2024

@Neverhorst @timoML I merged main again into this branch, resolving the conflicts with the new custom saving nametag. It is ready to merge from my side.

@qku qku requested review from timoML and Neverhorst August 19, 2024 14:18
Copy link
Contributor

@timoML timoML left a comment

Choose a reason for hiding this comment

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

Thanks again, looks good.

@timoML timoML merged commit 461cf48 into Ulm-IQO:main Aug 19, 2024
@qku qku deleted the scan_settings branch August 19, 2024 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants