small improvments to ConfCenter et emission_center
This commit is contained in:
@@ -109,7 +109,7 @@ def CenterConf(mask, PA, sPA):
|
|||||||
|
|
||||||
conf[np.isfinite(PA)] = 0.5 * np.exp(-0.5 * chi2[np.isfinite(PA)])
|
conf[np.isfinite(PA)] = 0.5 * np.exp(-0.5 * chi2[np.isfinite(PA)])
|
||||||
c0 = np.unravel_index(np.argmax(conf), conf.shape)[::-1]
|
c0 = np.unravel_index(np.argmax(conf), conf.shape)[::-1]
|
||||||
result = minimize(chisq, c0, bounds=[(0, PA.shape[1]), (0.0, PA.shape[0])], method="trust-constr")
|
result = minimize(chisq, c0, bounds=[(0, PA.shape[1]), (0.0, PA.shape[0])], method="TNC")
|
||||||
if result.success:
|
if result.success:
|
||||||
print("Center of emission found: reduced chi_squared {0:.2f}/{1:d}={2:.2f}".format(chisq(result.x) * (Nobs - 2), Nobs - 2, chisq(result.x)))
|
print("Center of emission found: reduced chi_squared {0:.2f}/{1:d}={2:.2f}".format(chisq(result.x) * (Nobs - 2), Nobs - 2, chisq(result.x)))
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user