26.12.2013 Views

Coherent Backscattering from Multiple Scattering Systems - KOPS ...

Coherent Backscattering from Multiple Scattering Systems - KOPS ...

Coherent Backscattering from Multiple Scattering Systems - KOPS ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Evaluation of the small angle data<br />

% calculate intensity profile<br />

part1 = improfile ( matrix, [endpoints(1),position(1)] , ...<br />

[endpoints(3),position(2)] ) ;<br />

part2 = improfile ( matrix, [position(1),endpoints(2)] , ...<br />

[position(2),endpoints(4)] ) ;<br />

part2 = part2(2:end) ; % first pixel is already in part1 !<br />

intensity = [part1;part2] ;<br />

% calculate error profile<br />

part1 = improfile ( errormatrix, [endpoints(1),position(1)] , ...<br />

[endpoints(3),position(2)] ) ;<br />

part2 = improfile ( errormatrix, [position(1),endpoints(2)] , ...<br />

[position(2),endpoints(4)] ) ;<br />

part2 = part2(2:end) ; % first pixel is already in part1 !<br />

error = [part1;part2] ;<br />

% calculate scale<br />

if range > 1<br />

modulo1 = mod ( size(part1,1) - ceil(range/2) , range ) ;<br />

modulo2 = mod ( size(part2,1) - floor(range/2) , range ) ;<br />

intensity = intensity ( modulo1+1 : size(part1,1)+size(part2,1)-modulo2 ) ;<br />

intensity = reshape (intensity, range, []) ;<br />

error = error ( modulo1+1 : size(part1,1)+size(part2,1)-modulo2 ) ;<br />

error = reshape (error, range, []) ;<br />

weight = 1 ./ error.^2 ;<br />

weighted_intensity = intensity .* weight ;<br />

intensity = sum (weighted_intensity, 1) ./ sum (weight, 1) ;<br />

intensity = intensity’ ;<br />

error = 1 / sqrt(range) .* 1 ./ sqrt ( sum (weight, 1) ) ;<br />

error = error’ ;<br />

else<br />

modulo1 = 0 ;<br />

end<br />

length = sqrt ( ( x_end - x_start )^2 + ( y_end - y_start )^2 ) ;<br />

number = size ( intensity , 1 ) ;<br />

pixels = 1 : length/number : length ;<br />

pixels = pixels - pixels( ceil ( ( size(part1,1) - modulo1 ) / range ) ) ;<br />

pixels = pixels’ ;<br />

end<br />

91

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!