spacetelescope / calcos

Calibration for HST/COS.
https://hst-docs.stsci.edu/cosdhb/chapter-3-cos-calibration
3 stars 27 forks source link

Fix calcos issue in 3.4.0 when input science file has empty event list #210

Closed stscirij closed 2 years ago

stscirij commented 2 years ago

CheckforAddSimulatedWavecal tries to calculate the exposure duration by calculating the difference between the time of the last and first events. This causes an index error if the event list is empty. This fix will trap the case of zero events and proceed normally. Products are created, with empty data extensions if events are absent.