Commit a0834cfb authored by rfetick's avatar rfetick
Browse files

update galpak example

parent 9166523e
......@@ -5,7 +5,6 @@ Created on Fri Jul 9 10:16:23 2021
Create a wrapper around Psfao for GalPak
TODO: manage odd pixels
TODO: manage PSF shift for undesampling
@author: rfetick
"""
......@@ -13,14 +12,12 @@ TODO: manage PSF shift for undesampling
from maoppy.utils import RAD2ARCSEC
from maoppy.psfmodel import Psfao
class PointSpreadFunction:
"""Dummy class. Replace it with the GalPak implementation"""
pass
# Psfao.__init__(self,npix,system=None,Lext=10.,samp=None, fixed_k = None)
# Psfao.__call__(self,x0,dx=0,dy=0,grad=False)
class PsfaoGalpak(Psfao, PointSpreadFunction):
def __init__(self, param, wvl_um, system=None, Lext=10., fixed_k=None):
npix = (10,10) # will be modified in 'as_image'
......@@ -49,12 +46,14 @@ class PsfaoGalpak(Psfao, PointSpreadFunction):
ww = wvl_um/self.wvl_ref_um # wavelength ratio
r0,C,A,alpha,ratio,theta,beta = self.param
p = [r0*ww**(6./5.),C*ww**(-2),A*ww**(-2),alpha,ratio,theta,beta]
dx = 0 # TODO: check this
dy = 0 # TODO: check this
print("WARNING: PsfaoGalpak not finished yet")
dx = (self._k-1)/(2*self._k) # centered on one pixel
dy = (self._k-1)/(2*self._k) # centered on one pixel
return self.__call__(p, dx=dx, dy=dy)
if __name__ == "__main__":
### PARAMETERS
......@@ -80,9 +79,9 @@ if __name__ == "__main__":
nwvl = 10
nx = 30
ny = 40
ny = 36
xy_step = muse_wfm.resolution_mas*1e-3 # comply with Muse resolution for this dummy cube
z_central = 0.7 # [um]
z_central = 0.8 # [um]
for_cube = MuseCube((nwvl,nx,ny), xy_step, z_central)
### CREATE PSF MODEL and GET 2D PSF
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment