Invalid plot values (None, NaN, +inf, -inf) from either measurement or data file can cause application crashes as plots can only accept finite float values.
Use math.nan as defaults for dictionary keys (avoiding None) and math.isfinite(x) to verify if the value can be added to a plot.
In addition it would beneficial to refactor class PlotsController into independent classes IVPlotsController and CVPlotsController for better modularization.
Invalid plot values (
None
,NaN
,+inf
,-inf
) from either measurement or data file can cause application crashes as plots can only accept finite float values.Use
math.nan
as defaults for dictionary keys (avoidingNone
) andmath.isfinite(x)
to verify if the value can be added to a plot.In addition it would beneficial to refactor class
PlotsController
into independent classesIVPlotsController
andCVPlotsController
for better modularization.