exosim.tasks.instrument.loadPsfPaos#
Classes#
It loads the PSFs from a PAOS file. |
Module Contents#
- class LoadPsfPaos[source]#
Bases:
exosim.tasks.instrument.loadPsf.LoadPsfIt loads the PSFs from a PAOS file. Each PAOS file contains a PSF vs wavelength. The task loads the PSF cube provided by the filename parameter. The PSF are then interpolated over a grid matching the one used to produce the focal planes, to convert them into the physical units. Then the total volume of the interpolated PSF is rescaled to the total volume of the original one. This allow to take into account for loss in the transmission due to the optical path. The PSF are then interpolated over a wavelength grid matching the one used to for the focal plane, producing the cube. Then, the PSF cube is repeated on the temporal axis, because no temporal variation is considered in this Task.
- Returns:
cube of psfs. axis=0 is time, axis=1 is wavelength, axis=2 is spatial direction, axis=3 is spectral direction.
- Return type:
- model(filename, parameters, wavelength, time)[source]#
- Parameters:
filename (str) – PSF input file
parameters (dict) – dictionary containing the parameters. This is usually parsed from
LoadOptionswavelength (
Quantity) – wavelength grid.
- Returns:
cube of psfs. axis=0 is time, axis=1 is wavelength, axis=2 is spatial direction, axis=3 is spectral direction.
- Return type:
- static load_wl_sampled(wl, data)[source]#
extract the wavelength from the data stored in the surfaces
- load_imac(wl, data, parameters, oversampling, delta_pix)[source]#
Returns the PSF interpolated to the detector pixel size. The PSF is normalized to the initial volume after the interpolation.
- Parameters:
wl (str) – wavelength
data (
h5py.File) – opened HDF5 fileparameters (dict) – detector description
oversampling (int) – oversampling factor
delta_pix (float or
astropy.units.Quantity) – sub-pixel size
- Returns:
PSF scaled to physical size
- Return type:
- crop_image_stack(psf_out, ene=0.99, time_iteration=False)[source]#
It crops the image stack. It takes the PSF for the longest wavelength, as it is expected to be the largest PSF, and then selects the smallest aperture which collect at least the desired ene, using
find_rectangular_aperture. Then it remove these area from all the image in the psf data cube.- Parameters:
psf_out (
numpy.ndarray) – output PSF cubeene (float) – encircled energy desired. Default is 99%.
time_iteration (bool) – if time iteration is True then it perform
- Returns:
PSF cube cropped
- Return type:
- static wl_interpolate(psf_cube, wl, wl_sampled)[source]#
This function interpolates the PSF to the desired wavelength grid
- Parameters:
psf_out (
numpy.ndarray) – output PSF cubepsf_cube (
numpy.ndarray) – input PSF cubewl (
numpy.ndarray) – desired wavelength gridwl_sampled (
numpy.ndarray) – input wavelength grid
- Returns:
output PSF cube
- Return type: