Qudi
Public Member Functions | List of all members
gated_ni_card.SlowGatedNICard Class Reference

Enable the usage of the gated counter in the slow counter interface. More...

Inheritance diagram for gated_ni_card.SlowGatedNICard:
Inheritance graph
[legend]
Collaboration diagram for gated_ni_card.SlowGatedNICard:
Collaboration graph
[legend]

Public Member Functions

def on_activate (self)
 Starts up the NI Card at activation.
 
def get_constraints (self)
 Get hardware limits of NI 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_channel=None, photon_source=None, counter_channel2=None, photon_source2=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 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 national_instruments_x_series.NationalInstrumentsXSeries
def on_activate (self)
 Starts up the NI Card at activation.
 
def on_deactivate (self)
 Shut down the NI card.
 
def get_constraints (self)
 Get hardware limits of NI device. More...
 
def set_up_clock (self, clock_frequency=None, clock_channel=None, scanner=False, idle=False)
 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_channels (self)
 Returns the list of counter channel names. More...
 
def get_counter (self, samples=None)
 Returns the current counts per second of the counter. More...
 
def close_counter (self, scanner=False)
 Closes the counter or scanner and cleans up afterwards. More...
 
def close_clock (self, scanner=False)
 Closes the clock and cleans up afterwards. More...
 
def reset_hardware (self)
 Resets the NI hardware, so the connection is lost and other programs can access it. More...
 
def get_scanner_axes (self)
 Scanner axes depends on how many channels tha analog output task has.
 
def get_scanner_count_channels (self)
 Return list of counter channels.
 
def get_position_range (self)
 Returns the physical range of the scanner. More...
 
def set_position_range (self, myrange=None)
 Sets the physical range of the scanner. More...
 
def set_voltage_range (self, myrange=None)
 Sets the voltage range of the NI Card. More...
 
def set_up_scanner_clock (self, clock_frequency=None, clock_channel=None)
 Configures the hardware clock of the NiDAQ card to give the timing. More...
 
def set_up_scanner (self, counter_channels=None, sources=None, clock_channel=None, scanner_ao_channels=None)
 Configures the actual scanner with a given clock. More...
 
def scanner_set_position (self, x=None, y=None, z=None, a=None)
 Move stage to x, y, z, a (where a is the fourth voltage channel). More...
 
def get_scanner_position (self)
 Get the current position of the scanner hardware. More...
 
def scan_line (self, line_path=None, pixel_clock=False)
 Scans a line and return the counts on that line. More...
 
def close_scanner (self)
 Closes the scanner and cleans up afterwards. More...
 
def close_scanner_clock (self)
 Closes the clock and cleans up afterwards. More...
 
def set_up_odmr_clock (self, clock_frequency=None, clock_channel=None)
 Configures the hardware clock of the NiDAQ card to give the timing. More...
 
def set_up_odmr (self, counter_channel=None, photon_source=None, clock_channel=None, odmr_trigger_channel=None)
 Configures the actual counter with a given clock. More...
 
def set_odmr_length (self, length=100)
 Sets up the trigger sequence for the ODMR and the triggered microwave. More...
 
def count_odmr (self, length=100)
 Sweeps the microwave and returns the counts on that sweep. More...
 
def close_odmr (self)
 Closes the odmr and cleans up afterwards. More...
 
def get_odmr_channels (self)
 
def close_odmr_clock (self)
 Closes the odmr and cleans up afterwards. More...
 
def get_status (self)
 Receives the current status of the Fast Counter and outputs it as return value. More...
 
def set_up_gated_counter (self, buffer_length, read_available_samples=False)
 Initializes and starts task for external gated photon counting. More...
 
def start_gated_counter (self)
 Actually start the preconfigured counter task. More...
 
def get_gated_counts (self, samples=None, timeout=None, read_available_samples=False)
 Returns latest count samples acquired by gated photon counting. More...
 
def stop_gated_counter (self)
 Actually start the preconfigured counter task. More...
 
def close_gated_counter (self)
 Clear tasks, so that counters are not in use any more. More...
 
def digital_channel_switch (self, channel_name, mode=True)
 
- 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...
 

Additional Inherited Members

- Public Attributes inherited from national_instruments_x_series.NationalInstrumentsXSeries
 digital_out_task
 
 digital_data
 
 digital_read
 
 digital_samples_channel
 
- Public Attributes inherited from core.module.BaseMixin
 module_state
 
 connectors
 

Detailed Description

Enable the usage of the gated counter in the slow counter interface.

Overwrite in this new class therefore the appropriate methods.

Example config for copy-paste:

slowgated_ni: module 'gated_ni_card.SlowGatedNICard' photon_sources:

clock_channel '/Dev1/Ctr0' default_clock_frequency 100 # optional, in Hz counter_channels:

odmr_trigger_channel '/Dev1/PFI7'

gate_in_channel '/Dev1/PFI9' default_samples_number 50 max_counts 3e7 read_write_timeout 10 counting_edge_rising True

Member Function Documentation

◆ close_clock()

def gated_ni_card.SlowGatedNICard.close_clock (   self)

Closes the clock and cleans up afterwards.

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

◆ close_counter()

def gated_ni_card.SlowGatedNICard.close_counter (   self)

Closes the counter and cleans up afterwards.

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

◆ get_constraints()

def gated_ni_card.SlowGatedNICard.get_constraints (   self)

Get hardware limits of NI device.

Returns
SlowCounterConstraints: constraints class for slow counter

FIXME ask hardware for limits when module is loaded

◆ get_counter()

def gated_ni_card.SlowGatedNICard.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 gated_ni_card.SlowGatedNICard.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 gated_ni_card.SlowGatedNICard.set_up_counter (   self,
  counter_channel = None,
  photon_source = None,
  counter_channel2 = None,
  photon_source2 = 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: