Beispiel #1
0
    def _get_run_details(self, run_number):
        # TODO once we migrate this to another format (i.e. not the if/elif/else) implement cached val
        cycle_dict = self._get_label_information(run_number=run_number)

        calibration_file, grouping_file, van_absorb, van_file =\
            pearl_calib_factory.get_calibration_filename(cycle=cycle_dict["cycle"], tt_mode=self._tt_mode)
        cycle, instrument_version = pearl_cycle_factory.get_cycle_dir(run_number)

        calibration_dir = self.calibration_dir

        calibration_full_path = os.path.join(calibration_dir, calibration_file)
        grouping_full_path = os.path.join(calibration_dir, grouping_file)
        van_absorb_full_path = os.path.join(calibration_dir, van_absorb)
        van_file_full_path = os.path.join(calibration_dir, van_file)

        run_details = RunDetails(calibration_path=calibration_full_path, grouping_path=grouping_full_path,
                                 vanadium_runs=van_file_full_path, run_number=run_number)
        run_details.vanadium_absorption = van_absorb_full_path
        run_details.label = cycle
        run_details.instrument_version = instrument_version

        # TODO remove this when we move to saving splined van ws on PEARL
        run_details.splined_vanadium = run_details.vanadium

        return run_details