def acquire(self, n):
        # Leave all array allocation beyond storage to subclasses

        # Set up counters

        self.n = n
        if self.mode == "blockwise":
            # blockwise readout and averaging: use twice the bufferlength
            self.buflen = self.n
        else:
            # running averager: bufferlength == boxcar
            self.buflen = self.n

        self.i_pp = -1     # First thing it does is get incremented
        self.i_po = -1     # First thing it does is get incremented
        self.countup_pp = 0
        self.countup_po = 0
        self.pp_full = False
        self.po_full = False
                
        # Set up storage
        # self.po_buf = dc.createAcquisitionArrays(self.x, self.buflen)   # probe-only buffer
        # self.pp_buf = dc.createAcquisitionArrays(self.x, self.buflen)   # pump-probe buffer
        # self.po     = dc.createAcquisitionArrays(self.x, self.n)        # probe-only signal
        # self.pp     = dc.createAcquisitionArrays(self.x, self.n)        # pump-probe signal
        self.po_buf     = dc.databuffer(self.x, self.buflen)   # probe-only buffer
        self.pp_buf     = dc.databuffer(self.x, self.buflen)  # pump-probe buffer
        self.out        = output(self.x, self.n)
        # dc.createAcquisitionArrays(self.po_buf, self.x, self.buflen)   # probe-only buffer
        # dc.createAcquisitionArrays(self.pp_buf, self.x, self.buflen)   # pump-probe buffer
        # dc.createAcquisitionArrays(self.po, self.x, self.n)        # probe-only signal
        # dc.createAcquisitionArrays(self.pp, self.x, self.n)        # pump-probe signal
        #self.ra     = dc.createAcquisitionArrays(self.x, self.n)        # po/pp ratio
        #self.od     = dc.createAcquisitionArrays(self.x, self.n)        # optical density

        #self.storage = np.zeros((self.n, self.x), dtype=np.int32)

        # Set up fft arrays for calculating ratio using the FFT phase method
        self.fft_buf = dc.fftbuffer(self.x, self.n)    
        # dc.createFFTArrays(self.ftbuf, self.x, self.n)    

        # Get ready to calculate fps
        self.plot_times = []

        # Go
        if self.mode == "blockwise":
            self.new_image.connect(self.collect_blockwise)
        else:
            self.new_image.connect(self.collect_running)
            
        self.new_data_collected.connect(self.process_data)

        self.running = True
Example #2
0
    def acquire(self, n):
        # Leave all array allocation beyond storage to subclasses

        # Set up counters

        self.n = n
        if self.mode == "blockwise":
            # blockwise readout and averaging: use twice the bufferlength
            self.buflen = self.n
        else:
            # running averager: bufferlength == boxcar
            self.buflen = self.n

        self.i_pp = -1  # First thing it does is get incremented
        self.i_po = -1  # First thing it does is get incremented
        self.countup_pp = 0
        self.countup_po = 0
        self.pp_full = False
        self.po_full = False

        # Set up storage
        # self.po_buf = dc.createAcquisitionArrays(self.x, self.buflen)   # probe-only buffer
        # self.pp_buf = dc.createAcquisitionArrays(self.x, self.buflen)   # pump-probe buffer
        # self.po     = dc.createAcquisitionArrays(self.x, self.n)        # probe-only signal
        # self.pp     = dc.createAcquisitionArrays(self.x, self.n)        # pump-probe signal
        self.po_buf = dc.databuffer(self.x, self.buflen)  # probe-only buffer
        self.pp_buf = dc.databuffer(self.x, self.buflen)  # pump-probe buffer
        self.out = output(self.x, self.n)
        # dc.createAcquisitionArrays(self.po_buf, self.x, self.buflen)   # probe-only buffer
        # dc.createAcquisitionArrays(self.pp_buf, self.x, self.buflen)   # pump-probe buffer
        # dc.createAcquisitionArrays(self.po, self.x, self.n)        # probe-only signal
        # dc.createAcquisitionArrays(self.pp, self.x, self.n)        # pump-probe signal
        #self.ra     = dc.createAcquisitionArrays(self.x, self.n)        # po/pp ratio
        #self.od     = dc.createAcquisitionArrays(self.x, self.n)        # optical density

        #self.storage = np.zeros((self.n, self.x), dtype=np.int32)

        # Set up fft arrays for calculating ratio using the FFT phase method
        self.fft_buf = dc.fftbuffer(self.x, self.n)
        # dc.createFFTArrays(self.ftbuf, self.x, self.n)

        # Get ready to calculate fps
        self.plot_times = []

        # Go
        if self.mode == "blockwise":
            self.new_image.connect(self.collect_blockwise)
        else:
            self.new_image.connect(self.collect_running)

        self.new_data_collected.connect(self.process_data)

        self.running = True
 def __init__(self, x_len, n):
     self.background = np.zeros((    x_len, 1))       # backgrund
     self.po         = dc.databuffer(x_len, n)        # probe-only signal
     self.pp         = dc.databuffer(x_len, n)        # pump-probe signal
     self.ra_sim     = dc.databuffer(x_len, n)        # probe-only signal
     self.ra_fft     = dc.databuffer(x_len, n)        # pump-probe signal
     self.od_sim     = dc.databuffer(x_len, n)        # probe-only signal
     self.od_fft     = dc.databuffer(x_len, n)        # pump-probe signal
     self.n_actual   = 0;
     self.fps        = 0;
     self.x_arr      = None
Example #4
0
 def __init__(self, x_len, n):
     self.background = np.zeros((x_len, 1))  # backgrund
     self.po = dc.databuffer(x_len, n)  # probe-only signal
     self.pp = dc.databuffer(x_len, n)  # pump-probe signal
     self.ra_sim = dc.databuffer(x_len, n)  # probe-only signal
     self.ra_fft = dc.databuffer(x_len, n)  # pump-probe signal
     self.od_sim = dc.databuffer(x_len, n)  # probe-only signal
     self.od_fft = dc.databuffer(x_len, n)  # pump-probe signal
     self.n_actual = 0
     self.fps = 0
     self.x_arr = None