5151
5252%% Recalculate size of boxes used to cut out parts of the original image
5353Box = round(FP .dist / input .dx )/2 * ones(max(type ),1 ); % calcBoxSize(FP.obs_bs,input.coordinates,input.dx);
54- % % ISTEM
55- % Box = [30;30;15];
56- % % ABF Dimi
57- % Box = [8;5;8];
58- % % ABF DF4 Nico Armand
59- % Box = [12;12;6];
60- % % ABF HAADF Nico Armand
61- % Box = [23.5;23.5;16];
62- % % LAADF Nico Armand
63- % Box = [17.5;17.5;9];
64- % % IDPC
65- % Box(3) = Box(1)/2;
66-
67- %% Zeta columnwise
68- % obs_back = smoothBack(Box,FP.K,FP.L,FP.X,FP.Y,input.obs,input.dx);
69- obs_back = 0 ;
7054
7155%% startmodel
72- input_obs_bs = input .obs - obs_back ;
73- reshape_obs_bs = reshape(input_obs_bs ,FP .K * FP .L ,1 );
56+ reshape_obs_bs = reshape(input .obs ,FP .K * FP .L ,1 );
7457Ga = sparse(FP .K * FP .L ,FP .n_c + FP .fitzeta );
7558job = cell(FP .numWorkers ,1 );
7659max_n = 70 - 6 * FP .numWorkers ;
146129 Estimated_eta = thetalin ;
147130 Estimated_zeta = FP .zeta ;
148131end
149- obs_bs = input_obs_bs - Estimated_zeta ;
132+ obs_bs = input . obs - Estimated_zeta ;
150133eta_estimatedbackground = Estimated_eta ;
151134
152135%% options for lsqnonlin
311294 if FP .fitzeta
312295 Estimated_eta = thetalin(1 : end - 1 );
313296 Estimated_zeta = thetalin(end );
314- obs_bs = input_obs_bs - Estimated_zeta ;
297+ obs_bs = input . obs - Estimated_zeta ;
315298 else
316299 Estimated_eta = thetalin ;
317300 end
374357 % fit
375358 StartParametersnonlin_s = [betaX_estimatedbackground(i ) betaY_estimatedbackground(i )];
376359 EstimatedParametersnonlin(: ,n ) = lsqnonlin(' criterionGauss_samerho' ,StartParametersnonlin_s ' ,[],[],options ,reshapeX_s ,reshapeY_s ,K_s ,L_s ,obs_s_back ,rho_estimatedbackground(i ));
377- end
360+ end
0 commit comments