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
- required_keys = {'filename', 'strehl', 'wavelength'}¶
- property strehl_ratio¶
- property wavelength¶
- class scopesim.effects.psfs.FieldConstantPSF(**kwargs)[source]¶
Bases:
DiscretePSF
A PSF that is constant across the field.
For spectroscopy, a wavelength-dependent PSF cube is built, where for each wavelength the reference PSF is scaled proportional to wavelength.
- required_keys = {'filename'}¶
- class scopesim.effects.psfs.FieldVaryingPSF(**kwargs)[source]¶
Bases:
DiscretePSF
TBA.
- Parameters:
- sub_pixel_flagbool, optional
- flux_accuracyfloat, optional
Default 1e-3. Level of flux conservation during rescaling of kernel
- required_keys = {'filename'}¶
- property strehl_imagehdu¶
The HDU containing the positional info for kernel layers.
- class scopesim.effects.psfs.GaussianDiffractionPSF(diameter, **kwargs)[source]¶
Bases:
AnalyticalPSF
- class scopesim.effects.psfs.NonCommonPathAberration(**kwargs)[source]¶
Bases:
AnalyticalPSF
TBA.
Needed: pixel_scale Accepted: kernel_width, strehl_drift
- required_keys = {'pixel_scale'}¶
- property total_wfe¶
- class scopesim.effects.psfs.PoorMansFOV(pixel_scale, spec_dict, recursion_call=False)[source]¶
Bases:
object
- class scopesim.effects.psfs.SeeingPSF(fwhm=1.5, **kwargs)[source]¶
Bases:
AnalyticalPSF
Currently only returns gaussian kernel with a
fwhm
[arcsec].- Parameters:
- fwhmflaot
[arcsec]