Qudi
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
fastcomtecmcs6.FastComtec Class Reference

Hardware Class for the FastComtec Card. More...

Inheritance diagram for fastcomtecmcs6.FastComtec:
Inheritance graph
[legend]
Collaboration diagram for fastcomtecmcs6.FastComtec:
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)
 Retrieve the hardware constrains from the Fast counting device. More...
 
def configure (self, bin_width_s, record_length_s, number_of_gates=1)
 Configuration of the fast counter. More...
 
def get_status (self)
 
def start_measure (self)
 Start the measurement. More...
 
def stop_measure (self)
 Stop the measurement. More...
 
def pause_measure (self)
 Make a pause in the measurement, which can be continued. More...
 
def continue_measure (self)
 Continue a paused 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)
 
def set_gated (self, gated)
 Change the gated status of the fast counter. More...
 
def get_data_testfile (self)
 Load data test file.
 
def get_bitshift (self)
 Get bitshift from Fastcomtec. More...
 
def set_bitshift (self, bitshift)
 Sets the bitshift properly for this card. More...
 
def set_binwidth (self, binwidth)
 Set defined binwidth in Card. More...
 
def set_length (self, length_bins)
 Sets the length of the length of the actual measurement. More...
 
def get_length (self)
 Get the length of the current measurement. More...
 
def set_delay_start (self, delay_s)
 Sets the record delay length. More...
 
def get_delay_start (self)
 Returns the current record delay length. More...
 
def configure_gated_counter (self, bin_width_s, record_length_s, preset=None, cycles=None, sequences=None)
 Methods for gated counting ##########################################. More...
 
def change_sweep_mode (self, gated, cycles=None, preset=None)
 Change the sweep mode (gated, ungated) More...
 
def set_preset_mode (self, mode=16, preset=None)
 Turns on or off a specific preset mode. More...
 
def set_preset (self, preset)
 Sets the preset/. More...
 
def get_preset (self)
 Gets the preset. More...
 
def set_cycle_mode (self, mode=True, cycles=None)
 Turns on or off the sequential cycle mode. More...
 
def set_cycles (self, cycles)
 Sets the cycles. More...
 
def get_cycles (self)
 Gets the cycles. More...
 
def set_sequences (self, sequences)
 Sets the cycles. More...
 
def get_sequences (self)
 Gets the cycles. More...
 
def set_dimension (self, length, cycles)
 Get the dimension of the 2D Trace. More...
 
def get_dimension (self)
 Get the dimension of the 2D Trace. More...
 
def configure_ssr_counter (self, counts_per_readout=None, countlength=None)
 Methods for SSR interface ####################################. More...
 
def change_filename (self, name)
 Methods for saving ###############################################. More...
 
def change_save_mode (self, mode)
 Changes the save mode of Mcs6. More...
 
def save_data (self, filename)
 save the current settings and data More...
 
def get_2D_trace (self)
 Methods to fulfill gated counter interface ################### (NOT TESTED SINCE GATED COUNTER IS NOT WORKING PROBABLY YET) ##########.
 
def get_count_length (self)
 
def set_count_length (self, length)
 
def get_counting_samples (self)
 
def set_counting_samples (self, samples)
 
def save_raw_data (self, nametag)
 
- 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

 stopped_or_halt
 
 timetrace_tmp
 
 dll
 
- Public Attributes inherited from core.module.BaseMixin
 module_state
 
 connectors
 

Static Public Attributes

 gated = ConfigOption('gated', False, missing='warn')
 
 trigger_safety = ConfigOption('trigger_safety', 400e-9, missing='warn')
 
 aom_delay = ConfigOption('aom_delay', 390e-9, missing='warn')
 
 minimal_binwidth = ConfigOption('minimal_binwidth', 0.2e-9, missing='warn')
 

Detailed Description

Hardware Class for the FastComtec Card.

stable Jochen Scheuer, Simon Schmitt

Example config for copy-paste:

fastcomtec_mcs6: module 'fastcomtec.fastcomtecmcs6.FastComtec' gated False trigger_safety 400e-9 aom_delay 390e-9 minimal_binwidth 0.2e-9

Member Function Documentation

◆ change_filename()

def fastcomtecmcs6.FastComtec.change_filename (   self,
  name 
)

Methods for saving ###############################################.

Changes filename

    @param str name: Location and name of the file

◆ change_save_mode()

def fastcomtecmcs6.FastComtec.change_save_mode (   self,
  mode 
)

Changes the save mode of Mcs6.

Parameters
intmode: Specifies the save mode (0: No Save at Halt, 1: Save at Halt, 2 Write list file, No Save at Halt, 3: Write list file, Save at Halt
@return int mode: specified save mode

◆ change_sweep_mode()

def fastcomtecmcs6.FastComtec.change_sweep_mode (   self,
  gated,
  cycles = None,
  preset = None 
)

Change the sweep mode (gated, ungated)

Parameters
boolgated: Gated or ungated
intcycles: Optional, change number of cycles
intpreset: Optional, change number of preset

◆ configure()

def fastcomtecmcs6.FastComtec.configure (   self,
  bin_width_s,
  record_length_s,
  number_of_gates = 1 
)

Configuration of the fast counter.

Parameters
floatbin_width_s: Length of a single time bin in the time trace histogram in seconds.
floatrecord_length_s: Total length of the timetrace/each single gate in seconds.
intnumber_of_gates: optional, number of gates in the pulse sequence. Ignore for not gated counter.
Returns
tuple(binwidth_s, record_length_s, number_of_gates): binwidth_s float the actual set binwidth in seconds gate_length_s the actual record length in seconds number_of_gates the number of gated, which are accepted, None if not-gated

◆ configure_gated_counter()

def fastcomtecmcs6.FastComtec.configure_gated_counter (   self,
  bin_width_s,
  record_length_s,
  preset = None,
  cycles = None,
  sequences = None 
)

Methods for gated counting ##########################################.

Configuration of the gated counter.

    @param float bin_width_s: Length of a single time bin in the time trace
                              histogram in seconds.
    @param float record_length_s: Total length of the timetrace/each single
                                  gate in seconds.
    @param int preset: optional, number of preset
    @param int cycles: optional, number of cycles
    @param int sequences: optional, number of sequences.

    @return tuple(binwidth_s, no_of_bins, cycles, preset, sequences):
binwidth_s  float the actual set binwidth in seconds
no_of_bins  Length in bins
cycles  Number of Cycles
preset  Number of preset
sequences   Number of sequences

◆ configure_ssr_counter()

def fastcomtecmcs6.FastComtec.configure_ssr_counter (   self,
  counts_per_readout = None,
  countlength = None 
)

Methods for SSR interface ####################################.

Configuration of the gated counter.

Parameters
floatbin_width_s: Length of a single time bin in the time trace histogram in seconds.
floatrecord_length_s: Total length of the timetrace/each single gate in seconds.
intpreset: optional, number of preset
intcycles: optional, number of cycles
intsequences: optional, number of sequences.
Returns
tuple(binwidth_s, no_of_bins, cycles, preset, sequences): binwidth_s float the actual set binwidth in seconds no_of_bins Length in bins cycles Number of Cycles preset Number of preset sequences Number of sequences

◆ continue_measure()

def fastcomtecmcs6.FastComtec.continue_measure (   self)

Continue a paused measurement.

◆ get_binwidth()

def fastcomtecmcs6.FastComtec.get_binwidth (   self)

Returns the width of a single timebin in the timetrace in seconds.

Returns
float: current length of a single bin in seconds (seconds/bin)

The red out bitshift will be converted to binwidth. The binwidth is defined as 2**bitshift*minimal_binwidth.

◆ get_bitshift()

def fastcomtecmcs6.FastComtec.get_bitshift (   self)

Get bitshift from Fastcomtec.

Returns
int settings.bitshift: the red out bitshift

◆ get_constraints()

def fastcomtecmcs6.FastComtec.get_constraints (   self)

Retrieve the hardware constrains from the Fast counting device.

Returns
dict: dict with keys being the constraint names as string and items are the definition for the constaints.

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!

◆ get_cycles()

def fastcomtecmcs6.FastComtec.get_cycles (   self)

Gets the cycles.

Returns
int mode: current cycles

◆ get_delay_start()

def fastcomtecmcs6.FastComtec.get_delay_start (   self)

Returns the current record delay length.

Returns
float delay_s: current record delay length in seconds

◆ get_dimension()

def fastcomtecmcs6.FastComtec.get_dimension (   self)

Get the dimension of the 2D Trace.

Returns
int cycles: Vertical dimension in bins
int length: Horizontal dimension in bins

◆ get_length()

def fastcomtecmcs6.FastComtec.get_length (   self)

Get the length of the current measurement.

Returns
int: length of the current measurement in bins

◆ get_preset()

def fastcomtecmcs6.FastComtec.get_preset (   self)

Gets the preset.

Returns
int mode: current preset

◆ get_sequences()

def fastcomtecmcs6.FastComtec.get_sequences (   self)

Gets the cycles.

Returns
int mode: current cycles

◆ is_gated()

def fastcomtecmcs6.FastComtec.is_gated (   self)

Check the gated counting possibility.

Returns
bool: Boolean value indicates if the fast counter is a gated counter (TRUE) or not (FALSE).

◆ pause_measure()

def fastcomtecmcs6.FastComtec.pause_measure (   self)

Make a pause in the measurement, which can be continued.

◆ save_data()

def fastcomtecmcs6.FastComtec.save_data (   self,
  filename 
)

save the current settings and data

Parameters
strfilename: Location and name of the savefile

◆ set_binwidth()

def fastcomtecmcs6.FastComtec.set_binwidth (   self,
  binwidth 
)

Set defined binwidth in Card.

Parameters
floatbinwidth: the current binwidth in seconds
Returns
float: Red out bitshift converted to binwidth

The binwidth is converted into to an appropiate bitshift defined as 2**bitshift*minimal_binwidth.

◆ set_bitshift()

def fastcomtecmcs6.FastComtec.set_bitshift (   self,
  bitshift 
)

Sets the bitshift properly for this card.

Parameters
intbitshift:
Returns
int: asks the actual bitshift and returns the red out value

◆ set_cycle_mode()

def fastcomtecmcs6.FastComtec.set_cycle_mode (   self,
  mode = True,
  cycles = None 
)

Turns on or off the sequential cycle mode.

Parameters
boolmode: Set or unset cycle mode
intcycles: Optional, Change number of cycles
Returns
: just the input

◆ set_cycles()

def fastcomtecmcs6.FastComtec.set_cycles (   self,
  cycles 
)

Sets the cycles.

Parameters
intcycles: Total amount of cycles
Returns
int mode: current cycles

◆ set_delay_start()

def fastcomtecmcs6.FastComtec.set_delay_start (   self,
  delay_s 
)

Sets the record delay length.

Parameters
intdelay_s: Record delay after receiving a start trigger
Returns
int : specified delay in unit of bins

◆ set_dimension()

def fastcomtecmcs6.FastComtec.set_dimension (   self,
  length,
  cycles 
)

Get the dimension of the 2D Trace.

Parameters
intcycles: Vertical dimension in bins
intlength: Horizontal dimension in bins

◆ set_gated()

def fastcomtecmcs6.FastComtec.set_gated (   self,
  gated 
)

Change the gated status of the fast counter.

Returns
bool: Boolean value indicates if the fast counter is a gated counter (TRUE) or not (FALSE).

◆ set_length()

def fastcomtecmcs6.FastComtec.set_length (   self,
  length_bins 
)

Sets the length of the length of the actual measurement.

Parameters
intlength_bins: Length of the measurement in bins
Returns
float: Red out length of measurement

◆ set_preset()

def fastcomtecmcs6.FastComtec.set_preset (   self,
  preset 
)

Sets the preset/.

Parameters
intpreset: Preset in sweeps of starts
Returns
int mode: specified save mode

◆ set_preset_mode()

def fastcomtecmcs6.FastComtec.set_preset_mode (   self,
  mode = 16,
  preset = None 
)

Turns on or off a specific preset mode.

Parameters
intmode: O for off, 4 for sweep preset, 16 for start preset
intpreset: Optional, change number of presets
Returns
just the input

◆ set_sequences()

def fastcomtecmcs6.FastComtec.set_sequences (   self,
  sequences 
)

Sets the cycles.

Parameters
intcycles: Total amount of cycles
Returns
int mode: current cycles

◆ start_measure()

def fastcomtecmcs6.FastComtec.start_measure (   self)

Start the measurement.

◆ stop_measure()

def fastcomtecmcs6.FastComtec.stop_measure (   self)

Stop the measurement.


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