Example #1
0
    def __init__(self, name, settings):
        super(EQSANSInterface, self).__init__(name, settings)

        self.ERROR_REPORT_NAME = "sans_error_report.xml"
        self.LAST_REDUCTION_NAME = ".mantid_last_reduction.xml"

        # Scripter object to interface with Mantid
        self.scripter = EQSANSReductionScripter(name=name, settings = self._settings)

        # Instrument description
        self.attach(SANSInstrumentWidget(settings = self._settings, data_proxy=DataProxy, data_type = self.data_type))

        # Detector
        self.attach(DetectorWidget(settings = self._settings, data_proxy=DataProxy,
                                   data_type = self.data_type, use_sample_dc=True,
                                   options_callback = self.scripter.set_options))

        # Sample
        self.attach(DataSetsWidget(settings = self._settings, data_proxy=None, data_type = self.data_type))

        # Catalog
        self.attach(SANSCatalogWidget(settings = self._settings, catalog_cls=DataCatalog))

        # Tabs that only make sense within MantidPlot
        if IS_IN_MANTIDPLOT:
            # Stitcher
            self.attach(StitcherWidget(settings = self._settings))

        # Reduction output
        self.attach(OutputWidget(settings = self._settings))

        return
    def __init__(self, name, settings):
        super(HFIRInterface, self).__init__(name, settings)

        self.ERROR_REPORT_NAME = "sans_error_report.xml"
        self.LAST_REDUCTION_NAME = ".mantid_last_HFIR_reduction.xml"

        # Scripter object to interface with Mantid
        self.scripter = HFIRReductionScripter(name=name,
                                              settings=self._settings)

        # Instrument description
        self.attach(
            SANSInstrumentWidget(settings=self._settings,
                                 name=name,
                                 data_proxy=DataProxy))

        # Detector
        self.attach(
            DetectorWidget(settings=self._settings,
                           data_proxy=DataProxy,
                           options_callback=self.scripter.set_options))

        # Sample
        self.attach(
            SampleDataWidget(settings=self._settings, data_proxy=DataProxy))

        # Background
        self.attach(
            BackgroundWidget(settings=self._settings, data_proxy=DataProxy))

        # Reduction output
        self.attach(OutputWidget(settings=self._settings))

        # Catalog
        self.attach(
            SANSCatalogWidget(settings=self._settings,
                              catalog_cls=DataCatalog))

        # Stitcher
        if IS_IN_MANTIDGUI:
            self.attach(StitcherWidget(settings=self._settings))