Skip to content

Commit 54d8b9e

Browse files
authored
Add files via upload
1 parent 4d547d4 commit 54d8b9e

1 file changed

Lines changed: 29 additions & 15 deletions

File tree

functions/@outputStatSTEM_MAP/outputStatSTEM_MAP.m

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
classdef outputStatSTEM_MAP < StatSTEMfile
2+
% outputStatSTEM_MAP - class to hold fitted parameters of different
3+
% Gaussian models obtained for MAP
4+
%
5+
% Advanced analysis options are defined for this class such as:
6+
%
7+
8+
%--------------------------------------------------------------------------
9+
% This file is part of StatSTEM
10+
%
11+
% Copyright: 2018, EMAT, University of Antwerp
12+
% Author: K.H.W. van den Bos, J. Fatermans
13+
% License: Open Source under GPLv3
14+
% Contact: sandra.vanaert@uantwerpen.be
15+
%--------------------------------------------------------------------------
216

317
properties
418
models = {}; % Cell structure containing outputStatSTEM files
5-
NselMod = 1; %
19+
NselMod = 1; % Selected model
620
end
721

822
properties (Dependent)
@@ -13,23 +27,23 @@
1327
end
1428

1529
properties (SetAccess=private)
16-
chi2 = 0.0;
17-
heds_tot = 0.0;
18-
etamin = 0.0;
19-
beta_xmin = 0.0;
20-
beta_ymin = 0.0;
21-
etamax = 0.0;
22-
beta_xmax = 0.0;
23-
beta_ymax = 0.0;
24-
rho_min = 0.0;
25-
rho_max = 0.0;
26-
zeta_min = 0.0;
27-
zeta_max = 0.0;
30+
chi2 = 0.0; % Least squares sum of fitted models
31+
heds_tot = 0.0; % Determinant of Hessian matrix of fitted models
32+
etamin = 0.0; % Lower limit on intensity of a column
33+
beta_xmin = 0.0; % Lower limit on x-coordinate of a column
34+
beta_ymin = 0.0; % Lower limit on y-coordinate of a column
35+
etamax = 0.0; % Upper limit on intensity of a column
36+
beta_xmax = 0.0; % Upper limit on x-coordinate of a column
37+
beta_ymax = 0.0; % Upper limit on y-coordinate of a column
38+
rho_min = 0.0; % Lower limit on width of a column
39+
rho_max = 0.0; % Upper limit on width of a column
40+
zeta_min = 0.0; % Lower limit on background
41+
zeta_max = 0.0; % Upper limit on background
2842
end
2943

3044
methods
31-
[output,obj] = selNewModel(obj,input)
3245
showMAPprob(obj)
46+
[output,outputMAP] = selNewModel(outputMAP,input);
3347
hfig = showModels(obj,input)
3448
end
3549

@@ -98,7 +112,7 @@
98112

99113
t = zeros([1 obj.Nmodels]);
100114
for i = 1:obj.Nmodels
101-
t(i) = factorial(u(i)) / factorial(v) * (4*pi)^(1.5*(u(i)-v)) * exp(-0.5*(chi(i))) * ((obj.beta_xmax-obj.beta_xmin)*(obj.beta_ymax-obj.beta_ymin)*(obj.etamax-obj.etamin))^(v-u(i)) * (obj.heds_tot(obj.Nmodels)/obj.heds_tot(i));
115+
t(i) = factorial(u(i)) / factorial(v) * (4*pi)^(1.5*(u(i)-v)) * exp(-0.5*(chi(i))) * ((obj.beta_xmax/obj.dx-obj.beta_xmin/obj.dx)*(obj.beta_ymax/obj.dx-obj.beta_ymin/obj.dx)*(obj.etamax-obj.etamin))^(v-u(i)) * (obj.heds_tot(obj.Nmodels)/obj.heds_tot(i));
102116
end
103117
p = t/max(t);
104118
val = log10(p);

0 commit comments

Comments
 (0)