torchref.base.targets.xray_gaussian module

Gaussian X-ray loss math.

Caller is responsible for producing the post-XrayTarget.get_data tensors (F_obs, F_calc, sigma, mask).

The public entry point gaussian_xray_loss_math dispatches to the Triton kernel on CUDA float32 and to the eager implementation otherwise, matching the pattern used by bond_math, angle_math, etc.

torchref.base.targets.xray_gaussian.gaussian_xray_loss_math(F_obs, F_calc, sigma, mask)[source]

Gaussian NLL on already-scaled amplitudes.

Dispatches to torchref.base.targets.triton.xray_gaussian.gaussian_xray_loss_math_triton() on CUDA float32 inputs; falls back to the eager implementation otherwise.