diff --git a/.ipynb_checkpoints/movie_writer-checkpoint.ipynb b/.ipynb_checkpoints/movie_writer-checkpoint.ipynb old mode 100755 new mode 100644 diff --git a/Experiments/experiment_04_07_2018___13.46.49.495901/experiment_04_07_2018___13.46.49.495901.log b/Experiments/experiment_04_07_2018___13.46.49.495901/experiment_04_07_2018___13.46.49.495901.log deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/Experiments/experiment_27_06_2018___12.13.14.428842/experiment_27_06_2018___12.13.14.428842.log b/Experiments/experiment_27_06_2018___12.13.14.428842/experiment_27_06_2018___12.13.14.428842.log deleted file mode 100644 index be1e4c34121b3ffa3b8e3617527946d3412aa9c9..0000000000000000000000000000000000000000 --- a/Experiments/experiment_27_06_2018___12.13.14.428842/experiment_27_06_2018___12.13.14.428842.log +++ /dev/null @@ -1,438 +0,0 @@ -INFO:root:sending command to stage:SAS 50 ....................27_06_2018___12.13.17.314775 -INFO:root:response received from stage:0 .....................27_06_2018___12.13.17.328241 -INFO:root:sending command to stage:BLSH 0 ....................27_06_2018___12.13.17.329090 -INFO:root:response received from stage:0 .....................27_06_2018___12.13.17.342783 -INFO:root:sending command to attenuator:;AT:TF 0.6 ...........27_06_2018___12.13.17.567204 -INFO:root:sending command to laser:M .........................27_06_2018___12.13.18.004452 -INFO:root:sending command to laser:W 200 .....................27_06_2018___12.13.18.005272 -WARNING:tensorflow:Variable *= will be deprecated. Use variable.assign_mul if you want assignment to the variable value or 'x = x * y' if you want a new python Tensor object. -INFO:root:video properties: ..................................27_06_2018___12.13.24.851858 -INFO:root:finished gui init ..................................27_06_2018___12.13.24.852354 -INFO:root:property 0, value: -1.0 ............................27_06_2018___12.13.24.852354 -INFO:root:property 1, value: -1.0 ............................27_06_2018___12.13.24.852849 -INFO:root:property 2, value: -1.0 ............................27_06_2018___12.13.24.852849 -INFO:root:property 3, value: 1024.0 ..........................27_06_2018___12.13.24.853345 -INFO:root:property 4, value: 822.0 ...........................27_06_2018___12.13.24.853345 -INFO:root:property 5, value: 0.0 .............................27_06_2018___12.13.24.853841 -INFO:root:property 6, value: -466162819.0 ....................27_06_2018___12.13.24.853841 -INFO:root:property 7, value: -1.0 ............................27_06_2018___12.13.24.854339 -INFO:root:property 8, value: -1.0 ............................27_06_2018___12.13.24.854339 -INFO:root:property 9, value: -1.0 ............................27_06_2018___12.13.24.854833 -INFO:root:property 10, value: 0.0 ............................27_06_2018___12.13.24.899826 -INFO:root:property 11, value: 0.0 ............................27_06_2018___12.13.24.946307 -INFO:root:property 12, value: 128.0 ..........................27_06_2018___12.13.24.995169 -INFO:root:property 13, value: 0.0 ............................27_06_2018___12.13.25.047896 -INFO:root:property 14, value: 100.0 ..........................27_06_2018___12.13.25.101642 -INFO:root:property 15, value: -1.0 ...........................27_06_2018___12.13.25.143282 -INFO:root:property 16, value: -1.0 ...........................27_06_2018___12.13.25.143777 -INFO:root:property 17, value: 6503.0 .........................27_06_2018___12.13.25.183803 -INFO:root:property 18, value: -1.0 ...........................27_06_2018___12.13.25.184317 -INFO:root:click move vector: [ 40 -99] .......................27_06_2018___12.13.52.125994 -INFO:root:sending command to stage:GR,40,-99 .................27_06_2018___12.13.52.126485 -INFO:root:response received from stage:R .....................27_06_2018___12.13.52.253902 -INFO:root:magnification changed to: 100 ......................27_06_2018___12.14.21.107310 -INFO:root:objective offset correction: [ -79. -139.] .........27_06_2018___12.14.21.108303 -INFO:root:sending command to stage:GR,-79.0,-139.0 ...........27_06_2018___12.14.21.109295 -INFO:root:response received from stage:R .....................27_06_2018___12.14.21.243973 -INFO:root:click move vector: [-34 -5] ........................27_06_2018___12.14.22.436236 -INFO:root:sending command to stage:GR,-34,-5 .................27_06_2018___12.14.22.436730 -INFO:root:response received from stage:R .....................27_06_2018___12.14.22.532673 -INFO:root:click move vector: [-26 -6] ........................27_06_2018___12.14.23.124873 -INFO:root:sending command to stage:GR,-26,-6 .................27_06_2018___12.14.23.125398 -INFO:root:response received from stage:R .....................27_06_2018___12.14.23.198030 -INFO:root:click move vector: [ -5 -18] .......................27_06_2018___12.14.23.588604 -INFO:root:sending command to stage:GR,-5,-18 .................27_06_2018___12.14.23.589102 -INFO:root:response received from stage:R .....................27_06_2018___12.14.23.656350 -INFO:root:click move vector: [22 -1] .........................27_06_2018___12.14.24.269828 -INFO:root:sending command to stage:GR,22,-1 ..................27_06_2018___12.14.24.270820 -INFO:root:response received from stage:R .....................27_06_2018___12.14.24.352837 -INFO:root:click move vector: [22 -1] .........................27_06_2018___12.14.24.881415 -INFO:root:sending command to stage:GR,22,-1 ..................27_06_2018___12.14.24.882070 -INFO:root:response received from stage:R .....................27_06_2018___12.14.24.949596 -INFO:root:click move vector: [-15 -19] .......................27_06_2018___12.14.25.443985 -INFO:root:sending command to stage:GR,-15,-19 ................27_06_2018___12.14.25.444477 -INFO:root:response received from stage:R .....................27_06_2018___12.14.25.511759 -INFO:root:click move vector: [-14 -4] ........................27_06_2018___12.14.27.045108 -INFO:root:sending command to stage:GR,-14,-4 .................27_06_2018___12.14.27.045422 -INFO:root:response received from stage:R .....................27_06_2018___12.14.27.107032 -INFO:root:click move vector: [1 6] ...........................27_06_2018___12.14.28.103608 -INFO:root:sending command to stage:GR,1,6 ....................27_06_2018___12.14.28.104066 -INFO:root:response received from stage:R .....................27_06_2018___12.14.28.155465 -INFO:root:click move vector: [ 8 12] .........................27_06_2018___12.14.28.527240 -INFO:root:sending command to stage:GR,8,12 ...................27_06_2018___12.14.28.528060 -INFO:root:response received from stage:R .....................27_06_2018___12.14.28.583907 -INFO:root:click move vector: [ 8 12] .........................27_06_2018___12.14.28.956142 -INFO:root:sending command to stage:GR,8,12 ...................27_06_2018___12.14.28.956673 -INFO:root:response received from stage:R .....................27_06_2018___12.14.29.013909 -INFO:root:click move vector: [-4 -7] .........................27_06_2018___12.15.14.223982 -INFO:root:sending command to stage:GR,-4,-7 ..................27_06_2018___12.15.14.224946 -INFO:root:response received from stage:R .....................27_06_2018___12.15.14.278074 -INFO:root:click move vector: [-4 -7] .........................27_06_2018___12.15.14.659518 -INFO:root:sending command to stage:GR,-4,-7 ..................27_06_2018___12.15.14.659867 -INFO:root:response received from stage:R .....................27_06_2018___12.15.14.711119 -INFO:root:click move vector: [-7 -5] .........................27_06_2018___12.15.14.893244 -INFO:root:sending command to stage:GR,-7,-5 ..................27_06_2018___12.15.14.893752 -INFO:root:response received from stage:R .....................27_06_2018___12.15.14.943971 -INFO:root:click move vector: [-16 0] .........................27_06_2018___12.15.20.586843 -INFO:root:sending command to stage:GR,-16,0 ..................27_06_2018___12.15.20.586843 -INFO:root:response received from stage:R .....................27_06_2018___12.15.20.647356 -INFO:root:click move vector: [-24 -21] .......................27_06_2018___12.15.25.526555 -INFO:root:sending command to stage:GR,-24,-21 ................27_06_2018___12.15.25.527006 -INFO:root:response received from stage:R .....................27_06_2018___12.15.25.599497 -INFO:root:click move vector: [-10 -29] .......................27_06_2018___12.15.26.240201 -INFO:root:sending command to stage:GR,-10,-29 ................27_06_2018___12.15.26.240201 -INFO:root:response received from stage:R .....................27_06_2018___12.15.26.318740 -INFO:root:click move vector: [ -7 -31] .......................27_06_2018___12.15.26.578290 -INFO:root:sending command to stage:GR,-7,-31 .................27_06_2018___12.15.26.578780 -INFO:root:response received from stage:R .....................27_06_2018___12.15.26.659339 -INFO:root:click move vector: [ 2 -24] ........................27_06_2018___12.15.27.005714 -INFO:root:sending command to stage:GR,2,-24 ..................27_06_2018___12.15.27.006210 -INFO:root:response received from stage:R .....................27_06_2018___12.15.27.085595 -INFO:root:click move vector: [-24 -20] .......................27_06_2018___12.15.27.573010 -INFO:root:sending command to stage:GR,-24,-20 ................27_06_2018___12.15.27.573541 -INFO:root:response received from stage:R .....................27_06_2018___12.15.27.646869 -INFO:root:click move vector: [-35 -8] ........................27_06_2018___12.15.28.028584 -INFO:root:sending command to stage:GR,-35,-8 .................27_06_2018___12.15.28.029167 -INFO:root:response received from stage:R .....................27_06_2018___12.15.28.113508 -INFO:root:click move vector: [-32 0] .........................27_06_2018___12.15.28.543788 -INFO:root:sending command to stage:GR,-32,0 ..................27_06_2018___12.15.28.544278 -INFO:root:response received from stage:R .....................27_06_2018___12.15.28.619112 -INFO:root:click move vector: [9 6] ...........................27_06_2018___12.15.29.610143 -INFO:root:sending command to stage:GR,9,6 ....................27_06_2018___12.15.29.610667 -INFO:root:response received from stage:R .....................27_06_2018___12.15.29.663260 -INFO:root:click move vector: [24 0] ..........................27_06_2018___12.15.30.829451 -INFO:root:sending command to stage:GR,24,0 ...................27_06_2018___12.15.30.829948 -INFO:root:response received from stage:R .....................27_06_2018___12.15.30.895556 -INFO:root:click move vector: [24 0] ..........................27_06_2018___12.15.31.133589 -INFO:root:sending command to stage:GR,24,0 ...................27_06_2018___12.15.31.134083 -INFO:root:response received from stage:R .....................27_06_2018___12.15.31.200910 -INFO:root:click move vector: [24 0] ..........................27_06_2018___12.15.31.404435 -INFO:root:sending command to stage:GR,24,0 ...................27_06_2018___12.15.31.405426 -INFO:root:response received from stage:R .....................27_06_2018___12.15.31.470292 -INFO:root:click move vector: [24 0] ..........................27_06_2018___12.15.31.598350 -INFO:root:sending command to stage:GR,24,0 ...................27_06_2018___12.15.31.599066 -INFO:root:response received from stage:R .....................27_06_2018___12.15.31.673272 -INFO:root:click move vector: [24 0] ..........................27_06_2018___12.15.31.783945 -INFO:root:sending command to stage:GR,24,0 ...................27_06_2018___12.15.31.783945 -INFO:root:response received from stage:R .....................27_06_2018___12.15.31.849298 -INFO:root:click move vector: [24 0] ..........................27_06_2018___12.15.32.025523 -INFO:root:sending command to stage:GR,24,0 ...................27_06_2018___12.15.32.025942 -INFO:root:response received from stage:R .....................27_06_2018___12.15.32.098577 -INFO:root:click move vector: [24 0] ..........................27_06_2018___12.15.32.325782 -INFO:root:sending command to stage:GR,24,0 ...................27_06_2018___12.15.32.326310 -INFO:root:response received from stage:R .....................27_06_2018___12.15.32.392057 -INFO:root:click move vector: [-13 -31] .......................27_06_2018___12.15.33.355223 -INFO:root:sending command to stage:GR,-13,-31 ................27_06_2018___12.15.33.355717 -INFO:root:response received from stage:R .....................27_06_2018___12.15.33.434239 -INFO:root:click move vector: [-13 -31] .......................27_06_2018___12.15.33.636161 -INFO:root:sending command to stage:GR,-13,-31 ................27_06_2018___12.15.33.636703 -INFO:root:response received from stage:R .....................27_06_2018___12.15.33.718043 -INFO:root:click move vector: [ 8 -28] ........................27_06_2018___12.15.34.432100 -INFO:root:sending command to stage:GR,8,-28 ..................27_06_2018___12.15.34.432812 -INFO:root:response received from stage:R .....................27_06_2018___12.15.34.505257 -INFO:root:click move vector: [33 -8] .........................27_06_2018___12.15.35.246545 -INFO:root:sending command to stage:GR,33,-8 ..................27_06_2018___12.15.35.247107 -INFO:root:response received from stage:R .....................27_06_2018___12.15.35.330270 -INFO:root:click move vector: [-22 -23] .......................27_06_2018___12.15.38.157588 -INFO:root:sending command to stage:GR,-22,-23 ................27_06_2018___12.15.38.158307 -INFO:root:response received from stage:R .....................27_06_2018___12.15.38.230960 -INFO:root:click move vector: [-27 1] .........................27_06_2018___12.15.38.962912 -INFO:root:sending command to stage:GR,-27,1 ..................27_06_2018___12.15.38.963439 -INFO:root:response received from stage:R .....................27_06_2018___12.15.39.034735 -INFO:root:click move vector: [ -5 -44] .......................27_06_2018___12.15.39.757539 -INFO:root:sending command to stage:GR,-5,-44 .................27_06_2018___12.15.39.758244 -INFO:root:response received from stage:R .....................27_06_2018___12.15.39.852293 -INFO:root:click move vector: [ -5 -44] .......................27_06_2018___12.15.40.068521 -INFO:root:sending command to stage:GR,-5,-44 .................27_06_2018___12.15.40.068521 -INFO:root:response received from stage:R .....................27_06_2018___12.15.40.163965 -INFO:root:click move vector: [-15 4] .........................27_06_2018___12.15.40.815541 -INFO:root:sending command to stage:GR,-15,4 ..................27_06_2018___12.15.40.816132 -INFO:root:response received from stage:R .....................27_06_2018___12.15.40.877317 -INFO:root:click move vector: [21 7] ..........................27_06_2018___12.15.41.669952 -INFO:root:sending command to stage:GR,21,7 ...................27_06_2018___12.15.41.670489 -INFO:root:response received from stage:R .....................27_06_2018___12.15.41.737052 -INFO:root:click move vector: [21 7] ..........................27_06_2018___12.15.41.922200 -INFO:root:sending command to stage:GR,21,7 ...................27_06_2018___12.15.41.922682 -INFO:root:response received from stage:R .....................27_06_2018___12.15.41.988822 -INFO:root:click move vector: [21 7] ..........................27_06_2018___12.15.42.145492 -INFO:root:sending command to stage:GR,21,7 ...................27_06_2018___12.15.42.146484 -INFO:root:response received from stage:R .....................27_06_2018___12.15.42.214561 -INFO:root:click move vector: [21 7] ..........................27_06_2018___12.15.42.406919 -INFO:root:sending command to stage:GR,21,7 ...................27_06_2018___12.15.42.407613 -INFO:root:response received from stage:R .....................27_06_2018___12.15.42.474596 -INFO:root:click move vector: [21 7] ..........................27_06_2018___12.15.42.679658 -INFO:root:sending command to stage:GR,21,7 ...................27_06_2018___12.15.42.680399 -INFO:root:response received from stage:R .....................27_06_2018___12.15.42.747563 -INFO:root:click move vector: [21 7] ..........................27_06_2018___12.15.42.881423 -INFO:root:sending command to stage:GR,21,7 ...................27_06_2018___12.15.42.881917 -INFO:root:response received from stage:R .....................27_06_2018___12.15.42.961291 -INFO:root:click move vector: [21 7] ..........................27_06_2018___12.15.42.969210 -INFO:root:sending command to stage:GR,21,7 ...................27_06_2018___12.15.42.970200 -INFO:root:response received from stage:R .....................27_06_2018___12.15.43.036722 -INFO:root:click move vector: [21 7] ..........................27_06_2018___12.15.43.124696 -INFO:root:sending command to stage:GR,21,7 ...................27_06_2018___12.15.43.125225 -INFO:root:response received from stage:R .....................27_06_2018___12.15.43.192274 -INFO:root:click move vector: [21 7] ..........................27_06_2018___12.15.43.322553 -INFO:root:sending command to stage:GR,21,7 ...................27_06_2018___12.15.43.323249 -INFO:root:response received from stage:R .....................27_06_2018___12.15.43.388127 -INFO:root:click move vector: [18 10] .........................27_06_2018___12.15.43.872039 -INFO:root:sending command to stage:GR,18,10 ..................27_06_2018___12.15.43.872570 -INFO:root:response received from stage:R .....................27_06_2018___12.15.43.936957 -INFO:root:click move vector: [18 10] .........................27_06_2018___12.15.44.124491 -INFO:root:sending command to stage:GR,18,10 ..................27_06_2018___12.15.44.124999 -INFO:root:response received from stage:R .....................27_06_2018___12.15.44.189190 -INFO:root:click move vector: [18 10] .........................27_06_2018___12.15.44.356327 -INFO:root:sending command to stage:GR,18,10 ..................27_06_2018___12.15.44.356327 -INFO:root:response received from stage:R .....................27_06_2018___12.15.44.422413 -INFO:root:click move vector: [18 10] .........................27_06_2018___12.15.44.521918 -INFO:root:sending command to stage:GR,18,10 ..................27_06_2018___12.15.44.522607 -INFO:root:response received from stage:R .....................27_06_2018___12.15.44.597884 -INFO:root:click move vector: [18 10] .........................27_06_2018___12.15.44.754065 -INFO:root:sending command to stage:GR,18,10 ..................27_06_2018___12.15.44.754558 -INFO:root:response received from stage:R .....................27_06_2018___12.15.44.819108 -INFO:root:click move vector: [18 10] .........................27_06_2018___12.15.45.036426 -INFO:root:sending command to stage:GR,18,10 ..................27_06_2018___12.15.45.036426 -INFO:root:response received from stage:R .....................27_06_2018___12.15.45.106284 -INFO:root:click move vector: [18 10] .........................27_06_2018___12.15.45.278347 -INFO:root:sending command to stage:GR,18,10 ..................27_06_2018___12.15.45.278842 -INFO:root:response received from stage:R .....................27_06_2018___12.15.45.342742 -INFO:root:click move vector: [32 9] ..........................27_06_2018___12.15.45.621527 -INFO:root:sending command to stage:GR,32,9 ...................27_06_2018___12.15.45.621883 -INFO:root:response received from stage:R .....................27_06_2018___12.15.45.698881 -INFO:root:click move vector: [-13 15] ........................27_06_2018___12.15.46.326169 -INFO:root:sending command to stage:GR,-13,15 .................27_06_2018___12.15.46.326836 -INFO:root:response received from stage:R .....................27_06_2018___12.15.46.389244 -INFO:root:click move vector: [-13 15] ........................27_06_2018___12.15.46.685520 -INFO:root:sending command to stage:GR,-13,15 .................27_06_2018___12.15.46.686133 -INFO:root:response received from stage:R .....................27_06_2018___12.15.46.747979 -INFO:root:click move vector: [ 17 -16] .......................27_06_2018___12.15.55.077651 -INFO:root:sending command to stage:GR,17,-16 .................27_06_2018___12.15.55.078375 -INFO:root:response received from stage:R .....................27_06_2018___12.15.55.144214 -INFO:root:click move vector: [ 19 -11] .......................27_06_2018___12.15.55.552071 -INFO:root:sending command to stage:GR,19,-11 .................27_06_2018___12.15.55.553066 -INFO:root:response received from stage:R .....................27_06_2018___12.15.55.619435 -INFO:root:click move vector: [ 19 -11] .......................27_06_2018___12.15.55.776498 -INFO:root:sending command to stage:GR,19,-11 .................27_06_2018___12.15.55.777049 -INFO:root:response received from stage:R .....................27_06_2018___12.15.55.844548 -INFO:root:click move vector: [ 15 -18] .......................27_06_2018___12.15.56.193778 -INFO:root:sending command to stage:GR,15,-18 .................27_06_2018___12.15.56.194110 -INFO:root:response received from stage:R .....................27_06_2018___12.15.56.258650 -INFO:root:click move vector: [21 -1] .........................27_06_2018___12.15.56.688280 -INFO:root:sending command to stage:GR,21,-1 ..................27_06_2018___12.15.56.688280 -INFO:root:response received from stage:R .....................27_06_2018___12.15.56.754034 -INFO:root:click move vector: [21 -1] .........................27_06_2018___12.15.56.959935 -INFO:root:sending command to stage:GR,21,-1 ..................27_06_2018___12.15.56.960232 -INFO:root:response received from stage:R .....................27_06_2018___12.15.57.026133 -INFO:root:click move vector: [21 -1] .........................27_06_2018___12.15.57.192760 -INFO:root:sending command to stage:GR,21,-1 ..................27_06_2018___12.15.57.193525 -INFO:root:response received from stage:R .....................27_06_2018___12.15.57.263991 -INFO:root:click move vector: [ 5 13] .........................27_06_2018___12.15.57.589754 -INFO:root:sending command to stage:GR,5,13 ...................27_06_2018___12.15.57.590251 -INFO:root:response received from stage:R .....................27_06_2018___12.15.57.647522 -INFO:root:click move vector: [ 5 13] .........................27_06_2018___12.15.57.958899 -INFO:root:sending command to stage:GR,5,13 ...................27_06_2018___12.15.57.959440 -INFO:root:response received from stage:R .....................27_06_2018___12.15.58.026696 -INFO:root:click move vector: [ 5 13] .........................27_06_2018___12.15.58.143731 -INFO:root:sending command to stage:GR,5,13 ...................27_06_2018___12.15.58.143731 -INFO:root:response received from stage:R .....................27_06_2018___12.15.58.200430 -INFO:root:click move vector: [ 5 13] .........................27_06_2018___12.15.58.337437 -INFO:root:sending command to stage:GR,5,13 ...................27_06_2018___12.15.58.337437 -INFO:root:response received from stage:R .....................27_06_2018___12.15.58.394084 -INFO:root:click move vector: [ 5 13] .........................27_06_2018___12.15.58.512228 -INFO:root:sending command to stage:GR,5,13 ...................27_06_2018___12.15.58.512681 -INFO:root:response received from stage:R .....................27_06_2018___12.15.58.569777 -INFO:root:click move vector: [ 5 13] .........................27_06_2018___12.15.58.712363 -INFO:root:sending command to stage:GR,5,13 ...................27_06_2018___12.15.58.712363 -INFO:root:response received from stage:R .....................27_06_2018___12.15.58.769342 -INFO:root:click move vector: [ 5 13] .........................27_06_2018___12.15.58.910287 -INFO:root:sending command to stage:GR,5,13 ...................27_06_2018___12.15.58.910287 -INFO:root:response received from stage:R .....................27_06_2018___12.15.58.966805 -INFO:root:click move vector: [ 5 13] .........................27_06_2018___12.15.59.142933 -INFO:root:sending command to stage:GR,5,13 ...................27_06_2018___12.15.59.143593 -INFO:root:response received from stage:R .....................27_06_2018___12.15.59.199125 -INFO:root:click move vector: [ 5 13] .........................27_06_2018___12.15.59.452295 -INFO:root:sending command to stage:GR,5,13 ...................27_06_2018___12.15.59.452792 -INFO:root:response received from stage:R .....................27_06_2018___12.15.59.510495 -INFO:root:click move vector: [ 5 13] .........................27_06_2018___12.15.59.667153 -INFO:root:sending command to stage:GR,5,13 ...................27_06_2018___12.15.59.667685 -INFO:root:response received from stage:R .....................27_06_2018___12.15.59.725477 -INFO:root:click move vector: [ 5 13] .........................27_06_2018___12.15.59.792279 -INFO:root:sending command to stage:GR,5,13 ...................27_06_2018___12.15.59.792772 -INFO:root:response received from stage:R .....................27_06_2018___12.15.59.849450 -INFO:root:click move vector: [ 5 13] .........................27_06_2018___12.15.59.948248 -INFO:root:sending command to stage:GR,5,13 ...................27_06_2018___12.15.59.948752 -INFO:root:response received from stage:R .....................27_06_2018___12.16.00.005324 -INFO:root:click move vector: [ 5 13] .........................27_06_2018___12.16.00.122577 -INFO:root:sending command to stage:GR,5,13 ...................27_06_2018___12.16.00.123067 -INFO:root:response received from stage:R .....................27_06_2018___12.16.00.178990 -INFO:root:click move vector: [-7 14] .........................27_06_2018___12.16.00.540382 -INFO:root:sending command to stage:GR,-7,14 ..................27_06_2018___12.16.00.540382 -INFO:root:response received from stage:R .....................27_06_2018___12.16.00.600809 -INFO:root:click move vector: [-7 14] .........................27_06_2018___12.16.00.849541 -INFO:root:sending command to stage:GR,-7,14 ..................27_06_2018___12.16.00.850070 -INFO:root:response received from stage:R .....................27_06_2018___12.16.00.919941 -INFO:root:click move vector: [-7 14] .........................27_06_2018___12.16.01.034024 -INFO:root:sending command to stage:GR,-7,14 ..................27_06_2018___12.16.01.034555 -INFO:root:response received from stage:R .....................27_06_2018___12.16.01.093421 -INFO:root:click move vector: [-7 14] .........................27_06_2018___12.16.01.219168 -INFO:root:sending command to stage:GR,-7,14 ..................27_06_2018___12.16.01.219663 -INFO:root:response received from stage:R .....................27_06_2018___12.16.01.278478 -INFO:root:click move vector: [-7 14] .........................27_06_2018___12.16.01.411715 -INFO:root:sending command to stage:GR,-7,14 ..................27_06_2018___12.16.01.412214 -INFO:root:response received from stage:R .....................27_06_2018___12.16.01.472783 -INFO:root:click move vector: [-7 14] .........................27_06_2018___12.16.01.635148 -INFO:root:sending command to stage:GR,-7,14 ..................27_06_2018___12.16.01.635680 -INFO:root:response received from stage:R .....................27_06_2018___12.16.01.695452 -INFO:root:click move vector: [-7 14] .........................27_06_2018___12.16.01.878687 -INFO:root:sending command to stage:GR,-7,14 ..................27_06_2018___12.16.01.878982 -INFO:root:response received from stage:R .....................27_06_2018___12.16.01.938792 -INFO:root:click move vector: [10 10] .........................27_06_2018___12.16.03.149143 -INFO:root:sending command to stage:GR,10,10 ..................27_06_2018___12.16.03.149676 -INFO:root:response received from stage:R .....................27_06_2018___12.16.03.208786 -INFO:root:click move vector: [10 10] .........................27_06_2018___12.16.03.352786 -INFO:root:sending command to stage:GR,10,10 ..................27_06_2018___12.16.03.353311 -INFO:root:response received from stage:R .....................27_06_2018___12.16.03.408225 -INFO:root:click move vector: [13 10] .........................27_06_2018___12.16.03.672812 -INFO:root:sending command to stage:GR,13,10 ..................27_06_2018___12.16.03.673810 -INFO:root:response received from stage:R .....................27_06_2018___12.16.03.732439 -INFO:root:click move vector: [13 10] .........................27_06_2018___12.16.03.924931 -INFO:root:sending command to stage:GR,13,10 ..................27_06_2018___12.16.03.925462 -INFO:root:response received from stage:R .....................27_06_2018___12.16.03.985029 -INFO:root:click move vector: [19 12] .........................27_06_2018___12.16.06.267689 -INFO:root:sending command to stage:GR,19,12 ..................27_06_2018___12.16.06.268189 -INFO:root:response received from stage:R .....................27_06_2018___12.16.06.335217 -INFO:root:click move vector: [19 12] .........................27_06_2018___12.16.06.621852 -INFO:root:sending command to stage:GR,19,12 ..................27_06_2018___12.16.06.622388 -INFO:root:response received from stage:R .....................27_06_2018___12.16.06.695529 -INFO:root:click move vector: [-10 13] ........................27_06_2018___12.16.07.805148 -INFO:root:sending command to stage:GR,-10,13 .................27_06_2018___12.16.07.805644 -INFO:root:response received from stage:R .....................27_06_2018___12.16.07.864367 -INFO:root:taking target picture ..............................27_06_2018___12.16.46.077286 -INFO:root:sending command to stage:GR,4400,0 .................27_06_2018___12.17.19.503316 -INFO:root:response received from stage:R .....................27_06_2018___12.17.20.096747 -INFO:root:sending command to stage:GR,-4400,0 ................27_06_2018___12.17.21.463224 -INFO:root:response received from stage:R .....................27_06_2018___12.17.22.057779 -INFO:root:sending command to stage:GR,4400,0 .................27_06_2018___12.17.22.694540 -INFO:root:response received from stage:R .....................27_06_2018___12.17.23.289180 -INFO:root:click move vector: [33 -1] .........................27_06_2018___12.17.33.432366 -INFO:root:sending command to stage:GR,33,-1 ..................27_06_2018___12.17.33.432986 -INFO:root:response received from stage:R .....................27_06_2018___12.17.33.509512 -INFO:root:click move vector: [33 -1] .........................27_06_2018___12.17.34.004869 -INFO:root:sending command to stage:GR,33,-1 ..................27_06_2018___12.17.34.005375 -INFO:root:response received from stage:R .....................27_06_2018___12.17.34.082207 -INFO:root:sending command to stage:GR,-4400,0 ................27_06_2018___12.17.44.688376 -INFO:root:response received from stage:R .....................27_06_2018___12.17.45.284596 -INFO:root:click move vector: [ -4 -27] .......................27_06_2018___12.17.47.607100 -INFO:root:sending command to stage:GR,-4,-27 .................27_06_2018___12.17.47.607100 -INFO:root:response received from stage:R .....................27_06_2018___12.17.47.696062 -INFO:root:click move vector: [-16 0] .........................27_06_2018___12.17.48.101767 -INFO:root:sending command to stage:GR,-16,0 ..................27_06_2018___12.17.48.102230 -INFO:root:response received from stage:R .....................27_06_2018___12.17.48.162147 -INFO:root:click move vector: [-18 1] .........................27_06_2018___12.17.48.480650 -INFO:root:sending command to stage:GR,-18,1 ..................27_06_2018___12.17.48.481146 -INFO:root:response received from stage:R .....................27_06_2018___12.17.48.544964 -INFO:root:click move vector: [-5 4] ..........................27_06_2018___12.17.48.985200 -INFO:root:sending command to stage:GR,-5,4 ...................27_06_2018___12.17.48.985692 -INFO:root:response received from stage:R .....................27_06_2018___12.17.49.035709 -INFO:root:click move vector: [ 0 11] .........................27_06_2018___12.17.49.266307 -INFO:root:sending command to stage:GR,0,11 ...................27_06_2018___12.17.49.266770 -INFO:root:response received from stage:R .....................27_06_2018___12.17.49.319538 -INFO:root:click move vector: [ 0 11] .........................27_06_2018___12.17.49.546216 -INFO:root:sending command to stage:GR,0,11 ...................27_06_2018___12.17.49.546754 -INFO:root:response received from stage:R .....................27_06_2018___12.17.49.599577 -INFO:root:click move vector: [23 12] .........................27_06_2018___12.18.10.389330 -INFO:root:sending command to stage:GR,23,12 ..................27_06_2018___12.18.10.389827 -INFO:root:response received from stage:R .....................27_06_2018___12.18.10.458793 -INFO:root:click move vector: [28 15] .........................27_06_2018___12.18.10.802497 -INFO:root:sending command to stage:GR,28,15 ..................27_06_2018___12.18.10.802994 -INFO:root:response received from stage:R .....................27_06_2018___12.18.10.879377 -INFO:root:click move vector: [-20 0] .........................27_06_2018___12.18.12.310623 -INFO:root:sending command to stage:GR,-20,0 ..................27_06_2018___12.18.12.311118 -INFO:root:response received from stage:R .....................27_06_2018___12.18.12.375889 -INFO:root:sending command to stage:GR,-5,0 ...................27_06_2018___12.18.14.014688 -INFO:root:response received from stage:R .....................27_06_2018___12.18.14.059306 -INFO:root:sending command to stage:GR,-5,0 ...................27_06_2018___12.18.14.178246 -INFO:root:response received from stage:R .....................27_06_2018___12.18.14.222777 -INFO:root:sending command to stage:GR,-5,0 ...................27_06_2018___12.18.14.550432 -INFO:root:response received from stage:R .....................27_06_2018___12.18.14.593492 -INFO:root:sending command to stage:GR,-5,0 ...................27_06_2018___12.18.14.738313 -INFO:root:response received from stage:R .....................27_06_2018___12.18.14.793171 -INFO:root:sending command to stage:GR,-5,0 ...................27_06_2018___12.18.14.966127 -INFO:root:response received from stage:R .....................27_06_2018___12.18.15.008759 -INFO:root:sending command to stage:GR,-5,0 ...................27_06_2018___12.18.15.107169 -INFO:root:response received from stage:R .....................27_06_2018___12.18.15.151402 -INFO:root:sending command to stage:GR,-5,0 ...................27_06_2018___12.18.15.267470 -INFO:root:response received from stage:R .....................27_06_2018___12.18.15.315016 -INFO:root:sending command to stage:GR,-5,0 ...................27_06_2018___12.18.15.417078 -INFO:root:response received from stage:R .....................27_06_2018___12.18.15.469107 -INFO:root:sending command to stage:GR,-5,0 ...................27_06_2018___12.18.15.582690 -INFO:root:response received from stage:R .....................27_06_2018___12.18.15.627123 -INFO:root:sending command to stage:GR,-5,0 ...................27_06_2018___12.18.15.760857 -INFO:root:response received from stage:R .....................27_06_2018___12.18.15.808706 -INFO:root:sending command to stage:GR,-5,0 ...................27_06_2018___12.18.16.100153 -INFO:root:response received from stage:R .....................27_06_2018___12.18.16.143136 -INFO:root:sending command to stage:GR,-5,0 ...................27_06_2018___12.18.16.292211 -INFO:root:response received from stage:R .....................27_06_2018___12.18.16.335468 -INFO:root:sending command to stage:GR,-5,0 ...................27_06_2018___12.18.16.466358 -INFO:root:response received from stage:R .....................27_06_2018___12.18.16.509124 -INFO:root:step size changed to: 10.0 .........................27_06_2018___12.18.18.414401 -INFO:root:step size changed to: 15.0 .........................27_06_2018___12.18.18.714054 -INFO:root:sending command to stage:GR,-15.0,0 ................27_06_2018___12.18.23.253414 -INFO:root:response received from stage:R .....................27_06_2018___12.18.23.314605 -INFO:root:sending command to stage:GR,-15.0,0 ................27_06_2018___12.18.23.804114 -INFO:root:response received from stage:R .....................27_06_2018___12.18.23.864373 -INFO:root:sending command to stage:GR,-15.0,0 ................27_06_2018___12.18.23.974638 -INFO:root:response received from stage:R .....................27_06_2018___12.18.24.035373 -INFO:root:sending command to stage:GR,-15.0,0 ................27_06_2018___12.18.24.216500 -INFO:root:response received from stage:R .....................27_06_2018___12.18.24.293291 -INFO:root:step size changed to: 20.0 .........................27_06_2018___12.18.27.717896 -INFO:root:step size changed to: 25.0 .........................27_06_2018___12.18.27.997369 -INFO:root:step size changed to: 30.0 .........................27_06_2018___12.18.28.217978 -INFO:root:step size changed to: 35.0 .........................27_06_2018___12.18.28.443461 -INFO:root:step size changed to: 40.0 .........................27_06_2018___12.18.28.617939 -INFO:root:sending command to stage:GR,-40.0,0 ................27_06_2018___12.18.30.153711 -INFO:root:response received from stage:R .....................27_06_2018___12.18.30.235136 -INFO:root:sending command to stage:GR,-40.0,0 ................27_06_2018___12.18.30.743718 -INFO:root:response received from stage:R .....................27_06_2018___12.18.30.824684 -INFO:root:sending command to stage:GR,-40.0,0 ................27_06_2018___12.18.31.034365 -INFO:root:response received from stage:R .....................27_06_2018___12.18.31.115888 -INFO:root:sending command to stage:GR,-40.0,0 ................27_06_2018___12.18.31.205633 -INFO:root:response received from stage:R .....................27_06_2018___12.18.31.287715 -INFO:root:sending command to stage:GR,-40.0,0 ................27_06_2018___12.18.31.829922 -INFO:root:response received from stage:R .....................27_06_2018___12.18.31.910745 -INFO:root:sending command to stage:GR,-40.0,0 ................27_06_2018___12.18.32.049278 -INFO:root:response received from stage:R .....................27_06_2018___12.18.32.142724 -INFO:root:sending command to stage:GR,-40.0,0 ................27_06_2018___12.18.32.333993 -INFO:root:response received from stage:R .....................27_06_2018___12.18.32.414427 -INFO:root:sending command to stage:GR,-40.0,0 ................27_06_2018___12.18.32.647532 -INFO:root:response received from stage:R .....................27_06_2018___12.18.32.734280 -INFO:root:sending command to stage:GR,-40.0,0 ................27_06_2018___12.18.32.928156 -INFO:root:response received from stage:R .....................27_06_2018___12.18.33.009448 -INFO:root:sending command to stage:GR,-40.0,0 ................27_06_2018___12.18.33.219727 -INFO:root:response received from stage:R .....................27_06_2018___12.18.33.301414 -INFO:root:sending command to stage:GR,-40.0,0 ................27_06_2018___12.18.33.533717 -INFO:root:response received from stage:R .....................27_06_2018___12.18.33.615462 -INFO:root:sending command to stage:GR,-40.0,0 ................27_06_2018___12.18.33.680296 -INFO:root:response received from stage:R .....................27_06_2018___12.18.33.760871 -INFO:root:sending command to stage:GR,-40.0,0 ................27_06_2018___12.18.33.951034 -INFO:root:response received from stage:R .....................27_06_2018___12.18.34.033333 -INFO:root:sending command to stage:GR,-40.0,0 ................27_06_2018___12.18.34.349566 -INFO:root:response received from stage:R .....................27_06_2018___12.18.34.431256 -INFO:root:sending command to stage:GR,40.0,0 .................27_06_2018___12.18.34.843500 -INFO:root:response received from stage:R .....................27_06_2018___12.18.34.924883 -INFO:root:sending command to stage:GR,40.0,0 .................27_06_2018___12.18.35.058936 -INFO:root:response received from stage:R .....................27_06_2018___12.18.35.138460 -INFO:root:sending command to stage:GR,40.0,0 .................27_06_2018___12.18.35.235628 -INFO:root:response received from stage:R .....................27_06_2018___12.18.35.316732 -INFO:root:sending command to stage:GR,40.0,0 .................27_06_2018___12.18.35.423001 -INFO:root:response received from stage:R .....................27_06_2018___12.18.35.502422 -INFO:root:sending command to stage:GR,40.0,0 .................27_06_2018___12.18.35.624780 -INFO:root:response received from stage:R .....................27_06_2018___12.18.35.705269 -INFO:root:sending command to stage:GR,40.0,0 .................27_06_2018___12.18.35.791167 -INFO:root:response received from stage:R .....................27_06_2018___12.18.35.873447 -INFO:root:sending command to stage:GR,40.0,0 .................27_06_2018___12.18.36.049573 -INFO:root:response received from stage:R .....................27_06_2018___12.18.36.134388 -INFO:root:sending command to stage:GR,40.0,0 .................27_06_2018___12.18.36.215286 -INFO:root:response received from stage:R .....................27_06_2018___12.18.36.299906 -INFO:root:sending command to stage:GR,40.0,0 .................27_06_2018___12.18.36.503534 -INFO:root:response received from stage:R .....................27_06_2018___12.18.36.584556 diff --git a/Experiments/experiment_27_06_2018___12.13.14.428842/target___27_06_2018___12.16.46.121489.tif b/Experiments/experiment_27_06_2018___12.13.14.428842/target___27_06_2018___12.16.46.121489.tif deleted file mode 100644 index c30b1cc2602ba1bc905b498fdbe0969f8a36c008..0000000000000000000000000000000000000000 Binary files a/Experiments/experiment_27_06_2018___12.13.14.428842/target___27_06_2018___12.16.46.121489.tif and /dev/null differ diff --git a/LCL.ui b/LCL.ui old mode 100755 new mode 100644 diff --git a/LCL_run.py b/LCL_run.py old mode 100755 new mode 100644 index 7285843ced0ee5681267f3485e88502f5226ab21..ab6c7fb1f7b87cac921026820f47b2f7ed6efc7a --- a/LCL_run.py +++ b/LCL_run.py @@ -129,7 +129,7 @@ class main_window(QMainWindow): self.vid = ShowVideo(self.ui.verticalLayoutWidget.size()) self.screen_shooter = screen_shooter() self.image_viewer = ImageViewer() - self.autofocuser = autofocuser() + # self.autofocuser = autofocuser() self.localizer = Localizer() # add the viewer to our ui @@ -140,9 +140,9 @@ class main_window(QMainWindow): self.screenshooter_thread.start() self.screen_shooter.moveToThread(self.screenshooter_thread) - self.autofocuser_thread = QThread() - self.autofocuser_thread.start() - self.autofocuser.moveToThread(self.autofocuser_thread) + # self.autofocuser_thread = QThread() + # self.autofocuser_thread.start() + # self.autofocuser.moveToThread(self.autofocuser_thread) self.localizer_thread = QThread() self.localizer_thread.start() @@ -155,13 +155,13 @@ class main_window(QMainWindow): # connect the outputs to our signals self.vid.VideoSignal.connect(self.image_viewer.setImage) self.vid.vid_process_signal.connect(self.screen_shooter.screenshot_slot) - self.vid.vid_process_signal.connect(self.autofocuser.vid_process_slot) + # self.vid.vid_process_signal.connect(self.autofocuser.vid_process_slot) self.vid.vid_process_signal.connect(self.localizer.vid_process_slot) self.qswitch_screenshot_signal.connect(self.screen_shooter.save_qswitch_fire_slot) self.localizer.qswitch_screenshot_signal.connect(self.screen_shooter.save_qswitch_fire_slot) - self.start_focus_signal.connect(self.autofocuser.autofocus) + # self.start_focus_signal.connect(self.autofocuser.autofocus) self.start_localization_signal.connect(self.localizer.localize) - self.autofocuser.position_and_variance_signal.connect(self.plot_variance_and_position) + # self.autofocuser.position_and_variance_signal.connect(self.plot_variance_and_position) self.image_viewer.click_move_signal.connect(stage.click_move_slot) self.localizer.localizer_move_signal.connect(stage.localizer_move_slot) self.localizer.ai_fire_qswitch_signal.connect(self.ai_fire_qswitch_slot) @@ -290,9 +290,9 @@ class main_window(QMainWindow): 16777249:laser.fire_auto, 70:self.qswitch_screenshot_slot, 81:laser.qswitch_auto, - 73:self.autofocuser.roll_forward, - 75:self.autofocuser.roll_backward, - 79:self.start_autofocus, + # 73:self.autofocuser.roll_forward, + # 75:self.autofocuser.roll_backward, + # 79:self.start_autofocus, # 71:self.toggle_dmf_or_lysis, 84:stage.move_left_one_well_slot, 89:stage.move_right_one_well_slot, @@ -307,8 +307,8 @@ class main_window(QMainWindow): # print('key released: {}'.format(event.key())) key_control_dict = { 16777249:laser.stop_flash, - 73:self.autofocuser.stop_roll, - 75:self.autofocuser.stop_roll + # 73:self.autofocuser.stop_roll, + # 75:self.autofocuser.stop_roll } if event.key() in key_control_dict.keys(): key_control_dict[event.key()]() diff --git a/LCL_ui.py b/LCL_ui.py old mode 100755 new mode 100644 diff --git a/LCL_ui.pyc b/LCL_ui.pyc old mode 100755 new mode 100644 diff --git a/__pycache__/LCL.cpython-36.pyc b/__pycache__/LCL.cpython-36.pyc old mode 100755 new mode 100644 diff --git a/__pycache__/LCL_ui.cpython-36.pyc b/__pycache__/LCL_ui.cpython-36.pyc old mode 100755 new mode 100644 diff --git a/__pycache__/autofocus.cpython-36.pyc b/__pycache__/autofocus.cpython-36.pyc old mode 100755 new mode 100644 diff --git a/__pycache__/image_movement_controller.cpython-36.pyc b/__pycache__/image_movement_controller.cpython-36.pyc old mode 100755 new mode 100644 diff --git a/__pycache__/image_window_ui.cpython-36.pyc b/__pycache__/image_window_ui.cpython-36.pyc old mode 100755 new mode 100644 diff --git a/__pycache__/laser_controller.cpython-36.pyc b/__pycache__/laser_controller.cpython-36.pyc old mode 100755 new mode 100644 diff --git a/__pycache__/localizer.cpython-36.pyc b/__pycache__/localizer.cpython-36.pyc old mode 100755 new mode 100644 index 14f3529b29e51701748e8410b3fa0ba409fae41d..fa3672df5dc27d1bab5033c9b02494603dfd2c5d Binary files a/__pycache__/localizer.cpython-36.pyc and b/__pycache__/localizer.cpython-36.pyc differ diff --git a/__pycache__/picture_handler.cpython-36.pyc b/__pycache__/picture_handler.cpython-36.pyc old mode 100755 new mode 100644 diff --git a/__pycache__/stage_controller.cpython-36.pyc b/__pycache__/stage_controller.cpython-36.pyc old mode 100755 new mode 100644 index 9d0f81fbe4d76e71c9a83aac39dd4da997b53d09..af5eaf805acca1759f4c85c90db71a0db87968da Binary files a/__pycache__/stage_controller.cpython-36.pyc and b/__pycache__/stage_controller.cpython-36.pyc differ diff --git a/__pycache__/test.cpython-36.pyc b/__pycache__/test.cpython-36.pyc old mode 100755 new mode 100644 diff --git a/__pycache__/utils.cpython-36.pyc b/__pycache__/utils.cpython-36.pyc old mode 100755 new mode 100644 diff --git a/__pycache__/zoom_gui_test.cpython-36.pyc b/__pycache__/zoom_gui_test.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0d57365be1d542870fa623b616e5e7df3f372966 Binary files /dev/null and b/__pycache__/zoom_gui_test.cpython-36.pyc differ diff --git a/autofocus.py b/autofocus.py old mode 100755 new mode 100644 diff --git a/autofocus.pyc b/autofocus.pyc old mode 100755 new mode 100644 diff --git a/denoising_test.py b/denoising_test.py old mode 100755 new mode 100644 diff --git a/directory_organizer.py b/directory_organizer.py old mode 100755 new mode 100644 diff --git a/image_annotator_adam_may29.py b/image_annotator_adam_may29.py old mode 100755 new mode 100644 diff --git a/image_processing.py b/image_processing.py old mode 100755 new mode 100644 diff --git a/laser_controller.py b/laser_controller.py old mode 100755 new mode 100644 diff --git a/laser_controller.pyc b/laser_controller.pyc old mode 100755 new mode 100644 diff --git a/localizer.py b/localizer.py old mode 100755 new mode 100644 index ac578097e6d8263119b71235b0b6e115ef3bc9ad..88916bfa29a3e2a190e3046c2ef47eaa9f9c3c9a --- a/localizer.py +++ b/localizer.py @@ -13,6 +13,7 @@ from sklearn.preprocessing import StandardScaler from utils import MeanIoU from keras import backend as K graph = tf.get_default_graph() +import skimage.transform as transform num_classes = 3 miou_metric = MeanIoU(num_classes) @@ -66,7 +67,8 @@ class Localizer(QtCore.QObject): def __init__(self, parent = None): super(Localizer, self).__init__(parent) - self.localizer_model = load_model(os.path.join(experiment_folder_location,'multiclass_localizer18_2.hdf5'),custom_objects={'mean_iou': mean_iou}) + # self.localizer_model = load_model(os.path.join(experiment_folder_location,'multiclass_localizer18_2.hdf5'),custom_objects={'mean_iou': mean_iou}) + self.localizer_model = load_model(os.path.join(experiment_folder_location,'model2018-10-18_08_47'),custom_objects={'mean_iou': mean_iou}) self.norm = StandardScaler() self.localizer_model._make_predict_function() self.position = np.zeros((1,2)) @@ -89,8 +91,10 @@ class Localizer(QtCore.QObject): def change_type_to_lyse(self,index): map_dict = { - 0:('red','multiclass_localizer18_2.hdf5'), - 1:('green','multiclass_localizer18_2.hdf5'), + # 0:('red','multiclass_localizer18_2.hdf5'), + # 1:('green','multiclass_localizer18_2.hdf5'), + 0:('red','model2018-10-18_08_47'), + 1:('green','model2018-10-18_08_47'), 2:('green hope','second_binary_green_hope_localizer_16_0.28892_1_54_7_12.hdf5') } self.cell_type_to_lyse = map_dict[index][0] @@ -123,7 +127,7 @@ class Localizer(QtCore.QObject): def get_network_output(self,img,mode): img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) - img = cv2.resize(img, (125, 125)) + img = transform.resize(img, (128, 128), anti_aliasing=False) img = self.norm.fit_transform(img) img = np.expand_dims(img,axis = 4) img = np.expand_dims(img,axis = 0) @@ -131,13 +135,14 @@ class Localizer(QtCore.QObject): segmented_image = self.localizer_model.predict(img,batch_size = 1) if mode == 'multi': # print(segmented_image.shape) - return_img = np.zeros((125,125,3)) + return_img = np.zeros((128,128,3)) #red cell - return_img[:,:,2] = segmented_image[0,:,:,1] + return_img[:,:,2] = segmented_image[0,:,:,2] #green cell - return_img[:,:,1] = segmented_image[0,:,:,2] + return_img[:,:,1] = segmented_image[0,:,:,1] elif mode == 'binary': return_img = segmented_image[0,:,:,0] + return_img = transform.resize(return_img, (125, 125), anti_aliasing=False) return return_img @QtCore.pyqtSlot('PyQt_PyObject') @@ -196,9 +201,9 @@ class Localizer(QtCore.QObject): self.auto_lysis = True self.well_center = self.get_stage_position() # now start moving and lysing all in view - # self.lyse_all_in_view() + self.lyse_all_in_view() box_size = 5 - stitcher = wellStitcher(box_size,self.image) + # stitcher = wellStitcher(box_size,self.image) directions = self.get_spiral_directions(box_size) self.get_well_center = False for num,let in directions: @@ -216,11 +221,11 @@ class Localizer(QtCore.QObject): QApplication.processEvents() self.delay() QApplication.processEvents() - stitcher.add_img(let,self.image) - # self.lyse_all_in_view() + # stitcher.add_img(let,self.image) + self.lyse_all_in_view() comment('lysis completed!') - stitcher.write_well_img() - # self.return_to_original_position(self.well_center) + # stitcher.write_well_img() + self.return_to_original_position(self.well_center) def get_spiral_directions(self,box_size): @@ -293,7 +298,7 @@ class Localizer(QtCore.QObject): def excision_lysis(self,cell_contours): # for each contour we want to trace it window_center = np.array([125./2,125./2]) - if len(cell_contours) >0: + if len(cell_contours) > 0: for i in range(len(cell_contours)): contour = cell_contours[i] point_number = contour.shape[0] @@ -339,6 +344,9 @@ class Localizer(QtCore.QObject): def direct_lysis(self,cell_centers): window_center = np.array([125./2,125./2]) + if len(cell_centers) < 2: return + cell_centers = cell_centers[1:] + print('centers:',cell_centers) old_center = cell_centers[0] self.move_to_target(old_center-window_center,True) @@ -392,9 +400,9 @@ class Localizer(QtCore.QObject): def threshold_based_on_type(self,segmented_image,cell_type): if cell_type == 'green': - _,confidence_image = cv2.threshold(segmented_image[:,:,1],.5,1,cv2.THRESH_BINARY) + _,confidence_image = cv2.threshold(segmented_image[:,:,1],.9,1,cv2.THRESH_BINARY) elif cell_type == 'red': - _,confidence_image = cv2.threshold(segmented_image[:,:,2],.5,1,cv2.THRESH_BINARY) + _,confidence_image = cv2.threshold(segmented_image[:,:,2],.9,1,cv2.THRESH_BINARY) elif cell_type == 'green hope': # assumes a binary image! # TODO: find the optimal location on the AUC curve for the threshold diff --git a/models/VGG_model_5.hdf5 b/models/VGG_model_5.hdf5 old mode 100755 new mode 100644 diff --git a/models/before_qswitch___06_07_2018___11.48.59.274395.tif b/models/before_qswitch___06_07_2018___11.48.59.274395.tif old mode 100755 new mode 100644 diff --git a/models/binary_green_hope_localizer3.hdf5 b/models/binary_green_hope_localizer3.hdf5 old mode 100755 new mode 100644 diff --git a/models/binary_green_hope_localizer_8_0.001_0.8280362384534469_0.13846914671645638_0.648396880101525_188_9_7.hdf5 b/models/binary_green_hope_localizer_8_0.001_0.8280362384534469_0.13846914671645638_0.648396880101525_188_9_7.hdf5 old mode 100755 new mode 100644 diff --git a/models/feature_extractor3.hdf5 b/models/feature_extractor3.hdf5 deleted file mode 100755 index 9981117d614074f1c0051ab7456828172a31568b..0000000000000000000000000000000000000000 Binary files a/models/feature_extractor3.hdf5 and /dev/null differ diff --git a/models/localizer_continue_learning.py b/models/localizer_continue_learning.py old mode 100755 new mode 100644 diff --git a/models/model2018-10-18_08_47 b/models/model2018-10-18_08_47 new file mode 100644 index 0000000000000000000000000000000000000000..1a780acb3aa6877b6ac0f1cc31cb0c36da77ee5d Binary files /dev/null and b/models/model2018-10-18_08_47 differ diff --git a/models/multiclass_localizer10.hdf5 b/models/multiclass_localizer10.hdf5 deleted file mode 100755 index 97ae6110dc1687ae8a72a11b1713594190530de5..0000000000000000000000000000000000000000 Binary files a/models/multiclass_localizer10.hdf5 and /dev/null differ diff --git a/models/multiclass_localizer11.hdf5 b/models/multiclass_localizer11.hdf5 deleted file mode 100755 index 29975c33cf81acffe6108d2469517d3199b2a6a5..0000000000000000000000000000000000000000 Binary files a/models/multiclass_localizer11.hdf5 and /dev/null differ diff --git a/models/multiclass_localizer14.hdf5 b/models/multiclass_localizer14.hdf5 deleted file mode 100755 index daead7974ddef0113168ba882d8ba99170e6d24a..0000000000000000000000000000000000000000 Binary files a/models/multiclass_localizer14.hdf5 and /dev/null differ diff --git a/models/multiclass_localizer16.hdf5 b/models/multiclass_localizer16.hdf5 deleted file mode 100755 index d0b3ff670a740d916be2f497b70611b63594e855..0000000000000000000000000000000000000000 Binary files a/models/multiclass_localizer16.hdf5 and /dev/null differ diff --git a/models/multiclass_localizer18_2.hdf5 b/models/multiclass_localizer18_2.hdf5 old mode 100755 new mode 100644 diff --git a/models/multiclass_localizer5.hdf5 b/models/multiclass_localizer5.hdf5 deleted file mode 100755 index cbc8f8cc99636883a5ed338abf9650bad6b8ca26..0000000000000000000000000000000000000000 Binary files a/models/multiclass_localizer5.hdf5 and /dev/null differ diff --git a/models/multiclass_localizer6.hdf5 b/models/multiclass_localizer6.hdf5 deleted file mode 100755 index da41c72fbfabbe70ae5eaf4b3d28a698775e4dcf..0000000000000000000000000000000000000000 Binary files a/models/multiclass_localizer6.hdf5 and /dev/null differ diff --git a/models/second_binary_green_hope_localizer_16_0.28892_1_54_7_12.hdf5 b/models/second_binary_green_hope_localizer_16_0.28892_1_54_7_12.hdf5 old mode 100755 new mode 100644 diff --git a/models/target___28_06_2018___15.16.37.613192.tif b/models/target___28_06_2018___15.16.37.613192.tif old mode 100755 new mode 100644 diff --git a/movie_writer.ipynb b/movie_writer.ipynb old mode 100755 new mode 100644 index a4413561a15c2901e7540da1fe46e598397aa1c0..b514dbcdfb0ea26e027df2d1123c11316a5f4b3a --- a/movie_writer.ipynb +++ b/movie_writer.ipynb @@ -23,8 +23,8 @@ }, "outputs": [], "source": [ - "in_dir = r'C:\\Users\\Wheeler\\Desktop\\LCL_software\\Experiments\\experiment_20_09_2018___10.08.42.888353'\n", - "out_loc = r'C:\\Users\\Wheeler\\Desktop\\LCL_software\\Experiments\\experiment_20_09_2018___10.08.42.avi'\n", + "in_dir = r'C:\\Users\\Wheeler\\Desktop\\LCL_software\\Experiments\\experiment_18_10_2018___10.05.26.666558'\n", + "out_loc = r'C:\\Users\\Wheeler\\Desktop\\LCL_software\\Experiments\\experiment_18_10_2018___10.05.26.avi'\n", "images = []\n", "clahe = cv2.createCLAHE(clipLimit=2.0, tileGridSize=(8,8))\n", "files = [os.path.join(in_dir, f) for f in os.listdir(in_dir) if '.tif' in f] \n", @@ -65,7 +65,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "09d2a745ee4b4b68bd1b8fe19bdc89be", + "model_id": "a5187b8d345241b6aa300e6ff9241493", "version_major": 2, "version_minor": 0 }, diff --git a/position_plotter.py b/position_plotter.py old mode 100755 new mode 100644 diff --git a/stage_control.py b/stage_control.py new file mode 100644 index 0000000000000000000000000000000000000000..bec381035208ef4131eb1e8b4f19384a8ba96135 --- /dev/null +++ b/stage_control.py @@ -0,0 +1,58 @@ +#just a test for stage_controller + +import serial +from PyQt5 import QtCore +from utils import comment + +class stage_control (QtCore.QObject): + + def __init__(self,parent = None): + super(stage_control, self).__init__(parent) + + com = 'COM9' + baud = 9600 + parity = serial.PARITY_NONE + self.ser = serial.Serial(com, baud, timeout=.25, + parity=parity) + self.step_size = 5 + self.send_receive('SAS 50') + self.send_receive('BLSH 0') + + self.magnification = 4 + self.microns_per_pixel = 100/34 + self.calibration_factor = 1.20*4 + + + def issue_command(self,command): + ''' + sends command and handles any errors from stage + ''' + command_string = '{}\r'.format(command) + #comment('sending command to stage:{}'.format(command_string)) + self.ser.write(command_string.encode('utf-8')) + + def get_response(self): + response = '' + while '\r' not in response: + piece = self.ser.read() + if piece != b'': + response += piece.decode('utf-8') + # comment('response received from stage:{}'.format(response)) + return response + + def send_receive(self,command): + self.issue_command(command) + response = self.get_response() + return response + + + def update_mov(self): + print("moving") + return self.send_receive('GR,-{},0'.format(100*self.step_size)) + + + + +if __name__ == '__main__': + stage = stage_control() + stage.update_mov() \ No newline at end of file diff --git a/stage_controller.py b/stage_controller.py old mode 100755 new mode 100644 index af50f3cd489b3fad455249635187b03a24143849..3cda048b8d92470635e6ff0c8deacb39c5ab9987 --- a/stage_controller.py +++ b/stage_controller.py @@ -70,12 +70,13 @@ class stage_controller(QtCore.QObject): comment('step size changed to: {}'.format(step_size)) self.step_size = step_size - def issue_command(self,command): + def issue_command(self,command, suppress_msg = False): ''' sends command and handles any errors from stage ''' command_string = '{}\r'.format(command) - comment('sending command to stage:{}'.format(command_string)) + if(not suppress_msg): + comment('sending command to stage:{}'.format(command_string)) self.ser.write(command_string.encode('utf-8')) def get_long_response(self): @@ -96,8 +97,8 @@ class stage_controller(QtCore.QObject): comment('response received from stage:{}'.format(response)) return response - def send_receive(self,command): - self.issue_command(command) + def send_receive(self,command, suppress_msg = False): + self.issue_command(command, suppress_msg) response = self.get_response() return response @@ -185,6 +186,17 @@ class stage_controller(QtCore.QObject): elif move_relative == True and scale_vector == False: self.move_relative(move_vector) + # zoom and recenter gui signals + @QtCore.pyqtSlot('PyQt_PyObject') + def zoom_and_move_slot(self, move_vector): + + if(move_vector[0] == 0 and move_vector[1] == 0): + return + + pixel_move_vector = np.array([move_vector[0], move_vector[1]]) + step_move_vector = self.scale_move_vector(pixel_move_vector) + self.move_relative(step_move_vector) + def go_to_dmf_location(self): self.lysing_loc = self.get_position_slot() diff --git a/stage_controller.pyc b/stage_controller.pyc old mode 100755 new mode 100644 diff --git a/test.py b/test.py old mode 100755 new mode 100644 diff --git a/utils.py b/utils.py old mode 100755 new mode 100644 diff --git a/utils.pyc b/utils.pyc old mode 100755 new mode 100644 diff --git a/zoom_gui_test.py b/zoom_gui_test.py old mode 100755 new mode 100644 index 17488a5e2cff63278f252e9a057153cd9486ff74..7d28335f1796aceb04710932e244a39b156ed0da --- a/zoom_gui_test.py +++ b/zoom_gui_test.py @@ -1,53 +1,172 @@ -import numpy +import numpy as np import cv2 +from PyQt5 import QtCore -img_loc = r'C:\Users\Wheeler\Desktop\LCL_software\well_images\well_image___20_09_2018___12.18.52.033870.tif' +img_loc = r'C:\Users\Wheeler\Desktop\LCL_software\LCL_zoom_test\well_image___27_09_2018___14.10.52.062012.tif' -class Stitcher(): - - def __init__(self): +class Stitcher(QtCore.QObject): + #inteface with main program + zoom_and_move_signal = QtCore.pyqtSignal('PyQt_PyObject') + + def __init__(self, parent=None): + super(Stitcher, self).__init__(parent) self.img = cv2.imread(img_loc) + # self.stage.change_magnification(2) # the values we will use to resize the image at the end to fit the screen self.user_view_x = int(1024*.78) self.user_view_y = int(822*.78) - # the center point of our image (will be updated when we move along the image) + # the center point of our image absolute to top left of screen self.x = int(self.img.shape[0]/2) self.y = int(self.img.shape[1]/2) + self.prev_x = int(self.img.shape[0]/2) + self.prev_y = int(self.img.shape[1]/2) - # the number of pixels the unaltered image has (will be updated with zoom) + # the number of pixels the image has (will be updated with zoom) self.px_x = int(self.img.shape[0]) self.px_y = int(self.img.shape[1]) - - + # dimensions of original file in pixels (will not change with zoom) + self.px_x_source = int(self.img.shape[0]) + self.px_y_source = int(self.img.shape[1]) self.img_resized = cv2.resize(self.img,(self.user_view_x,self.user_view_y),cv2.INTER_AREA) + cv2.imshow('Stitch',self.img_resized) cv2.createTrackbar('Zoom','Stitch',0,6,self.manage_zoom) - cv2.waitKey(0) - cv2.destroyAllWindows() + cv2.setMouseCallback('Stitch', self.recenter) + + # cv2.waitKey(0) + # cv2.destroyAllWindows() + def zoom(self,amt): - if amt != 0: - self.px_x = int(self.px_x/amt) - self.px_y = int(self.px_y/amt) - # now we need to update based on our location and the new unaltered img - # values - cropped_img = self.img[self.x:self.px_x,self.y:self.px_y] - img_resized = cv2.resize(cropped_img, + self.prev_x = self.x + self.prev_y = self.y + + self.px_x = int(self.px_x_source/(amt+1)) + self.px_y = int(self.px_y_source/(amt+1)) + + if(amt == 0): + self.x = int(self.px_x_source/2) + self.y = int(self.px_y_source/2) + # now we need to update based on our location and the new unaltered img + # values, centered still at center of image + cropped_x_start = self.x-self.px_x//2 + cropped_x_end = self.x+self.px_x//2 + cropped_y_start = self.y-self.px_y//2 + cropped_y_end = self.y+self.px_y//2 + + delta_x = 0 + delta_y = 0 + # make the window not leave the source image + # important for zooming out, not necessary if amt>previous amt + if(cropped_x_start <= 0): + delta_x = 0-cropped_x_start + elif(cropped_x_end >= self.px_x_source): + delta_x = self.px_x_source - cropped_x_end + if(cropped_y_start <= 0): + delta_y = 0-cropped_y_start + elif(cropped_y_end>= self.px_y_source): + delta_y = self.px_y_source - cropped_y_end + + cropped_x_start += delta_x + cropped_x_end += delta_x + self.x += delta_x + cropped_y_start += delta_y + cropped_y_end += delta_y + self.y += delta_y + + cropped_x = cropped_x_start, cropped_x_end + cropped_y = cropped_y_start, cropped_y_end + + cropped_img = self.img[cropped_x[0]:cropped_x[1],cropped_y[0]:cropped_y[1]] + + img_resized = cv2.resize(cropped_img, + (self.user_view_x,self.user_view_y), + cv2.INTER_AREA) + + self.move_stage_emit() # move the stage + self.draw_center_circle(img_resized) + cv2.imshow('Stitch',img_resized) + + #recenter based on the mouse click location + def recenter(self,event,x,y,flags,param): + if event == cv2.EVENT_LBUTTONUP: + self.prev_x = self.x + self.prev_y = self.y + + # find x and y coordinates in original picture + # might be a few pixels off + source_x = self.x-self.px_x//2+int((y/self.user_view_y)*self.px_x) + source_y = self.y-self.px_y//2+int((x/self.user_view_x)*self.px_y) + + cropped_x_start = source_x-self.px_x//2 + cropped_x_end = source_x+self.px_x//2 + cropped_y_start = source_y-self.px_y//2 + cropped_y_end = source_y+self.px_y//2 + + delta_x = 0 + delta_y = 0 + # make the window not leave the source image + if(cropped_x_start <= 0): + delta_x = 0-cropped_x_start + elif(cropped_x_end >= self.px_x_source): + delta_x = self.px_x_source - cropped_x_end + if(cropped_y_start <= 0): + delta_y = 0-cropped_y_start + elif(cropped_y_end>= self.px_y_source): + delta_y = self.px_y_source - cropped_y_end + + cropped_x_start += delta_x + cropped_x_end += delta_x + source_x += delta_x + cropped_y_start += delta_y + cropped_y_end += delta_y + source_y += delta_y + + cropped_x = cropped_x_start, cropped_x_end + cropped_y = cropped_y_start, cropped_y_end + + recentered_img = self.img[cropped_x[0]:cropped_x[1],cropped_y[0]:cropped_y[1]] + self.x = source_x + self.y = source_y + img_resized = cv2.resize(recentered_img, (self.user_view_x,self.user_view_y), - cv2.INTER_AREA) + cv2.INTER_AREA) + + #move and update the stage + self.move_stage_emit() + self.draw_center_circle(img_resized) cv2.imshow('Stitch',img_resized) + def manage_zoom(self,pos): - print('trackbar at',pos) + # print('trackbar at',pos) self.zoom(pos) -s = Stitcher() + #draw green circle at center of image + def draw_center_circle(self, image): + cv2.circle(image,(self.user_view_x//2, self.user_view_y//2), 5, (0,255,0), -1) + + @QtCore.pyqtSlot('PyQt_PyObject') + def move_stage_emit(self): + relative_move = [self.x-self.prev_x, self.y-self.prev_y] + self.zoom_and_move_signal.emit(relative_move) + + # def move_stage(self): + # #Find relative pixels to move stage by + # relative_x = self.x-self.prev_x + # relative_y = self.y-self.prev_y + # if(relative_x == 0 and relative_y == 0): + # return + # pixel_move_vector = np.array([relative_y, relative_x]) + # step_move_vector = self.stage.scale_move_vector(pixel_move_vector) + # # print(step_move_vector) + # self.stage.move_relative(step_move_vector)