pi@raspi1:~/Motor $ ./PolarimeterMain.py usage: type following commands w - sensor and light warmup. One cycle takes about 2 min. Repeat until values are stable. z - set zero /calibrate polarimeter ana [r [l]] - find delta angle, calculate concentration when specific rotation and length (default 1) are given rec [name]|off - record measurement data to file name or stop it o - one measurement q (quit) >>w Please run several times until values are stable. ************************************************************ *********************************** Warm up done! >>z >>ana -0.02, Thu Aug 2 16:55:54 2018 >>ana -0.01, Thu Aug 2 16:56:00 2018 >>ana -0.00, Thu Aug 2 16:56:06 2018 >>ana -0.01, Thu Aug 2 16:56:14 2018 >>ana 66.5 0.6 3.47, 8.70, Thu Aug 2 17:03:25 2018 >>ana 66.5 0.6 3.35, 8.40, Thu Aug 2 17:03:38 2018 >>ana 66.5 0.6 3.42, 8.57, Thu Aug 2 17:03:48 2018 >>ana 66.5 0.6 3.34, 8.37, Thu Aug 2 17:03:59 2018 >>ana 66.5 0.6 3.36, 8.42, Thu Aug 2 17:04:23 2018 >>ana 66.5 0.6 3.39, 8.50, Thu Aug 2 17:04:45 2018 >>ana 66.5 0.6 3.35, 8.40, Thu Aug 2 17:04:59 2018 >>ana 66.5 0.6 3.36, 8.42, Thu Aug 2 17:05:49 2018 >>ana 66.5 0.6 3.35, 8.40, Thu Aug 2 17:06:16 2018 >>ana 66.5 0.6 3.37, 8.45, Thu Aug 2 17:06:47 2018 >>ana 0.14, Thu Aug 2 17:07:54 2018 >>ana 3.42, Thu Aug 2 17:08:09 2018 >>ana 3.36, Thu Aug 2 17:08:17 2018 >>ana 3.29, Thu Aug 2 17:09:13 2018 >>ana 3.34, Thu Aug 2 17:09:25 2018 >>ana 3.38, Thu Aug 2 17:09:32 2018 >>q pi@raspi1:~/Motor $ ./PolTest.py usage: type following commands l - toggle light s - stop running loop (measure, rotation) r [n [m]] - rotate with stepwidth n (pos/neg/0) m times o/a/m [f] - one/auto/multiple measurements, latter with f seconds break, default 0.1 z - set zero /calibrate polarimeter ana [r l] - find delta angle, calculate concentration when specific rotation and length are given max - find max rec [name]|off - record measurement data to file name or stop it tune sc mw rw - type help tune for more info q (quit) >>l light on:True >>r 30 >>ana 66.5 0.6 gotoposition from 70 to 73 approachpeak: position 70 searchradius 20 slope -0.5500000000000304 gotoposition from 73 to 50.0 gotoposition from 50 to 53 pointB: position 50 slope 1.0833333333333333 gotoposition from 53 to 60 slopes with different signs, continue with middle point: 60, 3743.9 gotoposition from 60 to 63 approachpeak: position 60 searchradius 10 slope -12.199999999999969 gotoposition from 63 to 50.0 gotoposition from 50 to 53 pointB: position 50 slope -0.6000000000000606 approachpeak: position 50 searchradius 10 slope -0.6000000000000606 gotoposition from 53 to 40.0 gotoposition from 40 to 43 pointB: position 40 slope 2.283333333333303 gotoposition from 43 to 45 slopes with different signs and small search radius, return the middle point: 45, 3885.45 findmax from position 45 gotoposition from 45 to 9 gotoposition from 33 to -22 analyze: value 3.423239952833954 3.42, 8.57, Thu Aug 2 17:12:15 2018 >>r -30 >>ana 66.5 0.6 gotoposition from 6 to 9 approachpeak: position 6 searchradius 5 slope 0.7333333333334243 gotoposition from 9 to 11.0 gotoposition from 11 to 14 pointB: position 11 slope 1.3666666666666363 approachpeak: position 11 searchradius 5 slope 1.3666666666666363 gotoposition from 14 to 16.0 gotoposition from 16 to 19 pointB: position 16 slope 0.566666666666606 approachpeak: position 16 searchradius 5 slope 0.566666666666606 gotoposition from 19 to 21.0 gotoposition from 21 to 24 pointB: position 21 slope -1.1166666666666363 gotoposition from 24 to 18 slopes with different signs and small search radius, return the middle point: 18, 4024 findmax from position 18 gotoposition from 18 to -18 analyze: value 3.406995235600902 3.41, 8.55, Thu Aug 2 17:12:37 2018 >>r 50 >>ana 66.5 0.6 gotoposition from 84 to 87 approachpeak: position 84 searchradius 20 slope -12.583333333333334 gotoposition from 87 to 64.0 gotoposition from 64 to 67 pointB: position 64 slope 1.783333333333303 gotoposition from 67 to 74 slopes with different signs, continue with middle point: 74, 3602.65 gotoposition from 74 to 77 approachpeak: position 74 searchradius 20 slope -10.533333333333303 gotoposition from 77 to 54.0 gotoposition from 54 to 57 pointB: position 54 slope 0.6166666666666364 gotoposition from 57 to 64 slopes with different signs, continue with middle point: 64, 3700.4 gotoposition from 64 to 67 approachpeak: position 64 searchradius 20 slope -13.133333333333363 gotoposition from 67 to 44.0 gotoposition from 44 to 47 pointB: position 44 slope 1.1333333333333637 gotoposition from 47 to 54 slopes with different signs, continue with middle point: 54, 3804.3 gotoposition from 54 to 57 approachpeak: position 54 searchradius 10 slope -9.400000000000091 gotoposition from 57 to 44.0 gotoposition from 44 to 47 pointB: position 44 slope 0.0 gotoposition from 47 to 49 slopes with different signs and small search radius, return the middle point: 49, 3848.15 findmax from position 49 gotoposition from 49 to 13 gotoposition from 34 to -18 analyze: value 3.413998075622763 3.41, 8.55, Thu Aug 2 17:13:04 2018 >>r -100 >>ana 66.5 0.6 gotoposition from 3536 to 3539 approachpeak: position 3536 searchradius 20 slope 6.016666666666576 gotoposition from 3539 to 3556.0 gotoposition from 3556 to 3559 pointB: position 3556 slope 12.716666666666697 approachpeak: position 3556 searchradius 20 slope 12.716666666666697 gotoposition from 3559 to 3576.0 gotoposition from 3576 to 3579 pointB: position 3576 slope 11.316666666666757 approachpeak: position 3576 searchradius 10 slope 11.316666666666757 gotoposition from 3579 to 3586.0 gotoposition from 3586 to 3589 pointB: position 3586 slope 9.883333333333363 approachpeak: position 3586 searchradius 10 slope 9.883333333333363 gotoposition from 3589 to 3596.0 gotoposition from 3596 to 3599 pointB: position 3596 slope 7.683333333333242 approachpeak: position 3596 searchradius 5 slope 7.683333333333242 gotoposition from 3599 to 3601.0 gotoposition from 1 to 4 pointB: position 1 slope 5.433333333333242 approachpeak: position 1 searchradius 5 slope 5.433333333333242 gotoposition from 4 to 6.0 gotoposition from 6 to 9 pointB: position 6 slope 3.9499999999999695 approachpeak: position 6 searchradius 5 slope 3.9499999999999695 gotoposition from 9 to 11.0 gotoposition from 11 to 14 pointB: position 11 slope 2.4500000000001214 approachpeak: position 11 searchradius 5 slope 2.4500000000001214 gotoposition from 14 to 16.0 gotoposition from 16 to 19 pointB: position 16 slope 0.8333333333333334 approachpeak: position 16 searchradius 5 slope 0.8333333333333334 gotoposition from 19 to 21.0 gotoposition from 21 to 24 pointB: position 21 slope -1.2666666666667272 gotoposition from 24 to 18 slopes with different signs and small search radius, return the middle point: 18, 4022.15 findmax from position 18 gotoposition from 18 to -18 analyze: value 3.4226208703206478 3.42, 8.57, Thu Aug 2 17:19:12 2018 >>q