Qudi
Public Member Functions | Public Attributes | List of all members
timetagger_counter.TimeTaggerCounter Class Reference

Using the TimeTagger as a slow counter. More...

Inheritance diagram for timetagger_counter.TimeTaggerCounter:
Inheritance graph
[legend]
Collaboration diagram for timetagger_counter.TimeTaggerCounter:
Collaboration graph
[legend]

Public Member Functions

def on_activate (self)
 Start up TimeTagger interface.
 
def on_deactivate (self)
 Shut down the TimeTagger.
 
def set_up_clock (self, clock_frequency=None, clock_channel=None)
 Configures the hardware clock of the TimeTagger for 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_channels (self)
 
def get_constraints (self)
 Get hardware limits the device. More...
 
def get_counter (self, samples=None)
 Returns the current counts per second of the counter. More...
 
def close_counter (self)
 Closes the counter and cleans up afterwards. More...
 
def close_clock (self)
 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

 counter
 
 counter0
 
 counter1
 
- Public Attributes inherited from core.module.BaseMixin
 module_state
 
 connectors
 

Detailed Description

Using the TimeTagger as a slow counter.

Example config for copy-paste:

timetagger_slowcounter: module 'timetagger_counter.TimeTaggerCounter' timetagger_channel_apd_0 0 timetagger_channel_apd_1 1 timetagger_sum_channels 2

Member Function Documentation

◆ close_clock()

def timetagger_counter.TimeTaggerCounter.close_clock (   self)

Closes the clock and cleans up afterwards.

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

◆ close_counter()

def timetagger_counter.TimeTaggerCounter.close_counter (   self)

Closes the counter and cleans up afterwards.

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

◆ get_constraints()

def timetagger_counter.TimeTaggerCounter.get_constraints (   self)

Get hardware limits the device.

Returns
SlowCounterConstraints: constraints class for slow counter

FIXME ask hardware for limits when module is loaded

◆ get_counter()

def timetagger_counter.TimeTaggerCounter.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
numpy.array(uint32): the photon counts per second

◆ set_up_clock()

def timetagger_counter.TimeTaggerCounter.set_up_clock (   self,
  clock_frequency = None,
  clock_channel = None 
)

Configures the hardware clock of the TimeTagger for 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 timetagger_counter.TimeTaggerCounter.set_up_counter (   self,
  counter_channels = None,
  sources = None,
  clock_channel = None,
  counter_buffer = None 
)

Configures the actual counter with a given clock.

Parameters
strcounter_channel: optional, physical channel of the counter
strphoton_source: optional, physical channel where the photons are to count from
strcounter_channel2: optional, physical channel of the counter 2
strphoton_source2: optional, second physical channel where the photons are to count from
strclock_channel: optional, specifies the clock channel for the counter
intcounter_buffer: optional, a buffer of specified integer length, where in each bin the count numbers are saved.
Returns
int: error code (0:OK, -1:error)

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