flaresimulations / synthesizer

Synthesizer - a code for creating synthetic astrophysical observables
https://flaresimulations.github.io/synthesizer/
GNU General Public License v3.0
17 stars 9 forks source link

BUGFIX: `apply_filter` could cause divide by zero errors #720

Closed WillJRoper closed 2 months ago

WillJRoper commented 2 months ago

Filter.apply_filter never checked to ensure the non-zero masked array had elements (it now does, warns the user and returns 0), or checked if the array contribution in the band was 0 (if so there's no need to do the more expensive integration, this will now also return 0).

Issue Type

Checklist