Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into 11706_color_map_vsi…
Browse files Browse the repository at this point in the history
…_link_color_map_editor_to_color_selection_widget_lineedits

Conflicts:
	Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/ViewBase.cpp

spurious conflict in principle, re #11706
  • Loading branch information
FedeMPouzols committed Jun 4, 2015
2 parents d489cf7 + 7fce272 commit 7bede14
Show file tree
Hide file tree
Showing 479 changed files with 19,077 additions and 12,125 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Build/CMake/FindQwt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ find_package_handle_standard_args( Qwt DEFAULT_MSG QWT_LIBRARY QWT_INCLUDE_DIR )

# Parse version string from qwt_global.h
file ( STRINGS ${QWT_INCLUDE_DIR}/qwt_global.h QWT_VERSION
REGEX "^#define[ \t]+QWT_VERSION_STR[ \t]+\"[0-9]+.[0-9]+.[0-9]+\"$" )
REGEX "^#define[ \t]+QWT_VERSION_STR[ \t]+\"[0-9]+.[0-9]+.[0-9]+(.*)?\"$" )
if ( NOT QWT_VERSION )
message ( FATAL_ERROR "Unrecognized Qwt version (cannot find QWT_VERSION_STR in qwt_global.h)" )
endif()
Expand Down
19 changes: 19 additions & 0 deletions Code/Mantid/Build/CMake/GNUSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ elseif ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" )
message( STATUS "clang version ${CMAKE_CXX_COMPILER_VERSION}" )
endif()

#Use the old ABI until the dust has settled and all dependencies are built with the new ABI.
if ( CMAKE_COMPILER_IS_GNUCXX AND NOT (GCC_COMPILER_VERSION VERSION_LESS "5.1.0"))
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
endif()

# Global warning flags.
set( GNUFLAGS "-Wall -Wextra -Wconversion -Winit-self -Wpointer-arith -Wcast-qual -Wcast-align -fno-common" )
# Disable some warnings about deprecated headers and type conversions that
Expand Down Expand Up @@ -46,6 +51,20 @@ if(WITH_ASAN)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address -lasan" )
endif()

option(WITH_UBSAN "Enable undefined behavior sanitizer" OFF)
if(WITH_UBSAN)
message(STATUS "enabling undefined behavior sanitizers")
set( UBSAN_NO_RECOVER "-fno-sanitize-recover")
if ( CMAKE_COMPILER_IS_GNUCXX AND GCC_COMPILER_VERSION VERSION_LESS "5.1.0")
set( UBSAN_NO_RECOVER "")
endif()
set(SAN_FLAGS "-fno-omit-frame-pointer -fno-common -fsanitize=undefined ${UBSAN_NO_RECOVER}")
add_compile_options(-fno-omit-frame-pointer -fno-common -fsanitize=undefined ${UBSAN_NO_RECOVER})
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${SAN_FLAGS}" )
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SAN_FLAGS}" )
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SAN_FLAGS}" )
endif()

# Set the options for gcc and g++
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GNUFLAGS}" )
# -Wno-overloaded-virtual is down here because it's not applicable to the C_FLAGS
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Build/Jenkins/buildscript.bat
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,6 @@ if not "%JOB_NAME%"=="%JOB_NAME:pull_requests=%" (

:: Remove Mantid
cd %BUILD_DIR%
python !SYSTEMTESTS_DIR!\scripts\mantidinstaller.py uninstall %BUILD_DIR%
start "Uninstall Mantid" /B /WAIT python !SYSTEMTESTS_DIR!\scripts\mantidinstaller.py uninstall %BUILD_DIR%
if !RETCODE! NEQ 0 exit /B 1
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Version: 1.2.4
Section: main
Priority: optional
Architecture: all
Depends: git, clang, cmake-qt-gui(>=2.8.12), qt4-qmake, qt4-dev-tools, libqt4-dbg, libpoco-dev(>=1.4.2), libboost-all-dev, libboost-dbg, libnexus0-dev, libgoogle-perftools-dev, libqwt5-qt4-dev, libqwtplot3d-qt4-dev, python-qt4-dev, libgsl0-dev, liboce-visualization-dev, libmuparser-dev, python-numpy, libssl-dev, libqscintilla2-dev, texlive,texlive-latex-extra, dvipng, libhdf4-dev, doxygen, python-sphinx, python-scipy, ipython-qtconsole (>=1.2.0), libhdf5-dev, libhdf4-dev, libpococrypto11-dbg, libpocodata11-dbg, libpocofoundation11-dbg, libpocomysql11-dbg, libpoconet11-dbg, libpoconetssl11-dbg, libpocoodbc11-dbg, libpocosqlite11-dbg, libpocoutil11-dbg, libpocoxml11-dbg, libpocozip11-dbg, python-qt4-dbg, qt4-default, ninja-build, libjsoncpp-dev, python-dateutil, python-sphinx-bootstrap-theme, graphviz
Depends: g++, git, clang, cmake-qt-gui(>=2.8.12), qt4-qmake, qt4-dev-tools, libqt4-dbg, libpoco-dev(>=1.4.2), libboost-all-dev, libboost-dbg, libnexus0-dev, libgoogle-perftools-dev, libqwt5-qt4-dev, libqwtplot3d-qt4-dev, python-qt4-dev, libgsl0-dev, liboce-visualization-dev, libmuparser-dev, python-numpy, libssl-dev, libqscintilla2-dev, texlive,texlive-latex-extra, dvipng, libhdf4-dev, doxygen, python-sphinx, python-scipy, ipython-qtconsole (>=1.2.0), libhdf5-dev, libhdf4-dev, libpococrypto11-dbg, libpocodata11-dbg, libpocofoundation11-dbg, libpocomysql11-dbg, libpoconet11-dbg, libpoconetssl11-dbg, libpocoodbc11-dbg, libpocosqlite11-dbg, libpocoutil11-dbg, libpocoxml11-dbg, libpocozip11-dbg, python-qt4-dbg, qt4-default, ninja-build, libjsoncpp-dev, python-dateutil, python-sphinx-bootstrap-theme, graphviz
Installed-Size: 0
Maintainer: Mantid Project <mantid-help@mantidproject.org>
Description: Installs all packages required for a Mantid developer
Expand Down
18 changes: 0 additions & 18 deletions Code/Mantid/Framework/API/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ set ( SRC_FILES
src/IMDIterator.cpp
src/IMDWorkspace.cpp
src/IPawleyFunction.cpp
src/IPeak.cpp
src/IPeakFunction.cpp
src/IPeaksWorkspace.cpp
src/IPowderDiffPeakFunction.cpp
Expand Down Expand Up @@ -99,11 +98,6 @@ set ( SRC_FILES
src/ParameterReference.cpp
src/ParameterTie.cpp
src/PeakFunctionIntegrator.cpp
src/PeakTransform.cpp
src/PeakTransformHKL.cpp
src/PeakTransformQLab.cpp
src/PeakTransformQSample.cpp
src/PeakTransformSelector.cpp
src/Progress.cpp
src/Projection.cpp
src/PropertyManagerDataService.cpp
Expand Down Expand Up @@ -165,7 +159,6 @@ set ( INC_FILES
inc/MantidAPI/CompositeDomain.h
inc/MantidAPI/CompositeDomainMD.h
inc/MantidAPI/CompositeFunction.h
inc/MantidAPI/ConcretePeakTransformFactory.h
inc/MantidAPI/ConstraintFactory.h
inc/MantidAPI/CoordTransform.h
inc/MantidAPI/CostFunctionFactory.h
Expand Down Expand Up @@ -223,7 +216,6 @@ set ( INC_FILES
inc/MantidAPI/IMDWorkspace.h
inc/MantidAPI/IMaskWorkspace.h
inc/MantidAPI/IPawleyFunction.h
inc/MantidAPI/IPeak.h
inc/MantidAPI/IPeakFunction.h
inc/MantidAPI/IPeaksWorkspace.h
inc/MantidAPI/IPowderDiffPeakFunction.h
Expand Down Expand Up @@ -267,12 +259,6 @@ set ( INC_FILES
inc/MantidAPI/ParameterReference.h
inc/MantidAPI/ParameterTie.h
inc/MantidAPI/PeakFunctionIntegrator.h
inc/MantidAPI/PeakTransform.h
inc/MantidAPI/PeakTransformFactory.h
inc/MantidAPI/PeakTransformHKL.h
inc/MantidAPI/PeakTransformQLab.h
inc/MantidAPI/PeakTransformQSample.h
inc/MantidAPI/PeakTransformSelector.h
inc/MantidAPI/Progress.h
inc/MantidAPI/Projection.h
inc/MantidAPI/PropertyManagerDataService.h
Expand Down Expand Up @@ -370,10 +356,6 @@ set ( TEST_FILES
ParameterReferenceTest.h
ParameterTieTest.h
PeakFunctionIntegratorTest.h
PeakTransformHKLTest.h
PeakTransformQLabTest.h
PeakTransformQSampleTest.h
PeakTransformSelectorTest.h
ProjectionTest.h
PropertyManagerDataServiceTest.h
PropertyNexusTest.h
Expand Down
20 changes: 11 additions & 9 deletions Code/Mantid/Framework/API/inc/MantidAPI/IPeaksWorkspace.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MANTID_API_IPEAKSPACE_H_
#define MANTID_API_IPEAKSPACE_H_ 1
#define MANTID_API_IPEAKSPACE_H_

//----------------------------------------------------------------------
// Includes
Expand All @@ -10,9 +10,11 @@
#include <boost/optional.hpp>

namespace Mantid {

namespace API {
namespace Geometry {
class IPeak;
}
namespace API {


//==========================================================================================
/** Interface to the class Mantid::DataObjects::PeaksWorkspace
Expand Down Expand Up @@ -70,28 +72,28 @@ class MANTID_API_DLL IPeaksWorkspace : public ITableWorkspace,
/** Add a peak to the list
* @param ipeak :: Peak object to add (copy) into this.
*/
virtual void addPeak(const IPeak &ipeak) = 0;
virtual void addPeak(const Mantid::Geometry::IPeak &ipeak) = 0;

//---------------------------------------------------------------------------------------------
/** Return a reference to the Peak
* @param peakNum :: index of the peak to get.
* @return a reference to a Peak object.
*/
virtual IPeak &getPeak(int peakNum) = 0;
virtual Mantid::Geometry::IPeak &getPeak(int peakNum) = 0;

//---------------------------------------------------------------------------------------------
/** Return a reference to the Peak (const version)
* @param peakNum :: index of the peak to get.
* @return a reference to a Peak object.
*/
virtual const IPeak &getPeak(int peakNum) const = 0;
virtual const Mantid::Geometry::IPeak &getPeak(int peakNum) const = 0;

//---------------------------------------------------------------------------------------------
/** Return a pointer to the Peak
* @param peakNum :: index of the peak to get.
* @return a pointer to a Peak object.
*/
IPeak *getPeakPtr(const int peakNum) { return &this->getPeak(peakNum); }
Mantid::Geometry::IPeak *getPeakPtr(const int peakNum) { return &this->getPeak(peakNum); }

//---------------------------------------------------------------------------------------------
/** Create an instance of a Peak
Expand All @@ -101,15 +103,15 @@ class MANTID_API_DLL IPeaksWorkspace : public ITableWorkspace,
* detector. Calculated if not provided.
* @return a pointer to a new Peak object.
*/
virtual IPeak *createPeak(Mantid::Kernel::V3D QLabFrame,
virtual Mantid::Geometry::IPeak *createPeak(Mantid::Kernel::V3D QLabFrame,
boost::optional<double> detectorDistance) const = 0;

/**
* Create an instance of a peak using a V3D
* @param HKL V3D
* @return a pointer to a new Peak object.
*/
virtual IPeak *createPeakHKL(Mantid::Kernel::V3D HKL) const = 0;
virtual Mantid::Geometry::IPeak *createPeakHKL(Mantid::Kernel::V3D HKL) const = 0;

//---------------------------------------------------------------------------------------------
/** Determine if the workspace has been integrated using a peaks integration
Expand Down
3 changes: 1 addition & 2 deletions Code/Mantid/Framework/API/inc/MantidAPI/MatrixWorkspace.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ class MANTID_API_DLL MatrixWorkspace : public IMDWorkspace,
Geometry::IDetector_const_sptr getDetector(const size_t workspaceIndex) const;
double detectorTwoTheta(Geometry::IDetector_const_sptr det) const;
double detectorSignedTwoTheta(Geometry::IDetector_const_sptr det) const;
double gravitationalDrop(Geometry::IDetector_const_sptr det,
const double waveLength) const;

//@}

virtual void populateInstrumentParameters();
Expand Down
22 changes: 13 additions & 9 deletions Code/Mantid/Framework/API/src/ExperimentInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ void ExperimentInfo::setInstrument(const Instrument_const_sptr &instr) {
m_parmap = instr->getParameterMap();
} else {
sptr_instrument = instr;
m_parmap = boost::make_shared<ParameterMap>();
}
}

Expand Down Expand Up @@ -290,7 +291,7 @@ void ExperimentInfo::populateInstrumentParameters() {
}
if (rtpValues.haveRadius) // Just overwrite x,y,z
{
// convert spherical coordinates to cartesian coordinate values
// convert spherical coordinates to Cartesian coordinate values
double x = rtpValues.radius * std::sin(rtpValues.theta) *
std::cos(rtpValues.phi);
paramMap.addPositionCoordinate(paramInfo->m_component, "x", x);
Expand Down Expand Up @@ -1122,13 +1123,17 @@ void ExperimentInfo::populateWithParameter(
ParameterValue paramValue(paramInfo,
runData); // Defines implicit conversion operator

const std::string * pDescription=NULL;
if(!paramInfo.m_description.empty())
pDescription = &paramInfo.m_description;

// Some names are special. Values should be convertible to double
if (name.compare("x") == 0 || name.compare("y") == 0 ||
name.compare("z") == 0) {
paramMap.addPositionCoordinate(paramInfo.m_component, name, paramValue);
} else if (name.compare("rot") == 0 || name.compare("rotx") == 0 ||
name.compare("roty") == 0 || name.compare("rotz") == 0) {
paramMap.addRotationParam(paramInfo.m_component, name, paramValue);
paramMap.addRotationParam(paramInfo.m_component, name, paramValue,pDescription);
} else if (category.compare("fitting") == 0) {
std::ostringstream str;
str << paramInfo.m_value << " , " << paramInfo.m_fittingFunction << " , "
Expand All @@ -1137,16 +1142,15 @@ void ExperimentInfo::populateWithParameter(
<< " , " << paramInfo.m_tie << " , " << paramInfo.m_formula << " , "
<< paramInfo.m_formulaUnit << " , " << paramInfo.m_resultUnit << " , "
<< (*(paramInfo.m_interpolation));
paramMap.add("fitting", paramInfo.m_component, name, str.str());
paramMap.add("fitting", paramInfo.m_component, name, str.str(),pDescription);
} else if (category.compare("string") == 0) {
paramMap.addString(paramInfo.m_component, name, paramInfo.m_value);
paramMap.addString(paramInfo.m_component, name, paramInfo.m_value,pDescription);
} else if (category.compare("bool") == 0) {
paramMap.addBool(paramInfo.m_component, name, paramValue);
paramMap.addBool(paramInfo.m_component, name, paramValue,pDescription);
} else if (category.compare("int") == 0) {
paramMap.addInt(paramInfo.m_component, name, paramValue);
} else // assume double
{
paramMap.addDouble(paramInfo.m_component, name, paramValue);
paramMap.addInt(paramInfo.m_component, name, paramValue,pDescription);
} else{ // assume double
paramMap.addDouble(paramInfo.m_component, name, paramValue,pDescription);
}
}

Expand Down
4 changes: 3 additions & 1 deletion Code/Mantid/Framework/API/src/FunctionFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ CompositeFunction_sptr FunctionFactoryImpl::createComposite(
}
}

cfun->applyTies();
if (cfun) {
cfun->applyTies();
}
return cfun;
}

Expand Down
26 changes: 0 additions & 26 deletions Code/Mantid/Framework/API/src/MatrixWorkspace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -813,33 +813,7 @@ MatrixWorkspace::detectorTwoTheta(Geometry::IDetector_const_sptr det) const {
return det->getTwoTheta(samplePos, beamLine);
}

/**Calculates the distance a neutron coming from the sample will have deviated
* from a
* straight tragetory before hitting a detector. If calling this function many
* times
* for the same detector you can call this function once, with waveLength=1, and
* use
* the fact drop is proportional to wave length squared .This function has no
* knowledge
* of which axis is vertical for a given instrument
* @param det :: the detector that the neutron entered
* @param waveLength :: the neutrons wave length in meters
* @return the deviation in meters
*/
double MatrixWorkspace::gravitationalDrop(Geometry::IDetector_const_sptr det,
const double waveLength) const {
using namespace PhysicalConstants;
/// Pre-factor in gravity calculation: gm^2/2h^2
static const double gm2_OVER_2h2 =
g * NeutronMass * NeutronMass / (2.0 * h * h);

const V3D samplePos = getInstrument()->getSample()->getPos();
const double pathLength = det->getPos().distance(samplePos);
// Want L2 (sample-pixel distance) squared, times the prefactor g^2/h^2
const double L2 = gm2_OVER_2h2 * std::pow(pathLength, 2);

return waveLength * waveLength * L2;
}

//---------------------------------------------------------------------------------------
/** Add parameters to the instrument parameter map that are defined in
Expand Down
9 changes: 9 additions & 0 deletions Code/Mantid/Framework/Algorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ set ( SRC_FILES
src/ChangeBinOffset.cpp
src/ChangeLogTime.cpp
src/ChangePulsetime.cpp
src/ChangeTimeZero.cpp
src/CheckWorkspacesMatch.cpp
src/ChopData.cpp
src/ClearInstrumentParameters.cpp
Expand All @@ -41,6 +42,7 @@ set ( SRC_FILES
src/ConjoinWorkspaces.cpp
src/ConvertAxesToRealSpace.cpp
src/ConvertAxisByFormula.cpp
src/ConvertDiffCal.cpp
src/ConvertEmptyToTof.cpp
src/ConvertFromDistribution.cpp
src/ConvertSpectrumAxis.cpp
Expand Down Expand Up @@ -250,6 +252,7 @@ set ( SRC_FILES
src/UnwrapMonitor.cpp
src/UnwrapSNS.cpp
src/UpdateScriptRepository.cpp
src/VesuvioL1ThetaResolution.cpp
src/WeightedMean.cpp
src/WeightedMeanOfWorkspace.cpp
src/WeightingStrategy.cpp
Expand Down Expand Up @@ -292,6 +295,7 @@ set ( INC_FILES
inc/MantidAlgorithms/ChangeBinOffset.h
inc/MantidAlgorithms/ChangeLogTime.h
inc/MantidAlgorithms/ChangePulsetime.h
inc/MantidAlgorithms/ChangeTimeZero.h
inc/MantidAlgorithms/CheckWorkspacesMatch.h
inc/MantidAlgorithms/ChopData.h
inc/MantidAlgorithms/ClearInstrumentParameters.h
Expand All @@ -301,6 +305,7 @@ set ( INC_FILES
inc/MantidAlgorithms/ConjoinWorkspaces.h
inc/MantidAlgorithms/ConvertAxesToRealSpace.h
inc/MantidAlgorithms/ConvertAxisByFormula.h
inc/MantidAlgorithms/ConvertDiffCal.h
inc/MantidAlgorithms/ConvertEmptyToTof.h
inc/MantidAlgorithms/ConvertFromDistribution.h
inc/MantidAlgorithms/ConvertSpectrumAxis.h
Expand Down Expand Up @@ -511,6 +516,7 @@ set ( INC_FILES
inc/MantidAlgorithms/UnwrapMonitor.h
inc/MantidAlgorithms/UnwrapSNS.h
inc/MantidAlgorithms/UpdateScriptRepository.h
inc/MantidAlgorithms/VesuvioL1ThetaResolution.h
inc/MantidAlgorithms/WeightedMean.h
inc/MantidAlgorithms/WeightedMeanOfWorkspace.h
inc/MantidAlgorithms/WeightingStrategy.h
Expand Down Expand Up @@ -563,6 +569,7 @@ set ( TEST_FILES
ChangeBinOffsetTest.h
ChangeLogTimeTest.h
ChangePulsetimeTest.h
ChangeTimeZeroTest.h
CheckWorkspacesMatchTest.h
ChopDataTest.h
ClearInstrumentParametersTest.h
Expand All @@ -572,6 +579,7 @@ set ( TEST_FILES
ConjoinWorkspacesTest.h
ConvertAxesToRealSpaceTest.h
ConvertAxisByFormulaTest.h
ConvertDiffCalTest.h
ConvertEmptyToTofTest.h
ConvertFromDistributionTest.h
ConvertSpectrumAxis2Test.h
Expand Down Expand Up @@ -757,6 +765,7 @@ set ( TEST_FILES
UnGroupWorkspaceTest.h
UnaryOperationTest.h
UnwrapSNSTest.h
VesuvioL1ThetaResolutionTest.h
WeightedMeanOfWorkspaceTest.h
WeightedMeanTest.h
WeightingStrategyTest.h
Expand Down

0 comments on commit 7bede14

Please sign in to comment.