Closed aewallwi closed 2 years ago
Fix bug in P_SN correction calculation where nans can be introduced if both P_N and P_SN are infinite. If this is the case, then P_SN should still be np.inf after correction but instead it is set to Nan since the calculation takes the ratio between P_N and P_SN and numpy assigns inf/inf=nan (offending line is at https://github.com/HERA-Team/hera_pspec/blob/e6b73604ed771b6c1d56b4cf0396ccda2d56635d/hera_pspec/utils.py#L1514 )
P_SN
This PR sets all nans introduced by this step to infinty.
Fix bug in
P_SN
correction calculation where nans can be introduced if both P_N and P_SN are infinite. If this is the case, then P_SN should still be np.inf after correction but instead it is set to Nan since the calculation takes the ratio between P_N and P_SN and numpy assigns inf/inf=nan (offending line is at https://github.com/HERA-Team/hera_pspec/blob/e6b73604ed771b6c1d56b4cf0396ccda2d56635d/hera_pspec/utils.py#L1514 )This PR sets all nans introduced by this step to infinty.