You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defjitter_psf(rad: float, angle: float=0, centre: tuple= (0,0), npsf: int=10):
""" Returns a jittered PSF by summing a number of shifted PSFs. Parameters ---------- rad : float The radius of the jitter in pixels. angle : float, optional The angle of the jitter in degrees, by default 0 centre : tuple, optional The centre of the jitter in pixels, by default (0,0) npsf : int, optional The number of PSFs to sum, by default 10 Returns ------- np.ndarray The jittered PSF. """angle=np.deg2rad(angle) # converting to radius# converting to cartesian coordinatesx=rad/2*np.cos(angle)
y=rad/2*np.sin(angle)
xs=np.linspace(-x, x, npsf) # pixelsys=np.linspace( -y, y, npsf) # pixelspositions=pscale* (np.stack([xs, ys], axis=1) +np.array(centre)) # arcsecondspsfs=vmap_prop(optics, source, positions)
jit_psf=psfs.sum(0) /npsf# adding and renormalisingreturnjit_psf
The text was updated successfully, but these errors were encountered:
Update the
generate_kernel
method of the existing class. Perhaps add in theApplyLinearJitter
class I wrote for Toliman work.e.g.
and turn this func into a
DetectorLayer
The text was updated successfully, but these errors were encountered: