Qudi
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
slow_counter_dummy.SlowCounterDummy Class Reference

Dummy hardware class to emulate a slow counter with various distributions. More...

Inheritance diagram for slow_counter_dummy.SlowCounterDummy:
Inheritance graph
[legend]
Collaboration diagram for slow_counter_dummy.SlowCounterDummy:
Collaboration graph
[legend]

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)
 Return a constraints class for the slow counter. More...
 
def set_up_clock (self, clock_frequency=None, clock_channel=None)
 Configures the hardware clock of the NiDAQ card to give the timing. More...
 
def set_up_counter (self, counter_channels=None, sources=None, clock_channel=None, counter_buffer=None)
 Configures the actual counter with a given clock. More...
 
def get_counter (self, samples=None)
 Returns the current counts per second of the counter. More...
 
def get_counter_channels (self)
 Returns the list of counter channel names. More...
 
def close_counter (self)
 Closes the counter and cleans up afterwards. More...
 
def close_clock (self, power=0)
 Closes the clock and cleans up afterwards. More...
 
- Public Member Functions inherited from core.module.BaseMixin
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...
 
- Public Member Functions inherited from core.module.ModuleMeta
def __new__ (cls, name, bases, attrs)
 Collect declared Connectors, ConfigOptions and StatusVars into dictionaries. More...
 

Public Attributes

 mean_signal
 
 contrast
 
 mean_signal2
 
 noise_amplitude
 
 life_time_bright
 
 life_time_dark
 
 current_dec_time
 
 curr_state_b
 
 total_time
 
- Public Attributes inherited from core.module.BaseMixin
 module_state
 
 connectors
 

Static Public Attributes

 source_channels = ConfigOption('source_channels', 2, missing='warn')
 
 dist = ConfigOption('count_distribution', 'dark_bright_gaussian')
 

Detailed Description

Dummy hardware class to emulate a slow counter with various distributions.

Example config for copy-paste:

slow_counter_dummy: module 'slow_counter_dummy.SlowCounterDummy' clock_frequency 100 # in Hz samples_number 10 source_channels 2 count_distribution 'dark_bright_gaussian' # other options are:

'uniform, 'exponential', 'single_poisson', 'dark_bright_poisson'

and 'single_gaussian'.

Member Function Documentation

◆ close_clock()

def slow_counter_dummy.SlowCounterDummy.close_clock (   self,
  power = 0 
)

Closes the clock and cleans up afterwards.

Returns
int: error code (0:OK, -1:error)

◆ close_counter()

def slow_counter_dummy.SlowCounterDummy.close_counter (   self)

Closes the counter and cleans up afterwards.

Returns
int: error code (0:OK, -1:error)

◆ get_constraints()

def slow_counter_dummy.SlowCounterDummy.get_constraints (   self)

Return a constraints class for the slow counter.

◆ get_counter()

def slow_counter_dummy.SlowCounterDummy.get_counter (   self,
  samples = None 
)

Returns the current counts per second of the counter.

Parameters
intsamples: if defined, number of samples to read in one go
Returns
float: the photon counts per second

◆ get_counter_channels()

def slow_counter_dummy.SlowCounterDummy.get_counter_channels (   self)

Returns the list of counter channel names.

Returns
tuple(str): channel names Most methods calling this might just care about the number of channels, though.

◆ set_up_clock()

def slow_counter_dummy.SlowCounterDummy.set_up_clock (   self,
  clock_frequency = None,
  clock_channel = None 
)

Configures the hardware clock of the NiDAQ card to give the timing.

Parameters
floatclock_frequency: if defined, this sets the frequency of the clock
stringclock_channel: if defined, this is the physical channel of the clock
Returns
int: error code (0:OK, -1:error)

◆ set_up_counter()

def slow_counter_dummy.SlowCounterDummy.set_up_counter (   self,
  counter_channels = None,
  sources = None,
  clock_channel = None,
  counter_buffer = None 
)

Configures the actual counter with a given clock.

Parameters
stringcounter_channel: if defined, this is the physical channel of the counter
stringphoton_source: if defined, this is the physical channel where the photons are to count from
stringclock_channel: if defined, this specifies the clock for the counter
Returns
int: error code (0:OK, -1:error)

The documentation for this class was generated from the following file: