Troubleshooting

Images contain very sharp, very bright lines. Are particles with large pitch angles being simulated? If so, there’s a numerical issue that could potentially arise. In the calculation of a synchrotron image, the Jacobian for the orbit \(J = (\partial R/\partial\rho)(\partial Z/\partial\tau) - (\partial R/\partial\tau)(\partial Z/\partial\rho)\) must be computed. The derivatives with respect to \(\tau\) are straight-forward, but to find the derivatives with respect to \(\rho\) (the radius at which the particle is initiated) we must compute one additional orbit, at \(\rho+\epsilon\), where \(\epsilon\) is an arbitrarily small number. Internally, this number is fixed to \(10^{-6}\), which should be sufficient for most cases. If however the orbits corresponding to \(\rho\) and \(\rho+\epsilon\) lie on opposite sides of the trapped-passing boundary, this will lead to a large error in the computations of the derivatives which will amplify one particular orbit. Currently, the best approach for fixing this should be to make the value of macro JACOBIAN_ORBIT_STEP in src/include/global.h smaller.