Notebook

これは日々の作業を通して学んだことや毎日の生活で気づいたことをを記録しておく備忘録である。

HTML ファイル生成日時: 2025/08/15 15:56:28.294 (台灣標準時)

photutils の photutils.datasets.make_gaussian_prf_sources_image () 関数

photutils 2 系列では、 photutils.datasets.make_gaussian_prf_sources_image () 関数がなくなった ようでござる。


Traceback (most recent call last):
  File "/some/where/in/the/disk/appy_s13_00_04.py", line 155, in 
    = photutils.datasets.make_gaussian_prf_sources_image (image_size, \
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'photutils.datasets' has no attribute 'make_gaussian_prf_sources_image'

https://github.com/astropy/photutils/blob/main/CHANGES.rst を見てみたでござる。すると、以下のような記述があったでござる。

The make_gaussian_prf_sources_image function is now deprecated. Use
the make_model_psf_image function or the new make_model_image function
instead. [#1762]

make_model_psf_image () か make_model_image () を使うように書き換えな いといけないようでござる。

fig_202412/www_github_photutils_00.png
fig_202412/www_github_photutils_01.png

なれど、 API Reference を見てみると、 make_model_image () という関数に ついての記述はあるのでござるが、 make_model_psf_image () という関数に ついての記述は見当たらないでござる。どういうことなのでござろうか。

fig_202412/www_github_photutils_02.png

と思ったら、 make_model_image () は photutils.datasets.make_model_image () で、 make_model_psf_image () に ついては、関数の名前が間違って書かれているようで、存在するのは photutils.psf.make_psf_model_image () でござった。

fig_202412/www_github_photutils_03.png
fig_202412/www_github_photutils_04.png


Frequently accessed files

  1. Misc___Taiwan/20240207_00.html
  2. Misc___Taiwan/20240819_00.html
  3. Computer___NetBSD/20230119_00.html
  4. Computer___TeX/20231107_00.html
  5. Computer___Network/20230516_00.html
  6. Misc___Taiwan/20240903_01.html
  7. Computer___Network/20230726_00.html
  8. Computer___NetBSD/20250301_01.html
  9. Computer___Network/20241214_00.html
  10. Computer___NetBSD/20240805_03.html
  11. Computer___Network/20240130_00.html
  12. Computer___TeX/20240414_00.html
  13. Food___Taiwan/20230609_06.html
  14. Computer___TeX/20230726_01.html
  15. Misc___Taiwan/20250728_01.html
  16. Food___Taiwan/20230608_04.html
  17. Computer___TeX/20240414_01.html
  18. Computer___Python/20240101_00.html
  19. Computer___FreeBSD/20220621_0.html
  20. Misc___Japan/20240610_00.html
  21. Computer___NetBSD/20250409_00.html
  22. Computer___NetBSD/20241102_00.html
  23. Science___Math/20220420_0.html
  24. Computer___TeX/20240410_00.html
  25. Food___Taiwan/20230711_15.html
  26. Computer___TeX/20240411_00.html
  27. Computer___NetBSD/20240810_00.html
  28. Computer___NetBSD/20250728_00.html
  29. Computer___Network/20230508_00.html
  30. Misc___Taiwan/20220831_4.html


HTML file generated by Kinoshita Daisuke.