So, given we are really interested in when the brightness deviates from the baseline, I just record each time a brightness is recorded for the first time. This way, given brightness is 0-255, there are only 255 values needed to be stored for each test (2x1000x255=510kb).