exosim.tasks.instrument.loadPsfPaosTimeInterp#

Classes#

LoadPsfPaosTimeInterp

It loads the PSFs from two PAOS files and interpolates over time between them according to the given parameters.

Module Contents#

class LoadPsfPaosTimeInterp[source]#

Bases: exosim.tasks.instrument.loadPsfPaos.LoadPsfPaos

It loads the PSFs from two PAOS files and interpolates over time between them according to the given parameters. Each PAOS file contains a PSF vs wavelength. The task loads the PSF cubes provided by the filename parameter. The PSFs 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 an example of time dependency is implemented in the model method.

The PSF cube is then cropped to removed unused edges, where the signal is less than 1/100 of the PSF peak. This would fasten up the successive ExoSim step.

Returns:

cube of psfs. axis=0 is time, axis=1 is wavelength, axis=2 is spatial direction, axis=3 is spectral direction.

Return type:

ndarray

Note

filename must be a string of filenames separated by a comma and a space. To write your version, define a new class that inherits from this one in a dedicated python file. Then copy the model method and replace the indicated section (where REPLACE THIS WITH YOUR MODE is written).

model(filename, parameters, wavelength, time)[source]#
Parameters:
  • filename (str) – PSF input file

  • parameters (dict) – dictionary containing the parameters. This is usually parsed from LoadOptions

  • wavelength (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:

ndarray

static normalise(psf_out, psf_out_cropped)[source]#
load_psfs(filename, wavelength, parameters)[source]#
Parameters:
  • parameters (dict) – dictionary containing the parameters. This is usually parsed from LoadOptions

  • wavelength (Quantity) – wavelength grid.

  • filename (str) – string containing PSF input files separated by a comma

Returns:

list of psf cubes. axis=0 is wavelength, axis=1 is spatial direction, axis=2 is spectral direction.

Return type:

list