Skip to content

Commit

Permalink
Merge branch 'master' into feature/7253_workspace_groups_and_dock
Browse files Browse the repository at this point in the history
Conflicts:
	Code/Mantid/Framework/WorkflowAlgorithms/src/AlignAndFocusPowder.cpp
Re #7253
  • Loading branch information
mantid-roman committed Jul 3, 2013
2 parents 889cf9f + 399f9b7 commit fe478a4
Show file tree
Hide file tree
Showing 471 changed files with 23,203 additions and 9,020 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Build/CMake/WindowsNSIS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
set( CPACK_GENERATOR "NSIS" )
set( CPACK_INSTALL_PREFIX "/")
set( CPACK_NSIS_DISPLAY_NAME "Mantid${CPACK_PACKAGE_SUFFIX}")
set( CPACK_PACKAGE_NAME "Mantid${CPACK_PACKAGE_SUFFIX}" )
set( CPACK_PACKAGE_NAME "mantid${CPACK_PACKAGE_SUFFIX}" )
set( CPACK_PACKAGE_INSTALL_DIRECTORY "MantidInstall${CPACK_PACKAGE_SUFFIX}")
set( CPACK_NSIS_INSTALL_ROOT "C:")
set( CPACK_PACKAGE_EXECUTABLES "MantidPlot;MantidPlot")
Expand Down
10 changes: 9 additions & 1 deletion Code/Mantid/Build/wiki_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ def do_make_wiki(algo_name, version, latest_version):
"""

external_image = "http://download.mantidproject.org/algorithm_screenshots/ScreenShotImages/%s_dlg.png" % algo_name
out = "<anchor url='%s'><img width=400px align='right' src='%s' style='position:relative; z-index:1000; padding-left:5px;'></anchor>\n\n" % (external_image, external_image)
out = "<anchor url='%s'><img width=400px src='%s' style='position:relative; z-index:1000; padding-left:5px; float:right;'></anchor>\n\n" % (external_image, external_image)

# Deprecated algorithms: Simply return the deprecation message
print "Creating... ", algo_name, version
Expand Down Expand Up @@ -623,6 +623,14 @@ def do_make_wiki(algo_name, version, latest_version):
out += " " + create_function_signature(alg, algo_name) + "\n\n"
out += "<br clear=all>\n\n"
out += custom_usage

# If there is an alias put it in
alias = alg.alias().strip()
if len(alias) > 0:
out += ("== Alias ==\n\n")
out += "This algorithm is also called '%s'\n\n" % alias

# Table of properties
out += "== Properties ==\n\n"

out += """{| border="1" cellpadding="5" cellspacing="0"
Expand Down
14 changes: 12 additions & 2 deletions Code/Mantid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,24 @@ add_subdirectory ( QtPropertyBrowser )
# Flag that this is a full build, i.e not framework only
set( FULL_PACKAGE_BUILD 1 )

# Framework Build options
set ( CXXTEST_SINGLE_LOGFILE CACHE BOOL "Switch to have the tests for each package run together")
set ( CXXTEST_ADD_PERFORMANCE OFF CACHE BOOL "Switch to add Performance tests to the list of tests run by ctest?")
set ( MAKE_REMOTE_JOBS ON CACHE BOOL "Add code for executing algorithms on a remote cluster")

add_subdirectory ( Framework )

include_directories ( Framework/Kernel/inc )
include_directories ( Framework/Geometry/inc )
include_directories ( Framework/API/inc )

set ( CORE_MANTIDLIBS Kernel Geometry API )

if ( MAKE_REMOTE_JOBS )
include_directories ( Framework/Remote/inc )
LIST( APPEND CORE_MANTIDLIBS Remote)
endif (MAKE_REMOTE_JOBS)

# Add a target for all GUI tests
add_custom_target ( GUITests )
add_dependencies ( check GUITests )
Expand All @@ -125,9 +136,8 @@ if ( UNIX )
set ( UNITY_BUILD OFF CACHE BOOL "Switch for utilising unity builds. Faster builds for selected components.")
endif ( UNIX )

# VATES flag. Requires ParaView
set ( MAKE_VATES OFF CACHE BOOL "Switch for compiling the Vates project")
set ( CXXTEST_SINGLE_LOGFILE CACHE BOOL "Switch to have the tests for each package run together")
set ( CXXTEST_ADD_PERFORMANCE OFF CACHE BOOL "Switch to add Performance tests to the list of tests run by ctest?")

if ( MAKE_VATES )
add_subdirectory ( Vates )
Expand Down
6 changes: 0 additions & 6 deletions Code/Mantid/Framework/API/inc/MantidAPI/CompositeFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ class MANTID_API_DLL CompositeFunction : public virtual IFunction
/// Remove a constraint
void removeConstraint(const std::string& parName);

/// Set a value to attribute attName
virtual void setAttribute(const std::string& attName,const Attribute& );

/* CompositeFunction own methods */

/// Add a function at the back of the internal function list
Expand All @@ -169,8 +166,6 @@ class MANTID_API_DLL CompositeFunction : public virtual IFunction
std::string parameterLocalName(size_t i)const;
/// Check the function.
void checkFunction();
/// Enable/disable numeric derivative calculation
void useNumericDerivatives( bool yes ) const;

/// Returns the number of attributes associated with the function
virtual size_t nLocalAttributes()const {return 0;}
Expand Down Expand Up @@ -221,7 +216,6 @@ class MANTID_API_DLL CompositeFunction : public virtual IFunction
/// Function counter to be used in nextConstraint
mutable size_t m_iConstraintFunction;
/// Flag set to use numerical derivatives
mutable bool m_useNumericDerivatives;
};

///shared pointer to the composite function base class
Expand Down
7 changes: 6 additions & 1 deletion Code/Mantid/Framework/API/inc/MantidAPI/IDomainCreator.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace Mantid
const std::vector<std::string>& workspacePropertyNames,
DomainType domainType = Simple);
/// Virtual destructor
virtual ~IDomainCreator() {};
virtual ~IDomainCreator() {}
/// Initialize
virtual void initialize(Kernel::IPropertyManager* , const std::string&, DomainType) {}

Expand Down Expand Up @@ -103,6 +103,9 @@ namespace Mantid
/// Return the size of the domain to be created.
virtual size_t getDomainSize() const = 0;

/// Set to ignore invalid data
void ignoreInvalidData( bool yes ) {m_ignoreInvalidData = yes;}

protected:
/// Declare a property to the algorithm
void declareProperty(Kernel::Property* prop,const std::string& doc);
Expand All @@ -114,6 +117,8 @@ namespace Mantid
DomainType m_domainType;
/// Output separate composite function values
bool m_outputCompositeMembers;
/// Flag to ignore nans, infinities and zero errors.
bool m_ignoreInvalidData;
};

/// Typedef for a shared pointer to IDomainCreator.
Expand Down
14 changes: 11 additions & 3 deletions Code/Mantid/Framework/API/inc/MantidAPI/IEventList.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,19 @@ namespace API
virtual void addPulsetime(const double seconds) = 0;
/// Mask a given TOF range
virtual void maskTof(const double tofMin, const double tofMax) = 0;
/// Return the list of TOF values
virtual void getTofs(std::vector<double>& tofs) const = 0;
/// Return the list of TOF values
/// Return the list of TOF values
virtual std::vector<double> getTofs() const = 0;
/// Return the list of TOF values
virtual void getTofs(std::vector<double>& tofs) const = 0;
/// Return the list of event weight values
virtual std::vector<double> getWeights() const = 0;
/// Return the list of event weight values
virtual void getWeights(std::vector<double>& weights) const = 0;
/// Return the list of event weight error values
virtual std::vector<double> getWeightErrors() const = 0;
/// Return the list of event weight error values
virtual void getWeightErrors(std::vector<double>& weightErrors) const = 0;
/// Return the list of pulse time values
virtual std::vector<Mantid::Kernel::DateAndTime> getPulseTimes() const = 0;
/// Get the minimum TOF from the list
virtual double getTofMin() const = 0;
Expand Down
4 changes: 4 additions & 0 deletions Code/Mantid/Framework/API/inc/MantidAPI/IMDNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ class IMDNode
virtual uint32_t getDepth() const=0;
virtual signal_t getSignalNormalized() const=0;

virtual void calcVolume()=0;
virtual void setInverseVolume(const coord_t )=0;
virtual void setSignal(const signal_t )=0;
virtual void setErrorSquared(const signal_t )=0;

// -------------------------------- Geometry/vertexes-Related -------------------------------------------
virtual std::vector<Mantid::Kernel::VMD> getVertexes() const =0;
Expand Down
3 changes: 3 additions & 0 deletions Code/Mantid/Framework/API/inc/MantidAPI/IPeakFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ class MANTID_API_DLL IPeakFunction : public IFunctionWithLocation
static int s_peakRadius;
};

typedef boost::shared_ptr<IPeakFunction> IPeakFunction_sptr;
typedef boost::shared_ptr<const IPeakFunction> IPeakFunction_const_sptr;

} // namespace API
} // namespace Mantid

Expand Down
27 changes: 3 additions & 24 deletions Code/Mantid/Framework/API/src/CompositeFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ DECLARE_FUNCTION(CompositeFunction)

/// Default constructor
CompositeFunction::CompositeFunction():
m_nParams(0),
m_useNumericDerivatives(false)
m_nParams(0)
{
declareAttribute("NumDeriv", Attribute(false));
}
Expand Down Expand Up @@ -185,7 +184,7 @@ void CompositeFunction::function(const FunctionDomain& domain, FunctionValues& v
*/
void CompositeFunction::functionDeriv(const FunctionDomain& domain, Jacobian& jacobian)
{
if ( m_useNumericDerivatives )
if ( getAttribute("NumDeriv").asBool() )
{
calNumericalDeriv(domain, jacobian);
}
Expand Down Expand Up @@ -741,7 +740,7 @@ void CompositeFunction::setUpForFit()

// instead of automatically switching to numeric derivatives
// log a warning about a danger of not using it
if ( !m_useNumericDerivatives )
if ( !getAttribute("NumDeriv").asBool() )
{
for(size_t i = 0; i < nParams(); ++i)
{
Expand Down Expand Up @@ -825,25 +824,5 @@ IFunction_sptr CompositeFunction::getContainingFunction(const ParameterReference
return IFunction_sptr();
}

/**
* Enable/disable numeric derivative calculation.
* @param yes :: Set to true to use numeric derivative calculation.
*/
void CompositeFunction::useNumericDerivatives( bool yes ) const
{
m_useNumericDerivatives = yes;
}

/// Set a value to attribute attName
void CompositeFunction::setAttribute(const std::string& attName,const Attribute& att)
{
storeAttributeValue( attName, att );

if ( attName == "NumDeriv" )
{
useNumericDerivatives( att.asBool() );
}
}

} // namespace API
} // namespace Mantid
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/API/src/IDomainCreator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace API
DomainType domainType):
m_manager( manager ),
m_workspacePropertyNames( workspacePropertyNames ),
m_domainType( domainType ), m_outputCompositeMembers(false)
m_domainType( domainType ), m_outputCompositeMembers( false ), m_ignoreInvalidData( false )
{}

/**
Expand Down
17 changes: 16 additions & 1 deletion Code/Mantid/Framework/Algorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ set ( SRC_FILES
src/BinaryOperation.cpp
src/CalMuonDeadTime.cpp
src/CalculateEfficiency.cpp
src/CalculateFlatBackground.cpp
src/CalculateFlatBackground.cpp
src/CalculateTransmission.cpp
src/CalculateTransmissionBeamSpreader.cpp
src/CalculateZscore.cpp
Expand All @@ -34,6 +34,7 @@ set ( SRC_FILES
src/CloneWorkspace.cpp
src/CommutativeBinaryOperation.cpp
src/ConjoinWorkspaces.cpp
src/ConvertAxisByFormula.cpp
src/ConvertFromDistribution.cpp
src/ConvertMDHistoToMatrixWorkspace.cpp
src/ConvertSpectrumAxis.cpp
Expand Down Expand Up @@ -82,6 +83,7 @@ set ( SRC_FILES
src/ExportTimeSeriesLog.cpp
src/ExtractFFTSpectrum.cpp
src/ExtractMask.cpp
src/ExtractMaskToTable.cpp
src/ExtractMasking.cpp
src/ExtractSingleSpectrum.cpp
src/FFT.cpp
Expand Down Expand Up @@ -118,6 +120,7 @@ set ( SRC_FILES
src/He3TubeEfficiency.cpp
src/IQTransform.cpp
src/IdentifyNoisyDetectors.cpp
src/IntegrateByComponent.cpp
src/Integration.cpp
src/InterpolatingRebin.cpp
src/InvertMask.cpp
Expand All @@ -131,6 +134,7 @@ set ( SRC_FILES
src/MergeRuns.cpp
src/Min.cpp
src/Minus.cpp
src/ModeratorTzero.cpp
src/ModeratorTzeroLinear.cpp
src/MonteCarloAbsorption.cpp
src/MultipleScatteringCylinderAbsorption.cpp
Expand Down Expand Up @@ -170,6 +174,7 @@ set ( SRC_FILES
src/RemoveLowResTOF.cpp
src/RemovePromptPulse.cpp
src/RenameWorkspace.cpp
src/RenameWorkspaces.cpp
src/ReplaceSpecialValues.cpp
src/ResampleX.cpp
src/ResetNegatives.cpp
Expand Down Expand Up @@ -248,6 +253,7 @@ set ( INC_FILES
inc/MantidAlgorithms/CloneWorkspace.h
inc/MantidAlgorithms/CommutativeBinaryOperation.h
inc/MantidAlgorithms/ConjoinWorkspaces.h
inc/MantidAlgorithms/ConvertAxisByFormula.h
inc/MantidAlgorithms/ConvertFromDistribution.h
inc/MantidAlgorithms/ConvertMDHistoToMatrixWorkspace.h
inc/MantidAlgorithms/ConvertSpectrumAxis.h
Expand Down Expand Up @@ -296,6 +302,7 @@ set ( INC_FILES
inc/MantidAlgorithms/ExportTimeSeriesLog.h
inc/MantidAlgorithms/ExtractFFTSpectrum.h
inc/MantidAlgorithms/ExtractMask.h
inc/MantidAlgorithms/ExtractMaskToTable.h
inc/MantidAlgorithms/ExtractMasking.h
inc/MantidAlgorithms/ExtractSingleSpectrum.h
inc/MantidAlgorithms/FFT.h
Expand Down Expand Up @@ -333,6 +340,7 @@ set ( INC_FILES
inc/MantidAlgorithms/He3TubeEfficiency.h
inc/MantidAlgorithms/IQTransform.h
inc/MantidAlgorithms/IdentifyNoisyDetectors.h
inc/MantidAlgorithms/IntegrateByComponent.h
inc/MantidAlgorithms/Integration.h
inc/MantidAlgorithms/InterpolatingRebin.h
inc/MantidAlgorithms/InvertMask.h
Expand All @@ -346,6 +354,7 @@ set ( INC_FILES
inc/MantidAlgorithms/MergeRuns.h
inc/MantidAlgorithms/Min.h
inc/MantidAlgorithms/Minus.h
inc/MantidAlgorithms/ModeratorTzero.h
inc/MantidAlgorithms/ModeratorTzeroLinear.h
inc/MantidAlgorithms/MonteCarloAbsorption.h
inc/MantidAlgorithms/MultipleScatteringCylinderAbsorption.h
Expand Down Expand Up @@ -385,6 +394,7 @@ set ( INC_FILES
inc/MantidAlgorithms/RemoveLowResTOF.h
inc/MantidAlgorithms/RemovePromptPulse.h
inc/MantidAlgorithms/RenameWorkspace.h
inc/MantidAlgorithms/RenameWorkspaces.h
inc/MantidAlgorithms/ReplaceSpecialValues.h
inc/MantidAlgorithms/ResampleX.h
inc/MantidAlgorithms/ResetNegatives.h
Expand Down Expand Up @@ -474,6 +484,7 @@ set ( TEST_FILES
CommutativeBinaryOperationTest.h
CompressedRebinTest.h
ConjoinWorkspacesTest.h
ConvertAxisByFormulaTest.h
ConvertFromDistributionTest.h
ConvertSpectrumAxisTest.h
ConvertTableToMatrixWorkspaceTest.h
Expand Down Expand Up @@ -516,6 +527,7 @@ set ( TEST_FILES
ExportTimeSeriesLogTest.h
ExtractFFTSpectrumTest.h
ExtractMaskTest.h
ExtractMaskToTableTest.h
ExtractSingleSpectrumTest.h
FFTDerivativeTest.h
FFTSmooth2Test.h
Expand Down Expand Up @@ -547,6 +559,7 @@ set ( TEST_FILES
He3TubeEfficiencyTest.h
IQTransformTest.h
IdentifyNoisyDetectorsTest.h
IntegrateByComponentTest.h
IntegrationTest.h
InterpolatingRebinTest.h
InvertMaskTest.h
Expand All @@ -557,6 +570,7 @@ set ( TEST_FILES
MedianDetectorTestTest.h
MergeRunsTest.h
MinusTest.h
ModeratorTzeroTest.h
ModeratorTzeroLinearTest.h
MonteCarloAbsorptionTest.h
MultipleScatteringCylinderAbsorptionTest.h
Expand Down Expand Up @@ -592,6 +606,7 @@ set ( TEST_FILES
RemoveExpDecayTest.h
RemoveLowResTOFTest.h
RemovePromptPulseTest.h
RenameWorkspacesTest.h
RenameWorkspaceTest.h
ReplaceSpecialValuesTest.h
ResampleXTest.h
Expand Down

0 comments on commit fe478a4

Please sign in to comment.