ScaleOnTheFly: mosaicity input is float, for consistence with other code
This commit is contained in:
@@ -47,7 +47,7 @@ class IndexAndRefine {
|
||||
|
||||
mutable std::mutex reflections_mutex;
|
||||
std::vector<std::vector<Reflection>> reflections;
|
||||
std::vector<double> mosaicity;
|
||||
std::vector<float> mosaicity;
|
||||
std::vector<uint8_t> merge_mask;
|
||||
|
||||
IndexingOutcome DetermineLatticeAndSymmetryRotation(DataMessage &msg);
|
||||
|
||||
@@ -166,7 +166,8 @@ std::pair<double, size_t> ScaleOnTheFly::CalculateGlobalCC(const std::vector<Ref
|
||||
return {cov / std::sqrt(var_x * var_y), n};
|
||||
}
|
||||
|
||||
ScaleOnTheFlyResult ScaleOnTheFly::Scale(std::vector<Reflection> &reflections, std::optional<double> mosaicity_deg) {
|
||||
ScaleOnTheFlyResult ScaleOnTheFly::Scale(std::vector<Reflection> &reflections,
|
||||
std::optional<float> mosaicity_deg) {
|
||||
auto start = std::chrono::steady_clock::now();
|
||||
|
||||
ceres::Problem problem;
|
||||
@@ -296,7 +297,7 @@ ScaleOnTheFlyResult ScaleOnTheFly::Scale(std::vector<Reflection> &reflections, s
|
||||
}
|
||||
|
||||
ScalingResult ScaleOnTheFly::Scale(std::vector<std::vector<Reflection> > &reflections,
|
||||
const std::vector<double> &mosaicity,
|
||||
const std::vector<float> &mosaicity,
|
||||
size_t nthreads) {
|
||||
ScalingResult result(reflections.size());
|
||||
|
||||
@@ -305,7 +306,7 @@ ScalingResult ScaleOnTheFly::Scale(std::vector<std::vector<Reflection> > &reflec
|
||||
|
||||
if (nthreads <= 1) {
|
||||
for (int i = 0; i < reflections.size(); i++) {
|
||||
std::optional<double> mos_val;
|
||||
std::optional<float> mos_val;
|
||||
if (model == PartialityModel::Rotation
|
||||
&& mosaicity.size() > i
|
||||
&& std::isfinite(mosaicity[i])
|
||||
|
||||
@@ -37,10 +37,10 @@ class ScaleOnTheFly {
|
||||
[[nodiscard]] std::pair<double, size_t> CalculateGlobalCC(const std::vector<Reflection> &reflections) const;
|
||||
public:
|
||||
ScaleOnTheFly(const DiffractionExperiment &x, const std::vector<MergedReflection> &ref);
|
||||
ScaleOnTheFlyResult Scale(std::vector<Reflection> &r, std::optional<double> mosaicity_deg);
|
||||
ScaleOnTheFlyResult Scale(std::vector<Reflection> &r, std::optional<float> mosaicity_deg);
|
||||
|
||||
ScalingResult Scale(std::vector<std::vector<Reflection> > &reflections,
|
||||
const std::vector<double> &mosaicity,
|
||||
const std::vector<float> &mosaicity,
|
||||
size_t nthreads = 0);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user