Fixes Issue #76 -- 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_samples
count_rate - an array of shape [n_rows, n_cols], where each position represents the count rate at the location y, x
scan_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 device
One 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)
Fixes Issue #76 -- 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)