예제 #1
0
"""
    Script used to start the DGS reduction GUI from MantidPlot
"""
from reduction_application import ReductionGUI
from PyQt4 import QtCore, uic

reducer = ReductionGUI(instrument_list=[
    "ARCS", "CNCS", "HYSPEC", "MAPS", "MARI", "MERLIN", "SEQUOIA"
])
if reducer.setup_layout(load_last=True):
    reducer.show()
예제 #2
0
"""
    Script used to start the REFL reduction gui from Mantidplot
"""
from reduction_application import ReductionGUI
from PyQt4 import QtCore, uic

reducer = ReductionGUI(instrument="REFL", instrument_list=["REFL"])
if reducer.setup_layout(load_last=True):
    reducer.show()
예제 #3
0
파일: ORNL_SANS.py 프로젝트: ethoeng/mantid
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
#   NScD Oak Ridge National Laboratory, European Spallation Source,
#   Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
#pylint: disable=invalid-name
"""
    Script used to start the HFIR SANS reduction gui from Mantidplot
"""
from reduction_application import ReductionGUI

reducer = ReductionGUI(instrument_list=["BIOSANS", "GPSANS", "EQSANS"])
if reducer.setup_layout(load_last=True):
    reducer.show()
#pylint: disable=invalid-name
"""
    Script used to start the DGS reduction GUI from MantidPlot
"""
import os
import sys

from reduction_application import ReductionGUI

if 'workbench' in sys.modules:
    from workbench.config import get_window_config

    parent, flags = get_window_config()
else:
    parent, flags = None, None
reducer = ReductionGUI(parent, flags, instrument_list=["PG3", "NOM", "VULCAN"])
if reducer.setup_layout(load_last=True):

    # Set up reduction configuration from previous usage
    try:
        # Find home dir
        homedir = os.path.expanduser("~")
        mantidconfigdir = os.path.join(homedir, ".mantid")
        autopath = os.path.join(mantidconfigdir, 'snspowderreduction.xml')
        # Load configuration
        reducer.open_file(autopath)
    except IOError as e:
        print(
            "[Error] Unable to load previously reduction setup from file %s.\nReason: %s."
            % (autopath, str(e)))
    else:
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
#     NScD Oak Ridge National Laboratory, European Spallation Source
#     & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
#pylint: disable=invalid-name
"""
    Script used to start the DGS reduction GUI from MantidPlot
"""
from __future__ import (absolute_import, division, print_function)
import os

from reduction_application import ReductionGUI

reducer = ReductionGUI(instrument_list=["PG3", "NOM", "VULCAN"])
if reducer.setup_layout(load_last=True):

    # Set up reduction configuration from previous usage
    try:
        # Find home dir
        homedir = os.path.expanduser("~")
        mantidconfigdir = os.path.join(homedir, ".mantid")
        autopath = os.path.join(mantidconfigdir, 'snspowderreduction.xml')
        # Load configuration
        reducer.open_file(autopath)
    except IOError as e:
        print("[Error] Unable to load previously reduction setup from file %s.\nReason: %s." % (
            autopath, str(e)))
    else:
        print("[Info] Load earlier reduction setup from auto-saved %s." % (autopath))
예제 #6
0
"""
    Script used to start the DGS reduction GUI from MantidPlot
"""
from reduction_application import ReductionGUI
from PyQt4 import QtCore, uic

reducer = ReductionGUI(instrument_list=["PG3", "NOM", "VULCAN"])
if reducer.setup_layout(load_last=True):
    reducer.show()