LSSTDESC / DESC_DC2_imSim_Workflow

BSD 3-Clause "New" or "Revised" License
3 stars 3 forks source link

use lsst.sphgeom.ConvexPolygon to find overlaps near region corners in trim_sensors #44

Closed jchiang87 closed 4 years ago

jchiang87 commented 4 years ago

For the Run3.0i imSim testing at ALCF, Antonio encountered a number of sensor-visits that did not produce an output FITS file. Here's a plot of those sensor-visits, with the DDF boundary also shown: Run3 0i_tests_unfinished_sensor_visits The sensor-visits along the sides have tiny overlaps with the DDF, but there are no objects in the Run3.0i instance catalogs for those cases. For the sensor-visits where there are no objects to simulate, imSim simply exits and doesn't produce a FITS file. However, if the simulation starts from a checkpoint file, imSim should still produce the FITS file for the checkpointed data. That bug addressed in this imSim PR.

Most of the unfinished sensor-visits near the DDF corners actually lie outside the DDF, so should have been excluded from the .trim_sensors output. The current PR fixes this bug. Here's a plot showing the sensor-visits that should be simulated for visit 706993 (pink), as found by the revised code, and the ones that were included in the original test run that never finished (blue). R:2,2 S:0,0 is in both sets. v706993_corner_fix