EoRImaging / eppsilon

eppsilon - error propagated power spectrum with interleaved observed noise
BSD 2-Clause "Simplified" License
5 stars 4 forks source link

force double summation #144

Closed nicholebarry closed 3 years ago

nicholebarry commented 3 years ago

Strange IDL behaviour incoming...

Even if the values within a struct are double, the summation performed over the full struct is not double automatically.

For example, total(obs_arr.n_vis) where obs_arr is a struct array of 160 observations gives 1799498624. The true answer is 1799498646. If you force the total to perform double summation with /double, you get the correct answer. If you were to perform the summation looping over the struct array (i.e. for i=0, 159 do total += obs_arr[i].n_vis) you get the correct answer.

Affects metadata reporting and an extremely small change in some of the normalisation calculations of the beam integral.