Forked from atemkeng/Estimate UVW from image parameters
Last active
February 25, 2016 10:31
-
-
Save SpheMakh/7f46cc7f3335ccc00348 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the phase center PSF | |
self.phasePSF = phasePSF; | |
# Observed frequency | |
self.freq0 = freq0 or 1.; | |
# the compression in time | |
self.dtime = dtime or 1; | |
# the compression in frequency | |
self.dfreq = dfreq or 1; | |
# the resolution or the pixel size in radian | |
self.resolution = np.pi*(cellsize/3600.)/180.; | |
self.npix, n = phasePSF.shape | |
Fov = n*self.resolution | |
Delta_u, Delta_v = (1./Fov, 1./Fov) | |
u = np.linspace(-(n-1)/2*Delta_u,(n-1)/2*Delta_u,n) | |
v = np.linspace(-(n-1)/2*Delta_v,(n-1)/2*Delta_v,n) | |
uu,vv = np.meshgrid(u,v) | |
# angle of orientation | |
vv[vv==0]=1.e-9 | |
angle = np.arctan(uu/vv) | |
#angle[uu==0]=1e-9 | |
# uv distance in radian | |
self.uvd = np.sqrt(uu**2 + vv**2) | |
# angular velocity on one year | |
ang_velocity = 2.*np.pi/(3600.*24.) | |
self.du =ang_velocity*self.uvd*(-1*np.sin(angle)) | |
self.dv =ang_velocity*self.uvd*np.cos(angle) | |
self.UVdomain = np.fft.fftshift(np.fft.fft2(self.phasePSF)) | |
print ("**************************** here ************************************************") | |
self.liste=[] | |
self.cellsize = cellsize | |
self.npixDirty = npix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment