DarkTyr / squid_ssa_char

SQUID Series Array Screening Characterization Module
The Unlicense
0 stars 0 forks source link

Add data check to table data for zero check #1

Closed DarkTyr closed 1 month ago

DarkTyr commented 4 months ago

Divide by zero that python doesn't handle very well (It throws an exception and stops). ''' Traceback (most recent call last): File "/home/pcuser/anaconda3/envs/cryoQA/bin/SSA_data_proccessing", line 33, in sys.exit(load_entry_point('SQUID-SSA-Char', 'console_scripts', 'SSA_data_proccessing')()) File "/home/pcuser/gitrepos/squid_ssa_char/squid_ssa_char/scripts/SSA_data_processing.py", line 148, in main round((i.M_fb),2), round((i.M_in),2), round((i.M_in)/(i.M_fb),2)] ZeroDivisionError: division by zero '''

I believe we should break the calculations performed in that array into separate statements so we can check for divide by zero issues.

emaloney19 commented 3 months ago

Did this happen because the rows were null or because they were 0? It should be able to handle 0 except the ratio calculation?

DarkTyr commented 1 month ago

Fixed in commit 00f05ccc6cd3c7d892320cf06e97938731e761f9