def __init__(self, name, experiment, description=''): super(Fit_Sites, self).__init__(name, experiment, description) self.Fit_Frequency_x = FloatProp('Fit_Frequency_x', experiment, 'the fit for the x frequency', '0') self.Fit_Frequency_y = FloatProp('Fit_Frequency_y', experiment, 'the fit for the y frequency', '0') self.properties += ['Fit_site', 'Fit_Frequency_x', 'Fit_Frequency_y']
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 = []
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']
def __init__(self, name, experiment, description=''): super(RF_generator, self).__init__(name, experiment, description) self.enable = False self.GPIBchannel = 0 self.frequency = FloatProp('frequency', self.experiment, '[MHz]', '10') self.power = FloatProp('power', self.experiment, '[dBm]', '0') self.properties += ['enable', 'GPIBchannel', 'frequency', 'power']
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 = []
def __init__(self, name, experiment, description=''): super(BILTcard, self).__init__(name, experiment, description) self.desired_voltage = FloatProp('desired_voltage', experiment, 'the desired voltage', '0') self.properties += [ 'chassis_card_number', 'channel_number', 'desired_voltage' ]
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']
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(PiezoChannel, self).__init__(name, experiment, description) self.readServo = False self.setServo = BoolProp('setServo', self.experiment, '', 'False') self.setPosition = FloatProp('setPosition', self.experiment, '', '0') self.readAxis = '' self.readServo = False self.readPosition = float('nan') self.properties += [ 'version', 'setServo', 'setPosition', 'readAxis', 'readServo', 'readPosition' ]
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']
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' ]
def __init__(self, name, experiment, description=''): super(Noise_Eater, self).__init__(name, experiment, description) self.target_setting1 = FloatProp('target_setting1', experiment, 'the target power 1 percentage', '100') self.target_setting2 = FloatProp('target_setting2', experiment, 'the target power 2 percentage', '100') self.target_setting3 = FloatProp('target_setting3', experiment, 'the target power 3 percentage', '100') self.target_setting4 = FloatProp('target_setting4', experiment, 'the target power 4 percentage', '100') self.properties += [ 'target_setting1', 'target_setting2', 'target_setting3', 'target_setting4', 'IP', 'port' ] self.setting_array = [ self.target_setting1, self.target_setting2, self.target_setting3, self.target_setting4 ]
def __init__(self, name, experiment, description=''): super(DDSchannel, self).__init__(name, experiment, description) self.power = BoolProp('power', self.experiment, 'enable RF output from this channel', 'False') self.refClockRate = IntProp('refClockRate', self.experiment, '[MHz]', '1000') self.fullScaleOutputPower = FloatProp('fullScaleOutputPower', self.experiment, '[dBm]', '0') self.RAMenable = BoolProp('RAMenable', self.experiment, 'RAM enable', 'False') self.RAMDestType = IntProp('RAMDestType', self.experiment, '0:Frequency,1:Phase,2:Amplitude,3:Polar', '0') self.RAMDefaultFrequency = FloatProp('RAMDefaultFrequency', self.experiment, '[MHz]', '0') self.RAMDefaultAmplitude = FloatProp('RAMDefaultAmplitude', self.experiment, '[dBm]', '0') self.RAMDefaultPhase = FloatProp('RAMDefaultPhase', self.experiment, '[rad]', '0') '''each channel has exactly 8 profiles''' self.profileDescriptionList = [] self.profiles = ListProp('profiles', self.experiment, listProperty=[ DDSprofile('profile', self.experiment, channel=self) for i in range(8) ], listElementType=DDSprofile, listElementName='profile', listElementKwargs={'channel': self}) self.properties += [ 'power', 'refClockRate', 'fullScaleOutputPower', 'RAMenable', 'RAMDestType', 'RAMDefaultFrequency', 'RAMDefaultAmplitude', 'RAMDefaultPhase', 'profiles', 'profileDescriptionList' ] self.doNotSendToHardware += ['profileDescriptionList']
def __init__(self, name, experiment, description=''): super(Embezzletron, self).__init__(name, experiment, description) self.enable = self.experiment.Config.config.getboolean( 'DEV', 'EnableFakeData') self.shotsPerMeasurement = IntProp('shotsPerMeasurement', experiment, 'number of expected shots', '2') self.shotsPerMeasurement.value = 2 self.photoelectronScaling = FloatProp('photoelectronScaling', experiment, 'photoelectron scaling', '1') self.exposureTime = FloatRangeProp('exposureTime', experiment, 'exposure time (seconds)', low=0.000001, high=7200) self.exposureTime.value = 0.05
def __init__(self, name, experiment, description=''): super(TCP_Instrument, self).__init__(name, experiment, description) # defaults self.port = 0 self.connected = False self.error = False self.connected = False self.results = {} self.sock = None self.connected = False self.timeout = FloatProp('timeout', experiment, 'how long before TCP gives up [s]', '1.0') self.properties += ['IP', 'port', 'timeout'] self.doNotSendToHardware += ['IP', 'port', 'timeout']
def __init__(self, experiment): super(LabView, self).__init__('LabView', experiment, 'for communicating with a LabView system') # defaults self.port = 0 self.connected = False self.error = False self.cycleContinuously = False self.connected = False self.HSDIO = HSDIO.HSDIO('HSDIO', experiment) self.piezo = piezo.Piezo(experiment) self.RF_generators = RF_generators.RF_generators(experiment) self.AnalogOutput = AnalogOutput.AnalogOutput(experiment) self.AnalogInput = AnalogInput.AnalogInput(experiment) self.Counters = Counter.Counters('Counters', experiment) self.DAQmxDO = DAQmxDO.DAQmxDO(experiment) self.camera = Camera.HamamatsuC9100_13(experiment) self.TTL = TTL.TTL(experiment) self.results = {} self.instruments = [ self.HSDIO, self.piezo, self.RF_generators, self.AnalogOutput, self.AnalogInput, self.Counters, self.DAQmxDO, self.camera, self.TTL ] self.sock = None self.connected = False self.timeout = FloatProp( 'timeout', experiment, 'how long before LabView gives up and returns [s]', '1.0') self.properties += [ 'IP', 'port', 'timeout', 'AnalogOutput', 'AnalogInput', 'HSDIO', 'piezo', 'RF_generators', 'DAQmxDO', 'camera', 'TTL', 'Counters', 'cycleContinuously' ] self.doNotSendToHardware += ['IP', 'port', 'enable']
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', ]
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(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' ]
def __init__(self, name, experiment, description=''): super(Vaunix, self).__init__(name, experiment, description) self.frequency = FloatProp('Frequency', experiment, 'Frequency (MHz)', '0') self.power = FloatProp('Power', experiment, 'Power (dBm)', '0') self.pulsewidth = FloatProp('PulseWidth', experiment, 'Pulse Width (us)', '0') self.pulserep = FloatProp('PulseRep', experiment, 'Pulse Rep Time (us)', '0') self.startfreq = FloatProp('StartFreq', experiment, 'Start Frequency (MHz)', '0') self.endfreq = FloatProp('EndFreq', experiment, 'End Frequency (MHz)', '0') self.sweeptime = IntProp('SweepTime', experiment, 'Sweep Time (ms)', '0') self.properties += [ 'ID', 'model', 'serial', 'frequency', 'power', 'pulsewidth', 'pulserep', 'pulseenable', 'startfreq', 'endfreq', 'sweeptime', 'sweepmode', 'sweeptype', 'sweepdir', 'sweepenable', 'internalref', 'useexternalmod', 'rfonoff', 'maxPower' ]
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' ]
def __init__(self, experiment): super(HamamatsuC9100_13, self).__init__(experiment) self.forceImagesToU16 = BoolProp( 'forceImagesToU16', experiment, 'convert images to U16 (necessary on Aquarius hardware)', 'False') self.EMGain = IntRangeProp('EMGain', experiment, 'EMCCD gain', '0', low=0, high=255) self.analogGain = IntRangeProp('analogGain', experiment, 'analog gain', '0', low=0, high=5) self.exposureTime = FloatRangeProp( 'exposureTime', experiment, 'exposure time (seconds)', '00.050', low=.000001, high=7200 ) #low is 10 us, high is 7200 s, this setting does not apply if trigger is set to "level" self.scanSpeed = EnumProp('scanSpeed', experiment, 'CCD readout scan speed', '"High"', ['Slow', 'Middle', 'High']) self.lowLightSensitivity = EnumProp('lowLightSensitivity', experiment, 'low light sensitivity', '"Off"', ['Off', '5x', '13x', '21x']) self.externalTriggerMode = EnumProp( 'externalTriggerMode', experiment, 'external trigger mode', '"Level"', ['Edge', 'Level', 'Synchronous Readout']) self.triggerPolarity = EnumProp('triggerPolarity', experiment, 'trigger polarity', '"Positive"', ['Positive', 'Negative']) self.externalTriggerSource = EnumProp( 'externalTriggerSource', experiment, 'external trigger source', '"BNC on Power Supply"', [ 'Multi-Timing I/O Pin', 'BNC on Power Supply', 'CameraLink Interace' ]) self.cooling = EnumProp('cooling', experiment, 'TEC cooling', '"Off"', ['Off', 'On']) self.fan = EnumProp('fan', experiment, 'fan', '"Off"', ['Off', 'On']) self.scanMode = EnumProp('scanMode', experiment, 'scan mode', '"Normal"', ['Normal', 'Super pixel', 'Sub-array']) self.photoelectronScaling = FloatProp('photoelectronScaling', experiment, 'photoelectron scaling', '1') self.subArrayLeft = EnumProp('subArrayLeft', experiment, 'sub-array.left', '0', range(0, 512, 16)) self.subArrayTop = EnumProp('subArrayTop', experiment, 'sub-array.top', '0', range(0, 512, 16)) self.subArrayWidth = EnumProp('subArrayWidth', experiment, 'sub-array.width', '512', range(16, 513, 16)) self.subArrayHeight = EnumProp('subArrayHeight', experiment, 'sub-array.height', '512', range(16, 513, 16)) self.superPixelBinning = EnumProp('superPixelBinning', experiment, 'super pixel binning', '"1x1"', ['1x1', '2x2', '4x4']) self.frameGrabberAcquisitionRegionLeft = IntRangeProp( 'frameGrabberAcquisitionRegionLeft', experiment, 'frameGrabberAcquisitionRegion.Left', '0', low=0, high=512) self.frameGrabberAcquisitionRegionTop = IntRangeProp( 'frameGrabberAcquisitionRegionTop', experiment, 'frameGrabberAcquisitionRegion.Top', '0', low=0, high=512) self.frameGrabberAcquisitionRegionRight = IntRangeProp( 'frameGrabberAcquisitionRegionRight', experiment, 'frameGrabberAcquisitionRegion.Right', '512', low=0, high=512) self.frameGrabberAcquisitionRegionBottom = IntRangeProp( 'frameGrabberAcquisitionRegionBottom', experiment, 'frameGrabberAcquisitionRegion.Bottom', '512', low=0, high=512) self.numImageBuffers = IntRangeProp('numImageBuffers', experiment, 'number of image buffers', '300', low=0) self.shotsPerMeasurement = IntRangeProp('shotsPerMeasurement', experiment, 'shots per measurement', '1', low=0) self.properties += [ 'version', 'forceImagesToU16', 'EMGain', 'analogGain', 'exposureTime', 'scanSpeed', 'lowLightSensitivity', 'externalTriggerMode', 'triggerPolarity', 'externalTriggerSource', 'cooling', 'fan', 'scanMode', 'photoelectronScaling', 'subArrayLeft', 'subArrayTop', 'subArrayWidth', 'subArrayHeight', 'superPixelBinning', 'frameGrabberAcquisitionRegionLeft', 'frameGrabberAcquisitionRegionTop', 'frameGrabberAcquisitionRegionRight', 'frameGrabberAcquisitionRegionBottom', 'numImageBuffers', 'shotsPerMeasurement' ] self.doNotSendToHardware += ['photoelectronScaling']
def __init__(self, name, experiment, description=''): super(Noise_Eater, self).__init__(name, experiment, description) self.target_setting = FloatProp('target_setting1', experiment, 'the target Voltage', '1') self.properties += ['target_setting', 'ip', 'ID']
def __init__(self, name, experiment, description=''): super(Rearrange, self).__init__(name, experiment, description='') self.properties += [ 'version', 'IP', 'port', 'enable', 'sub_array_left', 'sub_array_top', 'sub_array_width', 'sub_array_height' ] self.frequency_increment = FloatProp('frequency_increment', experiment, 'the target power 1 percentage', '100') self.jump_time = FloatProp('jump_time', experiment, 'the target power 1 percentage', '100') self.laser_ramp_on_time = FloatProp('laser_ramp_on_time', experiment, 'the target power 1 percentage', '100') self.fit_freq_sites = ListProp( 'fit_freq_sites', experiment, 'A of sites fequency offsets which can take variable inputs', listElementType=Fit_Sites, listElementName='fit_site_freq') self.force_freq_sites = ListProp( 'force_freq_sites', experiment, 'A of sites fequency offsets which can take variable inputs', listElementType=Force_Sites, listElementName='force_site_freq') self.site_pattern = ListProp( 'site_pattern', experiment, 'A of sites fequency offsets which can take variable inputs', listElementType=Pattern_Sites, listElementName='site_occupation') #self.site_pattern = List('site_pattern', experiment, 'occupation', listElementType=Site_Offset,listElementName='occupation signature') self.properties += [ 'jump_time', 'frequency_increment', 'laser_ramp_on_time', 'enable', 'version', 'fit_freq_sites', 'force_freq_sites', 'site_pattern' ] # where we are going to dump data after analysis self.iter_analysis_base_path = 'analysis' # open settings file settings = h5py.File('settings.hdf5', 'r') # get rows and columns self.rows = settings['settings/experiment/ROI_rows'].value self.columns = settings['settings/experiment/ROI_columns'].value # get gaussian roi parameters and append image rows and columns to front of list bottom = eval(settings[ 'settings/experiment/LabView/camera/frameGrabberAcquisitionRegionBottom/function'] .value) top = eval(settings[ 'settings/experiment/LabView/camera/frameGrabberAcquisitionRegionTop/function'] .value) image_rows = bottom - top right = eval(settings[ 'settings/experiment/LabView/camera/frameGrabberAcquisitionRegionRight/function'] .value) left = eval(settings[ 'settings/experiment/LabView/camera/frameGrabberAcquisitionRegionLeft/function'] .value) image_columns = right - left self.gaussian_roi_params = settings[ 'settings/experiment/gaussian_roi/fitParams'].value self.gaussian_roi_params = [(image_rows, image_columns)] + list( self.gaussian_roi_params) # get cutoffs to send to rearranger barecutoff = settings[ 'settings/experiment/thresholdROIAnalysis/threshold_array'].value[ 0] self.s0_thresholds = numpy.zeros(self.rows * self.columns) if len(barecutoff) != len(self.s0_thresholds): logger.warning( 'ROI number change detected, thresholds for rearrangement are invalid.' ) barecutoff = numpy.resize(barecutoff, len(self.s0_thresholds)) for i in range(self.rows * self.columns): self.s0_thresholds[i] = barecutoff[i][0] self.s0_thresholds[i] = self.s0_thresholds[i] #close hdf5 file settings.close()
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']
def __init__(self, name, experiment, description=''): super(PyPicomotor, self).__init__(name, experiment, description) self.desired_position = FloatProp('desired_position', experiment, 'the desired position','0') self.properties += ['current_position']