Closed bhazelton closed 4 years ago
@nicholebarry I'd like to merge this, are you on board?
@bhazelton I have two comments.
1) I think we can increase the threshold on the what we consider to be rotatable. At the moment, it's at 1e-8 precision, but I think we could increase it based on the number of samples. i.e.
denom = covar_cos - covar_sin
inds_denom_low = where(abs(denom) LT sqrt(n_freq),n_count_denom)
numer = covar_cross
inds_numer_low = where(abs(numer) LT sqrt(n_freq),n_count_numer)
if n_count_denom gt 0 then theta[inds_denom_low] = !dpi / 2.
if n_count_numer gt 0 then theta[inds_numer_low] = 0.
2) Maybe add a printed warning about using the std_power option for EoR upper limits.
I think your number one is trying to address a separate problem about having too few frequencies, which could be added in another PR.
Nichole signed off on this at the Melbourne busy week.
Make the rotation angle calculation more robust against zeros in the denominator.
Also rework the std_power implementation: just don't rotate between sin & cos