scopesim.effects.psfs module¶
- class scopesim.effects.psfs.AnisocadoConstPSF(**kwargs)[source]¶
Bases:
SemiAnalyticalPSF
Makes a SCAO on-axis PSF with a desired Strehl ratio at a given wavelength
To make the PSFs a map connecting Strehl, Wavelength, and residual wavefront error is required
- Parameters:
- filenamestr
Path to Strehl map with axes (x, y) = (wavelength, wavefront error)
- strehlfloat
Desired Strehl ratio. Either percentage [1, 100] or fractional [1e-3, 1]
- wavelengthfloat
[um] The given strehl is valid for this wavelength
- psf_side_lengthint
[pixel] Default is 512. Side length of the kernel images
- offsettuple
[arcsec] SCAO guide star offset from centre (dx, dy)
- rounded_edgesbool
Default is True. Sets all halo values below a threshold to zero. The threshold is determined from the max values of the edge rows of the kernel image
- Other Parameters:
- convolve_modestr
[“same”, “full”] convolution keywords from scipy.signal.convolve
Examples
Add an AnisocadoConstPSF with code:
from scopesim.effects import AnisocadoConstPSF psf = AnisocadoConstPSF(filename="test_AnisoCADO_rms_map.fits", strehl=0.5, wavelength=2.15, convolve_mode="same", psf_side_length=512)
Add an AnisocadoConstPSF to a yaml file:
effects: - name: Ks_Stehl_40_PSF description: A 40% Strehl PSF over the field of view class: AnisocadoConstPSF kwargs: filename: "test_AnisoCADO_rms_map.fits" strehl: 0.5 wavelength: 2.15 convolve_mode: full psf_side_length: 512
- property nmRms¶
- remake_kernel(x)[source]¶
Remake the kernel based on either a pixel_scale of FieldOfView
- Parameters:
- x: float, FieldOfView
[um] if float
- property strehl_ratio¶
- property wavelength¶
- class scopesim.effects.psfs.FieldConstantPSF(**kwargs)[source]¶
Bases:
DiscretePSF
A PSF that is constant across the field.
For spectroscopy, the a wavelength-dependent PSF cube is built, where for each wavelength the reference PSF is scaled proportional to wavelength.
- class scopesim.effects.psfs.FieldVaryingPSF(**kwargs)[source]¶
Bases:
DiscretePSF
- Parameters:
- sub_pixel_flagbool, optional
- flux_accuracyfloat, optional
Default 1e-3. Level of flux conservation during rescaling of kernel
- property strehl_imagehdu¶
The HDU containing the positional info for kernel layers
- class scopesim.effects.psfs.GaussianDiffractionPSF(diameter, **kwargs)[source]¶
Bases:
AnalyticalPSF
- fov_grid(which='waveset', **kwargs)[source]¶
Returns the edges needed to generate FieldOfViews for an observation
- Parameters:
- whichstr
[“waveset”, “edges”, “shifts”] where: * waveset - wavelength bin extremes * edges - on sky coordinate edges for each FOV box * shifts - wavelength dependent FOV position offsets
- Returns:
- wavesetlist
[um] N+1 wavelengths that set edges of N spectral bins
- edgeslist of lists
[arcsec] Contains a list of footprint lists
- shiftslist of 3 lists
[wave, dx, dy] Contains lists corresponding to the (dx, dy) offset from the optical axis (0, 0) induced for each wavelength in (wave) [um, arcsec, arcsec]
- class scopesim.effects.psfs.NonCommonPathAberration(**kwargs)[source]¶
Bases:
AnalyticalPSF
Needed: pixel_scale Accepted: kernel_width, strehl_drift
- fov_grid(which='waveset', **kwargs)[source]¶
Returns the edges needed to generate FieldOfViews for an observation
- Parameters:
- whichstr
[“waveset”, “edges”, “shifts”] where: * waveset - wavelength bin extremes * edges - on sky coordinate edges for each FOV box * shifts - wavelength dependent FOV position offsets
- Returns:
- wavesetlist
[um] N+1 wavelengths that set edges of N spectral bins
- edgeslist of lists
[arcsec] Contains a list of footprint lists
- shiftslist of 3 lists
[wave, dx, dy] Contains lists corresponding to the (dx, dy) offset from the optical axis (0, 0) induced for each wavelength in (wave) [um, arcsec, arcsec]
- property total_wfe¶
- class scopesim.effects.psfs.PSF(**kwargs)[source]¶
Bases:
Effect
- fov_grid(which='waveset', **kwargs)[source]¶
Returns the edges needed to generate FieldOfViews for an observation
- Parameters:
- whichstr
[“waveset”, “edges”, “shifts”] where: * waveset - wavelength bin extremes * edges - on sky coordinate edges for each FOV box * shifts - wavelength dependent FOV position offsets
- Returns:
- wavesetlist
[um] N+1 wavelengths that set edges of N spectral bins
- edgeslist of lists
[arcsec] Contains a list of footprint lists
- shiftslist of 3 lists
[wave, dx, dy] Contains lists corresponding to the (dx, dy) offset from the optical axis (0, 0) induced for each wavelength in (wave) [um, arcsec, arcsec]
- class scopesim.effects.psfs.SeeingPSF(fwhm=1.5, **kwargs)[source]¶
Bases:
AnalyticalPSF
Currently only returns gaussian kernel with a
fwhm
[arcsec]- Parameters:
- fwhmflaot
[arcsec]
- class scopesim.effects.psfs.Vibration(**kwargs)[source]¶
Bases:
AnalyticalPSF
Creates a wavelength independent kernel image