LSSTDESC / imSim

GalSim based Rubin Observatory image simulation package
https://lsstdesc.org/imSim
BSD 3-Clause "New" or "Revised" License
36 stars 15 forks source link

New WCS type? #462

Open esheldon opened 7 months ago

esheldon commented 7 months ago

The current WCS output does not include all the physics, so it is quite far off for some cases, such as when DCR is on.

I've got a PR #461 in to calculate centroids of objects, so I can get my own WCS solution from the truth catalog.

But would it be possible to replace batoid_wcs with something that uses all the physics?

esheldon commented 7 months ago

I think DCR is the biggest missing physics, we could probably get pretty darn close by just including that photon op.

esheldon commented 7 months ago

@jmeyers314 is it possible to create a WCS type that would include DCR in addition to what batoid_wcs is doing?

jmeyers314 commented 7 months ago

That might work. I'd prefer to avoid changing batoid_wcs so there's no chance of double-counting the DCR in the WCS and again in the photon op. But I bet we could modify the output of batoid_wcs to add in DCR after the fact, and then write that to the headers. I guess we technically want to make this dependent on the presence/absence of the DCR photon op, but maybe we just leave that up to the user inside the config yaml?

cwwalter commented 5 months ago

Is this being handled by any of the others work PRs (like #461 )? Or should it remain open?

esheldon commented 5 months ago

I spent some time trying to get this to work by adding additional deflections to the position specified by batoid_wcs, but my code was not reliable.

There is a chicken-and-egg situation: you specify the x, y of the location based on the initial WCS and then the object moves relative to that when it goes through the photon ops. If the initial WCS has all the photon ops it it, then it gets "moved twice".

In some situations you can fudge it by moving the initial position by a -dx, -dy but I found this was not reliable, maybe due to not including enough physics in the WCS.