Skip to content

Commit

Permalink
Refs #8534. MuonAnalysis: new functions for calculations.
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbekasov committed Dec 3, 2013
1 parent 8b88c8a commit 98e544d
Show file tree
Hide file tree
Showing 2 changed files with 383 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ namespace Muon
class MuonAnalysisResultTableTab;
}

using namespace Mantid::Kernel;
using namespace Mantid::API;

/**
This is the main class for the MuonAnalysis interface
Expand Down Expand Up @@ -165,6 +167,9 @@ private slots:
/// Checks whether plots should be auto-updated when some settings change.
bool isAutoUpdateEnabled();

/// Whether Overwrite option is enabled on the Settings tab.
bool isOverwriteEnabled();

/// Show a plot for a given workspace. Closes previous plot if exists.
void showPlot(const QString& wsName);

Expand Down Expand Up @@ -206,6 +211,16 @@ private slots:


private:

// Types of entities we are dealing with
enum ItemType { Pair, Group };

// Possible plot types users might request
enum PlotType { Asymmetry, Counts, Logorithm };

// Types of periods
enum PeriodType { First, Second };

/// Initialize local Python environment
void initLocalPython();

Expand Down Expand Up @@ -236,6 +251,22 @@ private slots:
/// is grouping set
bool isGroupingSet();

/// Crop/rebins/offsets the workspace according to interface settings.
MatrixWorkspace_sptr prepareAnalysisWorkspace(MatrixWorkspace_sptr ws, bool isRaw);

/// Creates workspace for specified group/pair and plots it
void plotItem(ItemType itemType, int tableRow, PlotType plotType);

/// Creates workspace ready for analysis and plotting
MatrixWorkspace_sptr createAnalysisWorkspace(ItemType itemType, int tableRow, PlotType type,
bool isRaw = false);

/// Finds a name for new analysis workspace
std::string getNewAnalysisWSName(const std::string& runLabel, ItemType itemType, int tableRow,
PlotType plotType);

/// Selects a workspace from the group according to what is selected on the interface for the period
MatrixWorkspace_sptr getPeriodWorkspace(PeriodType periodType, WorkspaceGroup_sptr group);
/// create WS contained the data for a plot
void createPlotWS(const std::string& groupName,
const std::string& inputWS, const std::string& outWS);
Expand Down Expand Up @@ -396,7 +427,7 @@ private slots:
void setDummyGrouping(const int numDetectors);

///
void setGroupingFromIDF(const std::string& mainFieldDirection, Mantid::API::MatrixWorkspace_sptr matrix_workspace);
void setGroupingFromIDF(const std::string& mainFieldDirection, MatrixWorkspace_sptr matrix_workspace);

/// title of run
std::string m_title;
Expand Down

0 comments on commit 98e544d

Please sign in to comment.