%%% Script to compare the experimental I(q) data with the solutions %%% of regularized P(r) transforms for different values of Dmax %%% Set the filename and Dmax values to loop over below; %%% Loop over the different Dmax values by pressing any key %%% %%% Author: Jan Lipfert %%% Date: 11/1/2007 clc; clf; clear; %%% --- Set the values of Dmax to loop over here --- %%% for Dmax = 50:5:200 clf;clc; %%% --- Set the basename of the files here --- %%% basename = ['basename.' num2str(Dmax)]; %%% Load Iexp dat = load([basename '.exp']); datReg = load([basename '.ireg']); datPr = load([basename '.pr']); subplot(2,2,1) hold on; box on; plot(dat(:,1), dat(:,2), 'or') plot(datReg(:,1), datReg(:,2), '-', 'linewidth', 2) mytextstr = ['File: ' basename]; title(mytextstr, 'interpreter','none','fontsize', 16) %title('I(q)', 'fontsize', 16) set(gca, 'fontsize', 16) xlabel('q (A^{-1})', 'fontsize', 16); ylabel('I(q) (a.u.)', 'fontsize', 16); legend('Iexp{ }', 'Ireg{ }') subplot(2,2,2) hold on; box on; plot(dat(:,1), log10(dat(:,2)), 'or') plot(datReg(:,1), log10(datReg(:,2)), '-', 'linewidth', 2) title(['Dmax = ' num2str(Dmax) ' A'], 'fontsize', 16); %title('log(I)', 'fontsize', 16) set(gca, 'fontsize', 16) xlabel('q (A^{-1})', 'fontsize', 16); ylabel('log(I) (a.u.)', 'fontsize', 16); subplot(2,2,3) hold on; box on; plot(dat(:,1), dat(:,2).*dat(:,1).^2, 'or') plot(datReg(:,1), datReg(:,2).*datReg(:,1).^2, '-', 'linewidth', 2) %title('q^2 \cdot I(q)', 'fontsize', 16) set(gca, 'fontsize', 16) xlabel('q (A^{-1})', 'fontsize', 16); ylabel('q^2 \cdot I(q) (a.u.)', 'fontsize', 16); subplot(2,2,4) hold on; box on; plot(datPr(:,1), datPr(:,2), 'k','linewidth', 2) title('P(r)', 'fontsize', 16) set(gca, 'fontsize', 16) xlabel('r (A)', 'fontsize', 16); ylabel('P(r)', 'fontsize', 16); pause; end