예제 #1
0
 def setUp(self):
     self.source = None
     self.exp = None
     self.flatfield_axis = LinearMotor()
     self.flatfield_axis.motion_velocity = 10000 * q.mm / q.s
     self.camera = LoggingCamera(flat_axis=self.flatfield_axis)
     self._data_dir = tempfile.mkdtemp()
     self.walker = DirectoryWalker(root=self._data_dir)
예제 #2
0
 def live_on_stream2disk_prepare(self):
     self.fname, fext = self.QFD.getSaveFileName(self, 'Select directory',
                                                 self.last_dir,
                                                 "Image Files (*.tif)")
     self.lv_dirwalker = DirectoryWalker(root=os.path.dirname(self.fname),
                                         dsetname="frames_{:>02}.tif",
                                         bytes_per_file=2**37)
     self.lv_acquisitions = [Acquisition("Radios", self.acq_lv_stream2disk)]
     self.lv_experiment = Experiment(acquisitions=self.lv_acquisitions,
                                     walker=self.lv_dirwalker,
                                     separate_scans=True,
                                     name_fmt="live_view_seq_{:>03}")
     self.cons_writer = ImageWriter(self.lv_acquisitions,
                                    self.lv_dirwalker,
                                    async=True)
     self.cons_viewer = Consumer(self.lv_acquisitions, self.viewer)
예제 #3
0
 def create_exp(self):
     self.log.info("creating concert experiment")
     acquisitions = []
     #**********CREATE EXPERIMENT AND ATTACH CONSUMERS
     # CREATE NEW WALKER
     if self.file_writer_group.isChecked():
         bpf = 0
         if self.file_writer_group.bigtiff:
             bpf = 2**37
         self.concert_scan.walker = DirectoryWalker(
             root=self.file_writer_group.root_dir,
             dsetname=self.file_writer_group.dsetname,
             bytes_per_file=bpf)
     else:
         # if writer is disabled we do not need walker as well
         self.concert_scan.walker = None
     # create experiment
     self.concert_scan.create_experiment(
         acquisitions, self.file_writer_group.ctsetname,
         self.file_writer_group.separate_scans)
예제 #4
0
 def setUp(self):
     super(TestDirectoryWalker, self).setUp()
     self.path = tempfile.mkdtemp()
     self.walker = DirectoryWalker(root=self.path)
     self.data = np.ones((2, 2))
예제 #5
0
 def setUp(self):
     super(TestExperimentStates, self).setUp()
     self.data_dir = tempfile.mkdtemp()
     self.walker = DirectoryWalker(root=self.data_dir)