Skip to content

Commit cb0ca1c

Browse files
authored
UI bug fixes
Fixed problems with the T-matrix calculation GUI. Includes: - progress_callback function in all T-matrix class constructors - Special case for displaying DDA progress (just in terminal for now) - Other minor GUI related changes Should resolve issue #45
2 parents 819bfed + 625ba0e commit cb0ca1c

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed
1.39 KB
Binary file not shown.

+ott/TmatrixDda.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ function DefaultProgressCallback(data)
263263

264264
% Tell the user some things
265265
if pa.Results.verbose && pa.Results.z_rotational_symmetry ~= 1
266-
disp(['Voxels with rotationa symmetry: ' num2str(size(xyz, 2))]);
266+
disp(['Voxels with rotational symmetry: ' num2str(size(xyz, 2))]);
267267
end
268268

269269
% Put everything in units of wavelengths
@@ -280,7 +280,7 @@ function DefaultProgressCallback(data)
280280
% Calculate alpha for remaining positions
281281

282282
if isempty(pa.Results.spacing)
283-
error('Spacing is needed for polarizability calculation');
283+
error('spacing is needed for polarizability calculation');
284284
end
285285

286286
% Get and filter k_particle, convert to index

+ott/TmatrixEbcm.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
p.addParameter('index_particle', []);
9393

9494
p.addParameter('verbose', false);
95+
p.addParameter('progress_callback', @(x) []);
9596

9697
p.parse(varargin{:});
9798

@@ -125,7 +126,8 @@
125126
'z_mirror_symmetry', z_mirror_symmetry, ...
126127
'invmethod', p.Results.invmethod, ...
127128
'internal', p.Results.internal, ...
128-
'verbose', p.Results.verbose);
129+
'verbose', p.Results.verbose, ...
130+
'progress_callback', p.Results.progress_callback);
129131
end
130132
end
131133

@@ -186,7 +188,10 @@
186188
pa.addParameter('z_mirror_symmetry', false);
187189
pa.addParameter('internal', false);
188190
pa.addParameter('invmethod', []);
191+
189192
pa.addParameter('verbose', false);
193+
pa.addParameter('progress_callback', @(x) []);
194+
190195
pa.parse(varargin{:});
191196

192197
% Store inputs k_medium and k_particle

+ott/TmatrixSmarties.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,14 @@
119119
p.addParameter('Nmax', []);
120120
p.addParameter('npts', []);
121121
p.addParameter('verbose', false);
122+
p.addParameter('progress_callback', @(x) []);
122123

123124
p.parse(varargin{:});
125+
126+
% First check we have SMARTIES
127+
if exist('slvForT', 'file') ~= 2
128+
error('Could not find SMARTIES function slvForT, check SMARTIES installed');
129+
end
124130

125131
% Get the wavenumber of the particle and medium
126132
[tmatrix.k_medium, tmatrix.k_particle] = ...

0 commit comments

Comments
 (0)