Divide by zero error in skin map code

Issue #965 resolved
David Platten created an issue

If the total DAP is zero then an error is thrown:

Traceback (most recent call last): File "e:\openrem-src\openrem\remapp\tools\background.py", line 137, in run_as_task func(*args, **kwargs) File "e:\openrem-src\openrem\remapp\tools\make_skin_map.py", line 352, in make_skin_map dap_fraction=my_exp_map.my_dose.dap_count / np.float(study.total_dap), ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ ZeroDivisionError: float division by zero

Comments (5)

  1. David Platten reporter

    Replaced second occurrence of code that causes divide by zero error with new dap_fraction variable which is generated within a try except block to catch the error. Refs issue #986 and refs issue #965

    → <<cset 29a733c9ca18>>

  2. David Platten reporter

    Merged in issue986skinDoseMapDivideByZero (pull request #567)

    Replaced second occurrence of code that causes divide by zero error with new dap_fraction variable which is generated within a try except block to catch the error. Refs issue #986 and refs issue #965

    Approved-by: Ed McDonagh

    Fixes issue #986

    → <<cset d607d27cbf38>>

  3. Log in to comment