Incorrect fit to real component of RMSF
Closed this issue · 2 comments
AlecThomson commented
util_RM.py -> Line 318: Fit should be made to RMSFArr not RMSFcube. See diff for correction below:
diff --git a/RMutils/util_RM.py b/RMutils/util_RM.py
index 7a3cbcf..435cdc8 100644
--- a/RMutils/util_RM.py
+++ b/RMutils/util_RM.py
@@ -315,7 +315,7 @@ def get_rmsf_planes(lambdaSqArr_m2, phiArr_radm2, weightArr=None, mskArr=None,
if verbose:
log("Fitting Gaussian to the main lobe.")
if fitRMSFreal:
- mp = fit_rmsf(phi2Arr, RMSFcube.real)
+ mp = fit_rmsf(phi2Arr, RMSFArr.real)
else:
mp = fit_rmsf(phi2Arr, np.abs(RMSFArr))
if mp is None or mp.status<1:
AlecThomson commented
@Cameron-Van-Eck I think this bug still exists in the current release. I've also noticed that the same lines are repeated further down in util_RM.py
. Are you able to check where RMSFcube
and RMSFarr
are meant to be used?
Cameron-Van-Eck commented
Fixed today! Not fixing this sooner came to bite me, since it caused me issues in a different issue I'm tracking down. So shame on me for not fixing it sooner? Fitting the real part of the RMSF now seems to work as intended.