You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We create spectra on grids spaced linear in frequency (or log-frequency). Most of the relevant code is in spectra.c. These grids are created via code like:
We create spectra on grids spaced linear in frequency (or log-frequency). Most of the relevant code is in spectra.c. These grids are created via code like:
freqmin = f1;
freqmax = f2;
dfreq = (freqmax - freqmin) / NWAVE_NOW;
When we populate the spectra, we do that by calculating the index of the bin in which to add a photon via
When we write out the spectra, the frequencies (and associated wavelengths) we print are calculated via
freq = freqmin + i * dfreq;
Here, i is the integer counter of the loop over all bins.
What that means is that we actually print out the lower edge of each frequency bin, not its center.
What I think we should really write out is
freq = freqmin + (i + 0.5) * dfreq;
Not a big deal in general, but it means our spectra are all shifted by half a frequency bin at the moment.
The text was updated successfully, but these errors were encountered: