peak_to_pixels#
- anri.fwd.peak_to_pixels(centroid, erf_scale, amplitude, bins, window_sizes)[source]#
Compute the intensity of a single Gaussian peak over a local pixel window.
- Parameters:
centroid (
Array) –[n]centroid of the Gaussian peak in(slow, fast, omega[, dty])coordinates.erf_scale (
Array) –[n]per-axis scaling factors \(s_i = \frac{1}{\sigma_i\sqrt{2}}\) precomputed byprepare_gaussian_bin().amplitude (
float) – Integrated intensity of the peak.bins (
tuple[Array,...]) – Tuple ofncoordinate arrays giving bin centres along each of(slow, fast, omega[, dty]). Bin half-widths \(h_i\) are derived from the spacing of each array as \(h_i = (b_i[1] - b_i[0]) / 2\), so uniform spacing per axis is assumed.window_sizes (
tuple[int,...]) – Number of bins along each axis, one per axis. Each entry must not exceed the length of the corresponding bin array. Static for JIT and vmap compilation.
- Returns:
Notes
A local window of
window_sizes[i]bins is extracted aroundcentroidalong each axisiviajax.lax.dynamic_slice(). The resulting local bin centres are assembled into an[prod(window_sizes), n]grid and passed tosample_gaussian_bins()— see that function for the underlying maths.See also
prepare_gaussian_binPrecomputes \(s_i\) from a covariance matrix.
sample_gaussian_binsCore bin-integration function called internally.
peaks_to_pixelsVectorised form of this function over a batch of peaks.