diff --git a/Code/Mantid/Framework/DataHandling/src/LoadCalFile.cpp b/Code/Mantid/Framework/DataHandling/src/LoadCalFile.cpp index 876a11da9deeb4edcd9532e4295021478dcb5995..6fae0aae600436f2140e8760320001af4ec1f88a 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadCalFile.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadCalFile.cpp @@ -57,6 +57,8 @@ namespace DataHandling * */ void LoadCalFile::getInstrument3WaysInit(Algorithm * alg) { + std::string grpName("Specify the Instrument"); + alg->declareProperty(new WorkspaceProperty<>("InputWorkspace","",Direction::Input, true), "Optional: An input workspace with the instrument we want to use."); @@ -65,6 +67,11 @@ namespace DataHandling alg->declareProperty(new FileProperty("InstrumentFilename", "", FileProperty::OptionalLoad, ".xml"), "Optional: Path to the instrument definition file on which to base the GroupingWorkspace."); + + alg->setPropertyGroup("InputWorkspace", grpName); + alg->setPropertyGroup("InstrumentName", grpName); + alg->setPropertyGroup("InstrumentFilename", grpName); + } diff --git a/Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp b/Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp index 626630371d28119d79831440af94dbb2276217be..c181ff9966ba6cdccdda5ab570b5617f54259c42 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp @@ -19,6 +19,7 @@ #include <boost/algorithm/string/replace.hpp> #include <Poco/File.h> #include <Poco/Path.h> +#include "MantidKernel/VisibleWhenProperty.h" using std::endl; using std::map; @@ -650,6 +651,12 @@ void LoadEventNexus::init() new PropertyWithValue<double>("FilterByTime_Stop", EMPTY_DBL(), Direction::Input), "Optional: To only include events before the provided stop time, in seconds (relative to the start of the run)."); + std::string grp1 = "Filter Events"; + setPropertyGroup("FilterByTof_Min", grp1); + setPropertyGroup("FilterByTof_Max", grp1); + setPropertyGroup("FilterByTime_Start", grp1); + setPropertyGroup("FilterByTime_Stop", grp1); + declareProperty( new PropertyWithValue<string>("BankName", "", Direction::Input), "Optional: To only include events from one bank. Any bank whose name does not match the given string will have no events."); @@ -658,10 +665,11 @@ void LoadEventNexus::init() new PropertyWithValue<bool>("SingleBankPixelsOnly", true, Direction::Input), "Optional: Only applies if you specified a single bank to load with BankName.\n" "Only pixels in the specified bank will be created if true; all of the instrument's pixels will be created otherwise."); + setPropertySettings("SingleBankPixelsOnly", new VisibleWhenProperty(this, "BankName", IS_NOT_DEFAULT) ); - declareProperty( - new PropertyWithValue<bool>("LoadMonitors", false, Direction::Input), - "Load the monitors from the file (optional, default False)."); + std::string grp2 = "Loading a Single Bank"; + setPropertyGroup("BankName", grp2); + setPropertyGroup("SingleBankPixelsOnly", grp2); declareProperty( new PropertyWithValue<bool>("Precount", false, Direction::Input), @@ -672,9 +680,21 @@ void LoadEventNexus::init() new PropertyWithValue<double>("CompressTolerance", -1.0, Direction::Input), "Run CompressEvents while loading (optional, leave blank or negative to not do). \n" "This specified the tolerance to use (in microseconds) when compressing."); + std::string grp3 = "Reduce Memory Use"; + setPropertyGroup("Precount", grp3); + setPropertyGroup("CompressTolerance", grp3); + + declareProperty( + new PropertyWithValue<bool>("LoadMonitors", false, Direction::Input), + "Load the monitors from the file (optional, default False)."); declareProperty(new PropertyWithValue<bool>("MonitorsAsEvents", false, Direction::Input), "If present, load the monitors as events.\nWARNING: WILL SIGNIFICANTLY INCREASE MEMORY USAGE (optional, default False). \n"); + setPropertySettings("MonitorsAsEvents", new VisibleWhenProperty(this, "LoadMonitors", IS_EQUAL_TO, "1") ); + std::string grp4 = "Monitors"; + setPropertyGroup("LoadMonitors", grp4); + setPropertyGroup("MonitorsAsEvents", grp4); + } diff --git a/Code/Mantid/Framework/DataHandling/src/LoadRawHelper.cpp b/Code/Mantid/Framework/DataHandling/src/LoadRawHelper.cpp index efdcdf5a135d160e9a808f67a2eb3815ed160974..c57ba6d84794e244fbc2c7cf23471c6a6964662b 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadRawHelper.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadRawHelper.cpp @@ -448,18 +448,12 @@ namespace Mantid { std::vector<specid_t> specList; - std::cout << Strings::join(m_monitordetectorList.begin(), m_monitordetectorList.end(), ",") << "(detectors) " << std::endl; - //get the monitor spectrum list from SpectraDetectorMap localWorkspace->getSpectraFromDetectorIDs(m_monitordetectorList, specList); - std::cout << specList.size() << " entries (new way)\n"; - std::cout << Strings::join(specList.begin(), specList.end(), ",") << std::endl; // Old way to get the spectra # for these detectors const Geometry::ISpectraDetectorMap& specdetMap = localWorkspace->spectraMap(); specList = specdetMap.getSpectra(m_monitordetectorList); - std::cout << specList.size() << " entries (old way)\n"; - std::cout << Strings::join(specList.begin(), specList.end(), ",") << std::endl; // remove duplicates by calling sort & unique algorithms sort(specList.begin(), specList.end(), std::less<int>()); diff --git a/Code/Mantid/Framework/MDEvents/src/LoadMDEW.cpp b/Code/Mantid/Framework/MDEvents/src/LoadMDEW.cpp index 03575856ef7025841391954fe0bb36e1f3d3179f..37cc1e1d4bbe64e936c20c53a6f7ddf91624581e 100644 --- a/Code/Mantid/Framework/MDEvents/src/LoadMDEW.cpp +++ b/Code/Mantid/Framework/MDEvents/src/LoadMDEW.cpp @@ -10,6 +10,7 @@ #include "MantidMDEvents/MDEventFactory.h" #include <vector> #include "MantidKernel/Memory.h" +#include "MantidKernel/EnabledWhenProperty.h" using namespace Mantid::Kernel; using namespace Mantid::API; @@ -59,15 +60,17 @@ namespace Mantid declareProperty(new FileProperty("Filename", "", FileProperty::Load, exts), "The name of the Nexus file to load, as a full or relative path"); + declareProperty(new Kernel::PropertyWithValue<bool>("MetadataOnly", false), + "Load Metadata without events."); + declareProperty(new PropertyWithValue<bool>("FileBackEnd", false), "Set to true to load the data only on demand."); + setPropertySettings("FileBackEnd", new EnabledWhenProperty(this, "MetadataOnly", IS_EQUAL_TO, "0") ); declareProperty(new PropertyWithValue<double>("Memory", -1), "For FileBackEnd only: the amount of memory (in MB) to allocate to the in-memory cache.\n" "If not specified, a default of 40% of free physical memory is used."); - - declareProperty(new Kernel::PropertyWithValue<bool>("MetadataOnly", false), - "Load Metadata without events."); + setPropertySettings("Memory", new EnabledWhenProperty(this, "FileBackEnd", IS_EQUAL_TO, "1") ); declareProperty(new WorkspaceProperty<IMDEventWorkspace>("OutputWorkspace","",Direction::Output), "Name of the output MDEventWorkspace."); }