def get_constraints(self): """ Retrieve the hardware constrains from the Pulsing device. @return PulserConstraints: dict with constraints for the sequence generation and GUI """ constraints = PulserConstraints() # The file formats are hardware specific. constraints.waveform_format = ['pstream'] constraints.sequence_format = [] constraints.sample_rate.min = 1e9 constraints.sample_rate.max = 1e9 constraints.sample_rate.step = 0 constraints.sample_rate.default = 1e9 constraints.d_ch_low.min = 0.0 constraints.d_ch_low.max = 0.0 constraints.d_ch_low.step = 0.0 constraints.d_ch_low.default = 0.0 constraints.d_ch_high.min = 3.3 constraints.d_ch_high.max = 3.3 constraints.d_ch_high.step = 0.0 constraints.d_ch_high.default = 3.3 # Sample file length max is not well-defined for PulseStreamer, # which collates sequential identical pulses into one. # Total number of not-sequentially-identical pulses which # can be stored is 10^6. constraints.waveform_length.min = 1 constraints.waveform_length.max = 134217728 constraints.waveform_length.step = 1 constraints.waveform_length.default = 1 # the name a_ch<num> and d_ch<num> are generic names, which describe UNAMBIGUOUSLY the # channels. Here all possible channel configurations are stated, where only the generic # names should be used. The names for the different configurations can be customary chosen. activation_config = OrderedDict() activation_config['all'] = [ 'd_ch1', 'd_ch2', 'd_ch3', 'd_ch4', 'd_ch5', 'd_ch6', 'd_ch7', 'd_ch8' ] constraints.activation_config = activation_config return constraints
def get_constraints(self): """ Retrieve the hardware constrains from the Pulsing device. @return dict: dict with constraints for the sequence generation and GUI Provides all the constraints (e.g. sample_rate, amplitude, total_length_bins, channel_config, ...) related to the pulse generator hardware to the caller. 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 add to all files containing this interface. The items of the keys are again dictionaries which have the generic dictionary form: {'min': <value>, 'max': <value>, 'step': <value>, 'unit': '<value>'} Only the keys 'activation_config' and differs, since it contain the channel configuration/activation information. If the constraints cannot be set in the pulsing hardware (because it might e.g. has no sequence mode) then write just zero to each generic dict. Note that there is a difference between float input (0.0) and integer input (0). ALL THE PRESENT KEYS OF THE CONSTRAINTS DICT MUST BE ASSIGNED! """ constraints = PulserConstraints() # The file formats are hardware specific. constraints.waveform_format = ['pstream'] constraints.sequence_format = [] constraints.sample_rate.min = 1e9 constraints.sample_rate.max = 1e9 constraints.sample_rate.step = 0 constraints.sample_rate.default = 1e9 constraints.d_ch_low.min = 0.0 constraints.d_ch_low.max = 0.0 constraints.d_ch_low.step = 0.0 constraints.d_ch_low.default = 0.0 constraints.d_ch_high.min = 3.3 constraints.d_ch_high.max = 3.3 constraints.d_ch_high.step = 0.0 constraints.d_ch_high.default = 3.3 # sample file length max is not well-defined for PulseStreamer, which collates sequential identical pulses into # one. Total number of not-sequentially-identical pulses which can be stored: 1 M. constraints.sampled_file_length.min = 1 constraints.sampled_file_length.max = 134217728 constraints.sampled_file_length.step = 1 constraints.sampled_file_length.default = 1 # the name a_ch<num> and d_ch<num> are generic names, which describe UNAMBIGUOUSLY the # channels. Here all possible channel configurations are stated, where only the generic # names should be used. The names for the different configurations can be customary chosen. activation_config = OrderedDict() activation_config['all'] = [ 'd_ch1', 'd_ch2', 'd_ch3', 'd_ch4', 'd_ch5', 'd_ch6', 'd_ch7', 'd_ch8' ] constraints.activation_config = activation_config return constraints
def get_constraints(self): """ Retrieve the hardware constrains from the Pulsing device. @return constraints object: object with pulser constraints as attributes. Provides all the constraints (e.g. sample_rate, amplitude, total_length_bins, channel_config, ...) related to the pulse generator hardware to the caller. SEE PulserConstraints CLASS IN pulser_interface.py FOR AVAILABLE CONSTRAINTS!!! 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 the PulserConstraints class. Each scalar parameter is an ScalarConstraints object defined in cor.util.interfaces. Essentially it contains min/max values as well as min step size, default value and unit of the parameter. PulserConstraints.activation_config differs, since it contain the channel configuration/activation information of the form: {<descriptor_str>: <channel_list>, <descriptor_str>: <channel_list>, ...} If the constraints cannot be set in the pulsing hardware (e.g. because it might have no sequence mode) just leave it out so that the default is used (only zeros). """ constraints = PulserConstraints() # The file formats are hardware specific. constraints.waveform_format = ['fpga'] constraints.sequence_format = [] constraints.sample_rate.min = 500e6 constraints.sample_rate.max = 950e6 constraints.sample_rate.step = 450e6 constraints.sample_rate.default = 950e6 constraints.d_ch_low.min = 0.0 constraints.d_ch_low.max = 0.0 constraints.d_ch_low.step = 0.0 constraints.d_ch_low.default = 0.0 constraints.d_ch_high.min = 3.3 constraints.d_ch_high.max = 3.3 constraints.d_ch_high.step = 0.0 constraints.d_ch_high.default = 3.3 constraints.sampled_file_length.min = 1024 constraints.sampled_file_length.max = 134217728 constraints.sampled_file_length.step = 1 constraints.sampled_file_length.default = 1024 # the name a_ch<num> and d_ch<num> are generic names, which describe UNAMBIGUOUSLY the # channels. Here all possible channel configurations are stated, where only the generic # names should be used. The names for the different configurations can be customary chosen. activation_config = OrderedDict() activation_config['all'] = [ 'd_ch1', 'd_ch2', 'd_ch3', 'd_ch4', 'd_ch5', 'd_ch6', 'd_ch7', 'd_ch8' ] constraints.activation_config = activation_config return constraints
def get_constraints(self): """ Retrieve the hardware constrains from the Pulsing device. @return constraints object: object with pulser constraints as attributes. Provides all the constraints (e.g. sample_rate, amplitude, total_length_bins, channel_config, ...) related to the pulse generator hardware to the caller. SEE PulserConstraints CLASS IN pulser_interface.py FOR AVAILABLE CONSTRAINTS!!! 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 the PulserConstraints class. Each scalar parameter is an ScalarConstraints object defined in cor.util.interfaces. Essentially it contains min/max values as well as min step size, default value and unit of the parameter. PulserConstraints.activation_config differs, since it contain the channel configuration/activation information of the form: {<descriptor_str>: <channel_list>, <descriptor_str>: <channel_list>, ...} If the constraints cannot be set in the pulsing hardware (e.g. because it might have no sequence mode) just leave it out so that the default is used (only zeros). """ constraints = PulserConstraints() # The file formats are hardware specific. constraints.waveform_format = [self.compatible_waveform_format] constraints.sequence_format = [self.compatible_sequence_format] if self.interleave: constraints.sample_rate.min = 12.0e9 constraints.sample_rate.max = 24.0e9 constraints.sample_rate.step = 4.0e8 constraints.sample_rate.default = 24.0e9 else: constraints.sample_rate.min = 10.0e6 constraints.sample_rate.max = 12.0e9 constraints.sample_rate.step = 10.0e6 constraints.sample_rate.default = 12.0e9 constraints.a_ch_amplitude.min = 0.02 constraints.a_ch_amplitude.max = 2.0 constraints.a_ch_amplitude.step = 0.001 constraints.a_ch_amplitude.default = 2.0 constraints.a_ch_offset.min = -1.0 constraints.a_ch_offset.max = 1.0 constraints.a_ch_offset.step = 0.001 constraints.a_ch_offset.default = 0.0 constraints.d_ch_low.min = -1.0 constraints.d_ch_low.max = 4.0 constraints.d_ch_low.step = 0.01 constraints.d_ch_low.default = 0.0 constraints.d_ch_high.min = 0.0 constraints.d_ch_high.max = 5.0 constraints.d_ch_high.step = 0.01 constraints.d_ch_high.default = 5.0 constraints.sampled_file_length.min = 80 constraints.sampled_file_length.max = 64800000 constraints.sampled_file_length.step = 1 constraints.sampled_file_length.default = 80 constraints.waveform_num.min = 1 constraints.waveform_num.max = 32000 constraints.waveform_num.step = 1 constraints.waveform_num.default = 1 constraints.sequence_num.min = 1 constraints.sequence_num.max = 8000 constraints.sequence_num.step = 1 constraints.sequence_num.default = 1 constraints.subsequence_num.min = 1 constraints.subsequence_num.max = 4000 constraints.subsequence_num.step = 1 constraints.subsequence_num.default = 1 # If sequencer mode is available then these should be specified constraints.repetitions.min = 0 constraints.repetitions.max = 65539 constraints.repetitions.step = 1 constraints.repetitions.default = 0 constraints.trigger_in.min = 0 constraints.trigger_in.max = 2 constraints.trigger_in.step = 1 constraints.trigger_in.default = 0 constraints.event_jump_to.min = 0 constraints.event_jump_to.max = 8000 constraints.event_jump_to.step = 1 constraints.event_jump_to.default = 0 constraints.go_to.min = 0 constraints.go_to.max = 8000 constraints.go_to.step = 1 constraints.go_to.default = 0 # the name a_ch<num> and d_ch<num> are generic names, which describe UNAMBIGUOUSLY the # channels. Here all possible channel configurations are stated, where only the generic # names should be used. The names for the different configurations can be customary chosen. activation_config = OrderedDict() activation_config['config0'] = ['a_ch1', 'd_ch1', 'd_ch2', 'a_ch2', 'd_ch3', 'd_ch4'] activation_config['config1'] = ['a_ch2', 'd_ch1', 'd_ch2', 'a_ch3', 'd_ch3', 'd_ch4'] # Usage of channel 1 only: activation_config['config2'] = ['a_ch2', 'd_ch1', 'd_ch2'] # Usage of channel 2 only: activation_config['config3'] = ['a_ch3', 'd_ch3', 'd_ch4'] # Usage of Interleave mode: activation_config['config4'] = ['a_ch1', 'd_ch1', 'd_ch2'] # Usage of only digital channels: activation_config['config5'] = ['d_ch1', 'd_ch2', 'd_ch3', 'd_ch4', 'd_ch5', 'd_ch6', 'd_ch7', 'd_ch8'] # Usage of only one analog channel: activation_config['config6'] = ['a_ch1'] activation_config['config7'] = ['a_ch2'] activation_config['config8'] = ['a_ch3'] # Usage of only the analog channels: activation_config['config9'] = ['a_ch2', 'a_ch3'] constraints.activation_config = activation_config return constraints
def get_constraints(self): """ Retrieve the hardware constrains from the Pulsing device. @return dict: dict with constraints for the sequence generation and GUI Provides all the constraints (e.g. sample_rate, amplitude, total_length_bins, channel_config, ...) related to the pulse generator hardware to the caller. 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 add to all files containing this interface. The items of the keys are again dictionaries which have the generic dictionary form: {'min': <value>, 'max': <value>, 'step': <value>, 'unit': '<value>'} Only the keys 'activation_config' and differs, since it contain the channel configuration/activation information. If the constraints cannot be set in the pulsing hardware (because it might e.g. has no sequence mode) then write just zero to each generic dict. Note that there is a difference between float input (0.0) and integer input (0). ALL THE PRESENT KEYS OF THE CONSTRAINTS DICT MUST BE ASSIGNED! """ constraints = PulserConstraints() # The file formats are hardware specific. constraints.waveform_format = ['pstream'] constraints.sequence_format = [] constraints.sample_rate.min = 1e9 constraints.sample_rate.max = 1e9 constraints.sample_rate.step = 0 constraints.sample_rate.default = 1e9 constraints.d_ch_low.min = 0.0 constraints.d_ch_low.max = 0.0 constraints.d_ch_low.step = 0.0 constraints.d_ch_low.default = 0.0 constraints.d_ch_high.min = 3.3 constraints.d_ch_high.max = 3.3 constraints.d_ch_high.step = 0.0 constraints.d_ch_high.default = 3.3 # sample file length max is not well-defined for PulseStreamer, which collates sequential identical pulses into # one. Total number of not-sequentially-identical pulses which can be stored: 1 M. constraints.waveform_length.min = 1 constraints.waveform_length.max = 134217728 constraints.waveform_length.step = 1 constraints.waveform_length.default = 1 # the name a_ch<num> and d_ch<num> are generic names, which describe UNAMBIGUOUSLY the # channels. Here all possible channel configurations are stated, where only the generic # names should be used. The names for the different configurations can be customary chosen. activation_config = OrderedDict() activation_config['all'] = ['d_ch1', 'd_ch2', 'd_ch3', 'd_ch4', 'd_ch5', 'd_ch6', 'd_ch7', 'd_ch8'] constraints.activation_config = activation_config return constraints
def get_constraints(self): """ Retrieve the hardware constrains from the Pulsing device. @return constraints object: object with pulser constraints as attributes. Provides all the constraints (e.g. sample_rate, amplitude, total_length_bins, channel_config, ...) related to the pulse generator hardware to the caller. SEE PulserConstraints CLASS IN pulser_interface.py FOR AVAILABLE CONSTRAINTS!!! 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 the PulserConstraints class. Each scalar parameter is an ScalarConstraints object defined in cor.util.interfaces. Essentially it contains min/max values as well as min step size, default value and unit of the parameter. PulserConstraints.activation_config differs, since it contain the channel configuration/activation information of the form: {<descriptor_str>: <channel_list>, <descriptor_str>: <channel_list>, ...} If the constraints cannot be set in the pulsing hardware (e.g. because it might have no sequence mode) just leave it out so that the default is used (only zeros). """ constraints = PulserConstraints() # The file formats are hardware specific. constraints.waveform_format = ['fpga'] constraints.sequence_format = [] constraints.sample_rate.min = 500e6 constraints.sample_rate.max = 950e6 constraints.sample_rate.step = 450e6 constraints.sample_rate.default = 950e6 constraints.d_ch_low.min = 0.0 constraints.d_ch_low.max = 0.0 constraints.d_ch_low.step = 0.0 constraints.d_ch_low.default = 0.0 constraints.d_ch_high.min = 3.3 constraints.d_ch_high.max = 3.3 constraints.d_ch_high.step = 0.0 constraints.d_ch_high.default = 3.3 constraints.sampled_file_length.min = 1024 constraints.sampled_file_length.max = 134217728 constraints.sampled_file_length.step = 1 constraints.sampled_file_length.default = 1024 # the name a_ch<num> and d_ch<num> are generic names, which describe UNAMBIGUOUSLY the # channels. Here all possible channel configurations are stated, where only the generic # names should be used. The names for the different configurations can be customary chosen. activation_config = OrderedDict() activation_config['all'] = ['d_ch1', 'd_ch2', 'd_ch3', 'd_ch4', 'd_ch5', 'd_ch6', 'd_ch7', 'd_ch8'] constraints.activation_config = activation_config return constraints