Photutils DAOPhot不能很好地拟合星星?

问题描述 投票:0回答:1

我最近发现了PhotUtils软件包,并试图用它来对我的一些图像进行PSF光度测量。然而,当我尝试运行代码时,我得到了非常奇怪的结果。当我绘制由get_residual_image()生成的图像时,星星没有被很好地去除。下面是一些示例图像。

第一张图像的sigma设置为2.05,因为它在PhotUtils文档中的一个示例程序中。Image 1. For this image, sigma is set to 2.05 according to one of the samples on the website. On the left is the image with the stars "subtracted." On the right is the original image.

然而,星星只在中心被去除。

第二张图的sigma设置为5.0。这张图特别奇怪。有些星星被过度移除,有些则是未被移除,有些黑色方块被添加到图像中,等等。

Image 2. For this image, I set sigma to 5.0.这是我的代码。

import photutils
from photutils.psf import DAOPhotPSFPhotometry as DAOP
from photutils.psf import IntegratedGaussianPRF as PRF
from photutils.background import MMMBackground

bkg = MMMBackground()
background = 2.5*bkg(img)
gaussian_prf = PRF(sigma=5.0)
gaussian_prf.sigma.fixed = False
photTester = DAOP(8,background,5,gaussian_prf,31)
photResults = photTester(imgStars)

finalImg = photTester.get_residual_image()

在这之后,我简单地在MatPlotLib中 绘制原始和最终的图像 我使用的是灰度的colormap。 左边的图像看起来稍暗的原因是它们使用了不同的颜色缩放。

也许我有一个参数设置不正确?

谁能帮我解决这个问题?谢谢你的帮助

python-3.x astropy photutils
1个回答
0
投票

看着残像,立刻告诉我,背景减法可能是错误的。我可以重现这个结果,我想知道,如果... MMMBackground 没有正确地完成工作.仔细看了一下文档。开始使用Photutils 终于给出了本质的提示。

image -= np.median(image)  
© www.soinside.com 2019 - 2024. All rights reserved.