我希望我可以使用加尔西姆测试各种方法的PSF插值。我想用星系生成一幅图像,在不同的点对PSF进行采样,并将PSF插值到星系位置。这些示例演示了如何在特定位置生成PSF --是否有可能在图像中生成PSF并在不同的点对其进行采样?Great03 galsim网页承诺“具有空间相关性的真实噪音”,这听起来很有希望!
发布于 2013-10-30 22:12:45
请查看demo10示例目录中的GalSim。该示例包括一个随位置而变化的PSF。
基本思想是,PSF模型的参数是(x,y)的函数,然后在星系的位置建立PSF模型。例如(来自demo10.py):
pos = b.trueCenter() - im_center
pos = galsim.PositionD(pos.x * pixel_scale , pos.y * pixel_scale)
# The image comes out as about 211 arcsec across, so we define our variable
# parameters in terms of (r/100 arcsec), so roughly the scale size of the image.
r = math.sqrt(pos.x**2 + pos.y**2) / 100
psf_fwhm = 0.9 + 0.5 * r**2 # arcsec
psf_e = 0.4 * r**1.5
psf_beta = (math.atan2(pos.y,pos.x) + math.pi/2) * galsim.radians
# Define the PSF profile
psf = galsim.Gaussian(fwhm=psf_fwhm)
psf.applyShear(e=psf_e, beta=psf_beta)您也可以使用配置文件方法做同样的事情。以下是Demo10.yaml的相关部分:
psf :
type : Gaussian
fwhm :
type : Eval
str : '0.9 + 0.5 * (sky_pos.x**2 + sky_pos.y**2) / 100**2'
ellip:
type : EBeta
e :
type : Eval
fr : { type : Eval , str : '(sky_pos.x**2 + sky_pos.y**2)**0.5' }
str : '0.4 * (r/100)**1.5'
beta:
type : Eval
str : '(math.atan2(sky_pos.y,sky_pos.x) + math.pi/2.) * galsim.radians' 用于Great3挑战的变量PSF基本上做到了这一点,但是使用了一个更为复杂的PSF模型。
https://stackoverflow.com/questions/19694621
复制相似问题