Add python script to measure drag latency using QuuickStep V2

minimization.py is a helper module implementing an alternative method for
processing the data. It shifts the laser event timestamps in small steps until
they sit nicely on on a straight line as they would if latency was zero.

Example plot with XY data and fitted lines for the shifted laser events
https://drive.google.com/open?id=0B7f9CeY-0HXFUWwwbVdlLXpMVEE

qstep.py runs evtest as a separate process, talks to QuickStep over serial and
saves data from both as files. I then runs both data processing scripts on
those files.

Example run:

        $ python qstep.py 6
        Input device   : /dev/input/event6
        Serial device  : /dev/ttyACM1
        Laser log file : /tmp/QuickStep_2016_01_21__1554_22_lsaer.log
        evtest log file: /tmp/QuickStep_2016_01_21__1554_22_evtest.log
        Clock zeroed at 1453409662 (rt 0.259ms)
        ........................................
        Processing data, may take a minute or two...
        Drag latency (min method) = 19.62 ms
        Average Maximum Minimum
        0.0237723313845 0.0333168506622 0.0167829990387

The ~4 ms difference between the two methods is close to 4.8 ms which is half
the typical interval between two consecutive readings in evtest log. We
previously verified that similar difference arises depending on whether we
look at the last reading before the crossing, first one after, or interpolated
crossing time between them.

BUG=none
TEST=run manually on Glimmer (Lenovo rugged convertible)

Change-Id: If8635837f4b2a9858c280b680d7aeff875788b45
Reviewed-on: https://chromium-review.googlesource.com/323170
Commit-Ready: Mark Koudritsky <kamrik@chromium.org>
Tested-by: Mark Koudritsky <kamrik@chromium.org>
Reviewed-by: Mark Koudritsky <kamrik@chromium.org>
2 files changed