Skip to content

Create Overview Scan panel from WideFieldAcquisition.py - #66

Draft
lizziewylie wants to merge 33 commits into
nion-software:masterfrom
lizziewylie:overview_scan_panel
Draft

lizziewylie wants to merge 33 commits into
nion-software:masterfrom
lizziewylie:overview_scan_panel

Conversation

@lizziewylie

@lizziewylie lizziewylie commented Sep 1, 2026 •

Copy link
Copy Markdown

Fixes #69

@CLAassistant

CLAassistant commented Sep 1, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cmeyer cmeyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor drive-by comments. I'm aware this is draft, btw.

Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
@lizziewylie lizziewylie self-assigned this Sep 4, 2026

@cmeyer cmeyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm only adding review for coding style, not for functionality or general algorithm logic.

Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread mypy.ini Outdated

@Brow71189 Brow71189 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I haven't tried it, just a comment from reading through the code inline below. Apart from that it looks fine.

Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated

@MattRoyle MattRoyle left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mostly pedantic. Main bits are suggesting that the exporting is done via existing export functionality rather than introducing a new library dependency PIL. The UI line edit handling is done on a per function basis, converting to integers, exiting early if the value is too large. I think using Converters in tandem with property getters and setters would make the code more readable.

Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated

@MattRoyle MattRoyle left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Some issues with the defocus logic and how wide this panel appears.

Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated
display = data_item.display
display.display_type = "image"
display_item = display._display_item
data_path = pathlib.Path(r"C:\AS2\AS2User\Pictures\overview-scan.jpg")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If this path already exists then this will override the previous file. It might be useful to allow the flexibility of a UI to name the file with it defaulting to overview-scan with an index incremented to avoid duplicate names overview-scan(1). This way you can switch back to a previous scan without rerunning. In order to properly achieve this you would also need to save the properties json to a file. Then provide a user interface for reloading previously taken overview scans. I think that would be useful but probably something for a follow up.

Comment thread nionswift_plugin/nion_experimental_tools/overview_scan_panel.py Outdated

This branch has not been deployed

No deployments
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.

Add a panel to perform WideFieldAcquisition.py script functionality

5 participants