Exemplo n.º 1
0
    def test_that_gets_correct_reduction_selection(self):
        sans_settings = get_reduction_selection(SANSInstrument.SANS2D)
        self._assert_same_map(
            sans_settings, {
                ReductionMode.LAB: "rear",
                ReductionMode.HAB: "front",
                ReductionMode.MERGED: "Merged",
                ReductionMode.ALL: "All"
            })

        loq_settings = get_reduction_selection(SANSInstrument.LOQ)
        self._assert_same_map(
            loq_settings, {
                ReductionMode.LAB: "main-detector",
                ReductionMode.HAB: "Hab",
                ReductionMode.MERGED: "Merged",
                ReductionMode.ALL: "All"
            })

        larmor_settings = get_reduction_selection(SANSInstrument.LARMOR)
        self._assert_same_map(larmor_settings,
                              {ReductionMode.LAB: "DetectorBench"})

        default_settings = get_reduction_selection(
            SANSInstrument.NO_INSTRUMENT)
        self._assert_same_map(
            default_settings, {
                ReductionMode.LAB: "LAB",
                ReductionMode.HAB: "HAB",
                ReductionMode.MERGED: "Merged",
                ReductionMode.ALL: "All"
            })
Exemplo n.º 2
0
    def test_that_gets_correct_reduction_selection(self):
        sans_settings = get_reduction_selection(SANSInstrument.SANS2D)
        self._assert_same_map(sans_settings, {ISISReductionMode.LAB: "rear", ISISReductionMode.HAB: "front",
                                              ISISReductionMode.Merged: "Merged", ISISReductionMode.All: "All"})

        loq_settings = get_reduction_selection(SANSInstrument.LOQ)
        self._assert_same_map(loq_settings, {ISISReductionMode.LAB: "main-detector", ISISReductionMode.HAB: "Hab",
                                             ISISReductionMode.Merged: "Merged", ISISReductionMode.All: "All"})

        larmor_settings = get_reduction_selection(SANSInstrument.LARMOR)
        self._assert_same_map(larmor_settings, {ISISReductionMode.LAB: "DetectorBench"})

        default_settings = get_reduction_selection(SANSInstrument.NoInstrument)
        self._assert_same_map(default_settings, {ISISReductionMode.LAB: "LAB", ISISReductionMode.HAB: "HAB",
                                                 ISISReductionMode.Merged: "Merged", ISISReductionMode.All: "All"})