示例#1
0
    def test_that_OptionsColumnModel_get_hint_strategy(self):
        hint_strategy = TableModel.get_options_hint_strategy()
        expected_hint_strategy = BasicHintStrategy({
            "WavelengthMin":
            'The min value of the wavelength when converting from TOF.',
            "WavelengthMax":
            'The max value of the wavelength when converting from TOF.',
            "PhiMin":
            'The min angle of the detector to accept.'
            ' Anti-clockwise from horizontal.',
            "PhiMax":
            'The max angle of the detector to accept.'
            ' Anti-clockwise from horizontal.',
            "UseMirror":
            'True or False. Whether or not to accept phi angle'
            ' in opposing quadrant',
            "MergeScale":
            'The scale applied to the HAB when merging',
            "MergeShift":
            'The shift applied to the HAB when merging',
            "EventSlices":
            'The event slices to reduce.'
            ' The format is the same as for the event slices'
            ' box in settings, however if a comma separated list is given '
            'it must be enclosed in quotes'
        })

        self.assertEqual(expected_hint_strategy, hint_strategy)
示例#2
0
    def get_hint_strategy():
        from sans.gui_logic.models.basic_hint_strategy import BasicHintStrategy

        return BasicHintStrategy({
            "WavelengthMin":
            'The min value of the wavelength when converting from TOF.',
            "WavelengthMax":
            'The max value of the wavelength when converting from TOF.',
            "PhiMin":
            'The min angle of the detector to accept.'
            ' Anti-clockwise from horizontal.',
            "PhiMax":
            'The max angle of the detector to accept.'
            ' Anti-clockwise from horizontal.',
            "UseMirror":
            'True or False. Whether or not to accept phi angle in opposing quadrant',
            "MergeScale":
            'The scale applied to the HAB when merging',
            "MergeShift":
            'The shift applied to the HAB when merging',
            "EventSlices":
            'The event slices to reduce.'
            ' The format is the same as for the event slices'
            ' box in settings, however if a comma separated list is given '
            'it must be enclosed in quotes'
        })
示例#3
0
 def get_hint_strategy():
     return BasicHintStrategy({"WavelengthMin": 'The min value of the wavelength when converting from TOF.',
                               "WavelengthMax": 'The max value of the wavelength when converting from TOF.',
                               "EventSlices": 'The event slices to reduce.'
                               ' The format is the same as for the event slices'
                               ' box in settings, however if a comma separated list is given '
                               'it must be enclosed in quotes'})
示例#4
0
    def test_that_OptionsColumnModel_get_hint_strategy(self):
        hint_strategy = OptionsColumnModel.get_hint_strategy()
        expected_hint_strategy = BasicHintStrategy({
            "WavelengthMin":
            'The min value of the wavelength when converting from TOF.',
            "WavelengthMax":
            'The max value of the wavelength when converting from TOF.',
            "EventSlices":
            'The event slices to reduce.'
            ' The format is the same as for the event slices'
            ' box in settings, however if a comma separated list is given '
            'it must be enclosed in quotes'
        })

        self.assertEqual(expected_hint_strategy, hint_strategy)
示例#5
0
 def get_sample_shape_hint_strategy():
     return BasicHintStrategy({"Cylinder": "", "Disc": "", "FlatPlate": ""})
示例#6
0
    def get_hint_strategy():
        from sans.gui_logic.models.basic_hint_strategy import BasicHintStrategy

        return BasicHintStrategy({"Cylinder": "", "Disc": "", "FlatPlate": ""})