Qudi
Public Member Functions | List of all members
slow_counter_interface.SlowCounterInterface Class Reference

Define the controls for a slow counter. More...

Inheritance diagram for slow_counter_interface.SlowCounterInterface:
Inheritance graph
[legend]
Collaboration diagram for slow_counter_interface.SlowCounterInterface:
Collaboration graph
[legend]

Public Member Functions

def get_constraints (self)
 Retrieve the hardware constrains from the counter device. 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)
 Closes the clock and cleans up afterwards. More...
 
- Public Member Functions inherited from core.module.ModuleMeta
def __new__ (cls, name, bases, attrs)
 Collect declared Connectors, ConfigOptions and StatusVars into dictionaries. More...
 

Detailed Description

Define the controls for a slow counter.

Member Function Documentation

◆ close_clock()

def slow_counter_interface.SlowCounterInterface.close_clock (   self)

Closes the clock and cleans up afterwards.

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

◆ close_counter()

def slow_counter_interface.SlowCounterInterface.close_counter (   self)

Closes the counter and cleans up afterwards.

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

◆ get_constraints()

def slow_counter_interface.SlowCounterInterface.get_constraints (   self)

Retrieve the hardware constrains from the counter device.

Returns
SlowCounterConstraints: object with constraints for the counter

◆ get_counter()

def slow_counter_interface.SlowCounterInterface.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((n, uint32)): the photon counts per second for n channels

◆ get_counter_channels()

def slow_counter_interface.SlowCounterInterface.get_counter_channels (   self)

Returns the list of counter channel names.

Returns
list(str): channel names

Most methods calling this might just care about the number of channels, though.

◆ set_up_clock()

def slow_counter_interface.SlowCounterInterface.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_interface.SlowCounterInterface.set_up_counter (   self,
  counter_channels = None,
  sources = None,
  clock_channel = None,
  counter_buffer = None 
)

Configures the actual counter with a given clock.

Parameters
list(str)counter_channels: optional, physical channel of the counter
list(str)sources: optional, physical channel where the photons 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)

There need to be exactly the same number sof sources and counter channels and they need to be given in the same order. All counter channels share the same clock.


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