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

#005 adding qdlscan and qdlscope first implementation #10

Merged
merged 24 commits into from
Nov 14, 2024

Conversation

nyama8
Copy link
Contributor

@nyama8 nyama8 commented Nov 1, 2024

This PR includes a basic functional implementation of qdlscan (confocal scanning in 1-d and 2-d) and qdlscope (dynamic SPCM readout). These applications include the basic quality of life features that were requested in issue #5, as well as some requests for the qdlscope application from @NnguyenHTommy.

The general code outline is completely decoupled from the original qt3scan and qt3scope applications. Furthermore it utilizes the new base NIDAQ hardware classes added in PR #8.

Since it is all new, it is advised to test the functions on your systems directly. After this PR we're in a good position to do our base version for forking. I will add new issues for small problems that first-time developers can tackle that remain in the code, but it should be ready for use by the lab.

@nyama8 nyama8 linked an issue Nov 1, 2024 that may be closed by this pull request
Copy link
Member

@ethanqw ethanqw left a comment

Choose a reason for hiding this comment

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

looks good. Tested qdlmove and qdlscope.

Copy link
Member

@NnguyenHTommy NnguyenHTommy left a comment

Choose a reason for hiding this comment

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

Looks really good!

examples/qdlscan/confocal_scan_loader.ipynb Outdated Show resolved Hide resolved
src/qdlutils/applications/qdlscan/main.py Show resolved Hide resolved
src/qdlutils/applications/qdlscan/main.py Show resolved Hide resolved
# Query the controller to stop
self.application_controller.stop_scan = True

def save_scan(self, tkinter_event=None):
Copy link
Member

Choose a reason for hiding this comment

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

make it so that people can change the file type and save to the specified file type

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To clarify the comment here for others: currently the save file function allows the user to select a file format extension (e.g. ".png") and then save the file. However, if one deletes the extension in the file path input before saving then then the script will not automatically append the ".png" again. The desired behavior is that the file type is chosen based off of what the user selects from the dropdown box.

Unfortunately this is not something that is possible with Tkinter (https://stackoverflow.com/questions/45823473/tkinter-return-file-type-from-save-dialogue) the file type selection is merely a filter for the results that are shown to the user in the dialogue box. You cannot get which one was chosen by the user.

The desired behavior could be achieved by disabling any choice the user makes about file type and saving the png and hdf5 in both cases. But this is undesirable since you may not always want to save the image itself.

src/qdlutils/applications/qdlscope/main.py Show resolved Hide resolved
Copy link
Member

@NnguyenHTommy NnguyenHTommy left a comment

Choose a reason for hiding this comment

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

all new changes seem fine

@NnguyenHTommy NnguyenHTommy merged commit 1b4a7a3 into main Nov 14, 2024
@NnguyenHTommy NnguyenHTommy deleted the 005-add-qdlscan branch November 14, 2024 23:12
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.

Bringing qt3scan to parity with Matlab code
3 participants