Parameter export in snapshots
At the moment the parameter vector is exported only in the initialisation and finalisation of the data file. This means that if a new parameter set is added during the simulation, snapshots are saved with references to parameters that don't exist in the file at the time and will not be added until after the very end of the simulation.
This is not in line with the principle that a data file should be as robust as possible against disruptions while writing. Therefore, writeparams should also be called during the SaveCallback
's _savesnap
function If this is a performance issue it could be fixed by letting the SC keep track of how many parameters were already written—since the param vector is append only it should be easy to notice when something's changed in the simulation