Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/6905_script_repository_d…
Browse files Browse the repository at this point in the history
…ownload_folder' into feature/6176_upload_scripts

Necessary to get differences of #6905

re #6176
  • Loading branch information
gesnerpassos committed Apr 23, 2013
2 parents 41edd29 + 0c774f5 commit 751650f
Show file tree
Hide file tree
Showing 35 changed files with 915 additions and 1,225 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/API/inc/MantidAPI/Axis.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class MANTID_API_DLL Axis
Kernel::Unit_sptr& unit();

/// Set the unit on the Axis
virtual void setUnit(const std::string & unit);
virtual const Kernel::Unit_sptr& setUnit(const std::string & unitName);

/// Returns true is the axis is a Spectra axis
virtual bool isSpectra() const{return false;}
Expand Down
8 changes: 5 additions & 3 deletions Code/Mantid/Framework/API/src/Axis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ Kernel::Unit_sptr& Axis::unit()
}
/**
* Sets the Unit that is in use on this axis.
* @param unit :: name of the unit as known to the UnitFactory
* @param unitName :: name of the unit as known to the UnitFactory
* @returns The new unit instance
*/
void Axis::setUnit(const std::string & unit)
const Kernel::Unit_sptr& Axis::setUnit(const std::string & unitName)
{
m_unit = Mantid::Kernel::UnitFactory::Instance().create(unit);
m_unit = Mantid::Kernel::UnitFactory::Instance().create(unitName);
return unit();
}

/**
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/Algorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ set ( TEST_FILES
ConvertToMatrixWorkspaceTest.h
ConvertToPointDataTest.h
ConvertUnitsTest.h
CopyInstrumentParametersTest.h
CopySampleTest.h
CorrectFlightPathsTest.h
CorrectKiKfTest.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@

#include "MantidKernel/System.h"
#include "MantidAPI/Algorithm.h"
#include "MantidAPI/MatrixWorkspace.h"
#include "MantidDataObjects/EventWorkspace.h"
#include "MantidDataObjects/Workspace2D.h"
#include "MantidDataObjects/TableWorkspace.h"

namespace Mantid
{
Expand Down Expand Up @@ -41,51 +43,66 @@ namespace Algorithms
GetTimeSeriesLogInformation();
virtual ~GetTimeSeriesLogInformation();

virtual const std::string name() const {return "GetTimeSeriesLogInformation"; };
virtual int version() const {return 1; };
virtual const std::string category() const {return "Diffraction;Events\\EventFiltering"; };
virtual const std::string name() const {return "GetTimeSeriesLogInformation"; }
virtual int version() const {return 1; }
virtual const std::string category() const {return "Diffraction;Events\\EventFiltering"; }

private:
DataObjects::EventWorkspace_sptr eventWS;
DataObjects::Workspace2D_const_sptr seWS;
DataObjects::EventWorkspace_sptr outputWS;
API::MatrixWorkspace_sptr m_dataWS;

std::vector<int64_t> mSETimes;
std::vector<double> mSEValues;
Kernel::DateAndTime mRunStartTime;
Kernel::DateAndTime mFilterT0;
Kernel::DateAndTime mFilterTf;

Kernel::DateAndTime mRunStartTime;
Kernel::DateAndTime mFilterT0;
Kernel::DateAndTime mFilterTf;
std::map<std::string, int> m_intInfoMap;
std::map<std::string, double> m_dblInfoMap;

virtual void initDocs();
Kernel::TimeSeriesProperty<double>* m_log;
std::vector<Kernel::DateAndTime> m_timeVec;
std::vector<double> m_valueVec;

void init();
Kernel::DateAndTime m_starttime;
Kernel::DateAndTime m_endtime;

void exec();
bool m_ignoreNegativeTime;

void examLog(std::string logname, std::string outputdir);
virtual void initDocs();

void generateCalibrationFile();
void init();

void doTimeRangeInformation();
void exec();

void calDistributions(std::vector<Kernel::DateAndTime> timevec, double dts);
void examLog(std::string logname, std::string outputdir);

void exportLog();
void generateCalibrationFile();

void setupEventWorkspace(int numentries, std::vector<Kernel::DateAndTime> &times, std::vector<double> values);
void processTimeRange();

void setupWorkspace2D(int numentries, std::vector<Kernel::DateAndTime> &times, std::vector<double> values);
/// Calcualte the distribution of delta T in time stamps
DataObjects::Workspace2D_sptr calDistributions(std::vector<Kernel::DateAndTime> timevec, double stepsize);

void doStatistic();
void exportLog(API::MatrixWorkspace_sptr ws, std::vector<Kernel::DateAndTime> abstimevec, double dts);

void exportErrorLog(API::MatrixWorkspace_sptr ws, std::vector<Kernel::DateAndTime> abstimevec, double dts);
void setupEventWorkspace(int numentries, std::vector<Kernel::DateAndTime> &times, std::vector<double> values);

void checkLogAlternating(std::vector<Kernel::DateAndTime>timevec, std::vector<double> values, double delta);
void setupWorkspace2D(int numentries, std::vector<Kernel::DateAndTime> &times, std::vector<double> values);

void checkLogBasicInforamtion(API::MatrixWorkspace_sptr ws, std::string logname);
};
void execQuickStatistics();

void exportErrorLog(API::MatrixWorkspace_sptr ws, std::vector<Kernel::DateAndTime> abstimevec, double dts);

void checkLogValueChanging(std::vector<Kernel::DateAndTime>timevec, std::vector<double> values, double delta);

void checkLogBasicInforamtion();

/// Generate statistic information table workspace
DataObjects::TableWorkspace_sptr generateStatisticTable();

Kernel::DateAndTime getAbsoluteTime(double abstimens);

Kernel::DateAndTime calculateRelativeTime(double deltatime);

};

} // namespace Algorithms
} // namespace Mantid
Expand Down

0 comments on commit 751650f

Please sign in to comment.