mperrin / webbpsf

James Webb Space Telescope PSF simulation tool - NOTE THIS VERSION OF REPO IS SUPERCEDED BY spacetelescope/webbpsf
BSD 3-Clause "New" or "Revised" License
16 stars 15 forks source link

Add API function for making multi wavelength datacubes #116

Closed mperrin closed 6 years ago

mperrin commented 8 years ago

This has been requested by Chas Beichman and Klaus Hodapp to help with IFU simulations.

Brainstorming an API here, this could be something like

instr.calc_psf_cube(wavelengths=np.linspace(2,5,10), fov_arcsec=2)

def calc_psf_cube(self, wavelengths, *args, **kwargs):

    cube = "make a FITS file cube of appropriate dimensions etc."
    for i,wl in enumerate(wavelengths):
        psf = self.calc_psf(*args, **kwargs)
        for ext in len(psf):
            cube[ext].data[i] = psf[ext].data
   "update cube FITS header info appropriately"
   return cube    

etc etc.

mperrin commented 8 years ago

This might actually be a poppy.Instrument enhancement rather than in webbpsf

mperrin commented 8 years ago

Functionality added to poppy.Instrument in https://github.com/mperrin/poppy/commit/952aa6966dba24c7afb87b48b4525d2b3a0268ff.

Needs documentation in webbpsf, and maybe a unit test here too.

mperrin commented 6 years ago

Issues migrated to https://github.com/spacetelescope/webbpsf/issues. Please see the copies in that repo from now on.