Skip to content

Commit

Permalink
refs #9581 conflicts with develop (probably due to untested tickets)
Browse files Browse the repository at this point in the history
Merge branch 'feature/9581_SphinxChanges' into develop

Conflicts:
	Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDParent.cpp
  • Loading branch information
abuts committed Jun 17, 2014
2 parents def6118 + 03e8cb6 commit 9dacc2f
Show file tree
Hide file tree
Showing 19 changed files with 729 additions and 269 deletions.
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/API/inc/MantidAPI/ITableWorkspace.h
Expand Up @@ -131,9 +131,9 @@ class MANTID_API_DLL ITableWorkspace: public API::Workspace
virtual Column_sptr addColumn(const std::string& type, const std::string& name) = 0;
/// Creates n new columns of the same type.
virtual bool addColumns(const std::string& type, const std::string& name, size_t n);
/**Get access to shared pointer containing workspace porperties */
/**Get access to shared pointer containing workspace properties */
virtual API::LogManager_sptr logs() = 0;
/**Get constant access to shared pointer containing workspace porperties */
/**Get constant access to shared pointer containing workspace properties */
virtual API::LogManager_const_sptr getLogs()const = 0;

/// Removes a column.
Expand Down
Expand Up @@ -31,7 +31,7 @@ namespace Algorithms

private:

/// Initialise the properties
/// Initialize the properties
void init();
/// Run the algorithm
void exec();
Expand Down
Expand Up @@ -106,7 +106,7 @@ namespace Mantid


declareProperty("DeltaR", EMPTY_DBL(), mustBePositive,
"Step size of r of G(r) to calculate. Default = <math>\\frac{\\pi}{Q_{max}}</math>.");
"Step size of r of G(r) to calculate. Default = :math:`\\frac{\\pi}{Q_{max}}`.");
declareProperty("Rmax", 20., mustBePositive, "Maximum r for G(r) to calculate.");
declareProperty("rho0", EMPTY_DBL(), mustBePositive,
"Average number density used for g(r) and RDF(r) conversions (optional)");
Expand Down
Expand Up @@ -58,7 +58,7 @@ namespace MDAlgorithms
/// Algorithm's name for identification
virtual const std::string name() const;
///Summary of algorithms purpose
virtual const std::string summary() const {return "Create a MDEventWorkspace with selected dimensions, e.g. the reciprocal space of momentums (Qx, Qy, Qz) or momentums modules |Q|, energy transfer dE if availible and any other user specified log values which can be treated as dimensions.";}
virtual const std::string summary() const {return "Create a MDEventWorkspace with selected dimensions, e.g. the reciprocal space of momentums (Qx, Qy, Qz) or momentums modules |Q|, energy transfer dE if available and any other user specified log values which can be treated as dimensions.";}

/// Algorithm's version for identification
virtual int version() const;
Expand Down
Expand Up @@ -40,7 +40,7 @@ namespace MDAlgorithms

virtual const std::string name() const;
///Summary of algorithms purpose
virtual const std::string summary() const {return "Calculate limits required for ConvertToMD";}
virtual const std::string summary() const {return "Calculate limits for ConvertToMD transformation, achievable on a spheric instrument.";}

virtual int version() const;
virtual const std::string category() const;
Expand Down
Expand Up @@ -40,7 +40,7 @@ namespace MDAlgorithms

virtual const std::string name() const;
///Summary of algorithms purpose
virtual const std::string summary() const {return "Calculate limits required for ConvertToMD";}
virtual const std::string summary() const {return "Calculate limits of ConvertToMD transformation possible for this particular workspace and the instrument, attached to it.";}

virtual int version() const{return 1;}
protected: // for testing
Expand Down
Expand Up @@ -17,8 +17,8 @@ namespace MDAlgorithms
/** ConvertToMDParent :
* Main part of two algorithms which use ConvertToMD factory to transform points from instrument space to physical MD space
*
* The description of the algorithm is avalible at: <http://www.mantidproject.org/ConvertToMD>
* The detailed description of the algoritm is provided at: <http://www.mantidproject.org/Writing_custom_ConvertTo_MD_transformation>
* The description of the algorithm is available at: <http://www.mantidproject.org/ConvertToMD>
* The detailed description of the algorithm is provided at: <http://www.mantidproject.org/Writing_custom_ConvertTo_MD_transformation>
* @date 11-10-2011
Expand Down
Expand Up @@ -46,7 +46,9 @@ namespace MDAlgorithms
/// Algorithm's name for identification
virtual const std::string name() const { return "PreprocessDetectorsToMD";};
///Summary of algorithms purpose
virtual const std::string summary() const {return "'''PreprocessDetectorsToMD''' is helper algorithm, used to make common part of transformation from real to reciprocal space. It is used by ConvertToMD algorithm to save time spent on this transformation when the algorithm used multiple times for multiple measurements on the same instrument. It is also should be used to calculate limits of transformation in Q-space and the detectors trajectories in Q-space.\n\n";}
virtual const std::string summary() const {return "Its a helper algorithm, used to make common part of transformation from real to reciprocal space. "
"It is used by :ref:`algm-ConvertToMD` and :ref:`algm-ConvertToMDMinMaxLocal` algorithms to save time spent on this transformation "
"when the algorithm used multiple times for multiple measurements on the same instrument.";}

/// Algorithm's version for identification
virtual int version() const { return 1;};
Expand All @@ -55,7 +57,7 @@ namespace MDAlgorithms
private:
void init();
void exec();
/// the variable specifies if one needs to calculate efixed for detectors (make sence for indirect instruments)
/// the variable specifies if one needs to calculate efixed for detectors (make sense for indirect instruments)
bool m_getEFixed;
/// the variable specifies if one needs to return the state of detector mask e.g if the detector is masked
bool m_getIsMasked;
Expand Down
8 changes: 4 additions & 4 deletions Code/Mantid/Framework/MDAlgorithms/src/ConvertToMD.cpp
Expand Up @@ -42,17 +42,17 @@ namespace Mantid
{
ConvertToMDParent::init();
declareProperty(new WorkspaceProperty<IMDEventWorkspace>("OutputWorkspace","",Direction::Output),
"Name of the output [[MDEventWorkspace]].");
"Name of the output `MDEventWorkspace <MDEventWorkspace>`_.");

declareProperty(new PropertyWithValue<bool>("OverwriteExisting", true, Direction::Input),
"By default (''\"1\"''), existing Output Workspace will be replaced. Select false (''\"0\"'') if you want to add new events to the workspace, which already exist. "
"\nChoosing ''\"0\"''' can be very inefficient for file-based workspaces");
"By default (\"1\"), existing Output Workspace will be replaced. Select false (\"0\") if you want to add new events to the workspace, which already exist. "
"\nChoosing \"0\" can be very inefficient for file-based workspaces");


declareProperty(new ArrayProperty<double>("MinValues"),
"It has to be N comma separated values, where N is the number of dimensions of the target workspace. Values "
"smaller then specified here will not be added to workspace.\n Number N is defined by properties 4,6 and 7 and "
"described on [[MD Transformation factory]] page. See also [[ConvertToMDMinMaxLocal]]");
"described on `MD Transformation factory <MD_Transformation_factory>`_ page. See also :ref:`algm-ConvertToMDMinMaxLocal`");

//TODO: " If a minimal target workspace range is higher then the one specified here, the target workspace range will be used instead " );

Expand Down
26 changes: 13 additions & 13 deletions Code/Mantid/Framework/MDAlgorithms/src/ConvertToMDMinMaxGlobal.cpp
Expand Up @@ -67,21 +67,21 @@ namespace MDAlgorithms
"An input Matrix Workspace (Workspace2D or Event workspace) ");

std::vector<std::string> Q_modes = MDEvents::MDTransfFactory::Instance().getKeys();
// something to do with different moments of thime when algorithm or test loads library. To avoid empty factory always do this.
// something to do with different moments of time when algorithm or test loads library. To avoid empty factory always do this.
if(Q_modes.empty()) Q_modes.assign(1,"ERROR IN LOADING Q-converters");

/// this variable describes default possible ID-s for Q-dimensions
declareProperty("QDimensions",Q_modes[0],boost::make_shared<StringListValidator>(Q_modes),
"String, describing available analysis modes, registered with [[MD Transformation factory]]. "
"There are 3 modes currently available and described in details on [[MD Transformation factory]] page. "
"The modes names are '''CopyToMD''', '''|Q|''' and '''Q3D'''",
"String, describing MD-analysis modes, this algorithm can process. "
"There are 3 modes currently available and described in details on `MD Transformation factory <MD_Transformation_factory>`_ page. "
"The modes names are **CopyToMD**, **|Q|** and **Q3D**",
Direction::InOut);
/// temporary, untill dEMode is not properly defined on Workspace
/// temporary, until dEMode is not properly defined on Workspace
std::vector<std::string> dE_modes = Kernel::DeltaEMode().availableTypes();
declareProperty("dEAnalysisMode",dE_modes[Kernel::DeltaEMode::Direct],boost::make_shared<StringListValidator>(dE_modes),
"You can analyse neutron energy transfer in '''Direct''', '''Indirect''' or '''Elastic''' mode. "
"You can analyze neutron energy transfer in **Direct**, **Indirect** or **Elastic** mode. "
"The analysis mode has to correspond to experimental set up. Selecting inelastic mode increases "
"the number of the target workspace dimensions by one. See [[MD Transformation factory]] for further details.",
"the number of the target workspace dimensions by one. See `MD Transformation factory <MD_Transformation_factory>`_ for further details.",
Direction::InOut);

setPropertySettings("dEAnalysisMode",
Expand All @@ -92,18 +92,18 @@ namespace MDAlgorithms
TargFrames.push_back("Q");
TargFrames.push_back("HKL");
declareProperty("Q3DFrames", "AutoSelect",boost::make_shared<StringListValidator>(TargFrames),
"What will be the Q-dimensions of the output workspace in Q3D case?\n"
" AutoSelect: Q by default, HKL if sample has a UB matrix:\n"
" Q - momentum in inverse angstroms. Can be used for both laboratory or sample frame.\n"
" HKL - reciprocal lattice units"
"What will be the Q-dimensions of the output workspace in **Q3D** case?"
" **AutoSelect**: **Q** by default, **HKL** if sample has a UB matrix."
" **Q** - momentum in inverse angstroms. Can be used for both laboratory or sample frame."
" **HKL** - reciprocal lattice units"
);

setPropertySettings("Q3DFrames",
new VisibleWhenProperty("QDimensions", IS_EQUAL_TO, "Q3D"));

declareProperty(new ArrayProperty<std::string>("OtherDimensions",Direction::Input),
"List(comma separated) of additional to '''Q''' and '''DeltaE''' variables which form additional "
"(orthogonal) to '''Q''' dimensions in the target workspace (e.g. Temperature or Magnetic field). "
"List(comma separated) of additional to **Q** and **DeltaE** variables which form additional "
"(orthogonal) to **Q** dimensions in the target workspace (e.g. Temperature or Magnetic field). "
"These variables had to be logged during experiment and the names of these variables have to coincide "
"with the log names for the records of these variables in the source workspace.");

Expand Down
Expand Up @@ -76,7 +76,7 @@ namespace Mantid
std::vector<std::string> otherDimNames = getProperty("OtherDimensions");
//d) The output dimensions in the Q3D mode, processed together with QConversionScales
std::string QFrame = getProperty("Q3DFrames");
//e) part of the procedure, specifying the target dimensions units. Currently only Q3D target units can be converted to different flavours of hkl
//e) part of the procedure, specifying the target dimensions units. Currently only Q3D target units can be converted to different flavors of hkl
std::string convertTo_ = getProperty("QConversionScales");


Expand Down

0 comments on commit 9dacc2f

Please sign in to comment.