-
Notifications
You must be signed in to change notification settings - Fork 6
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
Issue76 improve scan save for qt3scan application #80
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adding cwodmr experimental setup
Add pulsed odmr class
Adds new function to control the qcsapphire. Can now get much smaller RF
Added argparse Uses qt3utils.nidaq to configure data acquisition Adds random test generator
for every data refresh. If scope is too slow and blit is needed, workaround is found in comments
Also, adds similar sized limit above and below min, max values in data array
Improves random trace for testing. Changes default scope width to 250.
Adds animation update option Updates README
side-effects from other programs trying to interact with the NIDAQ) Fixes bug where wrong clock_terminal name was being passed to the edge counter configuration.
Adds introduciton. Updates name changes and prerequisites.
Creates datagenerators submodule - should be used for objects in experiments in future Moves oscilloscope and piezo scan into applications directory
Creates TKinter GUI application for oscilloscope and piezo scan
removes temp folder
removes reset daq calls. reseting the daq would reset all output channels, including analog outputs connected to piezo stage.
fixes issue #7
Adds confocal / piezo scan, although the code to support the demo is not yet complete.
Adds examples from qt3-defaultexperiments (which will be retired)
Also wraps _read_samples in try catch to properly stop and close tasks
Update nidaqdigitalinputratecounter
…tate when no clock is specified. updates docstring
adds new arbitrary pulser. tests okay on scope
…lightly faster on screen update
…fore running a confocal scan
adds line to ignore pycharm settings
Changes interface class to abstract base class. Creates sample_counts, sample_count_rate and yield_count_rate functions in base class. Sample_counts must be implemented by subclasses. sample_counts implemented in RandomRateCounter
…e. This is a somewhat breaking change and will require subsequent changes to other components
Moves common methods to base class. Only a _read_samples method and clock_rate should be implemeneted by subclasses. removes setting .running attribute in subclasses
Allows to be instantiated with an implementation of a RateCounterBase class. RandomRateCounter and NiDaqDigitalInputRateCounter are subclasses. Also, CounterAndScanner must be implemented with a stage_controller object that is a subclass of nipiezojenapy.BaseControl. (This is poor choice, as we should probably define an interface for a scanner and then an implementation that supports nipiezojenapy. This would allow for different scanners to be used in the future. See Issue #79)
(some example notebooks would otherwise break)
Adds compressed numpy multi array (.npz) and hdf5 (.h5). Both the multi-array and hdf5 output hold an array of raw counts, an array of count rates, the scan size as well as the step size of the scan in microns.
gadamc
force-pushed
the
issue76_improve_scan_save
branch
2 times, most recently
from
February 3, 2023 22:01
617a2eb
to
fb669bf
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Vastly improves scan data saving options.
Adds support for h5 and npz (numpy multi array compressed) file formats.
Also, it was desirable to save the raw counts for each point in the scan rather than holding the count rates. With just the
count rates, a poisson standard deviation cannot be computed. The npz and h5 formats contain
raw_counts
- an array of shape [n_rows, n_cols, 1, 2], where for each position in n_rows, n_cols, which represents the y, x position in scan, there is a 1,2 array that contains total_counts, total_clock_samplescount_rate
- an array of shape [n_rows, n_cols], where each position represents the count rate at the location y, xscan_range
- an array holding (x_min, x_max, y_min, y_max) where y_max is the last y value scanned. Values are in microns (though these units are not specified in the files yet)step_size
- an array of size 1 holding the delta between x, y positions (in microns)daq_clock_rate
- an array of size 1 holding the clock frequency of the DAQ deviceOne can compute the count_rate from the raw_counts with the following numpy command
In order to deliver the raw_counts to the qt3scan application (piezoscan.py), a number of changes were made in
the datagenerqators sub package. These changes unified the NIDAQ and Random data generator subclasses so they operate
in the same manner. Additionally, because of this unification and definition of the datagenerators.RateCounterBase class, the piezoscanner.py module was vastly simplified to one class that is instantiated with instances of the subclasses, RateCounterBase and nipiezojenapy.BaseControl. This significantly opens the opportunity to later define different DAQ hardware and stage controller hardware that qt3scan can accept -- thus one can imagine repurposing this application for other hardware. (NB: the current implementation is not perfect, however...see issue #79)