thenineteen / Semiology-Visualisation-Tool

Data driven 3D brain visualisation of semiology. Semiology to anatomy translator based on over 4600 patients from 309 peer-reviewed articles.
MIT License
9 stars 6 forks source link

Lateralisation values exceeding localisation values: Division by Zero Error #195

Closed thenineteen closed 3 years ago

thenineteen commented 3 years ago

when running debugging_sinlge_terms:

patient = Semiology(
    'Tonic',
    symptoms_side=Laterality.LEFT,
    dominant_hemisphere=Laterality.LEFT,
)

heatmap = patient.get_num_datapoints_dict()
print("\nSemiology: ", patient.term)
print('\nResult:', heatmap, '\n')

get a RunTimeError: Division by Zero R_to_L_ratio = lat_only_Right / lat_only_Left

This is because the lateralisation values are zero for left

Need to create a condition to capture zeros and leave zeros as zeros in Q_L module lat_exceeding_loc_mapped_to_hemisphericGIFs_adjusted_for_locs()

thenineteen commented 3 years ago

the behaviour is still as expected, but we should explicitly deal with division by zeros