Skip to content

Commit a689bff

Browse files
committed
Minor changes for clearer code
1 parent 03c2619 commit a689bff

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/atip/rings/create_lattice_matfile.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,26 @@ function create_lattice_matfile(filename)
66
if ~(nargin == 0)
77
load(filename, 'ATIP_RING');
88
end
9+
910
if ~exist('ATIP_RING', 'var')
1011
global THERING;
11-
ATIP_RING = THERING;
12-
if isempty(ATIP_RING)
12+
if isempty(THERING)
1313
disp('THERING global variable is empty, try running storageringinit(Ringmode). Exiting with error.');
1414
exit(1)
1515
else
16+
ATIP_RING=THERING
1617
disp('Using global THERING and saving it to global ATIP_RING.');
1718
end
1819
else
1920
disp('Using loaded ATIP_RING from file.');
2021
end
22+
2123
fprintf('Initial lattice has dimensions: %s\n', mat2str(size(ATIP_RING)))
2224
% Correct dimension order if necessary.
2325
if size(ATIP_RING, 1) == 1
2426
ATIP_RING = permute(ATIP_RING, [2 1]);
2527
end
28+
2629
% Correct classes and pass methods.
2730
for x = 1:length(ATIP_RING)
2831
if strcmp(ATIP_RING{x, 1}.FamName, 'BPM10')

0 commit comments

Comments
 (0)