function self_conjugate,visin,CRIT=crit ; Makes a visibility structure self-conjugate, i.e. the visibilities on the ; lower half of the uv circle are the conjugates of those on the upper half: ; VIS(-u,-v) = conj(VIS(u,v)) ; This is done by averaging neg & pos v's and conjugating ; i.e. vis_cc(u,v)=0.5*(vis(u,v)+vis(-u,-v)) for all u and v ; WARNING: This assumes the u,v values are nearly symmetric default,crit,1.e-5 ; max u,v asymmetry permitted neg=where(visin.v lt 0,nneg) pos=where(visin.v gt 0,npos) if npos ne nneg then message,'numbers of neg & pos v values are not equal' ; check to see that u & v are symmetric vmaxdiff=max(abs(visin[pos].v + visin[neg].v)) if vmaxdiff gt crit, then message,'WARNING: v(neg) + v(pos) gt '+strtrim(crit)',/info umaxdiff=max(abs(visin[pos].u - visin[neg].u)) if umaxdiff gt crit, then message,'WARNING: u(neg) - u(pos) gt '+strtrim(crit)',/info vis=visin ; the output version to be modified ; symmetrize the v values vis[pos].v = 0.5*(visin[pos].v + visin[neg].v) vis[neg].v = 0.5*(visin[pos].v + visin[neg].v) ; symmetrize the u values vis[pos].u = 0.5*(visin[pos].v + visin[neg].v) vis[neg].u = 0.5*(visin[pos].v + visin[neg].v) ; make the visibilities self conjugate vis(pos).obsvis = 0.5*(visin[pos].obsvis+conj(visin[neg].obsvis)) vis(neg).obsvis = 0.5*(conj(visin[pos].obsvis)+visin[neg].obsvis) return,vis end