GalSim-developers / GalSim

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

Simulating spectrograph slit #1320

Open chazshapiro opened 3 days ago

chazshapiro commented 3 days ago

Hi All,

I'm simulating a spectrograph image where I:

  1. Start with telescope PSF (interpolated)
  2. Truncate the PSF on 2 sides as though being blocked by a slit
  3. Convolve the result with (interpolated) PSF of re-imaging optics
  4. Sample on the detector

What's the most effective, galsimmy way to do step 2? Trying not to make a mess of things...

Thanks, Chaz

rmjarvis commented 3 days ago

Probably you could draw the step 1 PSF onto an image at some reasonably high resolution. Then zero out the image where the slit is blocking it. Then use InterpolatedImage to go the rest of the way.

chazshapiro commented 3 days ago

Will do, thanks Mike. I wanted to make sure I wasn't overlooking some slick functionality that did this already.