Ejemplo n.º 1
0
 def setUp(self):
     self.base_dir = glbl.base
     self.home_dir = os.path.join(self.base_dir, 'xpdUser')
     self.config_dir = os.path.join(self.base_dir, 'xpdConfig')
     self.PI_name = 'Billinge '
     self.saf_num = 300000  # must be 30000 for proper load of config yaml => don't change
     self.wavelength = 0.1812
     self.experimenters = [('van der Banerjee', 'S0ham', 1),
                           ('Terban ', ' Max', 2)]
     # make xpdUser dir. That is required for simulation
     os.makedirs(self.home_dir, exist_ok=True)
     self.bt = _start_beamtime(self.PI_name, self.saf_num,
                               self.experimenters,
                               wavelength=self.wavelength)
     xlf = '300000_sample.xlsx'
     src = os.path.join(os.path.dirname(__file__), xlf)
     shutil.copyfile(src, os.path.join(glbl.import_dir, xlf))
     import_sample_info(self.saf_num, self.bt)
     self.sp = ScanPlan(self.bt, ct, 5)
     glbl.shutter_control = True
     self.xrun = CustomizedRunEngine(self.bt)
     open_collection('unittest')
     # simulation objects
     glbl.area_det = SimulatedPE1C('pe1c', {'pe1_image': lambda: 5})
     glbl.temp_controller = be.motor
     glbl.shutter = be.Mover('motor', {'motor': lambda x: x}, {'x': 0})
Ejemplo n.º 2
0
 def setUp(self):
     self.base_dir = glbl.base
     self.home_dir = os.path.join(self.base_dir, 'xpdUser')
     self.config_dir = os.path.join(self.base_dir, 'xpdConfig')
     self.PI_name = 'Billinge '
     self.saf_num = 300000  # must be 30000 for proper load of config yaml => don't change
     self.wavelength = 0.1812
     self.experimenters = [('van der Banerjee', 'S0ham', 1),
                           ('Terban ', ' Max', 2)]
     # make xpdUser dir. That is required for simulation
     os.makedirs(self.home_dir, exist_ok=True)
     self.bt = _start_beamtime(self.PI_name,
                               self.saf_num,
                               self.experimenters,
                               wavelength=self.wavelength)
     xlf = '300000_sample.xlsx'
     src = os.path.join(os.path.dirname(__file__), xlf)
     shutil.copyfile(src, os.path.join(glbl.import_dir, xlf))
     import_sample_info(self.saf_num, self.bt)
     self.sp = ScanPlan(self.bt, ct, 5)
     glbl.shutter_control = True
     self.xrun = CustomizedRunEngine(self.bt)
     open_collection('unittest')
     # simulation objects
     glbl.area_det = SimulatedPE1C('pe1c', {'pe1_image': lambda: 5})
     glbl.temp_controller = be.motor
     glbl.shutter = be.Mover('motor', {'motor': lambda x: x}, {'x': 0})
Ejemplo n.º 3
0
 def setUp(self):
     self.base_dir = glbl.base
     self.home_dir = os.path.join(self.base_dir, 'xpdUser')
     self.config_dir = os.path.join(self.base_dir, 'xpdConfig')
     self.PI_name = 'Billinge '
     self.saf_num = 300000  # must be 30000 for proper load of config yaml => don't change
     self.wavelength = 0.1812
     self.experimenters = [('van der Banerjee', 'S0ham', 1),
                           ('Terban ', ' Max', 2)]
     # make xpdUser dir. That is required for simulation
     os.makedirs(self.home_dir, exist_ok=True)
     # set simulation objects
     glbl.area_det = SimulatedPE1C('pe1c', {'pe1_image': lambda: 5})
     print("AT SETUP: numbe_of_sets = {}, images_per_set = {}, "
           "acquire_time ={}"
           .format(glbl.area_det.number_of_sets.get(),
                   glbl.area_det.images_per_set.get(),
                   glbl.area_det.cam.acquire_time.get()))
     glbl.temp_controller = cs700
     glbl.shutter = shctl1
     self.bt = _start_beamtime(self.PI_name, self.saf_num,
                               self.experimenters,
                               wavelength=self.wavelength)
     xlf = '300000_sample.xlsx'
     src = os.path.join(os.path.dirname(__file__), xlf)
     shutil.copyfile(src, os.path.join(glbl.import_dir, xlf))
     import_sample_info(self.saf_num, self.bt)
     self.xrun = CustomizedRunEngine(self.bt)
     open_collection('unittest')
Ejemplo n.º 4
0
 def setUp(self):
     self.base_dir = glbl.base
     self.home_dir = os.path.join(self.base_dir, 'xpdUser')
     self.config_dir = os.path.join(self.base_dir, 'xpdConfig')
     self.PI_name = 'Billinge '
     self.saf_num = 30079  # must be 30079 for proper load of config yaml => don't change
     self.wavelength = 0.1812
     self.experimenters = [('van der Banerjee', 'S0ham', 1),
                           ('Terban ', ' Max', 2)]
     # make xpdUser dir. That is required for simulation
     os.makedirs(self.home_dir, exist_ok=True)
     self.bt = _start_beamtime(self.PI_name, self.saf_num,
                               self.experimenters,
                               wavelength=self.wavelength)
     xlf = '30079_sample.xlsx'
     src = os.path.join(os.path.dirname(__file__), xlf)
     shutil.copyfile(src, os.path.join(glbl.xpdconfig, xlf))
     import_sample(self.saf_num, self.bt)
     self.sp = ScanPlan(self.bt, ct, 5)
     glbl.shutter_control = False
     self.prun = CustomizedRunEngine(self.bt)
     open_collection('unittest')