astropy / photutils

Astropy package for source detection and photometry. Maintainer: @larrybradley
https://photutils.readthedocs.io
BSD 3-Clause "New" or "Revised" License
243 stars 137 forks source link

Questions on psf_match. #1259

Open pinsongzhao opened 3 years ago

pinsongzhao commented 3 years ago

Hi, I want to do a psf match for sci-images to study color profiles of target galaxies, and I begin my test with psf images. I use Photutils.create_matching_kernel() to build the kernels first, use window function TopHat(0.35) and the final residuals (f160w-f814w X kernel) seem dirty to me. Then I try to increase the factor of TopHat from 0.35 to 1, the residuals improve but 'black' patterns appear near the boundary, which looks strange. When the factor goes to 1.6, TopHat(1.6), which means no high frequency cut, I see a great improvement in the main body of f814 residual, but 'black' pattern still exists. when I try other window functions available in Photutils, and do similar test work, I will get similar results. My problem now is kernel using small filtering values could not remove the psf effect between two different bands, but kernel with high values will bring negative pixel values in psf-matched sci-images. My question: Is there any way which could give me small residuals for both main body and boundary? test1 test2 test3

pinsongzhao commented 3 years ago

My second question is about the ratio of two different psf images in frequency space. I read the source code of create_matching_kernel(), and look into 'otf160/otf814' and 'otf160/otf125'. Here is the link to my source test code in case I could not make myself clear. https://github.com/pinsongzhao/TestPhotutils/blob/main/testPSFmatch1.ipynb. I find a more complex feature shown in right panel than that in left panel. Do these golden peaks at four corners of the right panel mean the ratio160to125 is noisier than ratio160to814? Or in an opposite way, they have relative large strength means they are necessary to produce a good residual? Sorry I am really new to this field, thank you and look forward to your reply. test4 test4_mark