Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFT vs Huygens notebook uses old API #72

Open
dkirkby opened this issue May 11, 2019 · 0 comments
Open

FFT vs Huygens notebook uses old API #72

dkirkby opened this issue May 11, 2019 · 0 comments

Comments

@dkirkby
Copy link
Contributor

dkirkby commented May 11, 2019

This notebook uses old APIs for both PSF methods. I think I fixed the first off-axis example with the following changes, but please double check @jmeyers314:

#theta_y = 0.75
theta_y = np.deg2rad(0.75)
...
fftpsf = batoid.fftPSF(telescope, theta_x, theta_y, wavelength)
fftpsf, coords = fftpsf.array, fftpsf.coords
extent = np.array([coords[0,0,0], coords[-1,-1,0], coords[0,0,1], coords[-1,-1,1]])
#scale, fftpsf = batoid.fftPSF(telescope, wavelength, theta_x, theta_y)
fftpsf = fftpsf[16:-16, 16:-16]
#extent = scale*fftpsf.shape[0]/2*np.r_[-1., 1., -1., 1.] # radians
#extent -= scale/2
...
#goodRays = batoid.trimVignetted(traced_rays)
goodRays = traced_rays.trimVignetted()
...
#huygensPSF = batoid.huygensPSF(telescope, xs=xs, ys=ys, zs=None, rays=orig_rays, saveRays=False)
huygensPSF = batoid.huygensPSF(telescope, theta_x, theta_y, wavelength, nx=16)
huygensPSF = huygensPSF.array

The resulting images are:

image

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant