-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathunitTest.m
More file actions
40 lines (31 loc) · 961 Bytes
/
Copy pathunitTest.m
File metadata and controls
40 lines (31 loc) · 961 Bytes
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
function success = unitTest()
success = 0;
SaveDir = smi_helpers.mkSMITETmpDir('unitTest', 'SimSMLM');
obj = smi_sim.SimSMLM();
obj.SZ = 128; %256
obj.Rho = 50; %30
obj.NDatasets = 10; %2
obj.NFrames = 1000; % 10
obj.ZoomFactor = 2;
obj.K_OnToOff = 1;
obj.K_OffToOn = 0.005;
obj.K_OnToBleach = 0.2;
obj.EmissionRate = 1000;
obj.Bg = 15;
obj.PSFSigma = 1.3;
obj.StartState = 'Equib';
obj.LabelingEfficiency = 1;
NWings = 16;
obj.simStar(NWings);
SMD_Data = obj.genNoisySMD(obj.SMD_Model);
[Model, Data] = obj.genImageStack();
% Display the blobs without noise:
figure; imagesc(sum(Model, 3)); colormap(gca, gray(256));
saveas(gcf, fullfile(SaveDir, 'Model.png'));
%dipshow(Model)
% Display the blobs having Poisson noise:
figure; imagesc(sum(Data, 3)); colormap(gca, gray(256));
saveas(gcf, fullfile(SaveDir, 'Data.png'));
%dipshow(Data)
success = 1;
end