August 18th, 2015
Sample is nanospheres (fluorosphere) 100 nm diameter, 8 different NAs and 42 phases per each of three orientations, 3 repetitions.
In [1]:
%load_ext autoreload
%autoreload 1
#get our environment ready for data analysis times
%pylab inline
#import some os functionality so that we can be platform independent
import os
import copy
#import our ability to read MRC files
from pysegtools.mrc import MRC
#import skimage components
from skimage.external import tifffile as tif #note that this can be achieved by using the skimage.io with
#the tifffile plugin.
#better filtering than skimage
from scipy import ndimage
from scipy.optimize import curve_fit
#import pandas
import pandas as pd
from scipy.ndimage import measurements
from scipy.ndimage.filters import median_filter
import matplotlib.gridspec as gridspec #fancy subplot layout
from matplotlib.path import Path #Needed to create shapes
import matplotlib.patches as patches #needed so show shapes on top of graphs
%aimport peaks.gauss2d
Gauss2D = peaks.gauss2d.Gauss2D
%aimport peaks.utils
detrend_data = peaks.utils.detrend
%aimport peaks.peakfinder
PeakFinder = peaks.peakfinder.PeakFinder
%aimport dphplotting.mip
mip = dphplotting.mip.mip
%aimport peaks.stackanalysis
SIMStackAnalyzer = peaks.stackanalysis.SIMStackAnalyzer
%aimport peaks.lpsvd
LPSVD = peaks.lpsvd.LPSVD
reconstruct_signal = peaks.lpsvd.reconstruct_signal
Populating the interactive namespace from numpy and matplotlib
In [2]:
SIM = tif.imread('testSIM.tif')
In [3]:
mip(SIM)
Out[3]:
(<matplotlib.figure.Figure at 0xabb07b8>,
array([<matplotlib.axes._subplots.AxesSubplot object at 0x000000000ABC5198>,
<matplotlib.axes._subplots.AxesSubplot object at 0x000000000FB0D630>,
<matplotlib.axes._subplots.AxesSubplot object at 0x000000000AB92AC8>], dtype=object))
In [9]:
mySIM = SIMStackAnalyzer(SIM.astype(float),3,42)
In [10]:
mySIM.peakfinder.prune_blobs(20)
Out[10]:
array([[ 3.14000000e+02, 4.88000000e+02, 2.00000000e+00,
1.48000000e+02],
[ 6.60000000e+01, 7.10000000e+01, 2.00000000e+00,
1.49000000e+02],
[ 1.15000000e+02, 2.48000000e+02, 1.00000000e+00,
1.69000000e+02],
[ 4.49000000e+02, 1.63000000e+02, 2.00000000e+00,
2.20300000e+03],
[ 1.02000000e+02, 2.30000000e+02, 2.00000000e+00,
4.38900000e+03],
[ 2.20000000e+02, 4.84000000e+02, 2.00000000e+00,
4.50200000e+03],
[ 6.70000000e+01, 4.41000000e+02, 2.00000000e+00,
6.89900000e+03],
[ 2.94000000e+02, 1.96000000e+02, 2.00000000e+00,
8.19100000e+03],
[ 3.93000000e+02, 2.31000000e+02, 2.00000000e+00,
9.94600000e+03],
[ 1.02000000e+02, 3.70000000e+02, 2.00000000e+00,
1.22190000e+04],
[ 3.39000000e+02, 3.50000000e+01, 2.00000000e+00,
1.42140000e+04],
[ 2.45000000e+02, 1.26000000e+02, 2.00000000e+00,
1.55210000e+04],
[ 3.28000000e+02, 3.29000000e+02, 2.00000000e+00,
3.86750000e+04]])
In [11]:
mySIM.peakfinder.plot_blobs()
Out[11]:
(<matplotlib.figure.Figure at 0x10166dd8>,
<matplotlib.axes._subplots.AxesSubplot at 0x102f98d0>)
In [14]:
SIM.shape
Out[14]:
(126, 512, 512)
In [13]:
mySIM.fitPeaks(20,4)
multiprocessing engaged with 4 cores
Out[13]:
[ amp offset sigma_x sigma_y x0 \
orientation phase
0 0 7.318999 104.850460 0.745523 2.444960 488.084492
1 10.712624 104.379486 0.998833 2.040850 487.992461
2 17.254740 104.514120 0.859051 1.957957 488.133326
3 NaN NaN NaN NaN NaN
4 NaN NaN NaN NaN NaN
5 NaN NaN NaN NaN NaN
6 NaN NaN NaN NaN NaN
7 29.896382 105.491413 0.249626 0.536059 484.663505
8 11.731306 106.002572 0.139987 1.325269 488.000137
9 14.691388 105.266970 0.376864 1.588755 486.646447
10 43.394342 105.292056 0.250463 0.611598 487.549383
11 42.185487 105.576373 0.258943 0.504482 485.429062
12 21.631405 105.899038 1.260971 0.294053 488.342540
13 9.948823 105.404351 1.776167 0.587356 488.022018
14 44.872703 105.373698 0.995063 0.270508 494.916559
15 136.861476 106.060889 0.658930 0.231194 489.396552
16 131.946770 105.982412 0.296077 0.134374 478.478018
17 4.915126 106.124967 1.541592 1.386586 485.307190
18 4.339971 105.974186 0.089563 3.367346 487.994696
19 NaN NaN NaN NaN NaN
20 NaN NaN NaN NaN NaN
21 13.769027 105.643029 0.156557 2.673982 489.916296
22 NaN NaN NaN NaN NaN
23 8.127001 105.309295 1.438075 0.053708 490.618473
24 37.338323 106.047161 1.052665 0.249574 488.525324
25 26.350244 105.233671 0.258768 0.158091 487.688425
26 NaN NaN NaN NaN NaN
27 NaN NaN NaN NaN NaN
28 NaN NaN NaN NaN NaN
29 NaN NaN NaN NaN NaN
... ... ... ... ... ...
2 12 28.723282 104.617108 1.730235 0.224191 488.167654
13 11.781578 104.919438 2.523836 0.487746 486.319740
14 15.675662 104.634516 1.037373 1.597212 487.754108
15 18.857573 104.801977 1.358855 1.013691 487.562592
16 8.682694 105.021663 0.974242 3.780664 488.100966
17 12.398170 105.064330 2.578966 1.718761 487.604281
18 20.970802 104.904618 1.975961 1.371769 488.012551
19 22.172499 104.867466 1.428755 2.577613 488.407569
20 20.507892 104.842688 2.122668 2.028868 488.220328
21 13.645733 105.125220 1.859413 2.012953 488.263833
22 13.858457 104.873727 1.772885 2.296453 488.377974
23 17.589094 105.862530 1.678175 1.423390 487.715211
24 15.459113 104.557602 2.279314 1.354905 488.504241
25 8.738614 104.520188 2.034654 1.932820 488.565925
26 15.799693 105.145056 1.453875 0.852059 487.560996
27 17.090308 104.981075 0.871869 1.052842 488.696913
28 5.063764 104.620053 1.013690 1.239576 486.884589
29 NaN NaN NaN NaN NaN
30 54.563995 104.116630 1.440775 0.268185 483.664329
31 42.560918 105.299555 0.280567 0.465487 489.502586
32 6.518112 105.034202 2.216999 0.873604 488.065598
33 9.383576 104.470274 1.156950 0.995280 489.462057
34 21.956756 104.974506 0.529600 0.040296 490.848189
35 7.687300 104.914375 1.985282 0.628789 491.546505
36 9.175643 104.580149 1.411331 1.228276 488.801200
37 10.814547 104.825019 2.426029 1.789559 487.951002
38 14.748137 104.796624 1.986818 1.587922 488.404640
39 21.713676 104.884069 1.882064 1.894182 487.926941
40 24.000623 104.739027 1.815398 1.868002 487.818270
41 19.267089 105.069431 2.305065 1.523880 488.055029
y0
orientation phase
0 0 312.467642
1 315.132913
2 314.300944
3 NaN
4 NaN
5 NaN
6 NaN
7 310.838903
8 316.634784
9 311.494253
10 314.478534
11 311.028212
12 313.521845
13 311.197820
14 317.568603
15 314.505046
16 303.776751
17 311.618291
18 315.258861
19 NaN
20 NaN
21 316.113082
22 NaN
23 314.998320
24 312.624901
25 313.999620
26 NaN
27 NaN
28 NaN
29 NaN
... ...
2 12 312.690595
13 314.761481
14 312.971642
15 313.566833
16 313.570860
17 313.773364
18 313.715200
19 313.563858
20 313.895802
21 313.575761
22 313.296487
23 313.886282
24 313.572064
25 313.465324
26 313.914794
27 315.067542
28 315.806323
29 NaN
30 308.495507
31 309.714463
32 313.784091
33 315.352610
34 315.003034
35 310.849674
36 313.532683
37 313.593192
38 313.660785
39 313.661631
40 314.178439
41 313.857430
[126 rows x 6 columns],
amp offset sigma_x sigma_y x0 \
orientation phase
0 0 6.898294 103.870925 0.488453 2.027874 70.724744
1 28.661076 103.385824 0.230844 4.716319 72.427732
2 17.878631 103.287449 0.870664 1.758794 70.674660
3 8.827689 103.757111 4.060034 0.493829 72.151567
4 37.257729 104.264558 0.335961 0.327188 70.394897
5 7.145577 104.915379 0.592107 2.625072 70.861293
6 14.094896 104.675610 0.892174 0.414363 69.791566
7 34.227156 105.132541 0.273134 1.471494 69.563366
8 13.569058 104.818649 1.201346 1.108542 71.044481
9 6.678054 104.565243 2.033820 2.073035 70.910204
10 11.880850 104.720770 1.392131 2.017782 71.147808
11 11.786457 104.689806 1.524627 2.764916 70.800501
12 17.989615 104.991630 0.995446 1.496196 70.783817
13 7.395984 104.674434 2.143637 2.200895 70.482324
14 36.667626 105.604465 0.464948 0.637395 71.168471
15 15.359538 105.783294 0.670754 2.173788 72.603469
16 7.657729 105.732798 1.398677 2.569963 70.988093
17 9.999549 105.703766 1.194005 2.192747 69.838161
18 7.942317 104.949470 2.678402 0.530674 67.674776
19 4.424647 104.550745 2.596449 3.680247 71.217155
20 16.550292 104.499559 0.304616 2.506731 70.482868
21 NaN NaN NaN NaN NaN
22 35.961717 105.145725 0.114069 0.322688 72.000307
23 39.309876 104.666488 0.310646 1.024840 69.450620
24 12.617333 104.789609 0.820733 0.772864 76.849575
25 16.347537 104.733681 0.622941 0.042141 67.890278
26 26.010843 104.711575 0.179612 0.659508 71.103909
27 NaN NaN NaN NaN NaN
28 10.612434 104.569048 0.334505 2.028318 70.479921
29 13.883761 104.756702 0.281845 6.283880 66.545113
... ... ... ... ... ...
2 12 35.222204 105.037630 1.697337 1.993830 70.675323
13 32.815318 105.248490 1.582675 1.914067 70.777480
14 30.558985 104.633116 1.660370 1.768341 70.685631
15 25.913591 104.465347 1.295048 2.076565 70.741330
16 25.447615 105.095466 1.229498 1.708219 71.288818
17 14.742237 104.190475 1.717424 1.884629 71.063166
18 22.832349 104.507879 0.826682 2.022416 70.649164
19 13.984037 104.755084 1.097119 2.240410 71.089160
20 33.558409 104.103750 0.259903 0.501087 71.261094
21 NaN NaN NaN NaN NaN
22 NaN NaN NaN NaN NaN
23 NaN NaN NaN NaN NaN
24 22.154848 103.639784 0.089057 0.466034 71.015043
25 6.300996 103.658298 1.764109 1.284060 70.766392
26 14.456919 104.633786 1.582886 1.387416 69.889327
27 20.639650 104.793891 1.611835 1.877477 71.106085
28 30.946772 105.203784 1.177893 1.888305 70.723118
29 24.062571 104.395332 2.061659 1.975833 70.731683
30 33.152556 104.323413 1.419904 2.152523 70.445732
31 39.869175 105.061116 1.561939 1.959126 70.829952
32 36.591860 104.561708 1.593423 1.968932 70.817140
33 28.254647 104.905822 1.645937 2.093330 71.188696
34 34.388451 105.215465 1.391453 1.595923 70.888565
35 43.094788 105.181997 1.487758 1.758004 70.929739
36 27.023515 104.921616 1.786286 1.992599 70.709247
37 32.343230 105.105777 1.347015 1.471073 70.834269
38 11.681854 104.358075 1.997061 2.536676 70.677638
39 14.776207 104.263356 1.309034 1.609916 71.612635
40 6.383808 104.170828 2.711206 2.077554 72.281164
41 36.380896 104.517588 0.296191 0.159769 71.449841
y0
orientation phase
0 0 70.211338
1 68.210333
2 65.116112
3 70.217825
4 65.400270
5 64.349313
6 64.933040
7 71.764057
8 65.814018
9 67.272184
10 65.499138
11 65.979254
12 66.090063
13 67.221231
14 68.255960
15 65.074616
16 66.944625
17 66.228944
18 65.034663
19 66.971539
20 67.650306
21 NaN
22 72.519241
23 71.158125
24 74.399214
25 56.998453
26 64.331145
27 NaN
28 68.735475
29 71.493739
... ...
2 12 66.446493
13 66.722089
14 66.937639
15 66.453052
16 65.978631
17 66.588989
18 66.587342
19 66.277473
20 67.900747
21 NaN
22 NaN
23 NaN
24 68.901612
25 65.561067
26 66.020129
27 66.290691
28 66.767940
29 66.725086
30 66.938657
31 66.639378
32 65.949064
33 66.375774
34 66.312557
35 66.373582
36 66.646076
37 66.638389
38 66.439281
39 66.873882
40 65.473552
41 65.999883
[126 rows x 6 columns],
amp offset sigma_x sigma_y x0 \
orientation phase
0 0 441.097696 116.711767 1.998130 2.456377 163.068986
1 358.779204 113.540594 1.991874 2.368259 162.999197
2 337.237428 113.538796 2.027538 2.430963 162.902588
3 855.009463 129.461663 1.991985 2.420385 162.857593
4 1166.603400 138.335868 1.976794 2.407531 162.857953
5 1310.825299 144.198670 2.010394 2.417089 162.848300
6 1554.596017 151.143237 2.003261 2.391522 162.873305
7 1621.971479 155.298945 2.014205 2.401860 162.866710
8 1902.260843 163.574973 2.007330 2.411832 162.862600
9 2105.208112 168.257017 1.995781 2.403927 162.825502
10 1938.066354 163.114568 1.991081 2.357792 162.834826
11 2040.757580 167.144176 2.022450 2.408394 162.952750
12 2008.027801 167.127794 1.979180 2.374295 163.113256
13 1963.979692 165.183264 2.003726 2.452699 163.121370
14 1651.703267 154.037929 1.991362 2.408294 162.990603
15 1706.240865 156.309681 2.044522 2.399465 163.094626
16 1524.583195 150.694907 2.014679 2.414290 162.892950
17 1360.711913 146.250568 1.993718 2.444668 163.013400
18 1299.566070 143.645150 2.023957 2.372566 163.003977
19 939.173150 131.947018 2.010083 2.392539 162.911422
20 696.447810 125.944350 1.980475 2.462305 162.893551
21 671.782585 125.135065 1.993270 2.419540 163.065449
22 657.880798 125.184572 1.999429 2.389379 163.026874
23 751.412065 128.730100 1.959332 2.418443 163.057165
24 1012.148899 135.225252 2.023446 2.440554 162.966064
25 952.158647 133.125581 1.987458 2.476702 163.097935
26 1331.758537 145.381849 1.993406 2.437251 163.062962
27 1791.451842 159.390564 1.992519 2.389716 162.853314
28 1580.607628 152.996027 1.996106 2.389344 162.776043
29 1569.128967 153.213268 2.013388 2.421564 162.663486
... ... ... ... ... ...
2 12 815.554814 127.258262 1.957197 2.410409 162.937388
13 810.520677 126.818773 1.940834 2.368479 163.069370
14 725.649978 125.136400 1.989831 2.409189 163.162990
15 679.826198 123.923654 1.999216 2.465637 163.081623
16 794.125659 127.927221 1.961728 2.412045 162.993113
17 741.622549 125.974840 1.995997 2.398996 162.957552
18 768.898251 126.042070 1.951782 2.405569 163.090569
19 685.560210 123.997616 2.000046 2.384679 163.134065
20 487.035044 117.546216 1.971717 2.355400 163.071831
21 403.641711 115.216885 2.056255 2.458469 163.219077
22 408.397104 114.506305 1.950538 2.437078 163.189117
23 337.984614 113.973360 2.003855 2.407036 163.164565
24 332.973085 113.566689 2.002883 2.435083 163.291066
25 317.856938 113.235468 2.000541 2.447874 163.195191
26 345.823588 112.847541 1.986370 2.350991 163.030819
27 435.658930 115.391790 1.977395 2.374306 162.966625
28 563.729559 118.347571 1.983193 2.399672 162.879605
29 590.735873 120.593562 1.920270 2.342478 163.045915
30 555.539670 118.653289 1.930393 2.323188 163.127924
31 711.041533 124.277348 1.922348 2.378069 163.064281
32 658.805915 123.526711 1.994152 2.361324 162.948044
33 666.514174 121.356910 2.011623 2.411810 163.175481
34 741.950494 124.645212 1.969325 2.381917 163.169168
35 745.870826 125.699071 1.969464 2.347596 163.108028
36 699.645437 123.384091 1.995434 2.410997 163.166163
37 732.597686 123.944406 1.996817 2.382421 163.067237
38 707.776142 124.240887 1.989270 2.397278 163.322963
39 589.051083 121.836870 2.003788 2.345348 163.154061
40 653.449459 122.632082 1.987633 2.358088 162.959464
41 475.405734 118.143289 1.966801 2.449118 163.053468
y0
orientation phase
0 0 448.818927
1 448.843380
2 448.808410
3 448.779952
4 448.790863
5 448.784534
6 448.765292
7 448.867177
8 448.757783
9 448.835111
10 448.919112
11 448.739134
12 448.753123
13 448.827370
14 448.737302
15 448.768667
16 448.721489
17 448.780550
18 448.897311
19 448.852876
20 448.729176
21 448.765343
22 448.832961
23 448.901354
24 448.905356
25 448.757231
26 448.661976
27 448.612333
28 448.766924
29 448.898599
... ...
2 12 448.826135
13 448.677448
14 448.782948
15 448.701824
16 448.656567
17 448.663237
18 448.692329
19 448.661282
20 448.663615
21 448.763356
22 448.621265
23 448.608178
24 448.649446
25 448.522132
26 448.654258
27 448.633221
28 448.794531
29 448.878437
30 448.899162
31 448.655452
32 448.754901
33 448.702215
34 448.700802
35 448.699689
36 448.788386
37 448.861832
38 448.936222
39 448.968352
40 448.934670
41 448.979092
[126 rows x 6 columns],
amp offset sigma_x sigma_y x0 \
orientation phase
0 0 4296.426342 189.483630 1.928699 2.049083 230.496125
1 3815.182332 180.400549 1.926215 2.034533 230.413336
2 3608.302773 175.370504 1.932399 2.028777 230.408374
3 1450.163637 135.906491 1.962891 2.012199 230.351215
4 957.855719 125.181729 1.951434 2.004633 230.452485
5 800.356568 122.050251 1.940907 2.068967 230.363065
6 942.279071 124.847781 1.962758 1.988370 230.314934
7 924.489273 123.902226 1.986906 1.998210 230.313658
8 1563.111795 136.653780 1.997715 2.018104 230.269613
9 2447.091627 153.138211 1.950593 1.971392 230.295869
10 2914.998315 165.429150 1.953673 2.012090 230.345856
11 3802.757921 182.454716 1.957930 1.996965 230.402201
12 4043.681473 187.432973 1.954430 2.011799 230.537242
13 4338.642186 190.299725 1.958581 2.008835 230.573331
14 4394.321707 192.144850 1.934335 2.017246 230.502323
15 4518.683834 196.733768 1.954877 2.021408 230.652766
16 4310.033782 193.948166 1.961610 2.014877 230.409013
17 4574.489206 197.820347 1.956575 1.998684 230.510018
18 4260.846946 192.916717 1.948195 1.997768 230.464021
19 3853.613826 182.358258 1.964539 1.992080 230.379474
20 3345.919109 172.794254 1.959862 2.040897 230.294766
21 3298.853708 170.201875 1.957914 1.982231 230.548348
22 2777.563907 161.661228 1.968177 2.030270 230.474942
23 1459.796966 136.028747 1.980434 2.030768 230.479507
24 1479.799292 134.657667 1.957387 2.050996 230.413831
25 996.010400 125.772318 1.952471 2.018624 230.476906
26 865.909154 124.069820 1.900881 2.001449 230.512298
27 1061.170696 127.888150 1.938320 2.011232 230.303697
28 831.027540 123.514970 1.921274 1.958251 230.329089
29 995.087721 125.694009 1.964612 2.008929 230.181068
... ... ... ... ... ...
2 12 2922.879399 160.675813 1.929809 2.050084 230.347765
13 3098.308564 163.906507 1.926919 2.016501 230.459785
14 3451.460893 169.560203 1.942533 2.037388 230.529880
15 4034.439301 182.177435 1.915370 2.010715 230.396688
16 4344.292275 189.435609 1.953560 2.020089 230.373080
17 4612.438897 195.027322 1.911538 2.023331 230.382720
18 4437.941078 189.139861 1.930853 2.029847 230.530382
19 4643.400390 194.157407 1.935865 2.018276 230.454170
20 4877.008386 196.766721 1.912590 2.001893 230.519239
21 4556.294091 191.652473 1.894831 2.023277 230.599835
22 4462.636735 190.632227 1.926746 2.008924 230.600635
23 4050.383852 181.266214 1.935062 2.018231 230.599753
24 3616.826789 173.726975 1.919566 2.021169 230.650003
25 3161.113618 165.836086 1.937985 2.045434 230.626912
26 2884.261011 159.238640 1.947146 2.045714 230.628753
27 2565.148811 152.973404 1.927379 2.034911 230.526570
28 2441.795428 152.104058 1.946493 2.045487 230.568538
29 2275.537005 147.767726 1.938818 2.024067 230.649889
30 2145.573759 146.121533 1.975355 2.009012 230.660665
31 2273.901324 148.685809 1.935051 2.018858 230.485356
32 2499.104922 152.188075 1.955123 2.018336 230.372197
33 2517.732631 152.148594 1.949706 2.045764 230.541411
34 2740.316445 156.132318 1.949132 2.023847 230.572346
35 3315.297415 167.121817 1.913954 2.010677 230.470550
36 3190.415709 165.044815 1.931955 2.026452 230.563464
37 3917.749433 177.859913 1.923770 2.004654 230.471426
38 4318.351583 186.159366 1.905301 2.014208 230.657618
39 4707.033108 194.726775 1.934951 2.019041 230.512515
40 4741.073039 194.237485 1.906422 2.016927 230.300084
41 4484.354551 190.457118 1.929686 2.033487 230.413714
y0
orientation phase
0 0 102.175322
1 102.150652
2 102.090462
3 102.255067
4 102.232783
5 102.175321
6 101.980210
7 102.090361
8 102.030640
9 102.087597
10 102.094758
11 102.062838
12 102.060111
13 102.103794
14 101.979927
15 102.037259
16 101.971058
17 102.132141
18 102.093522
19 102.120249
20 102.064516
21 102.145046
22 102.214993
23 102.286904
24 102.329543
25 102.184640
26 101.922134
27 101.798363
28 102.084471
29 102.129028
... ...
2 12 102.085971
13 102.098990
14 102.113265
15 102.021176
16 101.892626
17 101.992061
18 101.992704
19 101.969678
20 101.941349
21 102.068330
22 101.999507
23 102.027819
24 102.088637
25 102.024972
26 101.952037
27 102.040445
28 102.054830
29 102.187095
30 102.265587
31 102.133483
32 102.113500
33 102.072992
34 102.036603
35 101.997015
36 102.062972
37 102.166554
38 102.284036
39 102.213413
40 102.270914
41 102.284769
[126 rows x 6 columns],
amp offset sigma_x sigma_y x0 \
orientation phase
0 0 3026.072150 153.936590 1.893291 2.004413 484.540077
1 2742.095952 148.684617 1.877533 2.034220 484.469372
2 2326.692768 141.986292 1.891862 2.038334 484.429589
3 3946.170447 168.057753 1.894750 2.007839 484.423204
4 4294.086702 175.882928 1.886132 2.000930 484.478989
5 4288.824634 176.049599 1.888832 1.990881 484.419403
6 4428.917110 177.754404 1.880641 2.008897 484.402410
7 4804.776049 183.986645 1.867445 1.989621 484.355609
8 4693.473348 180.716427 1.866388 2.022716 484.330859
9 4157.299021 171.712944 1.887512 2.027329 484.399175
10 3393.648594 160.621672 1.899718 2.009170 484.433140
11 2858.930425 151.235895 1.915934 2.019098 484.478728
12 2273.689602 142.572272 1.888561 2.003455 484.600530
13 1729.218935 133.518348 1.914079 2.011580 484.614096
14 1189.512139 125.069336 1.889948 2.006348 484.539353
15 1124.195168 125.429209 1.887522 2.025371 484.642598
16 1049.585672 123.629625 1.902303 2.045342 484.487011
17 1091.179614 124.149767 1.894105 2.043652 484.529388
18 1406.211730 129.160960 1.926949 2.069464 484.453193
19 1944.646079 138.041415 1.865700 2.041023 484.317858
20 2549.540252 148.624136 1.877024 2.005570 484.336698
21 2975.471932 156.137755 1.907310 2.007349 484.495651
22 2825.915238 152.755702 1.880515 2.003143 484.501496
23 3727.137862 164.242727 1.893963 2.019420 484.485831
24 4261.531893 175.328147 1.857516 1.994175 484.497875
25 4364.702719 177.576065 1.877453 2.002513 484.537786
26 4495.299609 180.705014 1.874727 2.023657 484.544999
27 4900.395895 187.043292 1.887434 2.014769 484.320172
28 4746.918188 184.647528 1.898089 1.986209 484.373076
29 4494.442979 179.804473 1.883273 1.992448 484.233712
... ... ... ... ... ...
2 12 1992.633594 136.169496 1.887101 2.008591 484.536495
13 2171.909203 139.929428 1.892943 2.052154 484.541474
14 2385.288461 142.493792 1.911106 2.011604 484.596360
15 2715.416347 149.223915 1.858320 2.021423 484.454120
16 2733.854573 149.325077 1.863257 2.030263 484.412594
17 2827.331075 150.034886 1.875303 2.067181 484.456835
18 2821.861383 150.994617 1.878315 2.052646 484.604417
19 3087.935376 153.801652 1.901018 2.030830 484.532617
20 3001.006244 152.547076 1.860523 2.013389 484.575751
21 2760.207992 148.154776 1.899351 2.031991 484.698993
22 2767.512265 148.777688 1.882597 2.024038 484.696207
23 2720.841372 147.859334 1.890930 1.999364 484.666424
24 2967.502017 152.766666 1.902866 2.011478 484.655404
25 2591.634162 146.267920 1.868421 2.012236 484.644460
26 2022.912592 138.370067 1.893010 2.040503 484.668765
27 1926.976891 136.232960 1.873460 2.027681 484.564055
28 1691.940679 132.495407 1.922730 2.010701 484.602719
29 1552.447897 129.490871 1.888559 2.028096 484.681696
30 1565.312981 129.303054 1.883744 2.018034 484.792072
31 1657.520499 131.511187 1.891995 2.011481 484.535726
32 1700.022350 132.200027 1.906436 2.041824 484.409149
33 1792.811128 132.750651 1.895500 2.026503 484.569275
34 1948.825791 135.497566 1.881553 2.013389 484.608874
35 2214.495895 139.069265 1.895705 2.002745 484.482746
36 2211.446694 139.783956 1.880770 2.013018 484.621506
37 2640.791484 145.671818 1.889335 2.023273 484.584599
38 2856.531140 147.743701 1.875029 2.020365 484.781797
39 2878.438732 149.723774 1.889103 1.998270 484.548736
40 2990.936515 151.707944 1.883052 2.032982 484.409150
41 2900.242803 152.082984 1.905689 2.036347 484.530012
y0
orientation phase
0 0 220.290196
1 220.278816
2 220.219621
3 220.161017
4 220.236711
5 220.220008
6 220.185983
7 220.328652
8 220.224799
9 220.308558
10 220.278239
11 220.230339
12 220.265241
13 220.258245
14 220.090951
15 220.110050
16 220.051533
17 220.042930
18 220.125750
19 220.133339
20 220.070297
21 220.150336
22 220.204828
23 220.291487
24 220.318456
25 220.227947
26 220.086923
27 220.046504
28 220.199134
29 220.273128
... ...
2 12 220.176512
13 220.114057
14 220.219941
15 220.127576
16 220.072828
17 220.075451
18 220.130566
19 220.080539
20 220.083197
21 220.171626
22 220.088279
23 220.093647
24 220.181469
25 220.026747
26 220.054345
27 220.127619
28 220.206796
29 220.305362
30 220.374970
31 220.217943
32 220.142079
33 220.136875
34 220.140023
35 220.094446
36 220.166440
37 220.286228
38 220.463141
39 220.282829
40 220.383710
41 220.316157
[126 rows x 6 columns],
amp offset sigma_x sigma_y x0 \
orientation phase
0 0 6614.075140 216.887565 1.887766 2.005516 441.379718
1 6330.420541 210.058737 1.869419 1.987528 441.324250
2 6357.486165 209.641542 1.886903 2.018149 441.304563
3 3405.735696 163.234540 1.874586 1.997338 441.269932
4 4477.981994 180.153726 1.878609 1.986862 441.355881
5 5155.355767 192.827327 1.905358 1.973885 441.274783
6 5912.216767 204.364474 1.900244 1.991933 441.266419
7 6040.775088 206.579608 1.897672 1.977242 441.226321
8 6961.394433 221.796121 1.866509 1.986961 441.196592
9 7600.397594 231.801565 1.873735 1.980904 441.275780
10 7708.204282 234.410054 1.893721 1.975451 441.280237
11 8034.819141 240.035136 1.900541 1.987309 441.357758
12 7466.463514 232.598338 1.892094 1.995220 441.451137
13 6991.094727 219.924211 1.890376 1.987957 441.487526
14 5998.152698 204.076915 1.908224 2.002365 441.449134
15 5705.703569 201.089910 1.886414 1.999443 441.563420
16 4928.463966 190.549805 1.900190 1.986046 441.401781
17 4570.522526 183.229936 1.902995 1.992514 441.446797
18 3391.854826 162.693967 1.879600 2.008482 441.389925
19 2332.406430 145.039122 1.904093 2.015291 441.276344
20 1734.317680 135.554651 1.897850 2.010701 441.230807
21 1612.119430 133.772766 1.914685 2.018115 441.398980
22 1950.498069 138.912522 1.880653 2.033841 441.370807
23 3351.526465 163.840581 1.885553 2.009367 441.388821
24 3384.791771 163.883187 1.879533 1.984607 441.371721
25 4087.024463 175.632466 1.881337 1.991625 441.396238
26 5336.977648 194.931710 1.894924 1.996642 441.402140
27 6072.053311 207.205618 1.890416 1.989298 441.210552
28 5681.744972 201.467411 1.888593 1.985445 441.228974
29 6178.095932 207.718540 1.882287 1.993678 441.095625
... ... ... ... ... ...
2 12 3376.555472 162.381851 1.919586 2.009020 441.359176
13 3552.237232 164.132611 1.898248 2.031598 441.396845
14 4198.000042 173.229051 1.903987 2.009585 441.444912
15 4755.868018 184.560464 1.874707 2.001623 441.314385
16 5234.450332 192.728613 1.875613 1.994528 441.252004
17 5944.810363 200.703769 1.880837 1.989342 441.297553
18 5853.518433 199.698738 1.873130 2.002917 441.421413
19 6505.912352 210.628004 1.875997 1.990462 441.406770
20 6655.570269 213.459892 1.866917 2.001934 441.417234
21 6955.681028 215.123386 1.874494 2.012570 441.512792
22 7042.457978 219.265425 1.867202 1.997521 441.525895
23 6829.218977 216.332069 1.879690 1.993010 441.500510
24 6676.499323 212.933008 1.880103 2.009568 441.512708
25 6471.562270 213.937839 1.864884 1.990585 441.514494
26 6311.849423 209.083043 1.881450 2.001219 441.521731
27 5197.752312 191.712479 1.889006 2.003035 441.459991
28 4855.368789 186.060915 1.884329 2.008588 441.516179
29 4205.867200 173.966928 1.914174 2.024527 441.631273
30 3787.116024 168.949192 1.901252 2.032105 441.714872
31 3316.561220 161.928111 1.925116 2.042642 441.498737
32 3275.922034 160.180471 1.890504 2.006774 441.424244
33 3192.830266 159.378762 1.906293 2.020652 441.486892
34 3240.893247 160.118198 1.888427 2.011943 441.498755
35 3688.056724 164.189471 1.902462 1.991671 441.343396
36 3647.312966 165.293240 1.893327 2.001569 441.485222
37 4639.326565 179.658233 1.899464 1.985824 441.345605
38 5372.951840 191.069489 1.883590 1.994217 441.586773
39 6070.447763 202.868977 1.871109 1.985244 441.374627
40 6951.278348 218.616566 1.859230 2.001546 441.216568
41 6768.510569 214.787162 1.875935 2.005886 441.353501
y0
orientation phase
0 0 67.069657
1 67.059090
2 66.980188
3 66.901091
4 66.965511
5 66.897336
6 66.899962
7 67.006536
8 66.944986
9 67.027771
10 66.993491
11 66.974717
12 66.938775
13 67.005755
14 66.865365
15 66.891068
16 66.835749
17 67.003398
18 67.011770
19 67.051640
20 66.967516
21 66.930263
22 66.975987
23 66.972607
24 67.017880
25 66.901957
26 66.779708
27 66.750019
28 66.959646
29 67.053478
... ...
2 12 66.950837
13 66.953447
14 66.979933
15 66.881560
16 66.770870
17 66.808271
18 66.875334
19 66.843108
20 66.804972
21 66.963431
22 66.867678
23 66.884083
24 66.941450
25 66.832072
26 66.823861
27 66.890163
28 66.962336
29 67.062565
30 67.161992
31 67.030911
32 66.944299
33 66.895773
34 66.931342
35 66.854898
36 66.946912
37 66.994219
38 67.226024
39 67.116470
40 67.141253
41 67.116141
[126 rows x 6 columns],
amp offset sigma_x sigma_y x0 \
orientation phase
0 0 4754.232345 206.265972 1.954917 2.056655 196.042513
1 4202.370495 193.116472 1.970204 2.062400 196.059775
2 4267.539030 194.771674 1.970919 2.052627 196.054952
3 7326.173460 261.678033 1.974757 2.030410 195.858699
4 7109.604731 252.965858 1.952483 2.043872 195.914988
5 6860.911717 249.749400 1.974192 2.029378 195.824054
6 6363.537051 237.661973 1.974125 2.041968 195.887212
7 6374.376132 241.484049 1.980124 2.050216 195.843609
8 5084.609661 212.216205 1.958439 2.040168 195.799992
9 3414.609876 179.655141 1.965846 2.065328 195.759477
10 2156.032945 154.466271 1.970490 2.053279 195.822159
11 1319.907218 135.179446 1.967611 2.088228 195.909313
12 1263.999393 133.416497 1.950191 2.043766 196.118313
13 1819.480267 145.033123 1.956180 2.045353 196.167254
14 2999.156102 167.578109 1.969546 2.039301 196.046793
15 3246.023533 172.246074 1.995116 2.043659 196.190559
16 4572.025727 204.774930 1.975772 2.050085 195.983814
17 5507.698591 223.069653 1.971470 2.041532 196.050879
18 7271.384925 260.330144 1.957384 2.019910 196.030851
19 7571.514625 267.878502 1.959677 2.036573 195.906833
20 8325.747385 284.902240 1.971125 2.042940 195.837181
21 9038.164196 297.792033 1.964918 2.044113 196.057484
22 7895.685481 275.643949 1.969007 2.046967 196.049427
23 7511.903716 266.537209 1.963206 2.046818 196.037816
24 8170.362732 275.945757 1.976651 2.044081 195.981136
25 7510.612043 266.308415 1.963415 2.041529 196.049451
26 7139.096514 262.125670 1.962731 2.051869 196.032378
27 7234.211968 262.620750 1.983041 2.029324 195.817552
28 6965.188743 252.486702 1.946696 2.024567 195.797136
29 5809.094937 227.567640 1.958627 2.046037 195.641849
... ... ... ... ... ...
2 12 3152.331932 169.622506 1.995627 2.055803 195.862091
13 3074.140193 167.470820 1.981186 2.103985 195.953450
14 3804.876069 182.554261 1.968129 2.047681 196.028057
15 4255.964470 193.771227 1.954995 2.041979 195.910090
16 4165.025133 189.785151 1.969342 2.048204 195.837761
17 4554.976038 199.299239 1.967419 2.038545 195.876921
18 4394.560306 195.151827 1.967472 2.071633 196.012620
19 4634.310656 200.175767 1.954381 2.047791 195.976750
20 5318.217409 212.427595 1.947163 2.045538 196.080570
21 4938.196292 202.672212 1.950218 2.047649 196.159507
22 4999.879248 204.826028 1.948928 2.053394 196.167343
23 4260.250747 191.897471 1.946911 2.036854 196.189283
24 3912.793759 184.692428 1.954794 2.054410 196.211490
25 3957.524188 183.790160 1.950701 2.053076 196.223773
26 3452.053390 175.748263 1.951292 2.052672 196.262159
27 3507.879788 176.113449 1.976129 2.050407 196.122631
28 3552.314672 177.662378 1.948039 2.069790 196.158889
29 3292.956432 171.404625 1.962824 2.083175 196.188610
30 2887.779419 164.048404 1.979190 2.075697 196.286893
31 2984.322178 164.969474 2.001694 2.054104 196.064656
32 2759.086608 162.223944 1.985057 2.072047 195.869464
33 2825.506634 162.592949 1.968396 2.046999 196.042663
34 2978.361117 167.416997 1.955467 2.043771 196.078488
35 3222.423618 170.258425 1.968990 2.066553 195.965557
36 3094.806782 167.866402 1.969639 2.058966 196.025238
37 3690.976116 179.549061 1.961102 2.057970 195.957323
38 4147.851208 190.103689 1.971251 2.071450 196.193712
39 4967.861362 207.651198 1.936239 2.057024 196.007203
40 4915.175821 205.529030 1.929334 2.051653 195.870495
41 4967.334847 206.875108 1.950562 2.045872 195.983669
y0
orientation phase
0 0 294.153911
1 294.154091
2 294.086505
3 294.150471
4 294.170637
5 294.165005
6 294.181689
7 294.257216
8 294.184995
9 294.291698
10 294.301155
11 294.170179
12 294.014933
13 294.033990
14 293.935032
15 293.961125
16 293.953564
17 294.043648
18 294.060585
19 294.071502
20 294.008754
21 294.082400
22 294.144357
23 294.224778
24 294.252719
25 294.168586
26 294.024197
27 293.972957
28 294.186162
29 294.282623
... ...
2 12 294.138742
13 294.069386
14 294.100218
15 294.059017
16 293.953404
17 293.996373
18 294.014795
19 293.988904
20 293.950817
21 294.109299
22 294.009114
23 294.011412
24 294.085657
25 293.988525
26 293.977235
27 294.038098
28 294.125147
29 294.193161
30 294.268394
31 294.144723
32 294.153220
33 294.100265
34 294.067747
35 294.036425
36 294.053398
37 294.155718
38 294.308848
39 294.207210
40 294.261114
41 294.275405
[126 rows x 6 columns],
amp offset sigma_x sigma_y x0 \
orientation phase
0 0 7591.337177 306.240686 1.840871 2.327609 230.931280
1 6218.696533 267.743789 1.862677 2.332458 230.909980
2 6268.968726 268.245980 1.858712 2.322358 230.867321
3 5709.559558 340.732216 1.850050 2.281645 230.664289
4 6275.391370 343.030504 1.843474 2.232675 230.696573
5 6824.398642 345.431903 1.844258 2.243384 230.644895
6 7438.720718 351.913252 1.850831 2.220359 230.663940
7 7952.940883 360.223805 1.870389 2.246367 230.677184
8 8554.276331 350.400446 1.859783 2.259135 230.668795
9 9064.945288 346.406617 1.870427 2.281184 230.669156
10 8204.179796 317.759335 1.891834 2.289399 230.755805
11 8867.794890 329.075285 1.875848 2.307706 230.880989
12 8549.092729 333.758653 1.881642 2.313331 231.055090
13 8405.692991 335.304055 1.857210 2.306881 231.069761
14 7201.709656 327.713795 1.865563 2.258793 230.978891
15 7491.840209 339.525331 1.854562 2.276470 231.103298
16 7131.927299 343.653476 1.870332 2.256493 230.927495
17 6901.340296 359.607619 1.846974 2.271707 230.997808
18 6806.541984 375.439335 1.856432 2.308296 230.964240
19 5993.582655 359.812362 1.869513 2.324451 230.839747
20 5777.895409 360.216883 1.865415 2.338633 230.738985
21 6175.879394 382.832066 1.847067 2.332229 230.925410
22 5607.283784 363.562252 1.857604 2.337698 230.891651
23 5437.104606 341.122143 1.834865 2.299882 230.838754
24 6394.264698 370.258111 1.842905 2.261719 230.763899
25 6393.550081 359.804292 1.839899 2.272060 230.848530
26 6965.340806 360.671459 1.851751 2.280565 230.850331
27 8508.029736 382.599255 1.868678 2.265424 230.643593
28 7704.242994 356.072359 1.857427 2.231944 230.577725
29 7676.780332 339.709956 1.858607 2.250133 230.471197
... ... ... ... ... ...
2 12 3968.154232 246.656789 1.839516 2.263903 230.816658
13 4198.351780 247.442245 1.863922 2.285972 230.894740
14 6063.248171 291.852598 1.833419 2.281738 230.978853
15 6964.490829 308.245949 1.837247 2.298243 230.865328
16 6928.938172 308.658861 1.852889 2.283159 230.814251
17 7425.566432 316.670087 1.842603 2.307870 230.783142
18 7213.716768 312.649706 1.843247 2.294294 230.958832
19 7453.868198 309.902856 1.861904 2.301795 230.924635
20 8167.241539 314.237586 1.852582 2.290872 230.970393
21 7610.825524 298.613241 1.846058 2.313216 231.055579
22 7574.372774 298.898681 1.841092 2.288959 231.044744
23 6440.660774 268.366387 1.839835 2.311638 231.066732
24 5697.561875 251.957530 1.847730 2.277016 231.072859
25 5447.338468 249.504612 1.831287 2.289703 231.040015
26 5330.180714 246.420228 1.848401 2.295150 231.020966
27 4312.532174 230.557941 1.851471 2.296339 230.928697
28 4229.165290 242.429273 1.833880 2.274706 230.979676
29 3845.620415 235.307669 1.847219 2.264541 231.058530
30 3370.711341 220.414764 1.838202 2.287248 231.129641
31 3398.207076 229.215177 1.843564 2.251098 230.960360
32 3408.587631 227.112117 1.843305 2.268378 230.785033
33 3554.915638 230.592954 1.841532 2.283581 230.948271
34 3749.813785 241.689402 1.835078 2.257925 230.995260
35 4506.900892 253.939012 1.834683 2.288509 230.898796
36 4547.494852 256.977975 1.846367 2.295495 230.986977
37 5643.935718 280.696396 1.847826 2.281317 230.940164
38 7011.849214 311.027349 1.847134 2.280494 231.163051
39 8228.220950 329.482701 1.840787 2.296282 230.952482
40 8152.913860 320.709743 1.838704 2.282280 230.768268
41 7776.612426 303.480495 1.857255 2.311437 230.868118
y0
orientation phase
0 0 392.913641
1 392.943184
2 392.880856
3 392.654502
4 392.574124
5 392.570267
6 392.552455
7 392.663588
8 392.612390
9 392.828468
10 392.908532
11 392.915195
12 393.014289
13 393.130814
14 393.148839
15 393.179802
16 393.209966
17 393.300314
18 393.298110
19 393.174529
20 393.007005
21 393.006262
22 393.012660
23 392.805788
24 392.764005
25 392.647458
26 392.411600
27 392.382888
28 392.522045
29 392.706674
... ...
2 12 393.014751
13 392.909073
14 392.945625
15 392.930300
16 392.792286
17 392.820974
18 392.813256
19 392.797523
20 392.779883
21 392.876185
22 392.796664
23 392.817666
24 392.859474
25 392.736901
26 392.744029
27 392.807551
28 392.921727
29 392.991709
30 393.046676
31 392.951173
32 392.953161
33 392.921412
34 392.930728
35 392.927853
36 392.920183
37 393.028744
38 393.150179
39 393.012598
40 393.070082
41 393.092281
[126 rows x 6 columns],
amp offset sigma_x sigma_y x0 \
orientation phase
0 0 4663.613043 186.356048 1.897756 2.058882 370.283596
1 5182.119956 196.112000 1.886129 2.029583 370.115344
2 6720.538896 219.778221 1.848037 2.045812 370.080941
3 6739.516778 224.258414 1.873161 2.029001 370.068563
4 8219.298961 250.582245 1.865662 2.014355 370.156768
5 9318.399568 266.263020 1.868246 2.013679 370.105449
6 10444.991115 288.500675 1.874474 2.027563 370.137208
7 10609.290809 290.465685 1.867004 2.010385 370.087322
8 11639.586309 306.123416 1.875158 2.020239 370.089362
9 12803.384021 327.484588 1.874691 2.015414 370.132139
10 12992.930482 333.124724 1.883912 2.016038 370.173355
11 13923.920760 350.166843 1.867276 2.031577 370.266592
12 12563.883555 324.006105 1.876597 2.031797 370.415490
13 11912.100451 306.297605 1.868762 2.018717 370.457095
14 10623.213790 284.608613 1.868193 2.017008 370.405462
15 9302.475827 265.131192 1.861181 1.995733 370.535719
16 7738.474322 237.992235 1.868738 2.012158 370.397745
17 7403.189467 231.640485 1.869352 2.014363 370.447724
18 6035.055688 209.316986 1.869214 2.022074 370.415248
19 5290.069158 196.730339 1.891277 2.051631 370.252210
20 4430.361653 185.290496 1.890059 2.067257 370.162049
21 4549.767595 187.267450 1.906396 2.079962 370.281325
22 4926.888659 194.543850 1.877274 2.047179 370.244491
23 6460.268307 221.953544 1.862550 2.037445 370.157890
24 6794.241630 226.463717 1.866822 2.016781 370.151279
25 7805.999992 242.201518 1.861968 2.012148 370.220613
26 9847.709498 279.032653 1.873302 2.027600 370.250083
27 10585.942332 294.213631 1.867226 2.021655 370.074228
28 9450.119068 272.833654 1.881989 2.008381 370.079942
29 10622.208761 290.097455 1.873071 2.028660 369.965360
... ... ... ... ... ...
2 12 13057.877594 320.073315 1.853761 2.018016 370.315677
13 12246.090134 305.814510 1.864594 2.043014 370.418282
14 10732.855118 284.242129 1.861270 2.030476 370.459637
15 9912.613965 274.600173 1.875426 2.033231 370.368224
16 9605.038548 270.868654 1.859291 2.051115 370.301631
17 7684.409282 236.422831 1.863183 2.047061 370.333137
18 8269.355826 245.748343 1.859991 2.036417 370.440691
19 6398.755526 215.235041 1.878340 2.033628 370.443632
20 5442.233001 198.727453 1.872070 2.034117 370.410559
21 4978.879251 189.793690 1.891905 2.048762 370.461770
22 4744.695133 186.702384 1.903891 2.037129 370.443613
23 5052.744821 190.303915 1.881523 2.044145 370.296024
24 5322.046152 197.528150 1.871940 2.030893 370.364938
25 6777.327752 219.327342 1.854530 2.034196 370.275144
26 8551.098013 249.872715 1.862504 2.032091 370.310234
27 10333.829137 277.641728 1.848001 2.018772 370.232854
28 11091.129697 286.946905 1.852064 2.042759 370.291393
29 11676.315528 299.905738 1.844479 2.025980 370.373251
30 11722.996104 296.293241 1.846652 2.018229 370.461491
31 12816.725466 315.593066 1.850350 2.033698 370.346542
32 12779.761108 316.955830 1.850416 2.014079 370.284110
33 12453.642042 310.745873 1.846340 2.037745 370.422019
34 12759.825679 314.108444 1.843608 2.008803 370.460959
35 12218.635325 306.349598 1.849948 2.020815 370.379251
36 12124.072369 308.047035 1.857796 2.031846 370.474618
37 11588.548928 297.237074 1.849423 2.016651 370.401172
38 9567.136888 264.128411 1.861915 2.021200 370.612873
39 7336.390793 229.012487 1.876618 2.043599 370.465841
40 6040.075900 209.087176 1.861110 2.039992 370.229793
41 4865.779011 188.986174 1.904326 2.056379 370.290007
y0
orientation phase
0 0 101.817543
1 101.803386
2 101.721761
3 101.513935
4 101.567901
5 101.551228
6 101.598094
7 101.704623
8 101.692840
9 101.781261
10 101.788915
11 101.793073
12 101.792632
13 101.880871
14 101.773241
15 101.825751
16 101.834846
17 101.972781
18 101.984554
19 101.895929
20 101.731008
21 101.673663
22 101.680343
23 101.587179
24 101.613758
25 101.518378
26 101.430909
27 101.460444
28 101.664420
29 101.775116
... ...
2 12 101.740856
13 101.745892
14 101.777859
15 101.674185
16 101.579159
17 101.627271
18 101.637713
19 101.628743
20 101.607487
21 101.741260
22 101.637362
23 101.632638
24 101.698443
25 101.602343
26 101.580079
27 101.619625
28 101.716951
29 101.828527
30 101.874827
31 101.759903
32 101.749471
33 101.686429
34 101.689094
35 101.668718
36 101.696370
37 101.809720
38 101.996232
39 101.895152
40 101.917332
41 101.901988
[126 rows x 6 columns],
amp offset sigma_x sigma_y x0 \
orientation phase
0 0 8511.857017 372.874067 2.104574 2.641605 35.329796
1 7436.078411 340.835596 2.108530 2.621079 35.358533
2 7406.009926 343.121655 2.122283 2.636161 35.368949
3 5422.570457 279.394565 2.133079 2.731507 35.221259
4 5138.649551 264.775234 2.130552 2.721457 35.255323
5 5231.327521 268.874085 2.135822 2.728260 35.198650
6 5688.513032 283.352735 2.140389 2.714271 35.272205
7 6488.194849 308.075840 2.142696 2.730652 35.258959
8 6362.339557 310.666769 2.114511 2.665683 35.151283
9 5699.040441 287.567072 2.121892 2.718874 35.098729
10 4602.311775 252.376603 2.148552 2.727678 35.147963
11 6267.487014 306.603560 2.136024 2.776860 35.296505
12 6134.890062 301.716045 2.147193 2.763343 35.438599
13 5957.076762 291.639257 2.127937 2.800231 35.459470
14 6015.557101 297.116840 2.126392 2.771788 35.370210
15 6188.991525 300.033792 2.131869 2.783421 35.486479
16 6515.101035 318.539800 2.145271 2.807716 35.256193
17 8028.916166 365.344155 2.139052 2.766440 35.387692
18 8038.811232 363.616669 2.153751 2.818466 35.390682
19 7272.139806 336.993556 2.151760 2.798687 35.342314
20 7859.144823 354.477098 2.145392 2.832152 35.295382
21 8684.547021 379.151540 2.143652 2.807070 35.483747
22 6701.468345 320.258071 2.165935 2.810646 35.489646
23 5633.755630 285.680772 2.142253 2.765817 35.445644
24 6507.359962 306.693629 2.153685 2.758964 35.381327
25 6044.025733 297.706184 2.143654 2.789753 35.489278
26 6065.042747 300.726597 2.126119 2.757249 35.398006
27 7886.486000 354.977237 2.128314 2.739991 35.233924
28 7301.381421 336.973500 2.138413 2.724251 35.210068
29 6074.765942 299.564452 2.126542 2.724192 35.045694
... ... ... ... ... ...
2 12 9445.159832 381.746140 2.146687 2.837671 35.153159
13 8992.209244 365.641214 2.126823 2.821949 35.271192
14 7770.407072 332.421214 2.114141 2.813319 35.347965
15 8572.432844 359.321631 2.094831 2.800402 35.205052
16 9269.307189 383.024877 2.102375 2.785304 35.134751
17 9096.921617 376.667126 2.105345 2.784169 35.130181
18 9488.456095 388.423555 2.097409 2.783489 35.306138
19 9502.285066 391.022893 2.103385 2.723847 35.304800
20 8931.071251 377.450618 2.077163 2.659947 35.383121
21 8082.240817 352.278166 2.082705 2.611115 35.530668
22 8618.509263 363.312595 2.075424 2.608825 35.502812
23 7627.774314 338.906502 2.088563 2.604626 35.540314
24 8257.757651 356.488057 2.101851 2.620145 35.598305
25 8155.363807 355.179966 2.118009 2.645839 35.576226
26 7996.903269 351.477413 2.115076 2.669544 35.556228
27 8605.149567 367.915528 2.116396 2.759432 35.416256
28 7873.506681 340.599573 2.134674 2.771713 35.437091
29 7390.824096 320.227199 2.152006 2.808548 35.459284
30 7470.468866 324.845415 2.146782 2.792942 35.544194
31 8114.487011 339.040068 2.143697 2.805040 35.344285
32 7501.676211 323.390894 2.134324 2.821800 35.248120
33 7564.985600 323.160532 2.138720 2.835685 35.416338
34 8145.558290 339.669096 2.126082 2.811980 35.407779
35 8685.552437 356.349498 2.125901 2.808146 35.290482
36 7929.762087 332.967553 2.122429 2.833337 35.300772
37 8829.071955 360.443036 2.115091 2.802319 35.245065
38 9065.022636 367.506369 2.092947 2.782456 35.458181
39 9138.250684 382.636275 2.110126 2.732224 35.332418
40 9813.832062 402.852828 2.091771 2.706841 35.158278
41 8871.293769 375.466768 2.084403 2.610103 35.289447
y0
orientation phase
0 0 338.778645
1 338.733955
2 338.699525
3 339.118116
4 339.092537
5 339.050037
6 339.057669
7 339.122273
8 338.984591
9 339.066706
10 338.952245
11 338.852912
12 338.823371
13 338.928308
14 338.828713
15 338.906083
16 338.853690
17 338.921031
18 338.955251
19 338.925363
20 338.913020
21 338.953906
22 339.053320
23 339.143107
24 339.199564
25 339.057413
26 338.927302
27 338.862348
28 339.067606
29 339.169813
... ...
2 12 339.656236
13 339.542219
14 339.523407
15 339.334090
16 339.177495
17 339.116809
18 339.092461
19 338.858477
20 338.700102
21 338.676337
22 338.600224
23 338.582880
24 338.663315
25 338.604854
26 338.635539
27 338.919431
28 339.230275
29 339.393095
30 339.448169
31 339.539375
32 339.651085
33 339.616264
34 339.607606
35 339.490272
36 339.538225
37 339.497610
38 339.429164
39 339.170923
40 339.040152
41 338.878877
[126 rows x 6 columns],
amp offset sigma_x sigma_y x0 \
orientation phase
0 0 6854.686208 268.801513 2.190230 2.183248 126.077831
1 6799.372953 265.429049 2.161181 2.159914 126.073692
2 8069.486290 290.400269 2.111666 2.161308 126.107061
3 11810.954970 393.661963 2.190936 2.091917 125.952392
4 12624.179162 406.255256 2.196646 2.096887 125.968701
5 13422.509546 429.945518 2.188123 2.079357 125.867627
6 14533.680337 453.102216 2.186646 2.093101 125.928152
7 15352.408267 469.703143 2.187738 2.107648 125.953088
8 16030.797827 486.163079 2.170990 2.130104 125.889299
9 15401.135919 469.959910 2.178463 2.140635 125.918151
10 13036.269538 420.292770 2.181874 2.147928 126.055359
11 13168.761730 415.039333 2.172291 2.178086 126.233234
12 11593.856797 372.997402 2.174589 2.199026 126.442240
13 10622.883419 345.095414 2.134612 2.191064 126.526131
14 8998.603334 307.289580 2.121190 2.210752 126.545505
15 9172.090514 313.314716 2.106584 2.216356 126.715617
16 8592.230327 304.048989 2.100800 2.242040 126.611470
17 9368.046464 319.452024 2.098562 2.242454 126.681177
18 9450.056070 329.433064 2.115037 2.256083 126.633186
19 9500.474499 336.072387 2.139237 2.231027 126.428863
20 10349.083978 360.714302 2.200399 2.200305 126.249102
21 11683.416809 395.122574 2.189529 2.179981 126.364327
22 10909.157955 378.059970 2.198740 2.170794 126.312885
23 12024.878075 401.265144 2.193863 2.106129 126.123152
24 13195.605475 425.658311 2.188648 2.092820 126.054697
25 12951.076662 422.980957 2.179368 2.095732 126.086064
26 14380.152178 454.847795 2.182102 2.103612 126.049504
27 16407.016836 500.900759 2.186477 2.105155 125.893957
28 15027.433490 462.189434 2.185059 2.089589 125.847847
29 14659.285864 456.225987 2.174799 2.102534 125.728974
... ... ... ... ... ...
2 12 8779.196747 305.595153 2.114720 2.197672 126.469663
13 8200.491630 288.368154 2.100132 2.178896 126.586980
14 7809.155128 284.142483 2.155255 2.205949 126.623393
15 7480.420463 282.268050 2.185857 2.196552 126.428468
16 6610.993363 264.450460 2.227164 2.196966 126.344018
17 6225.390147 258.043897 2.232752 2.202951 126.222302
18 6534.977268 262.986792 2.223123 2.183535 126.389183
19 6149.788950 251.748734 2.245979 2.178966 126.244154
20 6937.948662 270.337175 2.194415 2.154491 126.164753
21 6759.253193 259.508336 2.178239 2.165551 126.188857
22 7129.687016 268.036864 2.165139 2.137723 126.200203
23 6625.131819 258.228204 2.144767 2.131853 126.219650
24 6195.059836 242.470687 2.153190 2.151613 126.266271
25 7319.299293 268.078531 2.121632 2.148118 126.281518
26 7619.366004 275.063462 2.102794 2.139382 126.334828
27 8756.871087 295.953152 2.077525 2.172746 126.302593
28 10078.001187 321.345367 2.067872 2.167926 126.443964
29 9811.611052 315.485624 2.054046 2.171110 126.563801
30 8854.133684 296.566677 2.051419 2.163245 126.626519
31 9652.752912 315.285262 2.084794 2.178344 126.574387
32 8246.067256 285.365561 2.067420 2.179290 126.524472
33 7785.303779 276.110385 2.083924 2.194712 126.704784
34 8080.903955 285.973640 2.109422 2.199322 126.718241
35 7534.614865 277.127805 2.126904 2.193928 126.570248
36 7137.170912 269.788451 2.132929 2.191723 126.650801
37 6630.898238 261.472849 2.200879 2.190870 126.486685
38 6093.968260 249.260562 2.257108 2.198182 126.549160
39 6467.808757 261.314460 2.256173 2.174509 126.226988
40 6228.035001 252.199555 2.247320 2.167422 125.950360
41 6860.605307 260.732782 2.204192 2.159817 125.999927
y0
orientation phase
0 0 245.315923
1 245.360736
2 245.384052
3 245.026857
4 245.077634
5 245.063216
6 245.100218
7 245.222953
8 245.217752
9 245.410193
10 245.429951
11 245.468170
12 245.529143
13 245.663947
14 245.613008
15 245.678295
16 245.600870
17 245.623504
18 245.509451
19 245.319947
20 245.113005
21 245.131610
22 245.132214
23 245.086246
24 245.140075
25 244.990333
26 244.920174
27 244.929057
28 245.114359
29 245.282105
... ...
2 12 245.423854
13 245.357695
14 245.356763
15 245.248129
16 245.087838
17 245.151278
18 245.139670
19 245.098273
20 245.096072
21 245.239342
22 245.207709
23 245.198153
24 245.297439
25 245.240988
26 245.249461
27 245.323874
28 245.446587
29 245.544922
30 245.603218
31 245.459498
32 245.444895
33 245.368745
34 245.339179
35 245.257421
36 245.296620
37 245.339089
38 245.411840
39 245.328666
40 245.358906
41 245.427326
[126 rows x 6 columns],
amp offset sigma_x sigma_y x0 \
orientation phase
0 0 39320.942051 910.868516 2.058467 3.064735 329.166015
1 37151.601224 868.967698 2.048051 3.052961 329.127451
2 36184.680081 844.843866 2.034236 3.031042 329.076438
3 35097.576142 839.293883 2.102553 3.153768 328.873646
4 34047.493627 823.172734 2.100953 3.166825 328.946697
5 32917.565742 802.324500 2.104387 3.171953 328.925112
6 32218.306234 797.995826 2.096787 3.172939 328.986260
7 32467.663312 805.078924 2.102500 3.167102 328.983820
8 30847.082895 774.505657 2.082373 3.145195 329.064272
9 32614.163162 813.747383 2.071147 3.067275 329.175781
10 32834.295320 822.708740 2.054609 3.004081 329.269168
11 36041.805742 886.194709 2.042477 2.969472 329.401030
12 35554.039440 866.117585 2.035258 2.956391 329.542992
13 35948.404305 855.727317 2.023734 2.957007 329.515202
14 35439.086955 843.537653 2.042557 3.000040 329.350853
15 35061.989136 843.519243 2.042166 2.995787 329.459128
16 35356.313559 847.275642 2.070522 3.021970 329.220216
17 37416.839496 870.202367 2.080281 3.060779 329.226665
18 36872.853094 852.650895 2.087553 3.091779 329.153629
19 36783.530008 852.663945 2.099862 3.108466 328.966983
20 35860.949910 845.605783 2.098779 3.109402 328.866809
21 37039.196134 865.911433 2.101725 3.120910 329.038749
22 35151.055020 835.506023 2.100763 3.142673 329.026371
23 35148.582789 831.864867 2.093928 3.140725 328.990058
24 36888.746754 874.094542 2.095543 3.140740 328.957357
25 33435.239609 809.869214 2.099701 3.167645 329.043266
26 32974.810910 818.393706 2.093341 3.173749 329.088414
27 32233.837483 809.915319 2.098419 3.168553 328.927863
28 30705.414707 755.303519 2.108815 3.163070 328.921535
29 30726.009860 759.697292 2.098143 3.161004 328.846001
... ... ... ... ... ...
2 12 36589.868926 826.109030 2.086083 3.209557 329.209109
13 37383.411962 843.596232 2.081694 3.203931 329.262536
14 37998.538416 848.556381 2.083337 3.186767 329.311385
15 39569.448150 892.072210 2.079089 3.173989 329.175918
16 39827.435185 905.505277 2.080873 3.153881 329.097112
17 41042.368143 932.600967 2.078132 3.113913 329.071841
18 41385.250743 925.885651 2.076235 3.130064 329.249898
19 41950.582926 937.839187 2.070217 3.089234 329.194424
20 42041.879400 945.205629 2.056344 3.061432 329.205845
21 39786.630240 886.314265 2.052100 3.045579 329.278670
22 40733.576485 913.310256 2.046946 3.039235 329.283516
23 37573.711653 855.008469 2.040192 3.032685 329.255865
24 36742.801631 829.263252 2.043046 3.038652 329.293895
25 35613.026115 818.048045 2.034375 3.038887 329.278063
26 33800.830535 782.851419 2.031099 3.038291 329.298671
27 34862.858012 797.704690 2.037292 3.100954 329.226856
28 34712.895287 789.568918 2.048353 3.110933 329.286205
29 33129.773280 757.790210 2.048350 3.121659 329.381253
30 32075.120800 732.055883 2.051911 3.145717 329.450749
31 33161.506475 763.802257 2.070984 3.178336 329.302347
32 33568.348535 756.311506 2.082392 3.216842 329.190589
33 33942.190795 770.593038 2.080579 3.201791 329.324311
34 34636.101676 781.859518 2.080738 3.218651 329.381949
35 37074.063548 832.240939 2.084455 3.193370 329.254640
36 35707.407198 804.660031 2.086596 3.208379 329.347976
37 38472.146370 844.392989 2.088856 3.178742 329.255722
38 39731.718557 864.017429 2.083225 3.144368 329.461444
39 40673.505720 916.104350 2.072013 3.106258 329.222547
40 40846.825888 913.048322 2.045741 3.059849 329.009305
41 40190.375239 896.251829 2.056078 3.047564 329.112464
y0
orientation phase
0 0 328.270838
1 328.229866
2 328.116451
3 328.329542
4 328.296806
5 328.242425
6 328.092029
7 328.112867
8 327.832393
9 327.676213
10 327.546436
11 327.407111
12 327.402257
13 327.474789
14 327.543623
15 327.562031
16 327.652898
17 327.874860
18 328.026580
19 328.144362
20 328.160330
21 328.214276
22 328.355185
23 328.439086
24 328.442798
25 328.337309
26 328.083656
27 327.933050
28 328.058666
29 328.019205
... ...
2 12 327.965725
13 327.984562
14 328.090842
15 328.107543
16 328.022435
17 328.083483
18 328.085731
19 328.104198
20 328.093098
21 328.227986
22 328.126674
23 328.083998
24 328.097805
25 327.932856
26 327.861280
27 327.868818
28 327.896817
29 327.945705
30 327.981305
31 327.843980
32 327.880321
33 327.900045
34 327.897844
35 327.953856
36 327.990412
37 328.229067
38 328.443732
39 328.326554
40 328.427797
41 328.410203
[126 rows x 6 columns]]
In [23]:
times = []
for i in range(1,17):
t = time.clock()
mySIM.fitPeaks(20,i,quiet = True)
times.append(time.clock()-t)
plot(times)
blob [115 248 1 169] is unfittable
multiprocessing engaged with 2 cores
multiprocessing engaged with 3 cores
multiprocessing engaged with 4 cores
multiprocessing engaged with 5 cores
multiprocessing engaged with 6 cores
multiprocessing engaged with 7 cores
multiprocessing engaged with 8 cores
multiprocessing engaged with 9 cores
multiprocessing engaged with 10 cores
multiprocessing engaged with 11 cores
multiprocessing engaged with 12 cores
multiprocessing engaged with 13 cores
multiprocessing engaged with 14 cores
multiprocessing engaged with 15 cores
multiprocessing engaged with 16 cores
Out[23]:
[<matplotlib.lines.Line2D at 0x1555e0b8>]
In [10]:
for peak in mySIM.fits:
for i, orient in peak.groupby(level='orientation'):
orient.amp.plot()
In [12]:
mySIM.calc_sim_params()
mySIM.plot_sim_params()
Out[12]:
(<matplotlib.figure.Figure at 0x1418aa90>,
array([<matplotlib.axes._subplots.AxesSubplot object at 0x00000000140103C8>,
<matplotlib.axes._subplots.AxesSubplot object at 0x000000001492A5F8>,
<matplotlib.axes._subplots.AxesSubplot object at 0x00000000149726D8>], dtype=object))
In [13]:
df = copy.deepcopy(mySIM.fits)
In [14]:
df[0].dropna().head()
Out[14]:
amp
offset
sigma_x
sigma_y
x0
y0
orientation
phase
0
4
29.896382
105.491413
0.249626
0.536059
484.663505
310.838903
5
11.731306
106.002572
0.139987
1.325269
488.000137
316.634784
6
14.691388
105.266970
0.376864
1.588755
486.646447
311.494253
7
43.394342
105.292056
0.250463
0.611598
487.549383
314.478534
8
42.185487
105.576373
0.258943
0.504482
485.429062
311.028212
In [15]:
for i,peak in enumerate(df):
peak.amp.plot(label=i)
legend()
Out[15]:
<matplotlib.legend.Legend at 0x14ec9208>
In [16]:
for peak in df:
figure()
for i, trace in peak.groupby(level='orientation'):
#v = np.roll(trace.amp.values,10)
v = trace.amp.values
h = plot(v,'o')
try:
coef = LPSVD(v,M=4)
if len(coef) != 3:
raise ValueError
plot(reconstruct_signal(coef,v),color=h[0].get_color())
except ValueError as e:
pass
In [17]:
new_df = []
for peak in df:
figure()
for i, trace in peak.groupby(level='orientation'):
#v = np.roll(trace.amp.values,10)
v = trace.amp.values
#filter 3 sigma
s = nanstd(v)
m = nanmean(v)
vf = v.copy()
vf[abs(v-m) > 1.5*sqrt(2)*s] = nan
h = plot(v,'x')
mod = (nanmax(vf)-nanmin(vf))/nanmax(vf)
plot(vf,'o',color=h[0].get_color(),label=mod)
ylim(ymin=0)
temp = trace.mean().to_dict()
temp['orientation']=i
temp['modulation']=mod
new_df.append(temp)
legend()
new_df = pd.DataFrame(new_df)
new_df
Out[17]:
amp
modulation
offset
orientation
sigma_x
sigma_y
x0
y0
0
33.819871
0.959200
105.886756
0
0.966002
1.265013
487.376449
313.070703
1
24.678082
0.867707
105.477708
1
1.604558
1.864819
488.090235
313.690121
2
19.577880
0.940358
104.825041
2
1.664369
1.383209
488.190034
313.553115
3
14.972552
0.884658
105.172893
0
1.125874
1.938181
70.703074
66.927664
4
13.918947
0.893544
104.450276
1
1.913898
2.239703
70.959056
66.309874
5
24.732019
0.861518
104.503546
2
1.435946
1.802550
70.883664
66.570136
6
1422.939104
0.717064
148.319296
0
1.999485
2.407546
162.901407
448.801267
7
1416.755854
0.606923
147.205255
1
1.995727
2.420924
163.042603
448.727556
8
569.350644
0.610257
120.090172
2
1.982507
2.392442
163.068413
448.732927
9
2835.369965
0.826242
162.954799
0
1.954103
2.009479
230.376373
102.104285
10
3329.142567
0.505699
171.193620
1
1.949927
2.040219
230.495668
102.063109
11
3402.826008
0.579193
169.965043
2
1.936102
2.024888
230.520955
102.066863
12
3046.319241
0.795372
155.927365
0
1.887695
2.016607
484.419021
220.202048
13
3702.956511
0.482718
166.260316
1
1.891779
2.036691
484.537826
220.152232
14
2333.577450
0.497254
142.163442
2
1.890782
2.025246
484.576304
220.164312
15
4976.592072
0.800661
189.722805
0
1.890473
1.994358
441.304553
66.962776
16
5988.689125
0.476113
206.015060
1
1.891870
2.010785
441.427182
66.913403
17
5140.914590
0.561336
189.695501
2
1.889059
2.005531
441.450273
66.934957
18
5555.092783
0.864908
224.705920
0
1.967527
2.045664
195.904992
294.120422
19
4837.694861
0.473533
207.648310
1
1.968664
2.069869
196.061970
294.062212
20
3824.797979
0.481201
183.305429
2
1.967160
2.057588
196.071400
294.080263
21
7309.777279
0.425191
351.183526
0
1.860863
2.289217
230.787713
392.916916
22
8070.853105
0.467528
363.594816
1
1.851956
2.308904
230.929664
392.881860
23
5520.182263
0.598550
266.228235
2
1.847004
2.289649
230.959547
392.896169
24
8883.075167
0.685228
260.843887
0
1.872903
2.027281
370.206572
101.745886
25
10895.717564
0.465624
293.365057
1
1.868870
2.043144
370.328433
101.698143
26
9130.251757
0.642851
258.298223
2
1.863104
2.032228
370.343901
101.704661
27
6723.793044
0.480413
320.317804
0
2.136879
2.764263
35.277508
338.984883
28
11416.195133
0.437153
459.452999
1
2.126729
2.777526
35.355776
339.088735
29
8281.206181
0.299876
353.415785
2
2.116891
2.741490
35.376896
339.122828
30
12074.908938
0.476308
393.960561
0
2.164072
2.165112
126.191510
245.321951
31
14825.332359
0.312431
454.900597
1
2.162063
2.200641
126.364341
245.282745
32
7680.613816
0.378902
279.368022
2
2.137090
2.174127
126.379635
245.315285
33
34902.535562
0.197138
841.615021
0
2.078562
3.083433
329.095164
327.923899
34
34890.545249
0.356926
832.557291
1
2.064647
3.103057
329.248443
327.983759
35
36874.215306
0.237067
837.513608
2
2.062609
3.118458
329.249323
328.029124
In [ ]:
Content source: david-hoffman/scripts
Similar notebooks: