Skip to content

Make instruments record fluorescence as secondary emission #256

Merged
petercamps merged 5 commits intoSKIRT:masterfrom
petercamps:relabel
Sep 26, 2025
Merged

Make instruments record fluorescence as secondary emission #256
petercamps merged 5 commits intoSKIRT:masterfrom
petercamps:relabel

Conversation

@petercamps
Copy link
Contributor

Motivation
While fluorescence is a form of secondary emission by a given medium, the XRayAtomicGasMix class instead implements fluorescence as a form of scattering. This substantially simplifies the implementation, but it also means that - before this update - fluorescence radiation is mixed in with primary radiation and cannot be recorded separately.


A group of users in the X-ray community requested to resolve this issue, because in X-ray spectral fitting fluorescent lines are commonly introduced as a separate spectral component. Furthermore, other future material types may face a similar problem.

Description
With this update, fluorescence photon packets are "rebranded" during the scattering event to look like secondary emission packets, and the instruments record them accordingly (assuming the recordComponents property is enabled).

Future material mixes may use this feature to rebrand photon packets that emulate secondary emission through a scattering interaction, including but not restricted to fluorescence.

Caveats
The emulation of secondary emission by rebranding photon packets only works for recording by instruments. Specifically:

  • The LaunchedPacketsProbe ignores rebranding; it just counts original emissions.
  • The procedure for storing the radiation field similarly ignores rebranding; it stores contributions from rebranded photon packets according to their original emission. For example, if the simulation includes secondary emission by dust, the radiation field used to calculate secondary emission spectrum will include the contributions from rebranded photon packets.

Tests
Apart from the expected changes in recorded X-ray flux components, all functional tests produce binary identical results.

Context
This feature was requested by @BertVdM.

@petercamps petercamps merged commit 3cd53cb into SKIRT:master Sep 26, 2025
6 checks passed
@petercamps petercamps deleted the relabel branch September 26, 2025 15:57
Koseimatsu pushed a commit to Koseimatsu/SKIRT9 that referenced this pull request Dec 17, 2025
* detect emulation in configuration
* add no-op scattering to base class
* honor emulation in medium system
* honor emulation in instruments
* store rf according to phase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant