ZeroDivisionError when uploading trim bit sweeps != list(range(16))
If a user performs a sweep of the trim bits that is not equal to 0 - 15 in 1 bit steps, the for loop is broken by this condition, xarr_d is never filled, the length is therefore 0 and this line will give you a ZeroDivisionError.
I believe this should be handled better, rather than returning a ZeroDivisionError.
To give you a heads up: If this is handled, there is also another potential ZeroDivisionError if the user uploads a 2 trim bit sweep here, since: if (len(xarr_a) = 2, Felis will subtract 2 to make 0 and divide by 0.
Edited by Matthew Lewis Franks