diff --git a/Framework/WorkflowAlgorithms/CMakeLists.txt b/Framework/WorkflowAlgorithms/CMakeLists.txt index faeab2d8be3e8a9b77d63dcca45974f6df80be53..2998844af80b008c3fdc690b9af027d9d3a57756 100644 --- a/Framework/WorkflowAlgorithms/CMakeLists.txt +++ b/Framework/WorkflowAlgorithms/CMakeLists.txt @@ -34,8 +34,7 @@ set ( SRC_FILES src/SANSSensitivityCorrection.cpp src/SANSSolidAngleCorrection.cpp src/SetupEQSANSReduction.cpp - src/SetupHFIRReduction.cpp - src/SetupILLD33Reduction.cpp + src/SetupHFIRReduction.cpp src/StepScan.cpp src/WorkflowAlgorithmHelpers.cpp ) @@ -79,8 +78,7 @@ set ( INC_FILES inc/MantidWorkflowAlgorithms/SANSSensitivityCorrection.h inc/MantidWorkflowAlgorithms/SANSSolidAngleCorrection.h inc/MantidWorkflowAlgorithms/SetupEQSANSReduction.h - inc/MantidWorkflowAlgorithms/SetupHFIRReduction.h - inc/MantidWorkflowAlgorithms/SetupILLD33Reduction.h + inc/MantidWorkflowAlgorithms/SetupHFIRReduction.h inc/MantidWorkflowAlgorithms/StepScan.h inc/MantidWorkflowAlgorithms/WorkflowAlgorithmHelpers.h ) diff --git a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SetupILLD33Reduction.h b/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SetupILLD33Reduction.h deleted file mode 100644 index be7a08dfd19857e7e4fb0db5b411e73be0cae76f..0000000000000000000000000000000000000000 --- a/Framework/WorkflowAlgorithms/inc/MantidWorkflowAlgorithms/SetupILLD33Reduction.h +++ /dev/null @@ -1,57 +0,0 @@ -// Mantid Repository : https://github.com/mantidproject/mantid -// -// Copyright © 2011 ISIS Rutherford Appleton Laboratory UKRI, -// NScD Oak Ridge National Laboratory, European Spallation Source -// & Institut Laue - Langevin -// SPDX - License - Identifier: GPL - 3.0 + -#ifndef MANTID_ALGORITHMS_SETUPEQSANSREDUCTION_H_ -#define MANTID_ALGORITHMS_SETUPEQSANSREDUCTION_H_ - -//---------------------------------------------------------------------- -// Includes -//---------------------------------------------------------------------- -#include "MantidAPI/Algorithm.h" -#include "MantidAPI/DeprecatedAlgorithm.h" -#include "MantidAPI/MatrixWorkspace_fwd.h" -#include "MantidDataObjects/EventWorkspace.h" -#include "MantidKernel/PropertyManager.h" - -namespace Mantid { -namespace WorkflowAlgorithms { -/** - Set up the reduction options for ILL D33 reduction. -*/ - -class DLLExport SetupILLD33Reduction : public API::Algorithm, - public API::DeprecatedAlgorithm { -public: - /// Algorithm's name - const std::string name() const override { return "SetupILLD33Reduction"; } - /// Summary of algorithms purpose - const std::string summary() const override { - return "Set up ILL D33 SANS reduction options."; - } - - /// Algorithm's version - int version() const override { return (1); } - /// Algorithm's category for identification - const std::string category() const override { return "Workflow\\SANS"; } - -private: - /// Initialisation code - void init() override; - /// Execution code - void exec() override; - std::string _findFile(std::string dataRun); - void - setupSensitivity(boost::shared_ptr<Kernel::PropertyManager> reductionManager); - void setupTransmission( - boost::shared_ptr<Kernel::PropertyManager> reductionManager); - void - setupBackground(boost::shared_ptr<Kernel::PropertyManager> reductionManager); -}; - -} // namespace WorkflowAlgorithms -} // namespace Mantid - -#endif /*MANTID_ALGORITHMS_SETUPEQSANSREDUCTION_H_*/ diff --git a/Framework/WorkflowAlgorithms/src/SetupILLD33Reduction.cpp b/Framework/WorkflowAlgorithms/src/SetupILLD33Reduction.cpp deleted file mode 100644 index e62aa2b2530a147874db1a12f35ad62fe4f84bed..0000000000000000000000000000000000000000 --- a/Framework/WorkflowAlgorithms/src/SetupILLD33Reduction.cpp +++ /dev/null @@ -1,950 +0,0 @@ -// 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 + -//---------------------------------------------------------------------- -// Includes -//---------------------------------------------------------------------- -#include "MantidWorkflowAlgorithms/SetupILLD33Reduction.h" -#include "MantidAPI/AlgorithmProperty.h" -#include "MantidAPI/FileProperty.h" -#include "MantidKernel/ArrayProperty.h" -#include "MantidKernel/BoundedValidator.h" -#include "MantidKernel/EnabledWhenProperty.h" -#include "MantidKernel/ListValidator.h" -#include "MantidKernel/PropertyManager.h" -#include "MantidKernel/PropertyManagerDataService.h" -#include "MantidKernel/RebinParamsValidator.h" -#include "MantidKernel/VisibleWhenProperty.h" -#include "Poco/NumberFormatter.h" - -namespace Mantid { -namespace WorkflowAlgorithms { - -// Register the algorithm into the AlgorithmFactory -DECLARE_ALGORITHM(SetupILLD33Reduction) - -using namespace Kernel; -using namespace API; -using namespace Geometry; - -void SetupILLD33Reduction::init() { - // Load options - std::string load_grp = "Load Options"; - - declareProperty( - "SolidAngleCorrection", true, - "If true, the solide angle correction will be applied to the data"); - declareProperty( - "DetectorTubes", false, - "If true, the solid angle correction for tube detectors will be applied"); - - // -- Define group -- - setPropertyGroup("SolidAngleCorrection", load_grp); - setPropertyGroup("DetectorTubes", load_grp); - - // Beam center - std::string center_grp = "Beam Center"; - std::vector<std::string> centerOptions{"None", "Value", "DirectBeam", - "Scattering"}; - - declareProperty("BeamCenterMethod", "None", - boost::make_shared<StringListValidator>(centerOptions), - "Method for determining the data beam center"); - - // Option 1: Set beam center by hand - declareProperty("BeamCenterX", EMPTY_DBL(), - "Position of the beam center, in pixel"); - declareProperty("BeamCenterY", EMPTY_DBL(), - "Position of the beam center, in pixel"); - setPropertySettings("BeamCenterX", - make_unique<VisibleWhenProperty>("BeamCenterMethod", - IS_EQUAL_TO, "Value")); - setPropertySettings("BeamCenterY", - make_unique<VisibleWhenProperty>("BeamCenterMethod", - IS_EQUAL_TO, "Value")); - - // Option 2: Find it (expose properties from FindCenterOfMass) - declareProperty( - make_unique<API::FileProperty>( - "BeamCenterFile", "", API::FileProperty::OptionalLoad, "_event.nxs"), - "The name of the input event Nexus file to load"); - setPropertySettings("BeamCenterFile", - make_unique<VisibleWhenProperty>( - "BeamCenterMethod", IS_NOT_EQUAL_TO, "None")); - - auto positiveDouble = boost::make_shared<BoundedValidator<double>>(); - positiveDouble->setLower(0); - declareProperty( - "BeamRadius", EMPTY_DBL(), - "Radius of the beam area used the exclude the beam when calculating " - "the center of mass of the scattering pattern [pixels]. Default=3.0"); - setPropertySettings("BeamRadius", - make_unique<VisibleWhenProperty>( - "BeamCenterMethod", IS_EQUAL_TO, "Scattering")); - - // -- Define group -- - setPropertyGroup("BeamCenterMethod", center_grp); - setPropertyGroup("BeamCenterX", center_grp); - setPropertyGroup("BeamCenterY", center_grp); - setPropertyGroup("BeamCenterFile", center_grp); - setPropertyGroup("BeamRadius", center_grp); - - // Normalisation - std::string norm_grp = "Normalisation"; - std::vector<std::string> incidentBeamNormOptions; - incidentBeamNormOptions.emplace_back("None"); - // The data will be normalised to the monitor counts - incidentBeamNormOptions.emplace_back("Monitor"); - // The data will be normalised to the total charge only (no beam profile) - incidentBeamNormOptions.emplace_back("Timer"); - this->declareProperty( - "Normalisation", "None", - boost::make_shared<StringListValidator>(incidentBeamNormOptions), - "Options for data normalisation"); - - setPropertyGroup("Normalisation", norm_grp); - - // Dark current - declareProperty( - make_unique<API::FileProperty>( - "DarkCurrentFile", "", API::FileProperty::OptionalLoad, "_event.nxs"), - "The name of the input event Nexus file to load as dark current."); - - // Sensitivity - std::string eff_grp = "Sensitivity"; - declareProperty( - make_unique<API::FileProperty>( - "SensitivityFile", "", API::FileProperty::OptionalLoad, "_event.nxs"), - "Flood field or sensitivity file."); - declareProperty( - "MinEfficiency", EMPTY_DBL(), positiveDouble, - "Minimum efficiency for a pixel to be considered (default: no minimum)."); - declareProperty( - "MaxEfficiency", EMPTY_DBL(), positiveDouble, - "Maximum efficiency for a pixel to be considered (default: no maximum)."); - declareProperty("UseDefaultDC", true, - "If true, the dark current subtracted " - "from the sample data will also be " - "subtracted from the flood field."); - declareProperty(make_unique<API::FileProperty>( - "SensitivityDarkCurrentFile", "", - API::FileProperty::OptionalLoad, "_event.nxs"), - "The name of the input file to load as dark current."); - // - sensitivity beam center - declareProperty("SensitivityBeamCenterMethod", "None", - boost::make_shared<StringListValidator>(centerOptions), - "Method for determining the sensitivity data beam center"); - - // Option 1: Set beam center by hand - declareProperty("SensitivityBeamCenterX", EMPTY_DBL(), - "Sensitivity beam center location in X [pixels]"); - setPropertySettings("SensitivityBeamCenterX", - make_unique<VisibleWhenProperty>( - "SensitivityBeamCenterMethod", IS_EQUAL_TO, "Value")); - - declareProperty("SensitivityBeamCenterY", EMPTY_DBL(), - "Sensitivity beam center location in Y [pixels]"); - setPropertySettings("SensitivityBeamCenterY", - make_unique<VisibleWhenProperty>( - "SensitivityBeamCenterMethod", IS_EQUAL_TO, "Value")); - - // Option 2: Find it (expose properties from FindCenterOfMass) - declareProperty( - make_unique<API::FileProperty>("SensitivityBeamCenterFile", "", - API::FileProperty::OptionalLoad, ".xml"), - "The name of the input data file to load"); - setPropertySettings( - "SensitivityBeamCenterFile", - make_unique<VisibleWhenProperty>("SensitivityBeamCenterMethod", - IS_NOT_EQUAL_TO, "None")); - - declareProperty( - "SensitivityBeamCenterRadius", EMPTY_DBL(), - "Radius of the beam area used the exclude the beam when calculating " - "the center of mass of the scattering pattern [pixels]. Default=3.0"); - setPropertySettings("SensitivityBeamCenterRadius", - make_unique<VisibleWhenProperty>( - "BeamCenterMethod", IS_EQUAL_TO, "Scattering")); - - declareProperty("OutputSensitivityWorkspace", "", - "Name to give the sensitivity workspace"); - - // -- Define group -- - setPropertyGroup("SensitivityFile", eff_grp); - setPropertyGroup("MinEfficiency", eff_grp); - setPropertyGroup("MaxEfficiency", eff_grp); - setPropertyGroup("UseDefaultDC", eff_grp); - setPropertyGroup("SensitivityDarkCurrentFile", eff_grp); - setPropertyGroup("SensitivityBeamCenterMethod", eff_grp); - setPropertyGroup("SensitivityBeamCenterX", eff_grp); - setPropertyGroup("SensitivityBeamCenterY", eff_grp); - setPropertyGroup("SensitivityBeamCenterFile", eff_grp); - setPropertyGroup("SensitivityBeamCenterRadius", eff_grp); - setPropertyGroup("OutputSensitivityWorkspace", eff_grp); - - // Transmission - std::string trans_grp = "Transmission"; - std::vector<std::string> transOptions{"Value", "DirectBeam"}; - declareProperty("TransmissionMethod", "Value", - boost::make_shared<StringListValidator>(transOptions), - "Transmission determination method"); - - // - Transmission value entered by hand - declareProperty("TransmissionValue", EMPTY_DBL(), positiveDouble, - "Transmission value."); - setPropertySettings("TransmissionValue", - make_unique<VisibleWhenProperty>("TransmissionMethod", - IS_EQUAL_TO, "Value")); - declareProperty("TransmissionError", EMPTY_DBL(), positiveDouble, - "Transmission error."); - setPropertySettings("TransmissionError", - make_unique<VisibleWhenProperty>("TransmissionMethod", - IS_EQUAL_TO, "Value")); - - // - Direct beam method transmission calculation - declareProperty( - "TransmissionBeamRadius", 3.0, - "Radius of the beam area used to compute the transmission [pixels]"); - setPropertySettings("TransmissionBeamRadius", - make_unique<VisibleWhenProperty>( - "TransmissionMethod", IS_EQUAL_TO, "DirectBeam")); - declareProperty( - make_unique<API::FileProperty>("TransmissionSampleDataFile", "", - API::FileProperty::OptionalLoad, ".xml"), - "Sample data file for transmission calculation"); - setPropertySettings("TransmissionSampleDataFile", - make_unique<VisibleWhenProperty>( - "TransmissionMethod", IS_EQUAL_TO, "DirectBeam")); - declareProperty( - make_unique<API::FileProperty>("TransmissionEmptyDataFile", "", - API::FileProperty::OptionalLoad, ".xml"), - "Empty data file for transmission calculation"); - setPropertySettings("TransmissionEmptyDataFile", - make_unique<VisibleWhenProperty>( - "TransmissionMethod", IS_EQUAL_TO, "DirectBeam")); - - // - transmission beam center - declareProperty("TransmissionBeamCenterMethod", "None", - boost::make_shared<StringListValidator>(centerOptions), - "Method for determining the transmission data beam center"); - setPropertySettings("TransmissionBeamCenterMethod", - make_unique<VisibleWhenProperty>( - "TransmissionMethod", IS_EQUAL_TO, "DirectBeam")); - - // Option 1: Set beam center by hand - declareProperty("TransmissionBeamCenterX", EMPTY_DBL(), - "Transmission beam center location in X [pixels]"); - setPropertySettings("TransmissionBeamCenterX", - make_unique<VisibleWhenProperty>( - "TransmissionMethod", IS_EQUAL_TO, "DirectBeam")); - declareProperty("TransmissionBeamCenterY", EMPTY_DBL(), - "Transmission beam center location in Y [pixels]"); - setPropertySettings("TransmissionBeamCenterY", - make_unique<VisibleWhenProperty>( - "TransmissionMethod", IS_EQUAL_TO, "DirectBeam")); - - // Option 2: Find it (expose properties from FindCenterOfMass) - declareProperty( - make_unique<API::FileProperty>("TransmissionBeamCenterFile", "", - API::FileProperty::OptionalLoad, ".xml"), - "The name of the input data file to load"); - setPropertySettings("TransmissionBeamCenterFile", - make_unique<VisibleWhenProperty>( - "TransmissionMethod", IS_EQUAL_TO, "DirectBeam")); - - declareProperty( - make_unique<API::FileProperty>("TransmissionDarkCurrentFile", "", - API::FileProperty::OptionalLoad, ".xml"), - "The name of the input data file to load as transmission dark current."); - setPropertySettings("TransmissionDarkCurrentFile", - make_unique<VisibleWhenProperty>( - "TransmissionMethod", IS_NOT_EQUAL_TO, "Value")); - - declareProperty( - "TransmissionUseSampleDC", true, - "If true, the sample dark current will be used IF a dark current file is" - "not set."); - setPropertySettings("TransmissionUseSampleDC", - make_unique<VisibleWhenProperty>( - "TransmissionMethod", IS_NOT_EQUAL_TO, "Value")); - - declareProperty( - "ThetaDependentTransmission", true, - "If true, a theta-dependent transmission correction will be applied."); - - // -- Define group -- - setPropertyGroup("TransmissionMethod", trans_grp); - setPropertyGroup("TransmissionValue", trans_grp); - setPropertyGroup("TransmissionError", trans_grp); - setPropertyGroup("TransmissionBeamRadius", trans_grp); - setPropertyGroup("TransmissionSampleDataFile", trans_grp); - setPropertyGroup("TransmissionEmptyDataFile", trans_grp); - setPropertyGroup("TransmissionBeamCenterMethod", trans_grp); - setPropertyGroup("TransmissionBeamCenterX", trans_grp); - setPropertyGroup("TransmissionBeamCenterY", trans_grp); - setPropertyGroup("TransmissionBeamCenterFile", trans_grp); - - setPropertyGroup("TransmissionDarkCurrentFile", trans_grp); - setPropertyGroup("TransmissionUseSampleDC", trans_grp); - setPropertyGroup("ThetaDependentTransmission", trans_grp); - - // Background options - std::string bck_grp = "Background"; - declareProperty("BackgroundFiles", "", "Background data files"); - declareProperty("BckTransmissionMethod", "Value", - boost::make_shared<StringListValidator>(transOptions), - "Transmission determination method"); - - // - Transmission value entered by hand - declareProperty("BckTransmissionValue", EMPTY_DBL(), positiveDouble, - "Transmission value."); - setPropertySettings("BckTransmissionValue", - make_unique<VisibleWhenProperty>("BckTransmissionMethod", - IS_EQUAL_TO, "Value")); - - declareProperty("BckTransmissionError", EMPTY_DBL(), positiveDouble, - "Transmission error."); - setPropertySettings("BckTransmissionError", - make_unique<VisibleWhenProperty>("BckTransmissionMethod", - IS_EQUAL_TO, "Value")); - - // - Direct beam method transmission calculation - declareProperty( - "BckTransmissionBeamRadius", 3.0, - "Radius of the beam area used to compute the transmission [pixels]"); - setPropertySettings("BckTransmissionBeamRadius", - make_unique<VisibleWhenProperty>( - "BckTransmissionMethod", IS_EQUAL_TO, "DirectBeam")); - declareProperty( - make_unique<API::FileProperty>("BckTransmissionSampleDataFile", "", - API::FileProperty::OptionalLoad, ".xml"), - "Sample data file for transmission calculation"); - setPropertySettings("BckTransmissionSampleDataFile", - make_unique<VisibleWhenProperty>( - "BckTransmissionMethod", IS_EQUAL_TO, "DirectBeam")); - declareProperty( - make_unique<API::FileProperty>("BckTransmissionEmptyDataFile", "", - API::FileProperty::OptionalLoad, ".xml"), - "Empty data file for transmission calculation"); - setPropertySettings("BckTransmissionEmptyDataFile", - make_unique<VisibleWhenProperty>( - "BckTransmissionMethod", IS_EQUAL_TO, "DirectBeam")); - - // - transmission beam center - declareProperty("BckTransmissionBeamCenterMethod", "None", - boost::make_shared<StringListValidator>(centerOptions), - "Method for determining the transmission data beam center"); - setPropertySettings("BckTransmissionBeamCenterMethod", - make_unique<VisibleWhenProperty>( - "BckTransmissionMethod", IS_EQUAL_TO, "DirectBeam")); - // Option 1: Set beam center by hand - declareProperty("BckTransmissionBeamCenterX", EMPTY_DBL(), - "Transmission beam center location in X [pixels]"); - setPropertySettings("BckTransmissionBeamCenterX", - make_unique<VisibleWhenProperty>( - "BckTransmissionMethod", IS_EQUAL_TO, "DirectBeam")); - declareProperty("BckTransmissionBeamCenterY", EMPTY_DBL(), - "Transmission beam center location in Y [pixels]"); - // Option 2: Find it (expose properties from FindCenterOfMass) - setPropertySettings("BckTransmissionBeamCenterY", - make_unique<VisibleWhenProperty>( - "BckTransmissionMethod", IS_EQUAL_TO, "DirectBeam")); - declareProperty( - make_unique<API::FileProperty>("BckTransmissionBeamCenterFile", "", - API::FileProperty::OptionalLoad, ".xml"), - "The name of the input data file to load"); - setPropertySettings("BckTransmissionBeamCenterFile", - make_unique<VisibleWhenProperty>( - "BckTransmissionMethod", IS_EQUAL_TO, "DirectBeam")); - - declareProperty( - make_unique<API::FileProperty>("BckTransmissionDarkCurrentFile", "", - API::FileProperty::OptionalLoad, ".xml"), - "The name of the input data file to load as background " - "transmission dark current."); - setPropertySettings("BckTransmissionDarkCurrentFile", - make_unique<VisibleWhenProperty>("BckTransmissionMethod", - IS_EQUAL_TO, - "BeamSpreader")); - - declareProperty( - "BckThetaDependentTransmission", true, - "If true, a theta-dependent transmission correction will be applied."); - - setPropertyGroup("BackgroundFiles", bck_grp); - setPropertyGroup("BckTransmissionMethod", bck_grp); - setPropertyGroup("BckTransmissionValue", bck_grp); - setPropertyGroup("BckTransmissionError", bck_grp); - setPropertyGroup("BckTransmissionBeamRadius", bck_grp); - setPropertyGroup("BckTransmissionSampleDataFile", bck_grp); - setPropertyGroup("BckTransmissionEmptyDataFile", bck_grp); - setPropertyGroup("BckTransmissionBeamCenterMethod", bck_grp); - setPropertyGroup("BckTransmissionBeamCenterX", bck_grp); - setPropertyGroup("BckTransmissionBeamCenterY", bck_grp); - setPropertyGroup("BckTransmissionBeamCenterFile", bck_grp); - setPropertyGroup("BckTransmissionDarkCurrentFile", bck_grp); - setPropertyGroup("BckThetaDependentTransmission", bck_grp); - - // Geometry correction - declareProperty("SampleThickness", EMPTY_DBL(), "Sample thickness [cm]"); - - // Masking - std::string mask_grp = "Mask"; - declareProperty(make_unique<ArrayProperty<int>>("MaskedDetectorList"), - "List of detector IDs to be masked"); - declareProperty( - make_unique<ArrayProperty<int>>("MaskedEdges"), - "Number of pixels to mask on the edges: X-low, X-high, Y-low, Y-high"); - std::vector<std::string> maskOptions{"None", "Front", "Back"}; - declareProperty("MaskedSide", "None", - boost::make_shared<StringListValidator>(maskOptions), - "Mask one side of the detector"); - - setPropertyGroup("MaskedDetectorList", mask_grp); - setPropertyGroup("MaskedEdges", mask_grp); - setPropertyGroup("MaskedSide", mask_grp); - - // Absolute scale - std::string abs_scale_grp = "Absolute Scale"; - std::vector<std::string> scaleOptions; - scaleOptions.emplace_back("None"); - scaleOptions.emplace_back("Value"); - scaleOptions.emplace_back("ReferenceData"); - declareProperty("AbsoluteScaleMethod", "None", - boost::make_shared<StringListValidator>(scaleOptions), - "Absolute scale correction method"); - declareProperty("AbsoluteScalingFactor", 1.0, "Absolute scaling factor"); - setPropertySettings("AbsoluteScalingFactor", - make_unique<VisibleWhenProperty>("AbsoluteScaleMethod", - IS_EQUAL_TO, "Value")); - - declareProperty( - make_unique<API::FileProperty>("AbsoluteScalingReferenceFilename", "", - API::FileProperty::OptionalLoad, ".xml")); - setPropertySettings("AbsoluteScalingReferenceFilename", - make_unique<VisibleWhenProperty>( - "AbsoluteScaleMethod", IS_EQUAL_TO, "ReferenceData")); - declareProperty( - "AbsoluteScalingBeamDiameter", 0.0, - "Beamstop diameter for computing the absolute scale factor [mm]. " - "Read from file if not supplied."); - setPropertySettings("AbsoluteScalingBeamDiameter", - make_unique<VisibleWhenProperty>( - "AbsoluteScaleMethod", IS_EQUAL_TO, "ReferenceData")); - declareProperty( - "AbsoluteScalingAttenuatorTrans", 1.0, - "Attenuator transmission value for computing the absolute scale factor"); - setPropertySettings("AbsoluteScalingAttenuatorTrans", - make_unique<VisibleWhenProperty>( - "AbsoluteScaleMethod", IS_EQUAL_TO, "ReferenceData")); - declareProperty("AbsoluteScalingApplySensitivity", false, - "Apply sensitivity correction to the reference data " - "when computing the absolute scale factor"); - setPropertySettings("AbsoluteScalingApplySensitivity", - make_unique<VisibleWhenProperty>( - "AbsoluteScaleMethod", IS_EQUAL_TO, "ReferenceData")); - - setPropertyGroup("AbsoluteScaleMethod", abs_scale_grp); - setPropertyGroup("AbsoluteScalingFactor", abs_scale_grp); - setPropertyGroup("AbsoluteScalingReferenceFilename", abs_scale_grp); - setPropertyGroup("AbsoluteScalingBeamDiameter", abs_scale_grp); - setPropertyGroup("AbsoluteScalingAttenuatorTrans", abs_scale_grp); - setPropertyGroup("AbsoluteScalingApplySensitivity", abs_scale_grp); - - // I(Q) calculation - std::string iq1d_grp = "I(q) Calculation"; - declareProperty("DoAzimuthalAverage", true); - auto positiveInt = boost::make_shared<BoundedValidator<int>>(); - positiveInt->setLower(0); - declareProperty("IQNumberOfBins", 100, positiveInt, - "Number of I(q) bins when binning is not specified"); - declareProperty("IQLogBinning", false, - "I(q) log binning when binning is not specified"); - declareProperty("ComputeResolution", false, - "If true the Q resolution will be computed"); - - declareProperty("Do2DReduction", true); - declareProperty("IQ2DNumberOfBins", 100, positiveInt, - "Number of I(qx,qy) bins."); - - // -- Define group -- - setPropertyGroup("DoAzimuthalAverage", iq1d_grp); - setPropertyGroup("IQNumberOfBins", iq1d_grp); - setPropertyGroup("IQLogBinning", iq1d_grp); - setPropertyGroup("ComputeResolution", iq1d_grp); - setPropertyGroup("Do2DReduction", iq1d_grp); - setPropertyGroup("IQ2DNumberOfBins", iq1d_grp); - - // Outputs - declareProperty("ProcessInfo", "", "Additional process information"); - declareProperty("OutputDirectory", "", - "Directory to put the output files in"); - declareProperty("OutputMessage", "", Direction::Output); - declareProperty("ReductionProperties", "__sans_reduction_properties", - Direction::Input); -} - -void SetupILLD33Reduction::exec() { - // Reduction property manager - const std::string reductionManagerName = getProperty("ReductionProperties"); - if (reductionManagerName.empty()) { - g_log.error() << "ERROR: Reduction Property Manager name is empty\n"; - return; - } - boost::shared_ptr<PropertyManager> reductionManager = - boost::make_shared<PropertyManager>(); - PropertyManagerDataService::Instance().addOrReplace(reductionManagerName, - reductionManager); - - // Store name of the instrument - reductionManager->declareProperty( - make_unique<PropertyWithValue<std::string>>("InstrumentName", "D33")); - - // Store additional (and optional) process information - const std::string processInfo = getProperty("ProcessInfo"); - reductionManager->declareProperty( - Kernel::make_unique<PropertyWithValue<std::string>>("ProcessInfo", - processInfo)); - - // Store the output directory - const std::string outputDirectory = getProperty("OutputDirectory"); - reductionManager->declareProperty( - Kernel::make_unique<PropertyWithValue<std::string>>("OutputDirectory", - outputDirectory)); - - // Store normalization algorithm - const std::string normalization = getProperty("Normalisation"); - - if (!boost::contains(normalization, "None")) { - // If we normalize to monitor, force the loading of monitor data - IAlgorithm_sptr normAlg = createChildAlgorithm("HFIRSANSNormalise"); - normAlg->setProperty("NormalisationType", normalization); - // normAlg->setPropertyValue("ReductionProperties", reductionManagerName); - auto algProp = make_unique<AlgorithmProperty>("NormaliseAlgorithm"); - algProp->setValue(normAlg->toString()); - reductionManager->declareProperty(std::move(algProp)); - } - - // Load algorithm - // IAlgorithm_sptr loadAlg = createChildAlgorithm("EQSANSLoad"); - // TODO : It looks like properties need cleanup - IAlgorithm_sptr loadAlg = createChildAlgorithm("LoadILLSANS"); - - auto algProp = make_unique<AlgorithmProperty>("LoadAlgorithm"); - algProp->setValue(loadAlg->toString()); - reductionManager->declareProperty(std::move(algProp)); - - // Store dark current algorithm - const std::string darkCurrentFile = getPropertyValue("DarkCurrentFile"); - if (!darkCurrentFile.empty()) { - IAlgorithm_sptr darkAlg = - createChildAlgorithm("EQSANSDarkCurrentSubtraction"); - darkAlg->setProperty("Filename", darkCurrentFile); - darkAlg->setProperty("OutputDarkCurrentWorkspace", ""); - darkAlg->setPropertyValue("ReductionProperties", reductionManagerName); - auto dcalgProp = make_unique<AlgorithmProperty>("DarkCurrentAlgorithm"); - dcalgProp->setValue(darkAlg->toString()); - reductionManager->declareProperty(std::move(dcalgProp)); - } - - // Store default dark current algorithm - IAlgorithm_sptr darkDefaultAlg = - createChildAlgorithm("EQSANSDarkCurrentSubtraction"); - darkDefaultAlg->setProperty("OutputDarkCurrentWorkspace", ""); - darkDefaultAlg->setPropertyValue("ReductionProperties", reductionManagerName); - auto ddcalgProp = - make_unique<AlgorithmProperty>("DefaultDarkCurrentAlgorithm"); - ddcalgProp->setValue(darkDefaultAlg->toString()); - reductionManager->declareProperty(std::move(ddcalgProp)); - - // Solid angle correction - const bool solidAngleCorrection = getProperty("SolidAngleCorrection"); - if (solidAngleCorrection) { - const bool detectorTubes = getProperty("DetectorTubes"); - IAlgorithm_sptr solidAlg = createChildAlgorithm("SANSSolidAngleCorrection"); - solidAlg->setProperty("DetectorTubes", detectorTubes); - auto ssaalgProp = - make_unique<AlgorithmProperty>("SANSSolidAngleCorrection"); - ssaalgProp->setValue(solidAlg->toString()); - reductionManager->declareProperty(std::move(ssaalgProp)); - } - - // Beam center - const double beamCenterX = getProperty("BeamCenterX"); - const double beamCenterY = getProperty("BeamCenterY"); - const std::string centerMethod = getPropertyValue("BeamCenterMethod"); - - // Beam center option for transmission data - if (boost::iequals(centerMethod, "Value")) { - if (!isEmpty(beamCenterX) && !isEmpty(beamCenterY)) { - reductionManager->declareProperty(make_unique<PropertyWithValue<double>>( - "LatestBeamCenterX", beamCenterX)); - reductionManager->declareProperty(make_unique<PropertyWithValue<double>>( - "LatestBeamCenterY", beamCenterY)); - } - } else if (!boost::iequals(centerMethod, "None")) { - bool useDirectBeamMethod = true; - if (!boost::iequals(centerMethod, "DirectBeam")) - useDirectBeamMethod = false; - const std::string beamCenterFile = getProperty("BeamCenterFile"); - if (!beamCenterFile.empty()) { - const double beamRadius = getProperty("BeamRadius"); - - IAlgorithm_sptr ctrAlg = createChildAlgorithm("SANSBeamFinder"); - ctrAlg->setProperty("Filename", beamCenterFile); - ctrAlg->setProperty("UseDirectBeamMethod", useDirectBeamMethod); - if (!isEmpty(beamRadius)) - ctrAlg->setProperty("BeamRadius", beamRadius); - ctrAlg->setPropertyValue("ReductionProperties", reductionManagerName); - - auto algProp = make_unique<AlgorithmProperty>("SANSBeamFinderAlgorithm"); - algProp->setValue(ctrAlg->toString()); - reductionManager->declareProperty(std::move(algProp)); - } else { - g_log.error() << "ERROR: Beam center determination was required" - " but no file was provided\n"; - } - } - - // Sensitivity correction, transmission and background - setupSensitivity(reductionManager); - setupTransmission(reductionManager); - setupBackground(reductionManager); - - // Geometry correction - const double thickness = getProperty("SampleThickness"); - if (!isEmpty(thickness)) { - IAlgorithm_sptr thickAlg = createChildAlgorithm("NormaliseByThickness"); - thickAlg->setProperty("SampleThickness", thickness); - - auto geomalgProp = make_unique<AlgorithmProperty>("GeometryAlgorithm"); - geomalgProp->setValue(thickAlg->toString()); - reductionManager->declareProperty(std::move(geomalgProp)); - } - - // Mask - const std::string maskDetList = getPropertyValue("MaskedDetectorList"); - const std::string maskEdges = getPropertyValue("MaskedEdges"); - const std::string maskSide = getProperty("MaskedSide"); - - IAlgorithm_sptr maskAlg = createChildAlgorithm("SANSMask"); - // The following is broken, try PropertyValue - maskAlg->setPropertyValue("Facility", "SNS"); - maskAlg->setPropertyValue("MaskedDetectorList", maskDetList); - maskAlg->setPropertyValue("MaskedEdges", maskEdges); - maskAlg->setProperty("MaskedSide", maskSide); - auto maskalgProp = make_unique<AlgorithmProperty>("MaskAlgorithm"); - maskalgProp->setValue(maskAlg->toString()); - reductionManager->declareProperty(std::move(maskalgProp)); - - // Absolute scaling - const std::string absScaleMethod = getProperty("AbsoluteScaleMethod"); - if (boost::iequals(absScaleMethod, "Value")) { - const double absScaleFactor = getProperty("AbsoluteScalingFactor"); - - IAlgorithm_sptr absAlg = createChildAlgorithm("SANSAbsoluteScale"); - absAlg->setProperty("Method", absScaleMethod); - absAlg->setProperty("ScalingFactor", absScaleFactor); - absAlg->setPropertyValue("ReductionProperties", reductionManagerName); - auto absScaleAlgProp = - make_unique<AlgorithmProperty>("AbsoluteScaleAlgorithm"); - absScaleAlgProp->setValue(absAlg->toString()); - reductionManager->declareProperty(std::move(absScaleAlgProp)); - } else if (boost::iequals(absScaleMethod, "ReferenceData")) { - const std::string absRefFile = - getPropertyValue("AbsoluteScalingReferenceFilename"); - const double beamDiam = getProperty("AbsoluteScalingBeamDiameter"); - const double attTrans = getProperty("AbsoluteScalingAttenuatorTrans"); - const bool applySensitivity = - getProperty("AbsoluteScalingApplySensitivity"); - - IAlgorithm_sptr absAlg = createChildAlgorithm("SANSAbsoluteScale"); - absAlg->setProperty("Method", absScaleMethod); - absAlg->setProperty("ReferenceDataFilename", absRefFile); - absAlg->setProperty("BeamstopDiameter", beamDiam); - absAlg->setProperty("AttenuatorTransmission", attTrans); - absAlg->setProperty("ApplySensitivity", applySensitivity); - absAlg->setPropertyValue("ReductionProperties", reductionManagerName); - auto refscalealgProp = - make_unique<AlgorithmProperty>("AbsoluteScaleAlgorithm"); - refscalealgProp->setValue(absAlg->toString()); - reductionManager->declareProperty(std::move(refscalealgProp)); - } - - // Azimuthal averaging - const bool doAveraging = getProperty("DoAzimuthalAverage"); - if (doAveraging) { - const std::string nBins = getPropertyValue("IQNumberOfBins"); - const bool logBinning = getProperty("IQLogBinning"); - const bool computeResolution = getProperty("ComputeResolution"); - - IAlgorithm_sptr iqAlg = createChildAlgorithm("SANSAzimuthalAverage1D"); - iqAlg->setPropertyValue("NumberOfBins", nBins); - iqAlg->setProperty("LogBinning", logBinning); - iqAlg->setProperty("ComputeResolution", computeResolution); - iqAlg->setPropertyValue("ReductionProperties", reductionManagerName); - - auto iqalgProp = make_unique<AlgorithmProperty>("IQAlgorithm"); - iqalgProp->setValue(iqAlg->toString()); - reductionManager->declareProperty(std::move(iqalgProp)); - } - - // 2D reduction - const bool do2DReduction = getProperty("Do2DReduction"); - if (do2DReduction) { - const std::string n_bins = getPropertyValue("IQ2DNumberOfBins"); - IAlgorithm_sptr iqAlg = createChildAlgorithm("EQSANSQ2D"); - iqAlg->setPropertyValue("NumberOfBins", n_bins); - auto iqxyalgProp = make_unique<AlgorithmProperty>("IQXYAlgorithm"); - iqxyalgProp->setValue(iqAlg->toString()); - reductionManager->declareProperty(std::move(iqxyalgProp)); - } - setPropertyValue("OutputMessage", "EQSANS reduction options set"); -} - -void SetupILLD33Reduction::setupSensitivity( - boost::shared_ptr<PropertyManager> reductionManager) { - const std::string reductionManagerName = getProperty("ReductionProperties"); - - const std::string sensitivityFile = getPropertyValue("SensitivityFile"); - if (!sensitivityFile.empty()) { - const bool useSampleDC = getProperty("UseDefaultDC"); - const std::string sensitivityDarkCurrentFile = - getPropertyValue("SensitivityDarkCurrentFile"); - const std::string outputSensitivityWS = - getPropertyValue("OutputSensitivityWorkspace"); - const double minEff = getProperty("MinEfficiency"); - const double maxEff = getProperty("MaxEfficiency"); - const double sensitivityBeamCenterX = getProperty("SensitivityBeamCenterX"); - const double sensitivityBeamCenterY = getProperty("SensitivityBeamCenterY"); - - IAlgorithm_sptr effAlg = createChildAlgorithm("SANSSensitivityCorrection"); - effAlg->setProperty("Filename", sensitivityFile); - effAlg->setProperty("UseSampleDC", useSampleDC); - effAlg->setProperty("DarkCurrentFile", sensitivityDarkCurrentFile); - effAlg->setProperty("MinEfficiency", minEff); - effAlg->setProperty("MaxEfficiency", maxEff); - - // Beam center option for sensitivity data - const std::string centerMethod = - getPropertyValue("SensitivityBeamCenterMethod"); - if (boost::iequals(centerMethod, "Value")) { - if (!isEmpty(sensitivityBeamCenterX) && - !isEmpty(sensitivityBeamCenterY)) { - effAlg->setProperty("BeamCenterX", sensitivityBeamCenterX); - effAlg->setProperty("BeamCenterY", sensitivityBeamCenterY); - } - } else if (boost::iequals(centerMethod, "DirectBeam") || - boost::iequals(centerMethod, "Scattering")) { - const std::string beamCenterFile = - getProperty("SensitivityBeamCenterFile"); - const double sensitivityBeamRadius = - getProperty("SensitivityBeamCenterRadius"); - bool useDirectBeam = boost::iequals(centerMethod, "DirectBeam"); - if (!beamCenterFile.empty()) { - IAlgorithm_sptr ctrAlg = createChildAlgorithm("SANSBeamFinder"); - ctrAlg->setProperty("Filename", beamCenterFile); - ctrAlg->setProperty("UseDirectBeamMethod", useDirectBeam); - ctrAlg->setProperty("PersistentCorrection", false); - if (useDirectBeam && !isEmpty(sensitivityBeamRadius)) - ctrAlg->setProperty("BeamRadius", sensitivityBeamRadius); - ctrAlg->setPropertyValue("ReductionProperties", reductionManagerName); - - auto sbcalgProp = - make_unique<AlgorithmProperty>("SensitivityBeamCenterAlgorithm"); - sbcalgProp->setValue(ctrAlg->toString()); - reductionManager->declareProperty(std::move(sbcalgProp)); - } else { - g_log.error() - << "ERROR: Sensitivity beam center determination was required" - " but no file was provided\n"; - } - } - - effAlg->setPropertyValue("OutputSensitivityWorkspace", outputSensitivityWS); - effAlg->setPropertyValue("ReductionProperties", reductionManagerName); - - auto sensalgProp = make_unique<AlgorithmProperty>("SensitivityAlgorithm"); - sensalgProp->setValue(effAlg->toString()); - reductionManager->declareProperty(std::move(sensalgProp)); - } -} -void SetupILLD33Reduction::setupTransmission( - boost::shared_ptr<PropertyManager> reductionManager) { - const std::string reductionManagerName = getProperty("ReductionProperties"); - // Transmission options - const bool thetaDependentTrans = getProperty("ThetaDependentTransmission"); - const std::string transMethod = getProperty("TransmissionMethod"); - const std::string darkCurrent = - getPropertyValue("TransmissionDarkCurrentFile"); - const bool useSampleDC = getProperty("TransmissionUseSampleDC"); - - // Transmission is entered by hand - if (boost::iequals(transMethod, "Value")) { - const double transValue = getProperty("TransmissionValue"); - const double transError = getProperty("TransmissionError"); - if (!isEmpty(transValue) && !isEmpty(transError)) { - IAlgorithm_sptr transAlg = - createChildAlgorithm("ApplyTransmissionCorrection"); - transAlg->setProperty("TransmissionValue", transValue); - transAlg->setProperty("TransmissionError", transError); - transAlg->setProperty("ThetaDependent", thetaDependentTrans); - - auto transalgProp = - make_unique<AlgorithmProperty>("TransmissionAlgorithm"); - transalgProp->setValue(transAlg->toString()); - reductionManager->declareProperty(std::move(transalgProp)); - } else { - g_log.information( - "SetupILLD33Reduction [TransmissionAlgorithm]:" - "expected transmission/error values and got empty values"); - } - } - // Direct beam method for transmission determination - else if (boost::iequals(transMethod, "DirectBeam")) { - const std::string sampleFilename = - getPropertyValue("TransmissionSampleDataFile"); - const std::string emptyFilename = - getPropertyValue("TransmissionEmptyDataFile"); - const double beamRadius = getProperty("TransmissionBeamRadius"); - const double beamX = getProperty("TransmissionBeamCenterX"); - const double beamY = getProperty("TransmissionBeamCenterY"); - const std::string centerMethod = - getPropertyValue("TransmissionBeamCenterMethod"); - - IAlgorithm_sptr transAlg = - createChildAlgorithm("SANSDirectBeamTransmission"); - transAlg->setProperty("SampleDataFilename", sampleFilename); - transAlg->setProperty("EmptyDataFilename", emptyFilename); - transAlg->setProperty("BeamRadius", beamRadius); - transAlg->setProperty("DarkCurrentFilename", darkCurrent); - transAlg->setProperty("UseSampleDarkCurrent", useSampleDC); - - // Beam center option for transmission data - if (boost::iequals(centerMethod, "Value") && !isEmpty(beamX) && - !isEmpty(beamY)) { - transAlg->setProperty("BeamCenterX", beamX); - transAlg->setProperty("BeamCenterY", beamY); - } else if (boost::iequals(centerMethod, "DirectBeam")) { - const std::string beamCenterFile = - getProperty("TransmissionBeamCenterFile"); - if (!beamCenterFile.empty()) { - IAlgorithm_sptr ctrAlg = createChildAlgorithm("SANSBeamFinder"); - ctrAlg->setProperty("Filename", beamCenterFile); - ctrAlg->setProperty("UseDirectBeamMethod", true); - ctrAlg->setProperty("PersistentCorrection", false); - ctrAlg->setPropertyValue("ReductionProperties", reductionManagerName); - - auto tbcalgProp = - make_unique<AlgorithmProperty>("TransmissionBeamCenterAlgorithm"); - tbcalgProp->setValue(ctrAlg->toString()); - reductionManager->declareProperty(std::move(tbcalgProp)); - } else { - g_log.error() - << "ERROR: Transmission beam center determination was required" - " but no file was provided\n"; - } - } - transAlg->setProperty("ThetaDependent", thetaDependentTrans); - auto transmissionalgProp = - make_unique<AlgorithmProperty>("TransmissionAlgorithm"); - transmissionalgProp->setValue(transAlg->toString()); - reductionManager->declareProperty(std::move(transmissionalgProp)); - } -} - -void SetupILLD33Reduction::setupBackground( - boost::shared_ptr<PropertyManager> reductionManager) { - const std::string reductionManagerName = getProperty("ReductionProperties"); - // Background - const std::string backgroundFile = getPropertyValue("BackgroundFiles"); - if (!backgroundFile.empty()) - reductionManager->declareProperty( - Kernel::make_unique<PropertyWithValue<std::string>>("BackgroundFiles", - backgroundFile)); - else - return; - - const std::string darkCurrent = - getPropertyValue("BckTransmissionDarkCurrentFile"); - const bool bckThetaDependentTrans = - getProperty("BckThetaDependentTransmission"); - const std::string bckTransMethod = getProperty("BckTransmissionMethod"); - if (boost::iequals(bckTransMethod, "Value")) { - const double transValue = getProperty("BckTransmissionValue"); - const double transError = getProperty("BckTransmissionError"); - if (!isEmpty(transValue) && !isEmpty(transError)) { - IAlgorithm_sptr transAlg = - createChildAlgorithm("ApplyTransmissionCorrection"); - transAlg->setProperty("TransmissionValue", transValue); - transAlg->setProperty("TransmissionError", transError); - transAlg->setProperty("ThetaDependent", bckThetaDependentTrans); - - auto bckTransAlgProp = - make_unique<AlgorithmProperty>("BckTransmissionAlgorithm"); - bckTransAlgProp->setValue(transAlg->toString()); - reductionManager->declareProperty(std::move(bckTransAlgProp)); - } else { - g_log.information( - "SetupILLD33Reduction [BckTransmissionAlgorithm]: " - "expected transmission/error values and got empty values"); - } - } else if (boost::iequals(bckTransMethod, "DirectBeam")) { - const std::string sampleFilename = - getPropertyValue("BckTransmissionSampleDataFile"); - const std::string emptyFilename = - getPropertyValue("BckTransmissionEmptyDataFile"); - const double beamRadius = getProperty("BckTransmissionBeamRadius"); - const double beamX = getProperty("BckTransmissionBeamCenterX"); - const double beamY = getProperty("BckTransmissionBeamCenterY"); - const bool thetaDependentTrans = - getProperty("BckThetaDependentTransmission"); - const bool useSampleDC = getProperty("TransmissionUseSampleDC"); - - IAlgorithm_sptr transAlg = - createChildAlgorithm("SANSDirectBeamTransmission"); - transAlg->setProperty("SampleDataFilename", sampleFilename); - transAlg->setProperty("EmptyDataFilename", emptyFilename); - transAlg->setProperty("BeamRadius", beamRadius); - transAlg->setProperty("DarkCurrentFilename", darkCurrent); - transAlg->setProperty("UseSampleDarkCurrent", useSampleDC); - - // Beam center option for transmission data - const std::string centerMethod = - getPropertyValue("BckTransmissionBeamCenterMethod"); - if (boost::iequals(centerMethod, "Value") && !isEmpty(beamX) && - !isEmpty(beamY)) { - transAlg->setProperty("BeamCenterX", beamX); - transAlg->setProperty("BeamCenterY", beamY); - } else if (boost::iequals(centerMethod, "DirectBeam")) { - const std::string beamCenterFile = - getProperty("BckTransmissionBeamCenterFile"); - if (!beamCenterFile.empty()) { - IAlgorithm_sptr ctrAlg = createChildAlgorithm("SANSBeamFinder"); - ctrAlg->setProperty("Filename", beamCenterFile); - ctrAlg->setProperty("UseDirectBeamMethod", true); - ctrAlg->setProperty("PersistentCorrection", false); - ctrAlg->setPropertyValue("ReductionProperties", reductionManagerName); - - auto btbcAlgProp = make_unique<AlgorithmProperty>( - "BckTransmissionBeamCenterAlgorithm"); - btbcAlgProp->setValue(ctrAlg->toString()); - reductionManager->declareProperty(std::move(btbcAlgProp)); - } else { - g_log.error() << "ERROR: Beam center determination was required" - " but no file was provided\n"; - } - } - transAlg->setProperty("DarkCurrentFilename", darkCurrent); - transAlg->setProperty("ThetaDependent", thetaDependentTrans); - auto btransAlgProp = - make_unique<AlgorithmProperty>("BckTransmissionAlgorithm"); - btransAlgProp->setValue(transAlg->toString()); - reductionManager->declareProperty(std::move(btransAlgProp)); - } -} -} // namespace WorkflowAlgorithms -} // namespace Mantid diff --git a/Testing/Data/SystemTest/ILL/001420.nxs.md5 b/Testing/Data/SystemTest/ILL/001420.nxs.md5 deleted file mode 100644 index cfaa07241720a8aec7dfd27a3f124409fcbd2d03..0000000000000000000000000000000000000000 --- a/Testing/Data/SystemTest/ILL/001420.nxs.md5 +++ /dev/null @@ -1 +0,0 @@ -3d7981dda48aed0b6b4abf1e8e03b118 \ No newline at end of file diff --git a/Testing/Data/SystemTest/ILL/001422.nxs.md5 b/Testing/Data/SystemTest/ILL/001422.nxs.md5 deleted file mode 100644 index 9c7c1302b97b5de8a93ba9d84e2f4de60fbdea03..0000000000000000000000000000000000000000 --- a/Testing/Data/SystemTest/ILL/001422.nxs.md5 +++ /dev/null @@ -1 +0,0 @@ -5dee58331051229ab32045bfb5dd19b5 \ No newline at end of file diff --git a/Testing/Data/SystemTest/ILL/001425.nxs.md5 b/Testing/Data/SystemTest/ILL/001425.nxs.md5 deleted file mode 100644 index 79c129065e6888de9645ca2b46222f71a001b450..0000000000000000000000000000000000000000 --- a/Testing/Data/SystemTest/ILL/001425.nxs.md5 +++ /dev/null @@ -1 +0,0 @@ -a5c7449af9f0d4a46dd06b5074d9da60 \ No newline at end of file diff --git a/Testing/Data/SystemTest/ILL/001427.nxs.md5 b/Testing/Data/SystemTest/ILL/001427.nxs.md5 deleted file mode 100644 index 9c968d06f28f879716a5fb3a9c24887657d26c15..0000000000000000000000000000000000000000 --- a/Testing/Data/SystemTest/ILL/001427.nxs.md5 +++ /dev/null @@ -1 +0,0 @@ -687284902a5639ad30a9fbf392531521 \ No newline at end of file diff --git a/Testing/Data/SystemTest/ILL/001428.nxs.md5 b/Testing/Data/SystemTest/ILL/001428.nxs.md5 deleted file mode 100644 index 6afbbc85b13c8a8242d9675f041fa570236ebee5..0000000000000000000000000000000000000000 --- a/Testing/Data/SystemTest/ILL/001428.nxs.md5 +++ /dev/null @@ -1 +0,0 @@ -899de6ba09da9137a863d420d6b5da7a \ No newline at end of file diff --git a/Testing/Data/SystemTest/ILL/001431.nxs.md5 b/Testing/Data/SystemTest/ILL/001431.nxs.md5 deleted file mode 100644 index 1017fc28e91af616069a465ee84dfe5b426fdb16..0000000000000000000000000000000000000000 --- a/Testing/Data/SystemTest/ILL/001431.nxs.md5 +++ /dev/null @@ -1 +0,0 @@ -37685dac3fc533fe858ea492ad08f586 \ No newline at end of file diff --git a/Testing/SystemTests/tests/analysis/ILLD33Test.py b/Testing/SystemTests/tests/analysis/ILLD33Test.py deleted file mode 100644 index 61ad85c60f7babe5b09de8ebe8c540647afcb51c..0000000000000000000000000000000000000000 --- a/Testing/SystemTests/tests/analysis/ILLD33Test.py +++ /dev/null @@ -1,120 +0,0 @@ -# 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=no-init -import systemtesting - -from mantid.api import mtd -import mantid.simpleapi as ms - -import unittest - - -class ILLD33SANSTest(unittest.TestCase): - - prefix = "D33" - - def tearDown(self): - for wsName in mtd.getObjectNames(): - if wsName.startswith(self.prefix): - mtd.remove(wsName) - - def test_all(self): - - ms.SetupILLD33Reduction( - # Beam center shouldn't work - #BeamCenterMethod="None", - MaskedDetectorList=[14709,14710,14711,14712,14713,14714,14715,14716,14717,14718,14719, - 14720,14721,14722,14723,14724,14725,14726,14727,14728,14729,14730, - 14731,14732,14733,14734,14735,14965,14966,14967,14968,14969,14970, - 14971,14972,14973,14974,14975,14976,14977,14978,14979,14980,14981, - 14982,14983,14984,14985,14986,14987,14988,14989,14990,14991,15221, - 15222,15223,15224,15225,15226,15227,15228,15229,15230,15231,15232, - 15233,15234,15235,15236,15237,15238,15239,15240,15241,15242,15243, - 15244,15245,15246,15247,15477,15478,15479,15480,15481,15482,15483, - 15484,15485,15486,15487,15488,15489,15490,15491,15492,15493,15494, - 15495,15496,15497,15498,15499,15500,15501,15502,15503,15733,15734, - 15735,15736,15737,15738,15739,15740,15741,15742,15743,15744,15745, - 15746,15747,15748,15749,15750,15751,15752,15753,15754,15755,15756, - 15757,15758,15759,15989,15990,15991,15992,15993,15994,15995,15996, - 15997,15998,15999,16000,16001,16002,16003,16004,16005,16006,16007, - 16008,16009,16010,16011,16012,16013,16014,16015,16245,16246,16247, - 16248,16249,16250,16251,16252,16253,16254,16255,16256,16257,16258, - 16259,16260,16261,16262,16263,16264,16265,16266,16267,16268,16269, - 16270,16271,16501,16502,16503,16504,16505,16506,16507,16508,16509, - 16510,16511,16512,16513,16514,16515,16516,16517,16518,16519,16520, - 16521,16522,16523,16524,16525,16526,16527,16757,16758,16759,16760, - 16761,16762,16763,16764,16765,16766,16767,16768,16769,16770,16771, - 16772,16773,16774,16775,16776,16777,16778,16779,16780,16781,16782, - 16783,17013,17014,17015,17016,17017,17018,17019,17020,17021,17022, - 17023,17024,17025,17026,17027,17028,17029,17030,17031,17032,17033, - 17034,17035,17036,17037,17038,17039,17269,17270,17271,17272,17273, - 17274,17275,17276,17277,17278,17279,17280,17281,17282,17283,17284, - 17285,17286,17287,17288,17289,17290,17291,17292,17293,17294,17295, - 17525,17526,17527,17528,17529,17530,17531,17532,17533,17534,17535, - 17536,17537,17538,17539,17540,17541,17542,17543,17544,17545,17546, - 17547,17548,17549,17550,17551], - BeamCenterMethod="DirectBeam", - BeamCenterFile='ILL/001427.nxs', - Normalisation="Timer", - DarkCurrentFile= 'ILL/001420.nxs', - TransmissionMethod="DirectBeam", - TransmissionSampleDataFile= 'ILL/001431.nxs', - TransmissionEmptyDataFile= 'ILL/001427.nxs', - BckTransmissionEmptyDataFile= 'ILL/001427.nxs', - TransmissionBeamRadius = 3, - TransmissionUseSampleDC=False, - BackgroundFiles='ILL/001422.nxs', - BckTransmissionSampleDataFile='ILL/001428.nxs', - DoAzimuthalAverage=False, - Do2DReduction=False, - ComputeResolution=True, - ReductionProperties=self.prefix + "props") - - ms.SANSReduction(Filename='ILL/001425.nxs', ReductionProperties=self.prefix + "props", - OutputWorkspace=self.prefix + "out") - ms.Rebin(InputWorkspace=self.prefix + 'out',OutputWorkspace=self.prefix + 'out_rebin', - Params='4,0.1,15') - ms.SANSAzimuthalAverage1D(InputWorkspace=self.prefix + 'out_rebin',Binning='0.001,0.0002,0.03', - OutputWorkspace=self.prefix + 'final') - - # Check some data - wsOut = mtd[self.prefix + 'out'] - self.assertEqual(wsOut.getNumberHistograms(), 65538) - wsOut = mtd[self.prefix + 'out_rebin'] - self.assertEqual(wsOut.getNumberHistograms(), 65538) - wsOut = mtd[self.prefix + 'final'] - self.assertEqual(wsOut.getNumberHistograms(), 1) - - #================== Failure cases ================================ - - # TODO - - -#==================================================================================== - -class ILLD33Test(systemtesting.MantidSystemTest): - _success = False - - def requiredMemoryMB(self): - """Set a limit of 2.5Gb to avoid 32-bit environment""" - return 2500 - - def runTest(self): - self._success = False - # Custom code to create and run this single test suite - suite = unittest.TestSuite() - suite.addTest( unittest.makeSuite(ILLD33SANSTest, "test") ) - runner = unittest.TextTestRunner() - # Run using either runner - res = runner.run(suite) - if res.wasSuccessful(): - self._success = True - else: - self._success = False - - def validate(self): - return self._success diff --git a/docs/source/algorithms/SetupILLD33Reduction-v1.rst b/docs/source/algorithms/SetupILLD33Reduction-v1.rst deleted file mode 100644 index e5dbb8669318c769e95786bb4bed2d6d45095e6c..0000000000000000000000000000000000000000 --- a/docs/source/algorithms/SetupILLD33Reduction-v1.rst +++ /dev/null @@ -1,93 +0,0 @@ -.. algorithm:: - -.. summary:: - -.. relatedalgorithms:: - -.. properties:: - -Description ------------ - -Create a PropertyManager object setting the reduction options for ILL -D33 SANS TOF instrument. The property manager object is then added to -the PropertyManagerDataService. -This was based on the :ref:`SetupEQSANSReduction <algm-SetupEQSANSReduction>`. - -See :ref:`SANSReduction <algm-SANSReduction>` for details. - -Usage ------ - -**Example - Reduces D33 data from a set of NeXus files:** - -.. code-block:: python - - # List of detector IDs masked - maskedDetectors = [14709,14710,14711,14712,14713,14714,14715,14716,14717,14718, - 14719,14720,14721,14722,14723,14724,14725,14726,14727,14728,14729,14730,14731, - 14732,14733,14734,14735,14965,14966,14967,14968,14969,14970,14971,14972,14973, - 14974,14975,14976,14977,14978,14979,14980,14981,14982,14983,14984,14985,14986, - 14987,14988,14989,14990,14991,15221,15222,15223,15224,15225,15226,15227,15228, - 15229,15230,15231,15232,15233,15234,15235,15236,15237,15238,15239,15240,15241, - 15242,15243,15244,15245,15246,15247,15477,15478,15479,15480,15481,15482,15483, - 15484,15485,15486,15487,15488,15489,15490,15491,15492,15493,15494,15495,15496, - 15497,15498,15499,15500,15501,15502,15503,15733,15734,15735,15736,15737,15738, - 15739,15740,15741,15742,15743,15744,15745,15746,15747,15748,15749,15750,15751, - 15752,15753,15754,15755,15756,15757,15758,15759,15989,15990,15991,15992,15993, - 15994,15995,15996,15997,15998,15999,16000,16001,16002,16003,16004,16005,16006, - 16007,16008,16009,16010,16011,16012,16013,16014,16015,16245,16246,16247,16248, - 16249,16250,16251,16252,16253,16254,16255,16256,16257,16258,16259,16260,16261, - 16262,16263,16264,16265,16266,16267,16268,16269,16270,16271,16501,16502,16503, - 16504,16505,16506,16507,16508,16509,16510,16511,16512,16513,16514,16515,16516, - 16517,16518,16519,16520,16521,16522,16523,16524,16525,16526,16527,16757,16758, - 16759,16760,16761,16762,16763,16764,16765,16766,16767,16768,16769,16770,16771, - 16772,16773,16774,16775,16776,16777,16778,16779,16780,16781,16782,16783,17013, - 17014,17015,17016,17017,17018,17019,17020,17021,17022,17023,17024,17025,17026, - 17027,17028,17029,17030,17031,17032,17033,17034,17035,17036,17037,17038,17039, - 17269,17270,17271,17272,17273,17274,17275,17276,17277,17278,17279,17280,17281, - 17282,17283,17284,17285,17286,17287,17288,17289,17290,17291,17292,17293,17294, - 17295,17525,17526,17527,17528,17529,17530,17531,17532,17533,17534,17535,17536, - 17537,17538,17539,17540,17541,17542,17543,17544,17545,17546,17547,17548,17549, - 17550,17551] - - # Set all the necessary parameters to reduce the data - SetupILLD33Reduction( - MaskedDetectorList=maskedDetectors, - BeamCenterMethod="DirectBeam", - BeamCenterFile="ILLD33_direct_beam_transm_001427.nxs", - Normalisation="Timer", - DarkCurrentFile= "ILLD33_b4c_001420.nxs", - TransmissionMethod="DirectBeam", - TransmissionSampleDataFile= "ILLD33_sample_transm_001431.nxs", - TransmissionEmptyDataFile= "ILLD33_direct_beam_transm_001427.nxs", - BckTransmissionEmptyDataFile= "ILLD33_direct_beam_transm_001427.nxs", - TransmissionBeamRadius = 3, - TransmissionUseSampleDC=False, - BackgroundFiles= "ILLD33_empty_cell_001422.nxs", - BckTransmissionSampleDataFile="ILLD33_empty_cell_transm_001428.nxs", - DoAzimuthalAverage=False, - Do2DReduction=False, - ComputeResolution=True, - ReductionProperties="d33") - - # Reduce the sample data - output=SANSReduction(Filename="ILLD33_sample_001425.nxs", ReductionProperties="d33",OutputWorkspace="d33out") - - # Rebin - Rebin(InputWorkspace='d33out',OutputWorkspace='d33out_rebin',Params='4,0.1,15') - - # Do a radial integration - SANSAzimuthalAverage1D(InputWorkspace='d33out_rebin',Binning='0.001,0.0002,0.03',OutputWorkspace='IQ_curve') - - # Get the OutputWorkspace as a python workspace - iq = mtd['IQ_curve'] - print("This workspace has {} dimensions and has {} histograms.".format(iq.getNumDims(), iq.getNumberHistograms())) - -Output: - - This workspace has 2 dimensions and has 1 histograms. - -.. categories:: - -.. sourcelink:: diff --git a/docs/source/release/v3.14.0/sans.rst b/docs/source/release/v3.14.0/sans.rst index 33983dfd743285fe4332980076733c82e724f2ba..73402887e3262c9b546980b0cc96ea73f9c61f71 100644 --- a/docs/source/release/v3.14.0/sans.rst +++ b/docs/source/release/v3.14.0/sans.rst @@ -38,4 +38,9 @@ Improvements - :ref:`Q1DWeighted <algm-Q1DWeighted>` now supports the option of asymmetric wedges for unisotropic scatterer. +Removed +####### + +- Obsolete *SetupILLD33Reduction* algorithm was removed. + :ref:`Release 3.14.0 <v3.14.0>`