Пример #1
0
    def collect_pixel(self, pixel_num, k, j, i):
        self.ccd_measure.interrupt_measurement_called = self.interrupt_measurement_called
        IRMicroscopeBase2DScan.collect_pixel(self, pixel_num, k, j, i)
        #calculate time remaining, there is almost 0.72 second overhead per pixel.
        #sec_remaining = (self.Npixels-(pixel_num+1))*(self.app.hardware['winspec_remote_client'].settings['acq_time']+0.72)
        #print(self.name, "collecting pixel: (",k,j,i, ") number:", pixel_num+1,"of",self.Npixels,
        #      'estimated time remaining:',datetime.timedelta(seconds=sec_remaining) )

        #acquire ccd data
        counter = 0
        retry = True
        while (retry):
            try:
                counter += 1
                hdr, data = self.ccd_measure.acquire_data(debug=False)
                #1print(counter)
                retry = False
            except:
                print('An error occurred while aquire_data(), try', counter,
                      '/4')
                retry = True
            finally:
                if counter > 3:
                    retry = False
                    #self.measurement_sucessfully_completed = False
        if hdr is None or data is None:
            raise IOError("Failed to acquire Data (probably interrupted)")
        self.hdr = hdr
        self.data = data[0, 0, :]

        if pixel_num == 0:
            self.wls = self.ccd_measure.evaluate_wls_acton_spectrometer(
                self.hdr, self.px_index)

        intensity = self.data.sum()
        self.display_image_map[k, j, i] = intensity

        # save spectral data
        if self.settings['save_h5']:
            self.hyperspectral_map_h5[k, j, i, :] = self.data
            self.integrated_count_map_h5[k, j, i] = intensity
            if pixel_num == 0:
                self.wls_h5[:] = self.wls
Пример #2
0
 def collect_pixel(self, pixel_num, k, j, i):
     IRMicroscopeBase2DScan.collect_pixel(self, pixel_num, k, j, i)
     AndorHyperSpec2DScanBase.collect_pixel(self, pixel_num, k, j, i)
Пример #3
0
 def collect_pixel(self, pixel_num, k, j, i):
     IRMicroscopeBase2DScan.collect_pixel(self, pixel_num, k, j, i)
     TRPL2DScanBase.collect_pixel(self, pixel_num, k, j, i)