Skip to content

Commit

Permalink
refs #8614 conflicts between ticket and recent changes to reduction
Browse files Browse the repository at this point in the history
Merge branch 'master' into bugfix/8614_letReduction

Conflicts:
	Code/Mantid/scripts/Inelastic/CommonFunctions.py
	Code/Mantid/scripts/Inelastic/DirectEnergyConversion.py
  • Loading branch information
abuts committed Feb 11, 2014
2 parents b969201 + 17d8683 commit 21d76d4
Show file tree
Hide file tree
Showing 319 changed files with 68,189 additions and 9,768 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Build/CMake/VersionNumber.cmake
@@ -1,7 +1,7 @@
# Set the version number here for MantidVersion and the package filenames

set ( VERSION_MAJOR 3 )
set ( VERSION_MINOR 0 )
set ( VERSION_MINOR 1 )

# UNCOMMENT the next 'set' line to 'force' the patch version number to
# a value (instead of using the count coming out of 'git describe')
Expand Down
@@ -1,9 +1,9 @@
Package: mantid-developer
Version: 1.0
Version: 1.1
Section: main
Priority: optional
Architecture: all
Depends: cmake-qt-gui (>= 2.8.5), build-essential, subversion, libhdf4-dev, libhdf5-serial-dev, libmxml-dev, libgsl0-dev, libopencascade-modeling-dev, libopencascade-foundation-dev, libssl-dev, openssl, libpoco-dev, libpococrypto9-dbg, libpocodata9-dbg, libpocofoundation9-dbg, libpocomysql9-dbg, libpoconet9-dbg, libpoconetssl9-dbg, libpocoodbc9-dbg, libpocosqlite9-dbg, libpocoutil9-dbg, libpocoxml9-dbg, libpocozip9-dbg, python-dev, python-dbg, python-numpy, libmuparser-dev, libnexus0-dev, libqt4-assistant, libqt4-dbus, libqt4-designer, libqt4-dev, libqt4-help, libqt4-network, libqt4-opengl, libqt4-opengl-dev, libqt4-qt3support, libqt4-script, libqt4-scripttools, libqt4-sql, libqt4-sql-mysql, libqt4-svg, libqt4-test, libqt4-webkit, libqt4-xml, libqt4-xmlpatterns, libqwt5-qt4-dev, libqwtplot3d-qt4-dev, python-qt4-dbg, python-qt4-dev, qt4-designer, qt4-qmake, python-sip-dbg, python-sip-dev, libqscintilla2-dev, qt4-dev-tools, libboost-signals-dev, libboost-date-time-dev, libboost-regex-dev, libboost-python-dev, git, libgoogle-perftools-dev,texlive-latex-recommended,texlive-latex-extra,texlive-fonts-recommended,dvipng
Depends: cmake-qt-gui (>= 2.8.5), build-essential, subversion, libhdf4-dev, libhdf5-serial-dev, libmxml-dev, ipython (>= 1.1), libgsl0-dev, libopencascade-modeling-dev, libopencascade-foundation-dev, libssl-dev, openssl, libpoco-dev, libpococrypto9-dbg, libpocodata9-dbg, libpocofoundation9-dbg, libpocomysql9-dbg, libpoconet9-dbg, libpoconetssl9-dbg, libpocoodbc9-dbg, libpocosqlite9-dbg, libpocoutil9-dbg, libpocoxml9-dbg, libpocozip9-dbg, python-dev, python-dbg, python-numpy, python-scipy, libmuparser-dev, libnexus0-dev, libqt4-assistant, libqt4-dbus, libqt4-designer, libqt4-dev, libqt4-help, libqt4-network, libqt4-opengl, libqt4-opengl-dev, libqt4-qt3support, libqt4-script, libqt4-scripttools, libqt4-sql, libqt4-sql-mysql, libqt4-svg, libqt4-test, libqt4-webkit, libqt4-xml, libqt4-xmlpatterns, libqwt5-qt4-dev, libqwtplot3d-qt4-dev, python-qt4-dbg, python-qt4-dev, qt4-designer, qt4-qmake, python-sip-dbg, python-sip-dev, libqscintilla2-dev, qt4-dev-tools, libboost-signals-dev, libboost-date-time-dev, libboost-regex-dev, libboost-python-dev, git, libgoogle-perftools-dev,texlive-latex-recommended,texlive-latex-extra,texlive-fonts-recommended,dvipng
Installed-Size: 0
Maintainer: Mantid Project
Description: Installs all packages required for a Mantid developer
Expand Down
@@ -1,6 +1,6 @@
Name: mantid-developer
Version: 1.1
Release: 2%{?dist}
Release: 4%{?dist}
Summary: Meta Package to install dependencies for Mantid Development

Group: Development/Tools
Expand All @@ -18,6 +18,7 @@ Requires: gcc-c++
Requires: gsl-devel
Requires: hdf-devel
Requires: hdf5-devel
Requires: python-ipython >= 1.1
Requires: muParser-devel
Requires: mxml-devel
Requires: nexus >= 4.2
Expand All @@ -33,6 +34,7 @@ Requires: qwt-devel
Requires: qwtplot3d-qt4-devel
Requires: redhat-lsb
Requires: rpmdevtools
Requires: scipy
Requires: sip-devel
Requires: git
Requires: openssl-devel
Expand Down Expand Up @@ -63,6 +65,9 @@ required for Mantid development.
%files

%changelog
* Tue Feb 04 2014 Stuart Campbell <campbellsi@ornl.gov>
- Added scipy and ipython >= 1.1 dependency

* Tue May 07 2013 Stuart Campbell <campbellsi@ornl.gov>
- Added dvipng and latex for qt-assistant stuff
- Added software collection dependencies
Expand Down
@@ -1,6 +1,6 @@
Name: mantid-developer
Version: 1.2
Release: 2%{?dist}
Release: 4%{?dist}
Summary: Meta Package to install dependencies for Mantid Development

Group: Development/Tools
Expand All @@ -27,12 +27,14 @@ Requires: OpenCASCADE-devel
Requires: poco-devel
Requires: PyQt4-devel
Requires: python-devel
Requires: python-ipython
Requires: qscintilla-devel
Requires: qt-devel >= 4.6
Requires: qwt5-qt4-devel
Requires: qwtplot3d-qt4-devel
Requires: redhat-lsb
Requires: rpmdevtools
Requires: scipy
Requires: sip-devel
Requires: git
Requires: openssl-devel
Expand Down Expand Up @@ -62,6 +64,9 @@ required for Mantid development.
%files

%changelog
* Tue Feb 04 2014 Stuart Campbell <campbellsi@ornl.gov>
- Added scipy and ipython >= 1.1 dependency

* Tue Aug 20 2013 Peter Peterson <petersonpf@ornl.gov>
- Removed things not necessary for fedora 19.

Expand Down
@@ -1,6 +1,6 @@
Name: mantid-developer
Version: 1.3
Release: 3%{?dist}
Release: 5%{?dist}
Summary: Meta Package to install dependencies for Mantid Development

Group: Development/Tools
Expand All @@ -27,13 +27,15 @@ Requires: OCE-devel
Requires: poco-devel
Requires: PyQt4-devel
Requires: python-devel
Requires: python-ipython
Requires: python-sphinx
Requires: qscintilla-devel
Requires: qt-devel >= 4.6
Requires: qwt5-qt4-devel
Requires: qwtplot3d-qt4-devel
Requires: redhat-lsb
Requires: rpmdevtools
Requires: scipy
Requires: sip-devel
Requires: git
Requires: openssl-devel
Expand Down Expand Up @@ -63,6 +65,9 @@ required for Mantid development.
%files

%changelog
* Tue Feb 04 2014 Stuart Campbell <campbellsi@ornl.gov>
- Added scipy and ipython >= 1.1 dependency

* Fri Dec 20 2013 Stuart Campbell <campbellsi@ornl.gov>
- Added python-sphinx

Expand Down
4 changes: 4 additions & 0 deletions Code/Mantid/Framework/API/inc/MantidAPI/ExperimentInfo.h
Expand Up @@ -120,6 +120,10 @@ namespace API
void saveExperimentInfoNexus(::NeXus::File * file) const;
/// Loads an experiment description from the open NeXus file
void loadExperimentInfoNexus(::NeXus::File * file, std::string & parameterStr);
/// Load the instrument from an open NeXus file.
void loadInstrumentInfoNexus(::NeXus::File * file, std::string & parameterStr);
/// Load the sample and log info from an open NeXus file.
void loadSampleAndLogInfoNexus(::NeXus::File * file);
/// Populate the parameter map given a string
void readParameterMap(const std::string & parameterStr);

Expand Down
14 changes: 7 additions & 7 deletions Code/Mantid/Framework/API/inc/MantidAPI/ICatalog.h
Expand Up @@ -50,25 +50,25 @@ class DLLExport ICatalog
/// logout from catalog
virtual void logout()=0;
///Search investigations
virtual void search(const ICat::CatalogSearchParam&,ITableWorkspace_sptr&, const int &offset,const int &limit)=0;
virtual void search(const ICat::CatalogSearchParam&,ITableWorkspace_sptr&, const int &,const int &)=0;
/// Obtain the number of results returned by the search method.
virtual int64_t getNumberOfSearchResults(const ICat::CatalogSearchParam&)=0;
/// search logged in users data
virtual void myData(ITableWorkspace_sptr &)=0;
/// get datasets.
virtual void getDataSets(const long long& ,ITableWorkspace_sptr&)=0;
virtual void getDataSets(const std::string& ,ITableWorkspace_sptr&)=0;
/// get datafiles
virtual void getDataFiles(const long long&,ITableWorkspace_sptr &)=0;
virtual void getDataFiles(const std::string&,ITableWorkspace_sptr &)=0;
/// instrument list
virtual void listInstruments(std::vector<std::string>& )=0;
virtual void listInstruments(std::vector<std::string>&)=0;
/// get investigationtype lists
virtual void listInvestigationTypes(std::vector<std::string>&)=0;
/// get file locations
virtual void getFileLocation(const long long&,std::string& )=0;
virtual void getFileLocation(const long long&,std::string&)=0;
/// get URLs of the files
virtual void getDownloadURL(const long long& fileid,std::string&)=0;
virtual void getDownloadURL(const long long&,std::string&)=0;
/// get URL of where to PUT (publish) files.
virtual const std::string getUploadURL(const std::string &fileName, const std::string &dataFileName)=0;
virtual const std::string getUploadURL(const std::string&,const std::string&,const std::string&)=0;
/// keep alive
virtual void keepAlive()=0;
///keep alive in minutes
Expand Down
44 changes: 33 additions & 11 deletions Code/Mantid/Framework/API/src/ExperimentInfo.cpp
Expand Up @@ -864,19 +864,11 @@ namespace API
}

//--------------------------------------------------------------------------------------------
/** Load the object from an open NeXus file.
/** Load the sample and log info from an open NeXus file.
* @param file :: open NeXus file
* @param[out] parameterStr :: special string for all the parameters.
* Feed that to ExperimentInfo::readParameterMap() after the instrument is done.
* @throws Exception::NotFoundError If instrument definition is not in the nexus file and cannot
* be loaded from the IDF.
*/
void ExperimentInfo::loadExperimentInfoNexus(::NeXus::File * file, std::string & parameterStr)
void ExperimentInfo::loadSampleAndLogInfoNexus(::NeXus::File * file)
{
std::string instrumentName;
std::string instrumentXml;
std::string instrumentFilename;

// First, the sample and then the logs
int sampleVersion = mutableSample().loadNexus(file, "sample");
if (sampleVersion == 0)
Expand All @@ -892,6 +884,37 @@ namespace API
// Newer style: separate "logs" field for the Run object
this->mutableRun().loadNexus(file, "logs");
}
}

//--------------------------------------------------------------------------------------------
/** Load the object from an open NeXus file.
* @param file :: open NeXus file
* @param[out] parameterStr :: special string for all the parameters.
* Feed that to ExperimentInfo::readParameterMap() after the instrument is done.
* @throws Exception::NotFoundError If instrument definition is not in the nexus file and cannot
* be loaded from the IDF.
*/
void ExperimentInfo::loadExperimentInfoNexus(::NeXus::File * file, std::string & parameterStr)
{
// load sample and log info
loadSampleAndLogInfoNexus(file);

loadInstrumentInfoNexus(file, parameterStr);
}

//--------------------------------------------------------------------------------------------
/** Load the instrument from an open NeXus file.
* @param file :: open NeXus file
* @param[out] parameterStr :: special string for all the parameters.
* Feed that to ExperimentInfo::readParameterMap() after the instrument is done.
* @throws Exception::NotFoundError If instrument definition is not in the nexus file and cannot
* be loaded from the IDF.
*/
void ExperimentInfo::loadInstrumentInfoNexus(::NeXus::File * file, std::string & parameterStr)
{
std::string instrumentName;
std::string instrumentXml;
std::string instrumentFilename;

// Try to get the instrument file
file->openGroup("instrument", "NXinstrument");
Expand Down Expand Up @@ -993,7 +1016,6 @@ namespace API
}
}


//-------------------------------------------------------------------------------------------------
/** Parse the result of ParameterMap.asString() into the ParameterMap
* of the current instrument. The instrument needs to have been loaded
Expand Down
Expand Up @@ -80,12 +80,11 @@ namespace Mantid
buildBinaryOperationTable(const API::MatrixWorkspace_const_sptr & lhs, const API::MatrixWorkspace_const_sptr & rhs);


private:
protected:
// Overridden Algorithm methods
void init();
void exec();
virtual void exec();
virtual void init();

protected:
bool handleSpecialDivideMinus();

/// Execution method for event workspaces, to be overridden as needed.
Expand Down
Expand Up @@ -4,9 +4,10 @@
#include "MantidAPI/Algorithm.h"
#include "MantidKernel/V3D.h"
#include <climits>
#include <list>
#include <map>
#include <string>
#include <vector>
#include <map>

namespace Mantid
{
Expand All @@ -28,9 +29,9 @@ namespace Algorithms
T.G.Perring June 1990:
Algorithm is based on a combinateion of Taylor series and
assymptotic expansion of the double integral for the
efficiency, linearly interpolating betweent the two in
Algorithm is based on a combination of Taylor series and
asymptotic expansion of the double integral for the
efficiency, linearly interpolating between the two in
region of common accuracy. Checked against numerical
integration to yield relative accuracy of 1 part in 10^12
or better over the entire domain of the input arguments
Expand All @@ -49,8 +50,8 @@ namespace Algorithms
These data are not quite consistent, but the errors are small :
2200 m/s = 25.299 meV
5327 barns & 1.4323 cm-1 ==> 10atms ofideal gas at 272.9K
but at what temperature are the tubes "10 atms" ?
5327 barns & 1.4323 cm-1 ==> 10atms of ideal gas at 272.9K
but at what temperature are the tubes at "10 atms" ?
Shall use 1.4323 cm-1 @ 3.49416 A-1 with sigma prop. 1/v
Expand Down Expand Up @@ -103,9 +104,9 @@ class DLLExport DetectorEfficiencyCor : public API::Algorithm
/// Calculate one over the wave vector for 2 bin bounds
double calculateOneOverK(double loBinBound, double uppBinBound) const;
/// Sets the detector geometry cache if necessary
void getDetectorGeometry(boost::shared_ptr<const Geometry::IDetector> det, double & detRadius, Kernel::V3D & detAxis);
void getDetectorGeometry(const Geometry::IDetector_const_sptr & det, double & detRadius, Kernel::V3D & detAxis);
/// Computes the distance to the given shape from a starting point
double distToSurface(const Kernel::V3D start, const Geometry::Object *shape) const;
double distToSurface(const Kernel::V3D & start, const Geometry::Object *shape) const;
/// Computes the detector efficiency for a given paramater
double detectorEfficiency(const double alpha) const;
/// Computes an approximate expansion of a Chebysev polynomial
Expand All @@ -132,24 +133,13 @@ class DLLExport DetectorEfficiencyCor : public API::Algorithm
/// Sample position
Kernel::V3D m_samplePos;
/// The spectra numbers that were skipped
std::vector<int64_t> m_spectraSkipped;
std::list<int64_t> m_spectraSkipped;


// Implement abstract Algorithm methods
void init();
void exec();

///// Links the energy to the wave number, I got this from Prof T.G.Perring
//const double KSquaredToE;
///// coefficients for Taylor series/assymptotic expansion used at large wavenumbers and large angle
//const double c_eff_f[];
///// coefficients for Taylor series/assymptotic expansion used at low wavenumbers and low angle
//const double c_eff_g[];
///// the number of coefficients in each of the c_eff_f and c_eff_g arrays
//const short NUMCOEFS;
///// constants to use for the ISIS 3He detectors 2.0*sigref*wref/atmref
//const double g_helium_prefactor;

};

} // namespace Algorithms
Expand Down
Expand Up @@ -59,6 +59,8 @@ namespace Mantid
private:
/// Sets documentation strings for this algorithm
virtual void initDocs();
virtual void init();
virtual void exec();
// Overridden BinaryOperation methods
void performBinaryOperation(const MantidVec& lhsX, const MantidVec& lhsY, const MantidVec& lhsE,
const MantidVec& rhsY, const MantidVec& rhsE, MantidVec& YOut, MantidVec& EOut);
Expand All @@ -80,6 +82,8 @@ namespace Mantid

std::string checkSizeCompatibility(const API::MatrixWorkspace_const_sptr lhs,const API::MatrixWorkspace_const_sptr rhs) const;

bool m_warnOnZeroDivide;

};

} // namespace Algorithm
Expand Down

0 comments on commit 21d76d4

Please sign in to comment.