DeaglanBartlett / ESR

21 stars 6 forks source link

combine_DL.py: Handling if Prel_DL is nan #42

Closed AmeliaFord353 closed 2 months ago

AmeliaFord353 commented 2 months ago

In combine_DL.py, an error occurs if there is a Prel_DL value that is not finite, in the line Prel /= sum(Prel)

A solution was to add the line Prel[~np.isfinite(Prel_DL) | np.isnan(Prel_DL)] = 0.0 just before the Prel value is calculated.