Skip to content

Commit

Permalink
Re #11063 Where these conflicts on master have came from?
Browse files Browse the repository at this point in the history
Merge branch 'master' into 11063_ParValidation

Conflicts:
	Code/Mantid/scripts/Inelastic/Direct/DirectEnergyConversion.py
	Code/Mantid/scripts/Inelastic/Direct/PropertiesDescriptors.py
	Code/Mantid/scripts/Inelastic/Direct/PropertyManager.py
	Code/Mantid/scripts/Inelastic/Direct/ReductionWrapper.py
	Code/Mantid/scripts/Inelastic/Direct/RunDescriptor.py
  • Loading branch information
abuts committed Feb 20, 2015
2 parents 990e006 + b4c62ec commit b0c3a74
Show file tree
Hide file tree
Showing 497 changed files with 20,381 additions and 13,912 deletions.
24 changes: 17 additions & 7 deletions Code/Mantid/Build/CMake/DarwinSetup.cmake
Expand Up @@ -131,20 +131,30 @@ else()
set ( CMAKE_OSX_ARCHITECTURES x86_64 )
set ( CMAKE_OSX_DEPLOYMENT_TARGET 10.8 )
# Follow symlinks so cmake copies the file
set ( PYQT4_PATH /usr/local/lib/python${PY_VER}/site-packages/PyQt4 )
# PYQT4_PATH, SITEPACKAGES_PATH, OPENSSL_ROOT_DIR may be defined externally (cmake -D)
# it would be good do not overwrite them (important for the compilation with macports)
if (NOT PYQT4_PATH)
set ( PYQT4_PATH /usr/local/lib/python${PY_VER}/site-packages/PyQt4 )
endif(NOT PYQT4_PATH)
execute_process(COMMAND readlink ${PYQT4_PATH}/Qt.so OUTPUT_VARIABLE PYQT4_SYMLINK_Qtso)
string(FIND ${PYQT4_SYMLINK_Qtso} "Qt.so" STOPPOS)
string(SUBSTRING ${PYQT4_SYMLINK_Qtso} 0 ${STOPPOS} PYQT4_SYMLINK)
string(FIND "${PYQT4_SYMLINK_Qtso}" "Qt.so" STOPPOS)
string(SUBSTRING "${PYQT4_SYMLINK_Qtso}" 0 ${STOPPOS} PYQT4_SYMLINK)
set ( PYQT4_PYTHONPATH ${PYQT4_PATH}/${PYQT4_SYMLINK} )
string(REGEX REPLACE "/$" "" PYQT4_PYTHONPATH "${PYQT4_PYTHONPATH}")

set ( SITEPACKAGES_PATH /usr/local/lib/python${PY_VER}/site-packages )
if (NOT SITEPACKAGES_PATH)
set ( SITEPACKAGES_PATH /usr/local/lib/python${PY_VER}/site-packages )
endif(NOT SITEPACKAGES_PATH)
execute_process(COMMAND readlink ${SITEPACKAGES_PATH}/sip.so OUTPUT_VARIABLE SITEPACKAGES_SYMLINK_sipso)
string(FIND ${SITEPACKAGES_SYMLINK_sipso} "sip.so" STOPPOS)
string(SUBSTRING ${SITEPACKAGES_SYMLINK_sipso} 0 ${STOPPOS} SITEPACKAGES_SYMLINK)
string(FIND "${SITEPACKAGES_SYMLINK_sipso}" "sip.so" STOPPOS)
string(SUBSTRING "${SITEPACKAGES_SYMLINK_sipso}" 0 ${STOPPOS} SITEPACKAGES_SYMLINK)
set ( SITEPACKAGES ${SITEPACKAGES_PATH}/${SITEPACKAGES_SYMLINK} )
string(REGEX REPLACE "/$" "" SITEPACKAGES "${SITEPACKAGES}")

# use homebrew OpenSSL package
set ( OPENSSL_ROOT_DIR /usr/local/opt/openssl )
if (NOT OPENSSL_ROOT_DIR)
set ( OPENSSL_ROOT_DIR /usr/local/opt/openssl )
endif(NOT OPENSSL_ROOT_DIR)
endif()

# Python packages
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Build/CMake/FindOpenCascade.cmake
Expand Up @@ -60,7 +60,7 @@ find_library ( OPENCASCADE_LIB_TKGEOMBASE
NAMES TKGeomBase
)

find_library ( OPENCASCADE_LIB_TKGEOMAlgo
find_library ( OPENCASCADE_LIB_TKGEOMALGO
NAMES TKGeomAlgo
)

Expand Down
4 changes: 4 additions & 0 deletions Code/Mantid/Build/CMake/LinuxPackageScripts.cmake
Expand Up @@ -22,6 +22,10 @@ endif()

set ( CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${LIB_DIR};${CMAKE_INSTALL_PREFIX}/${PLUGINS_DIR};${CMAKE_INSTALL_PREFIX}/${PVPLUGINS_DIR} )

# Tell rpm that this package does not own /opt /usr/share/{applications,pixmaps}
# Required for Fedora >= 18 and RHEL >= 7
set ( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION /opt /usr/share/applications /usr/share/pixmaps )

###########################################################################
# LD_PRELOAD TCMalloc
###########################################################################
Expand Down
File renamed without changes.
12 changes: 11 additions & 1 deletion Code/Mantid/Build/Jenkins/buildscript
Expand Up @@ -15,7 +15,17 @@
cmake --version
echo "SHA1=${sha1}"


#determine if should use the clang compiler.
if [[ ${JOB_NAME} == *clang* ]]; then
USE_CLANG=true
elif [[ $(uname) == 'Darwin' ]] ; then
if [[ ! $(command -v icpc) ]] ; then
USE_CLANG=true
fi
fi

if [[ $USE_CLANG ]]; then
# Assuming we are using the clang compiler
echo "Using clang/llvm compiler."
clang --version
Expand All @@ -35,7 +45,7 @@ fi
###############################################################################
# OS X 10.8 setup steps
###############################################################################
if [[ $(uname) == 'Darwin' ]] && [[ ${JOB_NAME} != *clang* ]]; then
if [[ $(uname) == 'Darwin' ]] && [[ ! $USE_CLANG ]]; then
# Assuming we are using the Intel compiler
cd $WORKSPACE/Code
./fetch_Third_Party.sh
Expand Down
84 changes: 84 additions & 0 deletions Code/Mantid/Build/Jenkins/jenkins-slave.sh
@@ -0,0 +1,84 @@
#!/bin/sh
#####################################################################
# Starts the Jenkins slave process if it is not already running.
# It also downloads the slave.jar to /tmp if it does not already
# exist.
#
# The settings at the top must be filled in for each slave.
#####################################################################
# Crontab setting should be something like
# 0,30 * * * * /home/builder/jenkins-linode/jenkins-slave.sh nodename secret
# or (on mac)
# 0,30 * * * * /Users/builder/jenkins-linode/jenkins-slave.sh nodename secret
#####################################################################
# User configuration
#####################################################################
# Main url for Jenkins
JENKINS_URL=http://builds.mantidproject.org
# URL for proxy (if required)
PROXY_HOST=${3}
# Port for proxy (if required)
PROXY_PORT=${4}
# Name of the node as it appears on jenkins
NODE_NAME=${1}
# Copy the secret from the command line given at the above URL
SECRET=${2}

#####################################################################
# Constants
#####################################################################
# URL of jnlp file for slave
SLAVE_AGENT_URL="${JENKINS_URL}/computer/${NODE_NAME}/slave-agent.jnlp"
# name of the slave jar - full path is determined later
JAR_FILE=slave.jar

#####################################################################
# Script
#####################################################################
# exit if it is already running
RUNNING=$(ps aux | grep java | grep ${JAR_FILE})
if [ ! -z "${RUNNING}" ]; then
echo "Slave process is already running"
exit 0
else
echo "Slave process is not running"
fi

# error out if there isn't a node name and secret
if [ "$#" -lt 2 ]; then
echo "Usage: `basename ${0}` <NODE_NAME> <SECRET> [PROXY_HOST] [PROXY_PORT]"
exit -1
fi

# setup the proxy
if [ ! -z "${PROXY_HOST}" ]; then
PROXY_ARGS="-Dhttp.proxyHost=${PROXY_HOST} -Dhttp.proxyPort=${PROXY_PORT}"
echo "using proxy ${PROXY_HOST} ${PROXY_PORT}"
# For curl
export http_proxy=http://$PROXY_HOST:$PROXY_PORT
fi

# find the jar file if it exists
if [ -f ${HOME}/jenkins-linode/${JAR_FILE} ]; then
JAR_FILE=${HOME}/jenkins-linode/${JAR_FILE}
elif [ -f ${HOME}/Jenkins/${JAR_FILE} ]; then
JAR_FILE=${HOME}/Jenkins/${JAR_FILE}
else
JAR_FILE=/tmp/${JAR_FILE}
if [ ! -f ${JAR_FILE} ]; then
echo "Downloading slave jar file to ${JAR_FILE}"
if [ $(command -v curl) ]; then
echo "curl -o ${JAR_FILE} ${JENKINS_URL}/jnlpJars/slave.jar"
curl -o ${JAR_FILE} ${JENKINS_URL}/jnlpJars/slave.jar
else
echo "Need curl to download ${JENKINS_URL}/jnlpJars/slave.jar"
exit -1
fi
fi
fi

echo "starting ..."
JAVA=`which java`
JAVA_ARGS="${PROXY_ARGS} -jar ${JAR_FILE} -jnlpUrl ${SLAVE_AGENT_URL} -secret ${SECRET}"
echo "${JAVA} ${JAVA_ARGS}"
${JAVA} ${JAVA_ARGS}
4 changes: 2 additions & 2 deletions Code/Mantid/Build/dev-packages/deb/mantid-developer/README
Expand Up @@ -2,5 +2,5 @@ This directory contains the structure required to build the simple mantid-develo

To build the package:
* Switch to the directory containing this file
* Run "dpkg --build mantid-developer-1.2.3"
* A file called mantid-developer-1.2.3.deb will appear in the current directory.
* Run "dpkg --build mantid-developer-1.2.4"
* A file called mantid-developer-1.2.4.deb will appear in the current directory.
Expand Up @@ -3,7 +3,7 @@ Version: 1.2.3
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
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
Installed-Size: 0
Maintainer: Mantid Project <mantid-help@mantidproject.org>
Description: Installs all packages required for a Mantid developer
Expand Down
@@ -0,0 +1,13 @@
Package: mantid-developer
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
Installed-Size: 0
Maintainer: Mantid Project <mantid-help@mantidproject.org>
Description: Installs all packages required for a Mantid developer
A metapackage which requires all the dependencies and tools that are
required for Mantid development. It works for Ubuntu version 14.04, 14.10
Some packages (poco) must be newer than those in the Ubuntu repository. Please
follow instructions at http://www.mantidproject.org/Mantid_Prerequisites#Repositories
@@ -1,5 +1,5 @@
Name: mantid-developer
Version: 1.7
Version: 1.9
Release: 1%{?dist}
Summary: Meta Package to install dependencies for Mantid Development

Expand Down Expand Up @@ -64,6 +64,7 @@ Requires: scl-utils
Requires: qt-devel
Requires: qtwebkit-devel
%endif
Requires: graphviz

BuildArch: noarch

Expand All @@ -86,6 +87,9 @@ required for Mantid development.
%files

%changelog
* Thu Feb 12 2015 Harry Jeffery <henry.jeffery@stfc.ac.uk>
- Added graphviz dependency

* Wed Aug 13 2014 Peter Peterson <petersonpf@ornl.gov>
- Merged all three distribution spec files into one

Expand Down
3 changes: 3 additions & 0 deletions Code/Mantid/Framework/API/CMakeLists.txt
Expand Up @@ -93,6 +93,7 @@ set ( SRC_FILES
src/ParamFunction.cpp
src/ParameterReference.cpp
src/ParameterTie.cpp
src/PeakFunctionIntegrator.cpp
src/PeakTransform.cpp
src/PeakTransformHKL.cpp
src/PeakTransformQLab.cpp
Expand Down Expand Up @@ -252,6 +253,7 @@ set ( INC_FILES
inc/MantidAPI/ParamFunction.h
inc/MantidAPI/ParameterReference.h
inc/MantidAPI/ParameterTie.h
inc/MantidAPI/PeakFunctionIntegrator.h
inc/MantidAPI/PeakTransform.h
inc/MantidAPI/PeakTransformFactory.h
inc/MantidAPI/PeakTransformHKL.h
Expand Down Expand Up @@ -348,6 +350,7 @@ set ( TEST_FILES
ParamFunctionAttributeHolderTest.h
ParameterReferenceTest.h
ParameterTieTest.h
PeakFunctionIntegratorTest.h
PeakTransformHKLTest.h
PeakTransformQLabTest.h
PeakTransformQSampleTest.h
Expand Down
5 changes: 3 additions & 2 deletions Code/Mantid/Framework/API/inc/MantidAPI/IPeak.h
Expand Up @@ -7,6 +7,7 @@
#include "MantidKernel/Matrix.h"
#include "MantidKernel/V3D.h"
#include "MantidKernel/PhysicalConstants.h"
#include <boost/optional.hpp>

namespace Mantid {
namespace API {
Expand Down Expand Up @@ -50,9 +51,9 @@ class MANTID_API_DLL IPeak {
virtual bool findDetector() = 0;

virtual void setQSampleFrame(Mantid::Kernel::V3D QSampleFrame,
double detectorDistance = 1.0) = 0;
boost::optional<double> detectorDistance) = 0;
virtual void setQLabFrame(Mantid::Kernel::V3D QLabFrame,
double detectorDistance = 1.0) = 0;
boost::optional<double> detectorDistance) = 0;

virtual void setWavelength(double wavelength) = 0;
virtual double getWavelength() const = 0;
Expand Down
6 changes: 6 additions & 0 deletions Code/Mantid/Framework/API/inc/MantidAPI/IPeakFunction.h
Expand Up @@ -49,6 +49,12 @@ class MANTID_API_DLL IPeakFunction : public IFunctionWithLocation {
/// Sets the parameters such that FWHM = w
virtual void setFwhm(const double w) = 0;

/// Returns the integral intensity of the peak
virtual double intensity() const;

/// Sets the integral intensity of the peak
virtual void setIntensity(const double newIntensity);

/// General implementation of the method for all peaks.
void function1D(double *out, const double *xValues, const size_t nData) const;
/// General implementation of the method for all peaks.
Expand Down
15 changes: 12 additions & 3 deletions Code/Mantid/Framework/API/inc/MantidAPI/IPeaksWorkspace.h
Expand Up @@ -7,6 +7,7 @@
#include "MantidAPI/ITableWorkspace.h"
#include "MantidAPI/ExperimentInfo.h"
#include "MantidKernel/SpecialCoordinateSystem.h"
#include <boost/optional.hpp>

namespace Mantid {

Expand Down Expand Up @@ -98,12 +99,20 @@ class MANTID_API_DLL IPeaksWorkspace : public ITableWorkspace,

//---------------------------------------------------------------------------------------------
/** Create an instance of a Peak
* @param QLabFrame :: Q of the center of the peak, in reciprocal space
* @param detectorDistance :: distance between the sample and the detector.
* @param QLabFrame :: Q of the center of the peak in the lab frame, in reciprocal space
* @param detectorDistance :: Optional distance between the sample and the detector. Calculated if not provided.
* @return a pointer to a new Peak object.
*/
virtual IPeak *createPeak(Mantid::Kernel::V3D QLabFrame,
double detectorDistance = 1.0) const = 0;
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;

//---------------------------------------------------------------------------------------------
/** Determine if the workspace has been integrated using a peaks integration
Expand Down
@@ -1,22 +1,25 @@
#ifndef PEAKFUNCTIONINTEGRATOR_H
#define PEAKFUNCTIONINTEGRATOR_H

#include "MantidSINQ/DllConfig.h"
#include "MantidAPI/DllConfig.h"
#include "MantidAPI/IPeakFunction.h"
#include "gsl/gsl_integration.h"

namespace Mantid {
namespace Poldi {
namespace API {

/** PeakFunctionIntegrator :
*
General integration of peaks (in the form of IPeakFunction) by wrapping the
corresponding GSL-functions. Integration with infinity limits is supported.
PeakFunctionIntegrator allocates a GSL integration workspace on construction
and frees the memory when it's destroyed.
@author Michael Wedel, Paul Scherrer Institut - SINQ
@date 24/04/2014
Copyright © 2014 PSI-MSS
Copyright © 2014,2015 PSI-MSS
This file is part of Mantid.
Expand All @@ -37,7 +40,7 @@ namespace Poldi {
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/

struct MANTID_SINQ_DLL IntegrationResult {
struct MANTID_API_DLL IntegrationResult {
double result;
double error;
size_t intervals;
Expand All @@ -46,7 +49,7 @@ struct MANTID_SINQ_DLL IntegrationResult {
bool success;
};

class MANTID_SINQ_DLL PeakFunctionIntegrator {
class MANTID_API_DLL PeakFunctionIntegrator {
public:
PeakFunctionIntegrator(double requiredRelativePrecision = 1e-8);
virtual ~PeakFunctionIntegrator();
Expand All @@ -55,27 +58,26 @@ class MANTID_SINQ_DLL PeakFunctionIntegrator {
double requiredRelativePrecision() const;

IntegrationResult
integrateInfinity(API::IPeakFunction_const_sptr peakFunction) const;
integrateInfinity(const IPeakFunction &peakFunction) const;
IntegrationResult
integratePositiveInfinity(API::IPeakFunction_const_sptr peakFunction,
integratePositiveInfinity(const IPeakFunction &peakFunction,
double lowerLimit) const;
IntegrationResult
integrateNegativeInfinity(API::IPeakFunction_const_sptr peakFunction,
integrateNegativeInfinity(const IPeakFunction &peakFunction,
double upperLimit) const;

IntegrationResult integrate(API::IPeakFunction_const_sptr peakFunction,
IntegrationResult integrate(const IPeakFunction &peakFunction,
double lowerLimit, double upperLimit) const;

protected:
gsl_function getGSLFunction(API::IPeakFunction_const_sptr peakFunction) const;
void throwIfInvalid(API::IPeakFunction_const_sptr peakFunction) const;
gsl_function getGSLFunction(const IPeakFunction &peakFunction) const;

gsl_integration_workspace *m_integrationWorkspace;

double m_relativePrecision;
};

double MANTID_SINQ_DLL gsl_peak_wrapper(double x, void *parameters);
double MANTID_API_DLL gsl_peak_wrapper(double x, void *parameters);
}
}

Expand Down

0 comments on commit b0c3a74

Please sign in to comment.