SunnySuite / Sunny.jl

Spin dynamics and generalization to SU(N) coherent states
Other
65 stars 19 forks source link

Classical intensities as density #272

Closed ddahlbom closed 1 month ago

ddahlbom commented 1 month ago

This PR

kbarros commented 1 month ago

Looks good to me, pending Sam's comments on binned intensities. Thanks David.

Lazersmoke commented 1 month ago

Hi David, thanks for writing this up.

I think the better way to make this change is to remove the 1/sqrt(n all omega) from the time fft normalization factor. The complete end to end calculation in the time direction is then:

  1. For each time offset t, sum up the |t-T| estimates (by fft method), and divide by that number of estimates. This results in a density already! (It's a number that does not go down when the bin size is decreased)
  2. For interpolation, just return the density (no factor)
  3. For binning, calculate and include the factor (this is done at the end of intensities_binned already, which is why there's a bug happening in the docs)
Lazersmoke commented 1 month ago

(per the discussion around #246 , the overall color scale should have not changed during that, but it turns out it actually did because the aforementioned inclusion of the factor in step 3 happened when that was merged)

Lazersmoke commented 1 month ago

See #273