(3) is what I am after. I want to calculate the mean phase error between the phases for the correct hand and a reference set of phases so the
I thought I only had to shift the phases by 180 degrees to invert the hand. The resulting map looks much
poorer. The space group is R32 (the H setting). My fortran jiffy is listed below.
real fobs,fom
integer h,k,l, phs, nnphs, dphs
C
open(unit=5,FILE='711pat.phs')
open(unit=6,FILE='711_inverted.phs')
3 FORMAT(3i4,F8.2,F8.4,I5)
4 FORMAT(3i4,F8.2,F8.4,I5)
5 FORMAT(3i4,F8.2,F8.4,F8.1)
11 read(5,3,end=9999) h,k,l,fobs,fom,dphs
if ((dphs.eq.0).OR.(dphs.eq.360)) then
nnphs=180
elseif (dphs.eq.180) then
nnphs=0
elseif ((dphs.gt.0).AND.(dphs.lt.180)) then
nnphs = dphs + 180
elseif ((dphs.gt.180).AND.(dphs.lt.360))then
nnphs = dphs - 180
endif
write(6,4) h,k,l,fobs,fom,nnphs
goto 11
9999 continue
end