def GetSigma():
'''
Get the standard deviation of the Gaussian PSF. I find `sigma` = 0.45 pixels.
I also plotted the `x` and `y` obtained below to find that average the maximum extent of
the stellar motion is x,y ~ y,x ~ (2.5, 3.5).
'''
star = Everest(os.path.join(TRAPPIST_OUT, 'nPLDTrappist.fits'), TRAPPIST_EPIC)
fpix = star.fpix.reshape(-1, 6, 6).swapaxes(1,2)
guess = [3., 3., 1e4, 1e2, 0.5]
n = 0
niter = len(fpix) // 10
x = np.zeros(niter)
y = np.zeros(niter)
a = np.zeros(niter)
b = np.zeros(niter)
sigma = np.zeros(niter)
for n in prange(niter):
x[n], y[n], a[n], b[n], sigma[n] = fmin(ChiSq, guess, args = (fpix[n * 10],), disp = 0)
return np.nanmedian(sigma)
评论列表
文章目录