Skip to main content

sources_from_magnitudes

Function sources_from_magnitudes 

Source
pub(crate) fn sources_from_magnitudes(pos: f64, neg_mag: f64) -> (f64, f64, f64)
Expand description

One voxel of a network’s de-normalised source magnitudes, as (χ+, χ−, χ_total) in the crate’s order: χ+ and |χ−| are set to 0 where they are negative, χ− is returned signed (≤ 0), and χ_total is the sum of the two after that.

A source magnitude below zero has no physical meaning; it comes from the de-normalisation (z·std + mean) of a network output with no output activation. χ-sepnet’s own test.py sets those voxels to 0 (“zero-truncation”); for SUSEP-Net, whose test_demo.py does not, it is a deliberate deviation.