Skip to content
Snippets Groups Projects
Commit 1a4bf65f authored by Lynch, Vickie's avatar Lynch, Vickie
Browse files

Refs #21752 clang-format

parent 9e3713e9
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ void LoadHKL::init() {
FileProperty::Load, ".hkl"),
"Path to an hkl file to save.");
declareProperty(make_unique<WorkspaceProperty<PeaksWorkspace> >(
declareProperty(make_unique<WorkspaceProperty<PeaksWorkspace>>(
"OutputWorkspace", "", Direction::Output),
"Name of the output workspace.");
}
......@@ -158,8 +158,9 @@ void LoadHKL::exec() {
radius1 = x1;
else if (x2 > 0)
radius1 = x2;
double frac = theta - static_cast<double>(static_cast<int>(theta / 5.)) *
5.; // theta%5.
double frac =
theta -
static_cast<double>(static_cast<int>(theta / 5.)) * 5.; // theta%5.
frac = frac / 5.;
radius = radius * (1 - frac) + radius1 * frac;
radius /= mu1;
......
......@@ -38,7 +38,7 @@ SortHKL::SortHKL() {
SortHKL::~SortHKL() = default;
void SortHKL::init() {
declareProperty(make_unique<WorkspaceProperty<PeaksWorkspace> >(
declareProperty(make_unique<WorkspaceProperty<PeaksWorkspace>>(
"InputWorkspace", "", Direction::Input),
"An input PeaksWorkspace with an instrument.");
......@@ -60,31 +60,31 @@ void SortHKL::init() {
boost::make_shared<StringListValidator>(centeringOptions),
"Appropriate lattice centering for the peaks.");
declareProperty(make_unique<WorkspaceProperty<PeaksWorkspace> >(
declareProperty(make_unique<WorkspaceProperty<PeaksWorkspace>>(
"OutputWorkspace", "", Direction::Output),
"Output PeaksWorkspace");
declareProperty("OutputChi2", 0.0, "Chi-square is available as output",
Direction::Output);
declareProperty(make_unique<WorkspaceProperty<ITableWorkspace> >(
declareProperty(make_unique<WorkspaceProperty<ITableWorkspace>>(
"StatisticsTable", "StatisticsTable", Direction::Output),
"An output table workspace for the statistics of the peaks.");
declareProperty(make_unique<PropertyWithValue<std::string> >(
declareProperty(make_unique<PropertyWithValue<std::string>>(
"RowName", "Overall", Direction::Input),
"name of row");
declareProperty("Append", false,
"Append to output table workspace if true.\n"
"If false, new output table workspace (default).");
std::vector<std::string> equivTypes{ "Mean", "Median" };
std::vector<std::string> equivTypes{"Mean", "Median"};
declareProperty("EquivalentIntensities", equivTypes[0],
boost::make_shared<StringListValidator>(equivTypes),
"Replace intensities by mean(default), "
"or median.");
declareProperty(Kernel::make_unique<PropertyWithValue<double> >(
declareProperty(Kernel::make_unique<PropertyWithValue<double>>(
"SigmaCritical", 3.0, Direction::Input),
"Removes peaks whose intensity deviates more than "
"SigmaCritical from the mean (or median).");
declareProperty(
make_unique<WorkspaceProperty<MatrixWorkspace> >(
make_unique<WorkspaceProperty<MatrixWorkspace>>(
"EquivalentsWorkspace", "EquivalentIntensities", Direction::Output),
"Output Equivalent Intensities");
}
......@@ -229,9 +229,10 @@ SortHKL::getNonZeroPeaks(const std::vector<Peak> &inputPeaks) const {
std::remove_copy_if(inputPeaks.begin(), inputPeaks.end(),
std::back_inserter(peaks), [](const Peak &peak) {
return peak.getIntensity() <= 0.0 || peak.getSigmaIntensity() <= 0.0 ||
peak.getHKL() == V3D(0, 0, 0);
});
return peak.getIntensity() <= 0.0 ||
peak.getSigmaIntensity() <= 0.0 ||
peak.getHKL() == V3D(0, 0, 0);
});
return peaks;
}
......@@ -330,9 +331,9 @@ SortHKL::getStatisticsTable(const std::string &name) const {
/// Inserts statistics the supplied PeaksStatistics-objects into the supplied
/// TableWorkspace.
void
SortHKL::insertStatisticsIntoTable(const ITableWorkspace_sptr &table,
const PeaksStatistics &statistics) const {
void SortHKL::insertStatisticsIntoTable(
const ITableWorkspace_sptr &table,
const PeaksStatistics &statistics) const {
if (!table) {
throw std::runtime_error("Can't store statistics into Null-table.");
}
......@@ -366,9 +367,8 @@ PeaksWorkspace_sptr SortHKL::getOutputPeaksWorkspace(
/// Sorts the peaks in the workspace by H, K and L.
void SortHKL::sortOutputPeaksByHKL(IPeaksWorkspace_sptr outputPeaksWorkspace) {
// Sort by HKL
std::vector<std::pair<std::string, bool> > criteria{ { "H", true },
{ "K", true },
{ "L", true } };
std::vector<std::pair<std::string, bool>> criteria{
{"H", true}, {"K", true}, {"L", true}};
outputPeaksWorkspace->sort(criteria);
}
......
......@@ -111,12 +111,12 @@ public:
Mantid::Kernel::V3D getDetectorPosition() const override;
Mantid::Kernel::V3D getDetectorPositionNoCheck() const override;
void setQSampleFrame(const Mantid::Kernel::V3D &QSampleFrame,
boost::optional<double> detectorDistance =
boost::none) override;
void setQLabFrame(const Mantid::Kernel::V3D &QLabFrame,
boost::optional<double> detectorDistance =
boost::none) override;
void setQSampleFrame(
const Mantid::Kernel::V3D &QSampleFrame,
boost::optional<double> detectorDistance = boost::none) override;
void
setQLabFrame(const Mantid::Kernel::V3D &QLabFrame,
boost::optional<double> detectorDistance = boost::none) override;
void setWavelength(double wavelength) override;
double getWavelength() const override;
......
......@@ -194,8 +194,7 @@ void PeakColumn::read(const size_t index, std::istringstream &in) {
double val;
try {
in >> val;
}
catch (std::exception &e) {
} catch (std::exception &e) {
g_log.error() << "Could not convert input to a number. " << e.what()
<< '\n';
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment