Esempio n. 1
0
    def create_cal(self, **kwargs):
        with self._apply_temporary_inst_settings(kwargs,
                                                 kwargs.get("run_number")):
            run_details = self._get_run_details(self._inst_settings.run_number)

            cross_correlate_params = {
                "ReferenceSpectra": self._inst_settings.reference_spectra,
                "WorkspaceIndexMin": self._inst_settings.cross_corr_ws_min,
                "WorkspaceIndexMax": self._inst_settings.cross_corr_ws_max,
                "XMin": self._inst_settings.cross_corr_x_min,
                "XMax": self._inst_settings.cross_corr_x_max
            }
            get_detector_offsets_params = {
                "DReference": self._inst_settings.d_reference,
                "Step": self._inst_settings.get_det_offsets_step,
                "XMin": self._inst_settings.get_det_offsets_x_min,
                "XMax": self._inst_settings.get_det_offsets_x_max
            }
            output_file_paths = self._generate_out_file_paths(run_details)
            return pearl_calibration_algs.create_calibration(
                calibration_runs=self._inst_settings.run_number,
                instrument=self,
                offset_file_name=run_details.offset_file_path,
                grouping_file_name=run_details.grouping_file_path,
                calibration_dir=self._inst_settings.calibration_dir,
                rebin_1_params=self._inst_settings.cal_rebin_1,
                rebin_2_params=self._inst_settings.cal_rebin_2,
                cross_correlate_params=cross_correlate_params,
                get_det_offset_params=get_detector_offsets_params,
                output_name=output_file_paths["output_name"] + "_grouped")
Esempio n. 2
0
    def create_cal(self, **kwargs):
        self._switch_long_mode_inst_settings(kwargs.get("long_mode"))
        self._inst_settings.update_attributes(kwargs=kwargs)
        run_details = self._get_run_details(self._inst_settings.run_number)

        cross_correlate_params = {
            "ReferenceSpectra": self._inst_settings.reference_spectra,
            "WorkspaceIndexMin": self._inst_settings.cross_corr_ws_min,
            "WorkspaceIndexMax": self._inst_settings.cross_corr_ws_max,
            "XMin": self._inst_settings.cross_corr_x_min,
            "XMax": self._inst_settings.cross_corr_x_max
        }
        get_detector_offsets_params = {
            "DReference": self._inst_settings.d_reference,
            "Step": self._inst_settings.get_det_offsets_step,
            "XMin": self._inst_settings.get_det_offsets_x_min,
            "XMax": self._inst_settings.get_det_offsets_x_max
        }

        return pearl_calibration_algs.create_calibration(
            calibration_runs=self._inst_settings.run_number,
            instrument=self,
            offset_file_name=run_details.offset_file_path,
            grouping_file_name=run_details.grouping_file_path,
            calibration_dir=self._inst_settings.calibration_dir,
            rebin_1_params=self._inst_settings.cal_rebin_1,
            rebin_2_params=self._inst_settings.cal_rebin_2,
            cross_correlate_params=cross_correlate_params,
            get_det_offset_params=get_detector_offsets_params)
Esempio n. 3
0
    def create_cal(self, **kwargs):
        with self._apply_temporary_inst_settings(kwargs):
            run_details = self._get_run_details(self._inst_settings.run_number)

            cross_correlate_params = {"ReferenceSpectra": self._inst_settings.reference_spectra,
                                      "WorkspaceIndexMin": self._inst_settings.cross_corr_ws_min,
                                      "WorkspaceIndexMax": self._inst_settings.cross_corr_ws_max,
                                      "XMin": self._inst_settings.cross_corr_x_min,
                                      "XMax": self._inst_settings.cross_corr_x_max}
            get_detector_offsets_params = {"DReference": self._inst_settings.d_reference,
                                           "Step": self._inst_settings.get_det_offsets_step,
                                           "XMin": self._inst_settings.get_det_offsets_x_min,
                                           "XMax": self._inst_settings.get_det_offsets_x_max}

            return pearl_calibration_algs.create_calibration(calibration_runs=self._inst_settings.run_number,
                                                             instrument=self,
                                                             offset_file_name=run_details.offset_file_path,
                                                             grouping_file_name=run_details.grouping_file_path,
                                                             calibration_dir=self._inst_settings.calibration_dir,
                                                             rebin_1_params=self._inst_settings.cal_rebin_1,
                                                             rebin_2_params=self._inst_settings.cal_rebin_2,
                                                             cross_correlate_params=cross_correlate_params,
                                                             get_det_offset_params=get_detector_offsets_params)