Esempio n. 1
0
 def __init__(self, name, experiment, description=''):
     super(ScriptTrigger, self).__init__('trigger', experiment, description)
     self.id = StrProp('id', experiment, '', '"ScriptTrigger0"')
     self.source = StrProp('source', experiment, '', '"PFI0"')
     self.type = StrProp('type', experiment, '', '"edge"')
     self.edge = StrProp('edge', experiment, '', '"rising"')
     self.level = StrProp('level', experiment, '', '"high"')
     self.properties += ['id', 'source', 'type', 'edge', 'level']
Esempio n. 2
0
 def __init__(self, experiment):
     super(StartTrigger, self).__init__('startTrigger', experiment)
     self.waitForStartTrigger = BoolProp('waitForStartTrigger', experiment,
                                         'HSDIO wait for start trigger',
                                         'False')
     self.source = StrProp('source', experiment, 'start trigger source',
                           '"PFI0"')
     self.edge = StrProp('edge', experiment, 'start trigger edge',
                         '"rising"')
     self.properties += ['waitForStartTrigger', 'source', 'edge']
Esempio n. 3
0
 def __init__(self, experiment):
     super(AnalogInput, self).__init__('AnalogInput', experiment)
     self.sample_rate = FloatProp('sample_rate', experiment, 'samples per second', '1000.0')
     self.source = StrProp('source', experiment, '', '"PXI1Slot6/ai0:15"')
     self.samples_per_measurement = IntProp('samples_per_measurement', experiment, '', '1')
     self.waitForStartTrigger = BoolProp('waitForStartTrigger', experiment, '', 'True')
     self.triggerSource = StrProp('triggerSource', experiment, '', '"/PXI1Slot6/PFI0"')
     self.triggerEdge = StrProp('triggerEdge', experiment, '"Rising" or "Falling"', '"Rising"')
     self.channels = Numpy1DProp('channels', experiment, 'a list of channel descriptions', dtype=[('description', object)], hdf_dtype=[('description', h5py.special_dtype(vlen=str))], zero=('new'))
     self.ground_mode = StrProp('ground_mode', experiment, 'RSE for ungrounded sensors, NRSE for grounded sensors', '"NRSE"')
     self.properties += ['version', 'sample_rate', 'source', 'samples_per_measurement', 'waitForStartTrigger',
                         'triggerSource', 'triggerEdge', 'channels', 'ground_mode']
     self.doNotSendToHardware += ['channels']
Esempio n. 4
0
 def __init__(self, name, experiment):
     super(HSDIO, self).__init__(name, experiment)
     self.resourceName = StrProp('resourceName', experiment,
                                 'the hardware location of the HSDIO card',
                                 "'Dev1'")
     self.clockRate = FloatProp('clockRate', experiment,
                                'samples/channel/sec', '1000')
     self.units = FloatProp(
         'units', experiment,
         'multiplier for HSDIO timing values (milli=.001)', '1')
     self.hardwareAlignmentQuantum = IntProp('hardwareAlignmentQuantum',
                                             experiment,
                                             '(PXI=1,SquareCell=2)', '1')
     self.channels = NumpyChannels(experiment, self)
     self.triggers = ListProp('triggers',
                              self.experiment,
                              listElementType=ScriptTrigger,
                              listElementName='trigger')
     self.startTrigger = StartTrigger(experiment)
     self.properties += [
         'version', 'resourceName', 'clockRate', 'units',
         'hardwareAlignmentQuantum', 'triggers', 'channels', 'startTrigger',
         'numChannels'
     ]
     # script and waveforms are handled specially in HSDIO.toHardware()
     self.doNotSendToHardware += ['units', 'numChannels']
     self.transition_list = []  # an empty list to store
     self.repeat_list = []
Esempio n. 5
0
 def __init__(self, name, experiment, description=''):
     super(Conex, self).__init__(name, experiment, description)
     self.IDString = StrProp('IDString', experiment, 'Instrument Key','0')
     self.SetPos = FloatProp('SetPos', experiment, 'Set position (mm)','0')
     self.Vel = FloatProp('Vel', experiment, 'Velocity (mm/s)','0')
     self.Threshold = FloatProp('PositionThreshold', experiment, 'Threshold for Position (mm)','0')
     self.properties += ['SetPos', 'enableVel', 'Vel', "IDString", 'Threshold', 'enable']
Esempio n. 6
0
    def __init__(self, experiment):
        super(AnalogOutput, self).__init__('AnalogOutput', experiment)
        self.enable = False
        self.physicalChannels = StrProp('physicalChannels', self.experiment,
                                        '', '"PXI1Slot2/ao0:7"')
        self.minimum = FloatProp('minimum', self.experiment, '', '-10')
        self.maximum = FloatProp('maximum', self.experiment, '', '10')
        self.clockRate = FloatProp('clockRate', self.experiment, '', '1000.0')
        self.units = FloatProp('units', self.experiment,
                               'equations entered in ms', '.001')
        self.waitForStartTrigger = BoolProp('waitForStartTrigger',
                                            self.experiment, '', 'True')
        self.triggerSource = StrProp('triggerSource', self.experiment, '',
                                     '"/PXI1Slot2/PFI0"')
        self.triggerEdge = StrProp('triggerEdge', self.experiment, '',
                                   '"Rising"')
        self.exportStartTrigger = BoolProp(
            'exportStartTrigger', self.experiment,
            'Should we trigger all other cards off the AO card?', 'True')
        self.exportStartTriggerDestination = StrProp(
            'exportStartTriggerDestination', self.experiment,
            'What line to send the AO StartTrigger out to?',
            '"/PXISlot2/PXI_Trig0"')
        self.useExternalClock = BoolProp(
            'useExternalClock', self.experiment,
            'True for external clock, false for default clock.', 'False')
        self.externalClockSource = StrProp(
            'externalClockSource', self.experiment,
            'Where does the external clock come in?', '"/PXISlot2/PFI9"')
        self.maxExternalClockRate = FloatProp(
            'maxExternalClockRate', self.experiment,
            'Upper limit on the external clock. Does not have to be exact.',
            '2000000')

        self.properties += [
            'version', 'physicalChannels', 'numChannels', 'minimum', 'maximum',
            'clockRate', 'units', 'waitForStartTrigger', 'triggerSource',
            'triggerEdge', 'exportStartTrigger',
            'exportStartTriggerDestination', 'useExternalClock',
            'externalClockSource', 'maxExternalClockRate',
            'channel_descriptions'
        ]
        self.doNotSendToHardware += [
            'numChannels', 'units', 'channel_descriptions'
        ]
        self.transition_list = []  # an empty list to store
 def __init__(self, name, experiment, description=''):
     super(UnlockMonitor, self).__init__(name, experiment, description)
     self.IP = StrProp('IP', experiment, 'IP Address of Raspberry Pi',
                       '10.141.196.160')
     self.Port = IntProp('Port', experiment, 'Port', '50007')
     self.Threshold = FloatProp('Threshold', experiment,
                                'Threshold for locked/unlocked', '30')
     self.properties += ['version', 'IP', 'Port', 'Threshold']
Esempio n. 8
0
 def __init__(self, experiment):
     super(DAQmxDO, self).__init__('DAQmxDO', experiment)
     self.resourceName = StrProp('resourceName', experiment, 'the hardware location of the card', "'Dev1'")
     self.clockRate = FloatProp('clockRate', experiment, 'samples/channel/sec', '1000')
     self.units = FloatProp('units', experiment, 'multiplier for timing values (milli=.001)', '1')
     self.channels = NumpyChannels(experiment, self)
     self.startTrigger = StartTrigger(experiment)
     self.properties += ['version', 'resourceName', 'clockRate', 'units', 'channels', 'startTrigger', 'numChannels']
     # the number of channels is defined by the resourceName (and the waveform which must agree), so
     # channels need not be send to hardware
     self.doNotSendToHardware += ['units', 'channels', 'numChannels']
     self.transition_list = []
Esempio n. 9
0
 def __init__(self, name, experiment, description=''):
     super(NIDAQmxAI, self).__init__(name, experiment, description)
     self.DeviceName = StrProp('DeviceName', experiment, 'Device Name',
                               'Dev1')
     self.chanList = StrProp('chanList', experiment, 'Channel List',
                             '[\'ai0\']')
     self.samples_per_measurement = IntProp('samples_per_measurement',
                                            experiment,
                                            'Samples per Measurement', '1')
     self.sample_rate = FloatProp('sample_rate', experiment, 'Sample Rate',
                                  '1000')
     self.waitForStartTrigger = BoolProp('waitForStartTrigger', experiment,
                                         'Wait For Start Trigger', 'True')
     self.triggerSource = StrProp('triggerSource', experiment,
                                  'Trigger Source', 'Dev1/PFI0')
     self.triggerEdge = StrProp('triggerEdge', experiment,
                                'Trigger Edge (\"Rising\" or \"Falling\")',
                                'Rising')
     self.properties += [
         'enable', 'DeviceName', 'chanList', 'samples_per_measurement',
         'sample_rate', 'waitForStartTrigger', 'triggerSource',
         'triggerEdge', 'applyFormula', 'formula'
     ]
Esempio n. 10
0
 def __init__(self, name, experiment, description=''):
     super(InstekPST, self).__init__(name, experiment, description)
     self.com_port = StrProp('com_port', experiment, 'Communications port of PST','0')
     self.tracking = IntProp('tracking', experiment, 'Tracking Mode (0 Independent; 1 Parallel; 2 Series)','0')
     #self.num_chans = IntProp('num_chans', experiment, 'Number of channels','0')
     self.voltage_setpoint_1 = FloatProp('voltage_setpoint_1', experiment, 'Voltage Setpoint for Channel 1','0')
     self.current_setpoint_1 = FloatProp('current_setpoint_1', experiment, 'Current Setpoint for Channel 1','0')
     self.voltage_setpoint_2 = FloatProp('voltage_setpoint_2', experiment, 'Voltage Setpoint for Channel 2','0')
     self.current_setpoint_2 = FloatProp('current_setpoint_2', experiment, 'Current Setpoint for Channel 2','0')
     self.voltage_setpoint_3 = FloatProp('voltage_setpoint_3', experiment, 'Voltage Setpoint for Channel 3','0')
     self.current_setpoint_3 = FloatProp('current_setpoint_3', experiment, 'Current Setpoint for Channel 3','0')
     self.properties += ['com_port', 'serial_number', 'tracking',
                         'voltage_setpoint_1', 'current_setpoint_1', 'voltage_setpoint_2', 'current_setpoint_2',
                         'voltage_setpoint_3', 'current_setpoint_3', 'actual_voltage_1', 'actual_current_1',
                         'actual_voltage_2', 'actual_current_2', 'actual_voltage_3', 'actual_current_3',
                         ]
Esempio n. 11
0
 def __init__(self, name, experiment, description=''):
     super(NIScopeInstrument, self).__init__(name, experiment, description)
     self.DeviceName = StrProp('DeviceName', experiment, 'NI Device Name',
                               'Dev0')
     self.TrigLevel = FloatProp('TrigLevel', experiment,
                                'Trigger Level (V)', '0')
     self.TrigDelay = FloatProp('TrigDelay', experiment,
                                'Trigger Delay (s)', '0')
     self.HorizRecordLength = IntProp(
         'HorizRecordLength', experiment,
         'Number of points to take per trigger', '0')
     self.Chan0Offset = FloatProp('Chan0Offset', experiment,
                                  'CH0 Offset (V)', '0')
     self.Chan1Offset = FloatProp('Chan1Offset', experiment,
                                  'CH1 Offset (V)', '0')
     self.properties += [
         'DeviceName', 'TrigLevel', 'TrigDelay', 'HorizRecordLength',
         'Chan0Offset', 'Chan1Offset', 'Chan1Atten', 'Chan1Impedance',
         'Chan1Coupling', 'Chan1VertScale', 'Chan0Atten', 'Chan0Impedance',
         'Chan0Coupling', 'Chan0VertScale', 'HorizScale', 'TrigSource',
         'TrigMode', 'TrigSlope', 'FFTMeas'
     ]
Esempio n. 12
0
 def __init__(self, name, experiment, description='', channel=None):
     self.channel = channel
     super(DDSprofile, self).__init__(name, experiment, description)
     self.frequency = FloatProp('frequency', self.experiment, '[MHz]', '0')
     self.amplitude = FloatProp('amplitude', self.experiment, '[dBm]', '0')
     self.phase = FloatProp('phase', self.experiment, '[rad]', '0')
     self.RAMMode = IntProp(
         'RAMMode', self.experiment,
         '0:Direct Switch, 1:Ramp Up, 2:Bidirectional Ramp, 3:Continuous Bidirectional Ramp, 4: Continuous Recirculate, 5: Direct Switch 2, 6: Direct Switch 3',
         '1')
     self.ZeroCrossing = BoolProp('ZeroCrossing', self.experiment, '',
                                  'False')
     self.NoDwellHigh = BoolProp('NoDwellHigh', self.experiment, '',
                                 'False')
     self.FunctionOrStatic = BoolProp('FunctionOrStatic', self.experiment,
                                      'True=function, False=static',
                                      'False')
     self.RAMFunction = StrProp('RAMFunction', self.experiment, '', '""')
     self.RAMInitialValue = FloatProp('RAMInitialValue', self.experiment,
                                      '', '0')
     self.RAMStepValue = FloatProp('RAMStepValue', self.experiment, '', '0')
     self.RAMTimeStep = FloatProp('RAMTimeStep', self.experiment, '[us]',
                                  '0')
     self.RAMNumSteps = IntProp('RAMNumSteps', self.experiment, '', '0')
     self.RAMStaticArray = ListProp('RAMStaticArray',
                                    self.experiment,
                                    listElementType=RAMStaticPoint,
                                    listElementName='point')
     self.properties += [
         'frequency', 'amplitude', 'phase', 'RAMMode', 'ZeroCrossing',
         'NoDwellHigh', 'FunctionOrStatic', 'RAMFunction',
         'RAMInitialValue', 'RAMStepValue', 'RAMTimeStep', 'RAMNumSteps',
         'RAMStaticArray'
     ]
     self.doNotSendToHardware += [
         'RAMFunction', 'RAMInitialValue', 'RAMStepValue', 'RAMNumSteps',
         'RAMStaticArray'
     ]
Esempio n. 13
0
 def __init__(self, name, experiment, description=''):
     super(PICamCamera, self).__init__(name, experiment, description)
     self.AdcEMGain = IntProp('AdcEMGain', experiment, 'EM gain', '0')
     #self.AdcAnalogGain = IntProp('AdcAnalogGain', experiment, 'Analog gain', '0')
     self.exposureTime = FloatProp('exposureTime', experiment,
                                   'exposure time for edge trigger (ms)',
                                   '0')
     self.shotsPerMeasurement = IntProp('shotsPerMeasurement', experiment,
                                        'number of expected shots', '0')
     self.currentCamera = StrProp('currentCamera', experiment,
                                  'Current Camera', '0')
     self.minPlot = IntProp('minPlot', experiment,
                            'Minimum Plot Scale Value', '0')
     self.maxPlot = IntProp('maxPlot', experiment,
                            'Maximum Plot Scale Value', '32768')
     self.properties += [
         'AdcEMGain', 'AdcAnalogGain', 'exposureTime', 'triggerMode',
         'shotsPerMeasurement', 'minPlot', 'maxPlot', 'currentCamera',
         'acquisitionMode', 'binMode', 'AdvancedEMGain', 'EMGainMode',
         'numPixX', 'numPixY', 'useDemo', 'ReadoutControl', 'shutterMode',
         'averageMeasurements', 'ROI', 'roilowv', 'roilowh', 'roihighv',
         'roihighh'
     ]
 def __init__(self, name, experiment, description=''):
     super(NewportStage, self).__init__(name, experiment, description)
     self.setposition = FloatProp('setposition', experiment, 'Set Position (mm)','0')
     self.comport = StrProp('comport',experiment,'COM port','COM6')
     self.properties += ['setposition','comport']