GalSim-developers / GalSim

The modular galaxy image simulation toolkit. Documentation:
http://galsim-developers.github.io/GalSim/
Other
226 stars 107 forks source link

Fix Scattered positions if world_pos is in the stamp field #1190

Closed rmjarvis closed 1 year ago

rmjarvis commented 1 year ago

Josh discovered that the Scattered type doesn't respect world_pos if it's in the stamp field, as it should. Instead it adds its own image_pos specification in the image field, which ends up taking precedence.

It turns out that an image_pos in the stamp field did work, kind of by accident, just because when we make the position, it checks stamp first, finds it, and uses it, and just ignores the default one that was made in the image field. But now the Scattered function explicitly checks the stamp field and only makes the default if there are no other positions anywhere.