Qudi
|
Implementation of the FastCounter interface methods for a dummy usage. More...
Public Member Functions | |
def | __init__ (self, config, kwargs) |
def | on_activate (self) |
Initialisation performed during activation of the module. | |
def | on_deactivate (self) |
Deinitialisation performed during deactivation of the module. | |
def | get_constraints (self) |
Retrieve the hardware constrains from the Fast counting device. More... | |
def | configure (self, bin_width_s, record_length_s, number_of_gates=0) |
Configuration of the fast counter. More... | |
def | get_status (self) |
Receives the current status of the Fast Counter and outputs it as return value. More... | |
def | start_measure (self) |
def | pause_measure (self) |
Pauses the current measurement. More... | |
def | stop_measure (self) |
Stop the fast counter. More... | |
def | continue_measure (self) |
Continues the current measurement. More... | |
def | is_gated (self) |
Check the gated counting possibility. More... | |
def | get_binwidth (self) |
Returns the width of a single timebin in the timetrace in seconds. More... | |
def | get_data_trace (self) |
Polls the current timetrace data from the fast counter. More... | |
def | get_frequency (self) |
![]() | |
def | __init__ (self, manager, name, config=None, callbacks=None, kwargs) |
Initialise Base class object and set up its state machine. More... | |
def | log (self) |
Returns a logger object. | |
def | is_module_threaded (self) |
Returns whether the module shall be started in a thread. | |
def | on_activate (self) |
Method called when module is activated. More... | |
def | on_deactivate (self) |
Method called when module is deactivated. More... | |
def | getStatusVariables (self) |
Return a dict of variable names and their content representing the module state for saving. More... | |
def | setStatusVariables (self, variableDict) |
Give a module a dict of variable names and their content representing the module state. More... | |
def | getConfiguration (self) |
Return the configration dictionary for this module. More... | |
def | get_connector (self, connector_name) |
Return module connected to the given named connector. More... | |
![]() | |
def | __new__ (cls, name, bases, attrs) |
Collect declared Connectors, ConfigOptions and StatusVars into dictionaries. More... | |
Public Attributes | |
statusvar | |
![]() | |
module_state | |
connectors | |
Static Public Attributes | |
trace_path = ConfigOption('load_trace', None) | |
Implementation of the FastCounter interface methods for a dummy usage.
Example config for copy-paste:
fastcounter_dummy: module 'fast_counter_dummy.FastCounterDummy' gated False #load_trace: None # path to the saved dummy trace
def fast_counter_dummy.FastCounterDummy.configure | ( | self, | |
bin_width_s, | |||
record_length_s, | |||
number_of_gates = 0 |
|||
) |
Configuration of the fast counter.
float | bin_width_s: Length of a single time bin in the time trace histogram in seconds. |
float | record_length_s: Total length of the timetrace/each single gate in seconds. |
int | number_of_gates: optional, number of gates in the pulse sequence. Ignore for not gated counter. |
def fast_counter_dummy.FastCounterDummy.continue_measure | ( | self | ) |
Continues the current measurement.
If fast counter is in pause state, then fast counter will be continued.
def fast_counter_dummy.FastCounterDummy.get_binwidth | ( | self | ) |
Returns the width of a single timebin in the timetrace in seconds.
def fast_counter_dummy.FastCounterDummy.get_constraints | ( | self | ) |
Retrieve the hardware constrains from the Fast counting device.
The keys of the returned dictionary are the str name for the constraints (which are set in this method).
NO OTHER KEYS SHOULD BE INVENTED!
If you are not sure about the meaning, look in other hardware files to get an impression. If still additional constraints are needed, then they have to be added to all files containing this interface.
The items of the keys are again dictionaries which have the generic dictionary form: {'min':
, 'max':
, 'step':
, 'unit': '
'}
Only the key 'hardware_binwidth_list' differs, since they contain the list of possible binwidths.
If the constraints cannot be set in the fast counting hardware then write just zero to each key of the generic dicts. Note that there is a difference between float input (0.0) and integer input (0), because some logic modules might rely on that distinction.
ALL THE PRESENT KEYS OF THE CONSTRAINTS DICT MUST BE ASSIGNED!
def fast_counter_dummy.FastCounterDummy.get_data_trace | ( | self | ) |
Polls the current timetrace data from the fast counter.
Return value is a numpy array (dtype = int64). The binning, specified by calling configure() in forehand, must be taken care of in this hardware class. A possible overflow of the histogram bins must be caught here and taken care of. If the counter is NOT GATED it will return a 1D-numpy-array with returnarray[timebin_index] If the counter is GATED it will return a 2D-numpy-array with returnarray[gate_index, timebin_index]
def fast_counter_dummy.FastCounterDummy.get_status | ( | self | ) |
Receives the current status of the Fast Counter and outputs it as return value.
0 = unconfigured 1 = idle 2 = running 3 = paused -1 = error state
def fast_counter_dummy.FastCounterDummy.is_gated | ( | self | ) |
Check the gated counting possibility.
def fast_counter_dummy.FastCounterDummy.pause_measure | ( | self | ) |
Pauses the current measurement.
Fast counter must be initially in the run state to make it pause.
def fast_counter_dummy.FastCounterDummy.stop_measure | ( | self | ) |
Stop the fast counter.