Divide by zero error in skin map code
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)
-
reporter -
reporter Updated changes file [skip ci]. Refs issue
#965→ <<cset 54f4dfda7fe4>>
-
reporter - changed status to resolved
Merged in issue965divideByZeroSkinDoseMapError (pull request #548)
Issue965divideByZeroSkinDoseMapError
Approved-by: Ed McDonagh
Fixes issue
#965→ <<cset ae4fad02eb9a>>
-
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
#986and refs issue#965→ <<cset 29a733c9ca18>>
-
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
#986and refs issue#965Approved-by: Ed McDonagh
Fixes issue
#986→ <<cset d607d27cbf38>>
- Log in to comment
Added catch for divide by zero error if study.total_dap is zero. Refs issue
#965→ <<cset a44fee577e99>>