Skip to content

Absolute CTR structure factor and reflectivity - #87

Merged
tifuchs merged 35 commits into
masterfrom
ctr-structure-factor
Sep 20, 2026
Merged

tifuchs merged 35 commits into
masterfrom
ctr-structure-factor

Conversation

@tifuchs

@tifuchs tifuchs commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Adds absolute structure factor and reflectivity calculation

According to #15

Reflectivity should be 1 below critical angle if everything is set correctly.

This requires exact knowledge of the sample size, beam size/shape and total flux hitting the sample.

Fixes

The solid angle correction was incorrect before. I used the default pixel-based solid angle correction. This is correct for determination of scattering cross-sections of broad scattering features or to correct the image to a correct scale.
However, for CTRs with wide-open detector slits (not truncated signal)

  1. stationary: As long as the complete CTR reflection is integrated, there is no solid angle correction required. It is a point-like intersection with the Ewald sphere, that is solid angle independent (as long as the complete reflection is integrated) How the reflection maps onto the Ewald sphere is the Lorentz correction.
  2. rocking: in-plane: the same story as stationary. No correction. Out-of-plane / along L: Here we must correct for the acceptance of the detector. I.e. Calculate the size of the active detector pixels in reciprocal space along L. This will change (even though the number of pixels might be constant), depending on L.

Also addresses partially:
#79

…factor scale

BREAKING CHANGE: F2_hkl changes in both integration modes. Rocking scans gain
the per-frame exposure/monitor normalization, the rocking integral in radian,
and division by the out-of-plane acceptance; both modes divide the detector
solid-angle correction back out of F2_hkl, which still scales the intensity.
Rods integrated with an earlier version are on a different scale and must be
re-integrated before being combined with new ones.
BREAKING CHANGE: intensities and F2_hkl change for scans that drive the
detector arm, and only those. The per-pixel polarization array is built at the
calibrated arm position, which understated the correction by 3 % at a
scattering angle of 10 degrees, 10 % at 18 and 33 % at 30; both integration
paths now apply a per-frame factor that moves it onto the arm position each
frame was measured at. A fixed-arm scan is bit-identical. The reciprocal-space
reconstruction applies the polarization per pixel and is unchanged.
BREAKING CHANGE: integration_corrections is now a group of typed datasets
instead of a single json string. The json dataset is still read, but no
longer written, so post-processing that parses it will not see new files.
@tifuchs
tifuchs merged commit 28a9e57 into master Sep 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant