CHIMEFRB / fitburst

An open-source package of utilities for direct modeling of radio dynamic spectra.
https://chimefrb.github.io/fitburst/
MIT License
11 stars 2 forks source link

ss/bugfix-2024-08 #84

Closed ssiegelx closed 2 months ago

ssiegelx commented 2 months ago

This builds on the bugfix-2024-01 branch. The primary change involves using the scaled complimentary error function instead of the error function when calculating the PBF model. This avoids problems with numerical overflow previously observed when the scattering time becomes small relative to the burst width. Before, in order to mitigate these numerical issues, we switched to using a Gaussian model for the time profile when the scattering timescale dropped below some threshold. However, due to differing normalizations between the Gaussian and PBF model, this introduced a step-like feature in the burst spectrum. Now, we are able to evaluate the PBF model directly for all scattering timescales.

Also fixes (copy-paste) errors in the calculation of the (burst_width, dm), (scattering_timescale, scattering_timescale), (burst_width, scattering_index), (scattering_index, scattering_index), and (dm, dm_index) mixed partial derivative. This will impact the calculation of the analytical hessian, and hence parameter uncertainties, for models with scattering.