Exemple #1
0
    def _apply_absorb_corrections(self, run_details, ws_to_correct):
        if self._inst_settings.gen_absorb:
            absorb_file_name = self._inst_settings.absorb_out_file
            if not absorb_file_name:
                raise RuntimeError("\"absorb_corrections_out_filename\" must be supplied when generating absorption "
                                   "corrections")
            absorb_corrections = pearl_algs.generate_vanadium_absorb_corrections(van_ws=ws_to_correct,
                                                                                 output_filename=absorb_file_name)
        else:
            absorb_corrections = None

        return pearl_algs.apply_vanadium_absorb_corrections(van_ws=ws_to_correct, run_details=run_details,
                                                            absorb_ws=absorb_corrections)
Exemple #2
0
    def _apply_absorb_corrections(self, run_details, ws_to_correct):
        if self._inst_settings.gen_absorb:
            absorb_file_name = self._inst_settings.absorb_out_file
            if not absorb_file_name:
                raise RuntimeError("\"absorb_corrections_out_filename\" must be supplied when generating absorption "
                                   "corrections")
            absorb_corrections = pearl_algs.generate_vanadium_absorb_corrections(van_ws=ws_to_correct,
                                                                                 output_filename=absorb_file_name)
        else:
            absorb_corrections = None

        return pearl_algs.apply_vanadium_absorb_corrections(van_ws=ws_to_correct, run_details=run_details,
                                                            absorb_ws=absorb_corrections)
Exemple #3
0
    def _apply_absorb_corrections(self, run_details, ws_to_correct):
        # TODO move generating absorption corrections to an instrument param
        gen_absorb = False
        if gen_absorb:
            pearl_algs.generate_vanadium_absorb_corrections(van_ws=ws_to_correct)

        if not self._is_vanadium:
            # This is sample absorption corrections which is not supported on Pearl.
            # We should not get here as the absorption flag shouldn't do anything whilst focusing on Pearl
            raise RuntimeError("Cannot run Absorption corrections for a sample on Pearl. Please contact development "
                               "team.")

        return pearl_algs.apply_vanadium_absorb_corrections(van_ws=ws_to_correct, run_details=run_details)