Abins: proof-of-concept implementation for interpolated broadening
This is a rough implementation of a new scheme for frequency-dependent broadening. The instrumental broadening function for TOSCA has an energy-dependent width; while there are several ways of sequencing and implementating the process, it generally requires a fresh Gaussian to be evaluated at every frequency bin and those Gaussians to be combined in a weighted sum. We note that a Gaussian function may be approximated by a linear combination of Gaussians with width parameters (sigma) that bracket the target and are not too far away. An error of ~1% may be reached by limiting the sigma span to a factor of sqrt(2), while a factor of two gives error of ~5%. Given the relevant range of widths for instrumental broadening, a suitable collection of broadening functions may be obtained with just a few logarithmically-spaced function evaluations. In this proof-of-concept, the spectrum is convolved with five Gaussian kernels, logarithmically spaced by factors of two. At each bin, the broadened value is drawn from a corresponding broad spectrum, obtained by interpolation from those at neighbouring sigma values. This interpolation involves some "magic numbers" in the form of a cubic function fitted to reproduce a Gaussian as closely as possible from wider and narrower functions. The main assumption made in this approach is that the broadening function is short-ranged relative to the rate of change in width. Compared to a sum of functions centered at each bin, this method introduces a slight asymmetry to the peaks. The benefit is a drastically reduced cost of evaluation; the implementation here is far from optimal (as it convolutes larger spectral regions than necessary) and reduces the runtime of Abins by almost half compared to the fastest implementation of a full sum.
Please register or sign in to comment