-
Notifications
You must be signed in to change notification settings - Fork 0
/
psf_calculation.m
61 lines (42 loc) · 1.07 KB
/
psf_calculation.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
% calculating psf
%% load z-stack file
% it should have knobby info and processed z-stack and max projection
load('zstack_psf_191124_3_.mat')
%% pick points of the bead
figure, imagesc(zstack_maxproj)
%%
[x,y] = ginput(1);
regionSize = 20;
yrange = round(y-regionSize:y+regionSize);
xrange = round(x-regionSize:x+regionSize);
temp3D = zstack(yrange, xrange, :);
implay(mat2gray(temp3D))
%%
implay(zstack)
%%
zstackSel = zstack(:,:,30:45);
figure, imagesc(max(zstackSel,[],3))
%%
implay(zstackSel)
%%
figure, imagesc(max(zstackSel,[],3))
[x,y] = ginput(1);
regionSize = 20;
yrange = round(y-regionSize:y+regionSize);
xrange = round(x-regionSize:x+regionSize);
temp3D = zstack(yrange, xrange, :);
implay(mat2gray(temp3D))
%%
axialPsf = squeeze(max(temp3D));
figure, imagesc(squeeze(max(temp3D)))
%%
axialIntensity = max(axialPsf(20:22,:));
figure, plot(axialIntensity)
%%
minVal = mean(axialIntensity([1:20,60:107]));
normIntensity = axialIntensity-minVal;
%%
pixFWHM = length(find(normIntensity > max(normIntensity)/2));
%%
zstep = mean(diff([knobbyInfo.z]));
FWHM = zstep * pixFWHM