Skip to content

Commit

Permalink
Merge branch '11359_md_coordinate_as_own_field' into 11350_converttom…
Browse files Browse the repository at this point in the history
…d_no_expt_info_loading

Conflicts:
	Code/Mantid/Framework/MDEvents/src/MDEventWorkspace.cpp
Refs #11350
  • Loading branch information
martyngigg committed Mar 16, 2015
2 parents 41d3b6d + cee29dc commit bacb8b4
Show file tree
Hide file tree
Showing 36 changed files with 1,500 additions and 857 deletions.
5 changes: 0 additions & 5 deletions Code/Mantid/Framework/API/inc/MantidAPI/IMDEventWorkspace.h
Expand Up @@ -51,11 +51,6 @@ class MANTID_API_DLL IMDEventWorkspace : public API::IMDWorkspace,
virtual void getBoxes(std::vector<API::IMDNode *> &boxes, size_t maxDepth,
bool leafOnly) = 0;

/// TODO: The meaning of this method have changed! Helper method that makes a
/// table workspace with some box data
// virtual Mantid::API::ITableWorkspace_sptr makeBoxTable(size_t start, size_t
// num) = 0;

/// @return true if the workspace is file-backed
virtual bool isFileBacked() const = 0;

Expand Down
Expand Up @@ -89,7 +89,7 @@ class DLLExport IMDHistoWorkspace : public IMDWorkspace,
virtual double &operator[](const size_t &index) = 0;

virtual void setCoordinateSystem(
const Mantid::Kernel::SpecialCoordinateSystem coordinateSystem) = 0;
const Kernel::SpecialCoordinateSystem coordinateSystem) = 0;

virtual boost::shared_ptr<IMDHistoWorkspace> clone() const = 0;

Expand Down
7 changes: 3 additions & 4 deletions Code/Mantid/Framework/API/inc/MantidAPI/IMDWorkspace.h
Expand Up @@ -67,8 +67,7 @@ enum MDNormalization {
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/

class MANTID_API_DLL IMDWorkspace : public Workspace,
public Mantid::API::MDGeometry {
class MANTID_API_DLL IMDWorkspace : public Workspace, public API::MDGeometry {
public:
IMDWorkspace();
IMDWorkspace(const IMDWorkspace &other);
Expand Down Expand Up @@ -119,11 +118,11 @@ class MANTID_API_DLL IMDWorkspace : public Workspace,
/// Clear existing masks
virtual void clearMDMasking() = 0;
///
virtual Mantid::Kernel::SpecialCoordinateSystem
virtual Kernel::SpecialCoordinateSystem
getSpecialCoordinateSystem() const = 0;
/// if a workspace was filebacked, this should clear file-based status, delete
/// file-based information and close related files.
virtual void clearFileBacked(bool /* loadFileContentsToMemory*/){};
virtual void clearFileBacked(bool /* loadFileContentsToMemory*/) {}
/// this is the method to build table workspace from any workspace. It does
/// not have much sence and may be placed here erroneously
virtual ITableWorkspace_sptr makeBoxTable(size_t /*start*/, size_t /* num*/) {
Expand Down
17 changes: 7 additions & 10 deletions Code/Mantid/Framework/API/inc/MantidAPI/IPeaksWorkspace.h
Expand Up @@ -55,10 +55,6 @@ class MANTID_API_DLL IPeaksWorkspace : public ITableWorkspace,
/// Destructor
virtual ~IPeaksWorkspace();

// boost::shared_ptr<IPeaksWorkspace> clone() = 0;
// void appendFile( std::string filename, Mantid::Geometry::Instrument_sptr
// inst) = 0;

//---------------------------------------------------------------------------------------------
/** @return the number of peaks
*/
Expand Down Expand Up @@ -99,14 +95,15 @@ class MANTID_API_DLL IPeaksWorkspace : public ITableWorkspace,

//---------------------------------------------------------------------------------------------
/** Create an instance of a Peak
* @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.
* @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,
boost::optional<double> detectorDistance) const = 0;


/**
* Create an instance of a peak using a V3D
* @param HKL V3D
Expand Down Expand Up @@ -136,16 +133,16 @@ class MANTID_API_DLL IPeaksWorkspace : public ITableWorkspace,
* @param coordinateSystem : Special Q3D coordinate system to use.
*/
virtual void setCoordinateSystem(
const Mantid::Kernel::SpecialCoordinateSystem coordinateSystem) = 0;

const Kernel::SpecialCoordinateSystem coordinateSystem) = 0;
//---------------------------------------------------------------------------------------------
/**
* Get the special coordinate system.
* @returns special Q3D coordinate system to use being used by this
* PeaksWorkspace object. Probably the one the workspace was generated with.
*/
virtual Mantid::Kernel::SpecialCoordinateSystem
virtual Kernel::SpecialCoordinateSystem
getSpecialCoordinateSystem() const = 0;

virtual std::vector<std::pair<std::string, std::string>>
peakInfo(Kernel::V3D QFrame, bool labCoords) const = 0;
virtual int peakInfoNumber(Kernel::V3D qLabFrame, bool labCoords) const = 0;
Expand Down
1 change: 0 additions & 1 deletion Code/Mantid/Framework/API/inc/MantidAPI/Projection.h
Expand Up @@ -72,7 +72,6 @@ class DLLExport Projection {
/// Set the unit for a given dimension
void setUnit(size_t nd, ProjectionUnit unit);

// We're guaranteed to have at least 2 axes
V3D &U() { return m_dimensions[0]; }
V3D &V() { return m_dimensions[1]; }
V3D &W() { return m_dimensions[2]; }
Expand Down
Expand Up @@ -78,8 +78,14 @@ class DLLExport PlotAsymmetryByLogValue : public API::Algorithm {
// Overridden Algorithm methods
void init();
void exec();
// Load run, apply dead time corrections and detector grouping
API::Workspace_sptr doLoad (int64_t runNumber );
// Analyse loaded run
void doAnalysis (API::Workspace_sptr loadedWs, int64_t index);
// Parse run names
void parseRunNames (std::string& firstFN, std::string& lastFN, std::string& fnBase, std::string& fnExt);
void parseRunNames (std::string& firstFN, std::string& lastFN, std::string& fnBase, std::string& fnExt, int& fnZeros);
// Resize vectors
void resizeVectors (size_t size);
// Load dead-time corrections from specified file
void loadCorrectionsFromFile (API::Workspace_sptr &customDeadTimes, std::string deadTimeFile );
// Apply dead-time corrections
Expand All @@ -97,6 +103,12 @@ class DLLExport PlotAsymmetryByLogValue : public API::Algorithm {
/// Populate output workspace with results
void populateOutputWorkspace (API::MatrixWorkspace_sptr &outWS, int nplots);

/// Stores base name shared by all runs
std::string m_filenameBase;
/// Stores extension shared by all runs
std::string m_filenameExt;
/// Sotres number of zeros in run name
int m_filenameZeros;
/// Stores property "Int"
bool m_int;
/// Store forward spectra
Expand All @@ -105,6 +117,12 @@ class DLLExport PlotAsymmetryByLogValue : public API::Algorithm {
std::vector<int> m_backward_list;
/// If true call LoadMuonNexus with Autogroup on
bool m_autogroup;
/// Store type of dead time corrections
std::string m_dtcType;
/// Store red period
int m_red;
/// Store green period
int m_green;
// Mantid vectors to store results
// Red mantid vectors
MantidVec m_redX, m_redY, m_redE;
Expand Down

0 comments on commit bacb8b4

Please sign in to comment.