Skip to content

Conversation

@welucas2
Copy link
Collaborator

@welucas2 welucas2 commented Oct 7, 2025

This isn't quite ready yet, but I'd like to get a draft PR in place. This will add to imSim the capability to simulate the full focal plane. Currently, we can only simulate detectors in isolation: for a given set of observation parameters and input, imSim will run through tasks drawing each detector in the list. This neglects any 'crosstalk' between detectors in the form of photons that are generated for one but which (for whatever reason) end up raining down on another.

We're building towards a two-pass full focal plane model which will work like the following:

  1. Pass one will work like a current imSim run, with the addition of an extra output field off_detector_photons. While working on each detector, imSim will gather the photons that end up outside its bounds and write them to file for use in pass two. The other output is the same image that would normally have been produced, of those objects which lie within the detector's bounds and have been drawn on it.
  2. Pass two takes both of those outputs from pass one. While working on a detector, it will read its image from pass one as well as the off-detector photons that were originally created by tasks working on other detectors. In this way, the task working on detector X is able to draw the photons that were originally created while working on the other 188 tasks.

As of the moment there are still things to do here:

  • The current implementation is for the photon pooling pipeline with LSST_PhotonPoolingImage. I'd like to see how easy it would be to implement for the original LSST_Image pipeline, too. This might be something to do later on separately.
    • If not doing now, preventing or providing a warning for users who try to use the off_detector_photons extra output with the original pipeline.
  • Provide a switch when reading off_detector_photons in pass two that refactors the input at the very start, prior to drawing the images.
    • Each task in pass one produces one file. which could potentially contain photons destined for all 188 other detectors. So, to be sure that all photons are captured, not refactoring the files would require each task in pass two to read and work with 188 files.
    • Refactoring would take the 189 files, each containing all the photons originating from a given detector but destined elsewhere, and produce a different set of 189 files, each containing the photons from any origin but destined for a given detector. With this, each task in pass two would only need to read the one off-detector photon file.
  • We should provide template configuration files for users, and probably expand the current imsim-user-instcat-ffp-pass1.yaml and imsim-user-instcat-ffp-pass2.yaml examples.

welucas2 added 22 commits July 10, 2025 10:12
… -- more general, as we don't want to presume how they got off the detector. Be a bit more general.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants