Skip to content

Commit

Permalink
Move the SANS GUI out of the Framework.
Browse files Browse the repository at this point in the history
  • Loading branch information
cailafinn committed Sep 19, 2024
1 parent c100135 commit 121d522
Show file tree
Hide file tree
Showing 303 changed files with 894 additions and 852 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
from sans.algorithm_detail.crop_helper import get_component_name
from sans.algorithm_detail.single_execution import perform_can_subtraction
from sans.algorithm_detail.strip_end_nans_and_infs import strip_end_nans
from sans.common.constants import EMPTY_NAME
from sans.common.enums import DetectorType, MaskingQuadrant, FindDirectionEnum
from sans.common.file_information import get_instrument_paths_for_sans_file
from sans.common.general_functions import create_child_algorithm
from sans.common.xml_parsing import get_named_elements_from_ipf_file
from SANS.sans.common.constants import EMPTY_NAME
from SANS.sans.common.enums import DetectorType, MaskingQuadrant, FindDirectionEnum
from SANS.sans.common.file_information import get_instrument_paths_for_sans_file
from SANS.sans.common.general_functions import create_child_algorithm
from SANS.sans.common.xml_parsing import get_named_elements_from_ipf_file
from sans.state.Serializer import Serializer


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
from sans.algorithm_detail.scale_sans_workspace import scale_workspace
from sans.algorithm_detail.slice_sans_event import slice_sans_event
from sans.algorithm_detail.xml_shapes import quadrant_xml
from sans.common.constants import EMPTY_NAME
from sans.common.enums import DetectorType, DataType, MaskingQuadrant, RebinType
from sans.common.general_functions import create_child_algorithm, append_to_sans_file_tag
from SANS.sans.common.constants import EMPTY_NAME
from SANS.sans.common.enums import DetectorType, DataType, MaskingQuadrant, RebinType
from SANS.sans.common.general_functions import create_child_algorithm, append_to_sans_file_tag
from sans.state.AllStates import AllStates
from sans.state.Serializer import Serializer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
from sans.algorithm_detail.move_sans_instrument_component import move_component, MoveTypes
from sans.algorithm_detail.scale_sans_workspace import scale_workspace
from sans.algorithm_detail.slice_sans_event import slice_sans_event
from sans.common.constants import EMPTY_NAME
from sans.common.enums import DetectorType
from sans.common.general_functions import create_child_algorithm, append_to_sans_file_tag
from SANS.sans.common.constants import EMPTY_NAME
from SANS.sans.common.enums import DetectorType
from SANS.sans.common.general_functions import create_child_algorithm, append_to_sans_file_tag
from sans.state.Serializer import Serializer


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
)
from mantid.dataobjects import EventWorkspace
from mantid.kernel import Direction, StringListValidator, Property
from sans.common.constants import EMPTY_NAME
from sans.common.enums import RebinType, RangeStepType
from sans.common.general_functions import (
from SANS.sans.common.constants import EMPTY_NAME
from SANS.sans.common.enums import RebinType, RangeStepType
from SANS.sans.common.general_functions import (
create_unmanaged_algorithm,
append_to_sans_file_tag,
get_input_workspace_as_copy_if_not_same_as_output_workspace,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from mantid.kernel import Direction, FloatArrayProperty
from sans.algorithm_detail.load_data import SANSLoadDataFactory
from sans.algorithm_detail.move_sans_instrument_component import move_component, MoveTypes
from sans.common.enums import SANSDataType
from SANS.sans.common.enums import SANSDataType

from sans.state.Serializer import Serializer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from mantid.api import AlgorithmFactory, Progress
from sans.algorithm_detail.mask_workspace import mask_bins
from sans.common.enums import DetectorType
from SANS.sans.common.enums import DetectorType


class SANSReductionCore(SANSReductionCoreBase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
from sans.algorithm_detail.move_sans_instrument_component import move_component, MoveTypes
from sans.algorithm_detail.scale_sans_workspace import scale_workspace
from sans.algorithm_detail.slice_sans_event import slice_sans_event
from sans.common.constants import EMPTY_NAME
from sans.common.enums import DetectorType, DataType, RebinType
from sans.common.general_functions import create_child_algorithm, append_to_sans_file_tag
from SANS.sans.common.constants import EMPTY_NAME
from SANS.sans.common.enums import DetectorType, DataType, RebinType
from SANS.sans.common.general_functions import create_child_algorithm, append_to_sans_file_tag
from sans.state.Serializer import Serializer
from sans.state.StateObjects.wavelength_interval import WavRange

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from mantid.api import MatrixWorkspaceProperty, AlgorithmFactory, PropertyMode, Progress
from mantid.kernel import Direction, StringListValidator
from sans.common.enums import DetectorType, DataType
from SANS.sans.common.enums import DetectorType, DataType


class SANSReductionCoreEventSlice(SANSReductionCoreBase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from mantid.api import MatrixWorkspaceProperty, AlgorithmFactory, Progress
from mantid.kernel import Direction
from sans.algorithm_detail.mask_workspace import mask_bins
from sans.common.enums import DetectorType
from SANS.sans.common.enums import DetectorType


class SANSReductionCorePreprocess(SANSReductionCoreBase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
from mantid.api import DataProcessorAlgorithm, MatrixWorkspaceProperty, AlgorithmFactory, PropertyMode, FileProperty, FileAction, Progress
from mantid.kernel import Direction, logger
from sans.algorithm_detail.save_workspace import save_to_file, get_zero_error_free_workspace, file_format_with_append
from sans.common.file_information import convert_to_shape
from sans.common.general_functions import get_detector_names_from_instrument
from sans.common.constant_containers import SANSInstrument_string_as_key_NoInstrument
from sans.common.enums import SaveType
from SANS.sans.common.file_information import convert_to_shape
from SANS.sans.common.general_functions import get_detector_names_from_instrument
from SANS.sans.common.constant_containers import SANSInstrument_string_as_key_NoInstrument
from SANS.sans.common.enums import SaveType


class SANSSave(DataProcessorAlgorithm):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
from mantid.kernel import Direction, Property
from mantid.simpleapi import CloneWorkspace
from sans.algorithm_detail.single_execution import run_core_reduction, run_optimized_for_can
from sans.common.enums import DataType, ReductionMode
from sans.common.general_functions import does_can_workspace_exist_on_ads
from SANS.sans.common.enums import DataType, ReductionMode
from SANS.sans.common.general_functions import does_can_workspace_exist_on_ads
from sans.data_objects.sans_workflow_algorithm_outputs import SANSWorkflowAlgorithmOutputs


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
get_reduction_mode_vs_output_bundles,
run_optimized_for_can,
)
from sans.common.enums import DataType, ReductionMode, FitType
from sans.common.general_functions import (
from SANS.sans.common.enums import DataType, ReductionMode, FitType
from SANS.sans.common.general_functions import (
create_child_algorithm,
does_can_workspace_exist_on_ads,
get_transmission_output_name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from sans.algorithm_detail.bundles import ReductionSettingBundle, CompletedSlices
from sans.algorithm_detail.single_execution import get_final_output_workspaces, get_merge_bundle_for_merge_request
from sans.algorithm_detail.strip_end_nans_and_infs import strip_end_nans
from sans.common.enums import DataType, ReductionMode
from sans.common.general_functions import create_child_algorithm
from SANS.sans.common.enums import DataType, ReductionMode
from SANS.sans.common.general_functions import create_child_algorithm
from sans.data_objects.sans_workflow_algorithm_outputs import SANSWorkflowAlgorithmOutputs
from sans.state.Serializer import Serializer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from mantid.api import DataProcessorAlgorithm, MatrixWorkspaceProperty, PropertyMode
from mantid.kernel import Direction, Property, StringListValidator, UnitFactory, EnabledWhenProperty, PropertyCriterion, Logger
import numpy as np
from sans.common.general_functions import create_unmanaged_algorithm
from sans.common.constants import EMPTY_NAME
from SANS.sans.common.general_functions import create_unmanaged_algorithm
from SANS.sans.common.constants import EMPTY_NAME


class Mode(object):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

from mantid.api import FrameworkManager, WorkspaceGroup
from mantid.dataobjects import EventWorkspace
from sans.common.general_functions import create_unmanaged_algorithm
from sans.common.constants import EMPTY_NAME
from sans.common.enums import RangeStepType
from SANS.sans.common.general_functions import create_unmanaged_algorithm
from SANS.sans.common.constants import EMPTY_NAME
from SANS.sans.common.enums import RangeStepType


def provide_workspace(is_event=True):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from mantid.api import AnalysisDataService
from ISISCommandInterface import *
from SANSBatchMode import *
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.LARMOR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from mantid.simpleapi import DeleteWorkspace

from ISISCommandInterface import *
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.LARMOR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
AddRuns,
LARMOR,
)
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.LARMOR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from sans.command_interface.ISISCommandInterface import Set1D, Detector, MaskFile, AssignSample, WavRangeReduction, LARMOR

# test batch mode with sans2d and selecting a period in batch mode
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.LARMOR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
AddRuns,
LARMOR,
)
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.LARMOR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from mantid.simpleapi import LoadRaw, MoveInstrumentComponent
import unittest

from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument

"""
Allowing the reduction to use already loaded workspace will make it easier to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import os

from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.LOQ)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from SANSBatchMode import *
import os.path

from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.LOQ)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from mantid.api import FileFinder
from mantid.simpleapi import LoadNexus, Plus
from sans.command_interface.ISISCommandInterface import LOQ, Detector, Set1D, MaskFile, Gravity, BatchReduce, UseCompatibilityMode
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.LOQ)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from ISISCommandInterface import *

# Test is giving odd results on Linux, but only this 2D one.
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.LOQ)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
WavRangeReduction,
UseCompatibilityMode,
)
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.LOQ)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
)

# Test is giving odd results on Linux, but only this 2D one.
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.LOQ)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest
from mantid.simpleapi import *
from ISISCommandInterface import *
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.LOQ)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# SPDX - License - Identifier: GPL - 3.0 +
import systemtesting
from mantid import FileFinder
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument
from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest

from sans.command_interface.ISISCommandInterface import LOQ, UseCompatibilityMode, BatchReduce
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest
from mantid.simpleapi import *
import ISISCommandInterface as i
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.LOQ)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest
from mantid.kernel import config
from sans.command_interface.ISISCommandInterface import UseCompatibilityMode, LOQ, MaskFile, BatchReduce
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.LOQ)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest
from mantid.simpleapi import *
from ISISCommandInterface import *
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.LOQ)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import os.path

# test batch mode with sans2d and selecting a period in batch mode
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.SANS2D)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
)
import os.path

from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.SANS2D)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import systemtesting
from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest
from ISISCommandInterface import *
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.SANS2D)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
AssignSample,
WavRangeReduction,
)
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.SANS2D)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest
from mantid.simpleapi import *
from ISISCommandInterface import *
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.SANS2D)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import mantid # noqa
from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest
from sans.command_interface.ISISCommandInterface import SANS2D, MaskFile, AssignSample, WavRangeReduction, UseCompatibilityMode
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.SANS2D)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest
from ISISCommandInterface import *
from SANSBatchMode import *
from sans.common.enums import SANSInstrument
from SANS.sans.common.enums import SANSInstrument


@ISISSansSystemTest(SANSInstrument.SANS2D)
Expand Down
Loading

0 comments on commit 121d522

Please sign in to comment.