Commit 3d16b074e4f24a54ca4dfcb60c8e3818a4b0b2bb
1 parent
2636bc84
correct zero point division error
Showing
1 changed file
with
1 additions
and
1 deletions
scripts/cssens
| ... | ... | @@ -532,7 +532,7 @@ class cssens(GApplication): |
| 532 | 532 | if ts > 0: |
| 533 | 533 | correct = math.sqrt(self.m_ts_thres/ts) |
| 534 | 534 | else: |
| 535 | - if eSPre_all > 0: | |
| 535 | + if SPre_all > 0 and eSPre_all > 0: | |
| 536 | 536 | correct = math.sqrt(self.m_ts_thres)/(SPre_all/eSPre_all) |
| 537 | 537 | flux = correct * SPre_all |
| 538 | 538 | pflux = correct * pflux | ... | ... |