Qudi
|
This logic module gathers data from a hardware counting device. More...
Public Member Functions | |
def | __init__ (self, config, kwargs) |
Create CounterLogic object with connectors. More... | |
def | on_activate (self) |
Initialisation performed during activation of the module. | |
def | on_deactivate (self) |
Deinitialisation performed during deactivation of the module. | |
def | get_hardware_constraints (self) |
Retrieve the hardware constrains from the counter device. More... | |
def | set_counting_samples (self, samples=1) |
def | set_count_length (self, length=300) |
Sets the time trace in units of bins. More... | |
def | set_count_frequency (self, frequency=50) |
Sets the frequency with which the data is acquired. More... | |
def | get_count_length (self) |
Returns the currently set length of the counting array. More... | |
def | get_count_frequency (self) |
Returns the currently set frequency of counting (resolution). More... | |
def | get_counting_samples (self) |
Returns the currently set number of samples counted per readout. More... | |
def | get_saving_state (self) |
Returns if the data is saved in the moment. More... | |
def | start_saving (self, resume=False) |
def | save_data (self, to_file=True, postfix='') |
Save the counter trace data and writes it to a file. More... | |
def | draw_figure (self, data) |
Draw figure to save with data file. More... | |
def | set_counting_mode (self, mode='CONTINUOUS') |
Set the counting mode, to change between continuous and gated counting. More... | |
def | get_counting_mode (self) |
Retrieve the current counting mode. More... | |
def | startCount (self) |
This is called externally, and is basically a wrapper that redirects to the chosen counting mode start function. More... | |
def | stopCount (self) |
Set a flag to request stopping counting. | |
def | count_loop_body (self) |
This method gets the count data from the hardware for the continuous counting mode (default). More... | |
def | save_current_count_trace (self, name_tag='') |
The currently displayed counttrace will be saved. More... | |
def | get_channels (self) |
Shortcut for hardware get_counter_channels. More... | |
Public Attributes | |
threadlock | |
countdata | |
countdata_smoothed | |
rawdata | |
stopRequested | |
Static Public Attributes | |
sigCounterUpdated = QtCore.Signal() | |
sigCountDataNext = QtCore.Signal() | |
sigGatedCounterFinished = QtCore.Signal() | |
sigGatedCounterContinue = QtCore.Signal(bool) | |
sigCountingSamplesChanged = QtCore.Signal(int) | |
sigCountLengthChanged = QtCore.Signal(int) | |
sigCountFrequencyChanged = QtCore.Signal(float) | |
sigSavingStatusChanged = QtCore.Signal(bool) | |
sigCountStatusChanged = QtCore.Signal(bool) | |
sigCountingModeChanged = QtCore.Signal(CountingMode) | |
counter1 = Connector(interface='SlowCounterInterface') | |
declare connectors | |
savelogic = Connector(interface='SaveLogic') | |
This logic module gathers data from a hardware counting device.
sigCounterUpdate: there is new counting data available sigCountContinuousNext: used to simulate a loop in which the data acquisition runs. sigCountGatedNext: ???
def counter_logic.CounterLogic.__init__ | ( | self, | |
config, | |||
kwargs | |||
) |
Create CounterLogic object with connectors.
dict | config: module configuration |
dict | kwargs: optional parameters |
def counter_logic.CounterLogic.count_loop_body | ( | self | ) |
This method gets the count data from the hardware for the continuous counting mode (default).
It runs repeatedly in the logic module event loop by being connected to sigCountContinuousNext and emitting sigCountContinuousNext through a queued connection.
def counter_logic.CounterLogic.draw_figure | ( | self, | |
data | |||
) |
Draw figure to save with data file.
def counter_logic.CounterLogic.get_channels | ( | self | ) |
Shortcut for hardware get_counter_channels.
def counter_logic.CounterLogic.get_count_frequency | ( | self | ) |
Returns the currently set frequency of counting (resolution).
def counter_logic.CounterLogic.get_count_length | ( | self | ) |
Returns the currently set length of the counting array.
def counter_logic.CounterLogic.get_counting_mode | ( | self | ) |
Retrieve the current counting mode.
def counter_logic.CounterLogic.get_counting_samples | ( | self | ) |
Returns the currently set number of samples counted per readout.
def counter_logic.CounterLogic.get_hardware_constraints | ( | self | ) |
Retrieve the hardware constrains from the counter device.
def counter_logic.CounterLogic.get_saving_state | ( | self | ) |
Returns if the data is saved in the moment.
def counter_logic.CounterLogic.save_current_count_trace | ( | self, | |
name_tag = '' |
|||
) |
The currently displayed counttrace will be saved.
str | name_tag: optional, personal description that will be appended to the file name |
This method saves the already displayed counts to file and does not accumulate them. The counttrace variable will be saved to file with the provided name!
def counter_logic.CounterLogic.save_data | ( | self, | |
to_file = True , |
|||
postfix = '' |
|||
) |
Save the counter trace data and writes it to a file.
bool | to_file: indicate, whether data have to be saved to file |
str | postfix: an additional tag, which will be added to the filename upon save |
def counter_logic.CounterLogic.set_count_frequency | ( | self, | |
frequency = 50 |
|||
) |
Sets the frequency with which the data is acquired.
float | frequency: the desired frequency of counting in Hz |
This makes sure, the counter is stopped first and restarted afterwards.
def counter_logic.CounterLogic.set_count_length | ( | self, | |
length = 300 |
|||
) |
Sets the time trace in units of bins.
int | length: time trace in units of bins (positive int). |
This makes sure, the counter is stopped first and restarted afterwards.
def counter_logic.CounterLogic.set_counting_mode | ( | self, | |
mode = 'CONTINUOUS' |
|||
) |
Set the counting mode, to change between continuous and gated counting.
Possible options are: 'CONTINUOUS' = counts continuously 'GATED' = bins the counts according to a gate signal 'FINITE_GATED' = finite measurement with predefined number of samples
def counter_logic.CounterLogic.startCount | ( | self | ) |
This is called externally, and is basically a wrapper that redirects to the chosen counting mode start function.