agnwinds/python — pull request #71 by jhmatthews (2014-03-01 13:12:53+00:00)
Title: Moving estimators increments from radiation into subroutines (estimators for PPL ionization solver and IP)

Currently we duplicate code between radiation() and bf_estimators_increment(), which are the corresponding routines which increment estimators in non-macro atom and macro atom mode when a photon travels ds inside a cell.

To avoid this, I've moved all the duplicated incrementing to a subroutine called update_banded_estimators(). This routine
* updates j, j_direct, j_scatter
* updates ip, ip_direct, ip_scatter
* updates the banded estimators we use e.g. xave_freq, xj etc for each band
* updates n_ds, mean_ds and ave_freq

I've also moved the part where photon stats are saved to a file as part of Extra_diagnostics to a new subroutine called save_photon_stats.

This shouldn't change how anything works and is merely to avoid duplication. Only files modified are radiation.c and estimators.c