Chandra-MARX / marx

Chandra X-ray Observatory ray-trace simulator
http://space.mit.edu/cxc/marx/
5 stars 4 forks source link

New source type: Image that uses Ra/DEC #57

Open hamogu opened 1 year ago

hamogu commented 1 year ago

The existing image source only uses the pixel scale from the WCS in the image, but always assumes that the center of the input image is at the optical axis of marx. That's done as a convenience for a typical use case: Take an observed image from one source and use it as input to simulate the same spatial distribution, but a different detector, different exposure time, or different position on the sky.

However, that leads to annoying side effects:

So, I should make a new source class. Name open for discussion, but something like "S-Image-WCS".

hamogu commented 8 months ago

This functionality is available through SIMPUT. Marx has a SIMPUT source and SIMPUT does provide exactly this functionality. It's a little more work to set up then using a build-in marx source, but I'd prefer not to duplicate existing functionality if I can avoid it. While it's not hard in principle to modify the IMAGE source for this, there are restrictions: Which WCS systems should be supported? TAN projection is relatively easy, but how about others? Do I re-implement here or use WCSlib as an additional dependency? I'll close this as "won't do", but it could be resurrected if a use case that cannot be covered by SIMPUT emerges.

hamogu commented 8 months ago

Hmm. If I build marx agains the CIAO libraries, then I have access to the WCSlib which would make this much easier to implement. In that case, it might be worthwhile to have this natively in marx without requiering SIMPUT.