diff --git a/aliases/bernina.py b/aliases/bernina.py index 10f40af..62a9ebf 100755 --- a/aliases/bernina.py +++ b/aliases/bernina.py @@ -161,6 +161,11 @@ aliases = { 'z_und' : 142, 'desc' : 'Experiment laser optics', 'eco_type' : 'loptics.bernina_experiment.Laser_Exp'}, + 'SLAAR01-TSPL-EPL' : { + 'alias' : 'PhaseShifter', + 'z_und' : 142, + 'desc' : 'Experiment laser phase shifter', + 'eco_type' : 'devices_general.timing.PhaseShifterAramis'}, 'http://sf-daq-1:10000' : { 'alias' : 'DetJF', 'z_und' : 142, diff --git a/devices_general/detectors.py b/devices_general/detectors.py index 9620f60..15963b9 100755 --- a/devices_general/detectors.py +++ b/devices_general/detectors.py @@ -150,10 +150,33 @@ class JF: config = self.client.get_config() return config - def set_config(self): - self.writer_config = {'dataset_name': 'jungfrau/data','output_file': '/gpfs/sf-data/bernina/raw/p16582/Bi11_pp_delayXXPP_tests.h5','process_gid': 16582, 'process_uid': 16582, "disable_processing": False}; - self.backend_config = {"n_frames": 100000, "pede_corrections_filename": "/sf/bernina/data/res/p16582/pedestal_20171119_1027_res.h5", "pede_corrections_dataset": "gains", "gain_corrections_filename": "/sf/bernina/data/res/p16582/gains.h5", "gain_corrections_dataset": "gains", "activate_corrections_preview": True, "pede_mask_dataset": "pixel_mask"}; - self.detector_config = {"exptime": 0.0001, "cycles":20000, "timing": "trigger", "frames": 1} + def set_config(self, f = "/sf/bernina/data/JF.h5", N = 1000): + + self.reset() + self.detector_config = { + "timing": "trigger", + "exptime": 0.00001, + "delay" : 0.00199, # this is the magic aldo number + "frames" : 1, + "cycles": N} + + + self.writer_config = { + "output_file": fname, + "process_uid": 16582, + "process_gid": 16582, + "dataset_name": "jungfrau/data", + "n_messages": N} + + self.backend_config = { + "n_frames": N, + "gain_corrections_filename": "/sf/bernina/data/res/p16582/gains.h5", + "gain_corrections_dataset": "gains", + "pede_corrections_filename": pedestal_fname, + "pede_corrections_dataset": "gains", + "activate_corrections_preview": True} + + DetectorIntegrationClient.set_config(self,self.writer_config, self.backend_config, self.detector_config) pass @@ -203,11 +226,14 @@ class JF: def acquire(self,file_name=None,Npulses=100): file_name += '_JF1p5M.h5' def acquire(file_name=None, Npulses=None): +<<<<<<< HEAD self.detector_config.update(dict(cycles=Npulses)) self.writer_config.update(dict(output_file=file_name)) +======= +>>>>>>> 996d461d115daf9b253e9c9a997af8fed35bd17e self.reset() - DetectorIntegrationClient.set_config(self,self.writer_config, self.backend_config, self.detector_config) + self.set_config(f = file_name, N = Npulses) self.client.start() self.check_running() self.check_still_running() diff --git a/loptics/bernina_experiment.py b/loptics/bernina_experiment.py index 9b1b52e..4f0aafc 100755 --- a/loptics/bernina_experiment.py +++ b/loptics/bernina_experiment.py @@ -7,6 +7,8 @@ class Laser_Exp: self.Id = Id self.delay_stage_offset =160. + + ### Mirrors used in the expeirment ### try: self.phi = MotorRecord(Id+'-M517:MOT') @@ -19,10 +21,10 @@ class Laser_Exp: print('No Standa steering theta mirror') pass + #Waveplate and Delay stage + self.wp = MotorRecord(Id+'-M533:MOT') self.delay_stage = MotorRecord(Id+'-M521:MOTOR_1') - - def get_delay(self): motor_pos = self.delay_stage.wm()