Readers: polarization from miniCBF and d*TREK headers (RESULT-CHANGING)

No reader parsed a polarization, and ApplyRugnuxExperimentDefaults then set
P = 0.99 (an undulator value) unconditionally, so laboratory-source data were
corrected as if from a synchrotron. Every d*TREK (Rigaku Saturn/A200) header in
the open arm states SOURCE_POLARZ=0.5 1 0 0, i.e. unpolarized; at Cu K-alpha and
2 A the wrong factor puts a +-33% azimuthal modulation on the intensities.

- d*TREK SMV: SOURCE_POLARZ is the fraction f followed by the plane normal (as
  dxtbx's FormatSMVRigaku reads it); stored as degree 2f - 1, negative where the
  normal lies along lab x (plane containing y).
- miniCBF: "# Polarization f" is the fraction in the horizontal plane; stored as
  2f - 1 ("None" or a missing line leave it unset).
- ApplyRugnuxExperimentDefaults sets 0.99 only where the file stated none;
  --polarization still overrides. ADSC SMV, marCCD and NXmx state nothing and
  keep 0.99.
- The "Header:" log line reports the stated polarization.

RESULT-CHANGING: d*TREK home-source sets (0.99 -> 0), one Rigaku miniCBF set
(0.99 -> 0), miniCBF sets stating 0.99 (0.99 -> 0.98).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PXc1zD1yxHqaR1DGdCTHL4
This commit is contained in:
leonarski_fandClaude Opus 5.5 committed 2026-10-18 09:25:14 +02:00
1 parent 14ee27f362
commit b17b643bd9
11 files changed
+84 -14

No files matched your search

+4
View File
@@ -286,6 +286,10 @@ void JFJochCBFReader::ReadFiles(const std::string &path) {
}
dataset_->experiment.IncidentEnergy_keV(WVL_1A_IN_KEV / static_cast<float>(header0_.wavelength_A));
// The header states the fraction f polarized in the horizontal plane, which is the plane the
// correction takes to contain the lab x axis; the degree it wants is 2f - 1.
if (header0_.polarization_fraction.has_value())
dataset_->experiment.PolarizationFactor(2.0f * static_cast<float>(*header0_.polarization_fraction) - 1.0f);
dataset_->experiment.FrameTime(
std::chrono::duration_cast<std::chrono::nanoseconds>(
std::chrono::duration<double>(header0_.period_s)),