Inversion of Magnetic Speckle
--> Domains
We measure the speckles in k space but want to know what is
happening in realspace. We know only the magnitude in k space
so guess the object phases-- fourier transform-->
replace amplitudes with observed amplitudes--inverse transform-->
cut down on the image --new object--> repeat
Mk is gotten from MAD type measurements. T.O.Mentes,etal
in J.Synchrotron Radiation 9,90(2002)
has developed some equations for linear and circular
polarization reconstruction. In linear polarization,
transmission geometry the interference between charge
and magnetic scattering is strongly suppressed.
The importance of speckle
contrast and photon noise must be considered; by adding
up lots of the Mk images,such as this one,
the signal should creep out of the noise.
%%%part of matlab code
%%to calculate Mk from three
%%images.
%%f*, A,B,C computed from
%%Mentes paper
%%f' and f" charge & magnetic
%%precomputed from measurements
%%Pt/Co films
Mk=zeros(1024);%magnetization
ZZ=ones(3,1);
xc=512;%center of ccd
yc=512;
%%actual center is 512.5,512.5
%%and can be corrected for
%assuming we know the center
for y=1:1024
for x=1:1024
ZZ(1)=(Z1(x,y) +Z1(2*xc+1-x,2*yc-y+1))/2;
%ZZ(2)=(Z2(x,y) +Z2(-x,-y))/2;
ZZ(2)=(Z2(x,y) +Z2(2*xc+1-x,2*yc-y+1))/2;
ZZ(3)=(Z3(x,y) +Z3(2*xc+1-x,2*yc-y+1))/2;
r2=(-y+yc)^2 + (x-xc)^2;
rr2=r2*(2.54/1024)^2;
sinth2=(rr2/(118*118 + rr2));%sin(theta) squared
if(abs(yc-y)==0 & abs(x-xc)==0)
sinph=0;
cosph=0;
else
sinph=(yc-y)/sqrt(r2);%sin(phi)
cosph=(x-xc)/sqrt(r2);
end
A=(1-sinth2*sinph*sinph);
B=(1-sinth2*cosph*cosph);
C=2*sinth2*sinph*cosph;
fc1=47.2651; fm1=4.6510;
fc2=98.9311; fm2=24.8350;
fc3=19.3420; fm3=2.6977;
AA(1,1)=A*fc1*fc1;
AA(2,1)=A*fc2*fc2;
AA(3,1)=A*fc3*fc3;
AA(1,2)=B*fm1*fm1;
AA(2,2)=B*fm2*fm2;
AA(3,2)=B*fm3*fm3;
AA(1,3)=-76.6318*C;
AA(2,3)=-273.1239*C ;
AA(3,3)=-34.9427*C;
[U,S,V]=svd(AA);
W=eye(size(AA))/S;
XX=V*W*U'*ZZ;
Mk(x,y)=sqrt(abs(XX(2)));% magnitude Magnetization
end % x
end %y
clear Z1;
clear Z2;
clear Z3;
%save Mk and compare to G in a loop
figure(4);
mesh(X,Y,Mk);% save Mk to compare with use gamma
axis square;
view(90,90);
title(' MADmodulusMk ');
print -djpeg99 MADmodulusMk.jpg
G=zeros(1024);
G=(2.*round(rand(1024))-ones(1024)).*Mk;
%%
%%%
%%%......
We use equations
11 and 15 from Mentes paper (since we know the center)
J.Miao,etal PRL 89,(2002) patched in some
for the blocker.
For comparison of the latest cycle of
fourier tranform and inverse to the Mk one can
use the cross correlation function:
%gamma is the cross correlation utiilizing
% a matrix of average pixel values computed
% as Zav(x,y)
% that is subtracted off every image
% gamma=sum of the product of pixel values
% from two images
% divided by the square root of the
% product of sum pixel values squared
% from each image
% gamma=0 means uncorrelated(opposite
% of the R value)
% gamma=-1 anti-correlated
% gamma= 1 means correlated (this
% is opposite of the R value)