install poppy and astropy and picloud locally:
 $ pip install --no-deps astropy
 $ pip install poppy --upgrade
 $ sudo pip install cloud

sign up for picloud:

$ picloud setup

On the website setup a picloud Ubuntu 12.04 environment named "poppy".

from the configuration console in that environment, install FFTW and astropy:

  sudo apt-get install fftw3
  sudo pip install astropy

then jusy run the code below.

In [2]:
import poppy 
import astropy
import cloud
import matplotlib.pyplot as plt
WARNING: No thermal tables found, no thermal calculations can be performed. No files found for /Users/edouglas/Documents/projects/PICTURE/synphot/mtab/*_tmt.fits. [pysynphot.refs]
In [2]:
In [2]:
In [2]:

In [3]:
def psf(wavelength):
    osys = poppy.OpticalSystem(oversample=10)
    osys.addPupil(function='Circle', radius=.25,pad_factor = 1.0) # pupil radius in meters
    osys.addDetector(pixelscale=0.18, fov_arcsec=23)  # image plane coordinates in arcseconds
    return osys.calcPSF(wavelength,display_intermediates=False)
In [4]:
manywaves=400e-9 + 1e-8*np.arange(10,41) #400 to 800  nm,wavelength,_env='poppy',_profile=True)
In [5]:
In [6]:
#add up the returned psfs for each wavlength:
summed=np.sum([(wave[0].data) for wave in multiwave[:]],axis=0)
<matplotlib.image.AxesImage at 0x10d8e0c50>

save as fits file to local disk:

In [10]:
hdufieldresult =
In [ ]: