BraggPrediction: Work in progress
This commit is contained in:
@@ -22,7 +22,6 @@ struct Reflection {
|
||||
float sigma;
|
||||
float dist_ewald;
|
||||
bool observed = false;
|
||||
float partiality = 1.0;
|
||||
};
|
||||
|
||||
#endif //JFJOCH_REFLECTION_H
|
||||
|
||||
@@ -141,9 +141,9 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg,
|
||||
|
||||
BraggPredictionSettings settings_prediction{
|
||||
.high_res_A = experiment.GetBraggIntegrationSettings().GetDMinLimit_A(),
|
||||
.ewald_dist_cutoff = ewald_dist_cutoff,
|
||||
.max_hkl = 100,
|
||||
.centering = outcome.symmetry.centering,
|
||||
.ewald_dist_cutoff = ewald_dist_cutoff,
|
||||
};
|
||||
|
||||
auto nrefl = prediction.Calc(experiment, *outcome.lattice_candidate, settings_prediction);
|
||||
|
||||
@@ -12,12 +12,10 @@
|
||||
|
||||
struct BraggPredictionSettings {
|
||||
float high_res_A = 1.5;
|
||||
float ewald_dist_cutoff = 0.0005;
|
||||
int max_hkl = 100;
|
||||
char centering = 'P';
|
||||
|
||||
// Still parameters
|
||||
float ewald_dist_cutoff = 0.0005;
|
||||
|
||||
// Rotation parameters
|
||||
Coord rotation_axis = Coord(1, 0, 0);
|
||||
int image_number = 0;
|
||||
|
||||
@@ -176,25 +176,7 @@ int BraggPredictionRotation::Calc(const DiffractionExperiment &experiment,
|
||||
if (i >= max_reflections) break;
|
||||
|
||||
const float phi = sols[si];
|
||||
|
||||
// Rossmann partiality model (geometric overlap)
|
||||
// Reflection interval: [phi - half_mosaicity, phi + half_mosaicity]
|
||||
// Image interval: [phi0, phi1]
|
||||
float refl_start = phi - half_mosaicity;
|
||||
float refl_end = phi + half_mosaicity;
|
||||
|
||||
float overlap_start = std::max(refl_start, phi0);
|
||||
float overlap_end = std::min(refl_end, phi1);
|
||||
|
||||
if (overlap_end < overlap_start)
|
||||
continue; // No physical overlap
|
||||
|
||||
float partiality = 1.0f;
|
||||
if (mosaicity_rad > 1e-6f) {
|
||||
partiality = (overlap_end - overlap_start) / mosaicity_rad;
|
||||
if (partiality > 1.0f) partiality = 1.0f;
|
||||
}
|
||||
|
||||
|
||||
const float cos_p = cosf(phi);
|
||||
const float sin_p = sinf(phi);
|
||||
|
||||
@@ -232,8 +214,7 @@ int BraggPredictionRotation::Calc(const DiffractionExperiment &experiment,
|
||||
.predicted_x = x,
|
||||
.predicted_y = y,
|
||||
.d = d,
|
||||
.dist_ewald = sqrtf(S_x * S_x + S_y * S_y + S_z * S_z) - one_over_wavelength,
|
||||
.partiality = partiality
|
||||
.dist_ewald = sqrtf(S_x * S_x + S_y * S_y + S_z * S_z) - one_over_wavelength
|
||||
};
|
||||
++i;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user