Replies: 2 comments 4 replies
-
Hi iwelzel, Thanks for this issue, indeed we have seen this and its most prominently present for low contrasts. I would recommend shaping your PSF so that only the central region where the companion is inserted (i.e only the pixels corresponding to the FWHM) are inserted and the rest is zero. FWIW, it does not hurt training a deep learning algorithm much but try to avoid low contrasts and work in the high contrast regime. Hope that helps |
Beta Was this translation helpful? Give feedback.
-
Hi @lwelzel, for the injection to work well visually the average pixel values at the edges of the PSF inset needs to be ~0 and to have a variance after scaling that is significantly smaller than local stellar speckle intensities. |
Beta Was this translation helpful? Give feedback.
-
Problem description:
I am trying to inject a synthetic planet (spectrum) using cube_inject_companions in fakecomp.py. Overall this works very well, however when using a high contrast and a specific instrument psf (spectrum) I get the following square artifact in the image:
The square persists with rotation and is dependent on the wavelength, see below:
I use the normalize_psf function as recommended in the docstring of cube_inject_companions. While I am only visually seeing it with high contrast ~1e-3, I assume that this persistent no matter the contrast. Since this is the same size as my psf I assume that this is due to the way the image cubes of star and companion are added.
Has anybody come up against something similar and found a solution to the sharp edge? I expect this to become a problem when training a (C)NN on synthetic images produced with cube_inject_companions since the co-moving sharp edge will be a possible feature to detect.
Potential workarounds?
Median edge subtraction
One potential issue is that the psf image is "small" compared to its extent so that the outer pixels are far from zero (wavelength dependent):
Subtracting the median of the edges of the image cube (see below) has major bad vibes since I am just shifting all the pixel values down so I am slightly changing the PSF. It helps it bit with the edge issue though.
Padded psf image
Padding the psf first helps slightly but naturally preserves part of the outline square as the psf is not extended into the padding.
Does anyone have a solution/workaround for this problem for which I can still use the same psf? Any suggestions are very welcome.
Beta Was this translation helpful? Give feedback.
All reactions