コード例 #1
0
 def __init__(self):
     # inherit a QThread to run parallel from the GUI
     super().__init__()
     self.isRunning = False
     self.moveToThread(self)
     self.started.connect(self.measure)
     
     # load frequently used constants
     constants = MeasurementConstants()
     self.configs = NiDaqChannels().look_up_table
     self.sampleRate = constants.patchSealSampRate
     self.frequency = constants.patchSealFreq
     self.voltMin = constants.patchSealMinVol
     self.voltMax = constants.patchSealMaxVol
     self.dutycycle = constants.patchSealDuty
     self.readNumber = 100 # should be a multiple of the wavelength
     
     # look up channel configuration of NIDAQ
     self.configs = NiDaqChannels().look_up_table
     self.patchVoltOutChan = None
     self.patchCurOutChan = None
     self.patchVoltInChan = None
     
     # generate wave function from loaded constants
     self.wave = np.zeros(self.readNumber)
     self.setWave(1,0,0)
     
     # operation mode
     self.mode = 'voltageclamp'
コード例 #2
0
 def __init__(self, channel_LUT = None, *args, **kwargs):
     
     super().__init__(*args, **kwargs)
     """
     Specifiy NI-daq channels. channel_LUT in the form of dictionary, with keys being the 
     purpose of the channel (the same as the fields from the input waveforms' "Sepcification" 
     field) and values being the port of the daq. If not specified it will load the dictionary
     from NiDaqChannels class in NIDAQ.constants.
     """
     if channel_LUT == None:
         self.channel_LUT = NiDaqChannels().look_up_table
     else:
         self.channel_LUT = channel_LUT
コード例 #3
0
    def __init__(self, wave, sampleRate, readNumber, *args, **kwargs):
        """
        wave is the output data
        sampleRate is the sampleRate of the DAQ
        readNumber is the
        """
        super().__init__(*args, **kwargs)
        self.patchVoltInChan = None
        self.patchVoltOutChan = None
        self.patchCurOutChan = None

        self.sampleRate = sampleRate

        self.wave = wave

        self.configs = NiDaqChannels().look_up_table