Open esheldon opened 7 months ago
The tests such as test_lsst_silicon_builder_passes_correct_photon_ops_to_drawImage
don't actually result in any flux in the image, so the code is currently failing. Was no flux drawn the intention?
Anyone know how to make the tests draw a non zero flux?
Rather than change what that test does, probably better to make this centroid calculation optional, which we need to do anyway. We definitely don't want it turned on by default, since it's much too slow for objects that have very few photons. (Which are the vast majority of objects in typical use cases.)
The recent commits make it optional
I can't make any progress on this PR until I can get the tests to actually produce photons. Currently the tests as set up produce zero flux drawn in the stamp but I don't understand why. Does anyone know how to modify the test to produce flux?
I think this is ready for review.
I have my own issues with this PR, mainly that it is calculating a centroid for every object which is not necessary.
For images with a lot of galaxies this slows down the code significantly.
We only need a subset of the objects, say a random 100 or 200, with which to fit a WCS and validate it.
This adds code to calculate centers from shot photons
These positions will be accurate in all cases, whereas the current available x, y are from converting ra, dec to x, y using the batoid wcs. That wcs does not include all physics (e.g. DCR) making the WCS inaccurate in some cases.
Currently this is "always on" and uses a fixed number of photons.
I need help to understand how to make this configurable within the galsim config system, as imsim interfaces with it.