【问题标题】:FFT Runtime Error in Running Galsim运行 Galsim 时出现 FFT 运行时错误
【发布时间】:2014-07-26 00:42:45
【问题描述】:

在运行脚本保存动画时,我不断收到以下错误:

RuntimeError: SB Error: fourierDraw() requires an FFT that is too large, 6144
If you can handle the large FFT, you may update gsparams.maximum_fft_size.

所以我进入 /Galsim/include/galsim/GSparams.h

我更改了以下内容

maximum_fft_size(16384) 从 maximum_fft_size(4096)

或 2^14 从 2^12。

我仍然遇到与以前相同的错误。我应该重启我的机器还是什么?

【问题讨论】:

    标签: python galsim


    【解决方案1】:

    这不是更改 maximum_fft_size 参数的地方。有关如何使用 GSParams 对象和更新参数的示例,请参见 demo7。 GSObject 的文档字符串中还有一个示例:

        >>> gal = galsim.Sersic(n=4, half_light_radius=4.3)
        >>> psf = galsim.Moffat(beta=3, fwhm=2.85)
        >>> conv = galsim.Convolve([gal,psf])
        >>> im = galsim.Image(1000,1000, scale=0.05)        # Note the very small pixel scale!
        >>> im = conv.drawImage(image=im)                   # This uses the default GSParams.
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
          File "galsim/base.py", line 1236, in drawImage
            image.added_flux = prof.SBProfile.draw(imview.image, gain, wmult)
        RuntimeError: SB Error: fourierDraw() requires an FFT that is too large, 6144
        If you can handle the large FFT, you may update gsparams.maximum_fft_size.
        >>> big_fft_params = galsim.GSParams(maximum_fft_size=10240)
        >>> conv = galsim.Convolve([gal,psf],gsparams=big_fft_params)
        >>> im = conv.drawImage(image=im)                   # Now it works (but is slow!)
        >>> im.write('high_res_sersic.fits')
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-07-23
      • 1970-01-01
      • 1970-01-01
      • 2015-07-17
      • 2016-04-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多