Confusion on supersampling #478
-
Hi Simon and the team, I am trying to generate mock metallicity maps for NIRISS-like data. For this, I am using a PSF generated by
To be consistent with this, when I generate my image, I use a subgrid_resolution of 5, and I make sure that my numerics are supersampling my data by a factor of 5, too:
However, when I do things in this way, I get the following warning, and I don't know what it means: "Warning: Super-sampled point source kernel over-written due to different subsampling size requested." What does this mean? Does this mean it is treating my kernel, that was generated to have 5 times more pixels than our resolution, is being used as a psf at native resolution? That would increase my FWHM by 5, which would be wrong. What is the difference between the parameters I have tried varying arrangements of turning parameters from 5 to 1 and I cannot figure out what will get rid of this warning. If I'm honest, I don't really know what this warning means. Should I worry about this? My goal is to model this galaxy with supersampled data so that I can accurately account for the effects of pixelisation and beam smearing. What is the right values that I should be choosing for these parameters to make this happen? I simply do not have enough intuition for what all of these parameters do so I am constantly worrying about doing something wrong. Thanks for your help, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @astrobenji thank you very much for the post! PSF class: Your setup looks ok. The kwargs_psf are only there to initiate the PSF class and are distinct from the numerical options of how to use it. The PSF (and also when supersampled) are relative to the pixel grid provided. Creation of the pixel grid: Here are some ambiguities. The way you constructed it is in already supersampled space, this includes also the pixel transformation matrix Mpix2coord. So when combining these pixel grid settings with the settings in the PSF class, then you actually doubly super sample the PSF. Numerics: There is the Numerics() class with all the arguments available and their meaning documented. These settings are how the numerics are done given the PSF and PixelGrid classes. If in the numerical options, the same super-sampling number are chosen (make sure they are both integers of the same type, otherwise this might raise a warning) then it should take the original over-sampled PSF to perform the convolution. Otherwise the code internally has to re-sample the PSF to a different pixel grid and hence raises a Warning that the PSF might have been altered. There is this notebook https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Numerics/lenstronomy_numerics.ipynb that goes through different settings of the numerics and convolves a Sersic profile and compares speed and accuracy for the different methods. I hope this helps (a bit) but otherwise let me know! |
Beta Was this translation helpful? Give feedback.
Hi @astrobenji thank you very much for the post!
Hear a few things, which may or may not help. In case they don't help, if you could send a notebook to reproduce the behavior would be best.
PSF class: Your setup looks ok. The kwargs_psf are only there to initiate the PSF class and are distinct from the numerical options of how to use it. The PSF (and also when supersampled) are relative to the pixel grid provided.
Creation of the pixel grid: Here are some ambiguities. The way you constructed it is in already supersampled space, this includes also the pixel transformation matrix Mpix2coord. So when combining these pixel grid settings with the settings in the PSF class, then you actually do…