integration: each reflection is corrected for the sensor's efficiency at the angle it arrives
A photon entering a flat sensor at an angle alpha to its normal crosses t/cos(alpha) of material instead of t, so the absorbed fraction rises toward the detector edge. The correction is QE(0)/QE(alpha) taken on the diffracted-beam direction against the detector normal, not on the scattering angle, so it follows a tilted or swung-out detector rather than assuming the two coincide. On an untilted detector this is a function of |s| alone: it is 99.7% a Wilson B offset and cancels exactly within a resolution shell, so merged protein data barely moves and no gain is claimed. It stops cancelling the moment the detector is tilted, because the incidence angle then acquires an azimuthal dependence: on a 30 degree swung-out geometry at 18 keV the within-shell spread reaches 21% median and 31% peak, and the anisotropy tensor moves with it. Attenuation lengths are the tabulated NIST coefficients rather than a wavelength-cubed approximation, which is within 0.2% for silicon above 10 keV but wrong for CdTe by a factor of two, and by six above the cadmium K edge. Photoelectric branching cancels in the ratio; K-fluorescence escape is not modelled, and the header says so. The correction self-disables where the physics makes it meaningless - an opaque sensor - so it needs no flag and is exactly neutral on all long-wavelength data and on thick CdTe. That also makes it a no-op on a file that stores its sensor thickness in the wrong unit, of which the corpus holds one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFEJG6WBQv8th4UJFNe53N
This commit is contained in:
1 parent
5761bcc94d
commit
efa8ab1221
8 files changed
+229
-6
No files matched your search
@@ -1006,11 +1006,25 @@ HDF5MetadataSource::OpenResult HDF5MetadataSource::Open(const std::string &filen
|
||||
.value_or(0))));
|
||||
// Sensor thickness/material drive the parallax/absorption model, so take them from the file
|
||||
// rather than the DetectorSetup default.
|
||||
// Say so when they are absent rather than let the DetectorSetup default stand in silently.
|
||||
// The default (320 um Si) is right for every JUNGFRAU and wrong for the 450 um Si and 750 um
|
||||
// CdTe sensors this code also reads, and both the angle-dependent efficiency correction and
|
||||
// the parallax variance term are computed from these two numbers - so a file that omits them
|
||||
// gets a correction derived from an assumption, which the user should be told about. The
|
||||
// correction is still applied: a 320 um Si assumption is closer to every real sensor than
|
||||
// switching the physics off, and declining would silently disagree with the same data read
|
||||
// from a file that does state its sensor.
|
||||
if (master_file->Exists("/entry/instrument/detector/sensor_thickness"))
|
||||
detector.SensorThickness_um(
|
||||
ReadLength_m(*master_file, "/entry/instrument/detector/sensor_thickness") * 1e6);
|
||||
else
|
||||
Logger("HDF5Reader").Warning("No sensor_thickness in the file; assuming {:.0f} um for the "
|
||||
"sensor absorption model", detector.GetSensorThickness_um());
|
||||
if (master_file->Exists("/entry/instrument/detector/sensor_material"))
|
||||
detector.SensorMaterial(master_file->GetString("/entry/instrument/detector/sensor_material"));
|
||||
else
|
||||
Logger("HDF5Reader").Warning("No sensor_material in the file; assuming {} for the sensor "
|
||||
"absorption model", detector.GetSensorMaterial());
|
||||
// Optional, because a file that states no saturation value anywhere is a real and common
|
||||
// thing: an Eiger master links saturation_value into a companion _meta.h5, and a deposited
|
||||
// dataset frequently does not include that file, leaving neither the NXmx name nor the
|
||||
|
||||
Reference in new issue
Block a user