BraggIntegrate: Add Lorentz factor (1/sin(2*theta)) for rotation measurment
This commit is contained in:
@@ -91,14 +91,18 @@ std::vector<Reflection> IntegrateInternal(const DiffractionExperiment &experimen
|
||||
IntegrateReflection(r, ptr, image.GetWidth(), image.GetHeight(), special_value, saturation,
|
||||
r_3, r_1_sq, r_2_sq, r_3_sq);
|
||||
if (r.observed) {
|
||||
if (experiment.GetPolarizationFactor()) {
|
||||
float pol = geom.CalcAzIntPolarizationCorr(r.predicted_x, r.predicted_y,
|
||||
float corr = 1.0;
|
||||
if (experiment.GetPolarizationFactor())
|
||||
corr /= geom.CalcAzIntPolarizationCorr(r.predicted_x, r.predicted_y,
|
||||
experiment.GetPolarizationFactor().value());
|
||||
r.I /= pol;
|
||||
r.bkg /= pol;
|
||||
r.sigma /= pol;
|
||||
}
|
||||
|
||||
if (experiment.GetGoniometer().has_value()) {
|
||||
float two_theta = geom.TwoTheta_rad(r.predicted_x, r.predicted_y);
|
||||
corr *= std::sin(two_theta);
|
||||
}
|
||||
r.I *= corr;
|
||||
r.bkg *= corr;
|
||||
r.sigma *= corr;
|
||||
r.image_number = static_cast<float>(image_number);
|
||||
ret.emplace_back(r);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user