首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运行Galsim的FFT运行时误差

运行Galsim的FFT运行时误差
EN

Stack Overflow用户
提问于 2014-07-26 00:42:45
回答 1查看 274关注 0票数 2

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

代码语言:javascript
复制
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/GSaffs.h

我修改了下面的内容

maximum_fft_size(16384)来自maximum_fft_size(4096)

或2^12中的2^14。

我仍然会遇到和以前一样的错误。我该重新启动我的机器吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-07-26 16:19:39

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

代码语言:javascript
复制
    >>> 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')
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24966419

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档