COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
sutraWrap.SHWFS Class Reference
Inheritance diagram for sutraWrap.SHWFS:
Collaboration diagram for sutraWrap.SHWFS:

Public Member Functions

int comp_nphot (self, float ittime, float optthroughput, float diam, int nxsub, float zerop=0, float gsmag=0, float lgsreturnperwatt=0, float laserpower=0)
 Compute the currect number of photons for a given system. More...
 
int load_arrays (self, numpy.ndarray[numpy.int32] phasemap, numpy.ndarray[numpy.int32] hrmap, numpy.ndarray[numpy.int32] binmap, numpy.ndarray[numpy.float32] offsets, numpy.ndarray[numpy.float32] fluxPerSub, numpy.ndarray[numpy.int32] validsubsx, numpy.ndarray[numpy.int32] validsubsy, numpy.ndarray[numpy.int32] istart, numpy.ndarray[numpy.int32] jstart, numpy.ndarray[numpy.float32] ttprojmat, numpy.ndarray[numpy.complex64] kernel)
 Load SH WFS arrays. More...
 
int set_bincube (self, numpy.ndarray[numpy.float32] bincube, int nElem)
 Set the bincube of the SH WFS. More...
 
- Public Member Functions inherited from sutraWrap.Wfs
int comp_image (self, bool noise=True)
 Computes the WFS image from the WFS phase. More...
 
int fill_binimage (self, int arg0)
 Fill d_binimg from d_bincube. More...
 
int set_binimg (self, numpy.ndarray[numpy.float32] binimg, int nElem)
 Set the binimg of the SH WFS. More...
 
int set_dark (self, numpy.ndarray[numpy.float32] dark, int nElem)
 Set the dark of the SH WFS. More...
 
int set_fakecam (self, bool fakecam)
 Enable or disable uint16 computation for the WFS. More...
 
int set_flat (self, numpy.ndarray[numpy.float32] flat, int nElem)
 Set the flat of the SH WFS. More...
 
int set_max_flux_per_pix (self, int max_flux_per_pix)
 Set the maximum number of photons allowed before pixel saturation. More...
 
int set_max_pix_value (self, int max_pix_value)
 Set the maximum number of ADU allowed in the uint16 image. More...
 
int set_noise (self, float noise, int seed)
 Set the noise of the WFS. More...
 
None set_pupil (self, numpy.ndarray[numpy.float32] pupil)
 Set the pupil seen by the WFS. More...
 
int slopes_geom (self, int type=0)
 Computes theoretical slopes in wfs.d_slopes. More...
 
int slopes_geom (self, numpy.ndarray[numpy.float32] slopes, int type=0)
 

Properties

 d_binmap = property
 TODO docstring. More...
 
 d_fsamplifoc = property
 Focal plane with field stop. More...
 
 d_fsamplipup = property
 Complex amplitude in the pupil in the field stop array size. More...
 
 d_validpuppixx = property
 X position of the bottom left corner of each ssp. More...
 
 d_validpuppixy = property
 Y position of the bottom left corner of each ssp. More...
 
- Properties inherited from sutraWrap.Wfs
 d_bincube = property
 WFS spots as a 3D array. More...
 
 d_binimg = property
 WFS image. More...
 
 d_binimg_notnoisy = property
 WFS image without noise (ROKET only) More...
 
 d_camimg = property
 uint16 WFS image More...
 
 d_camplifoc = property
 Complex amplitude in the focal plane. More...
 
 d_camplipup = property
 Complex amplitude in the pupil. More...
 
 d_dark = property
 Dark WFS frame. More...
 
 d_flat = property
 Flat WFS frame. More...
 
 d_fluxPerSub = property
 Normalized flux per ssp. More...
 
 d_fttotim = property
 Buffer for FFT computation. More...
 
 d_gs = property
 WGS GS (SutraSource object) More...
 
 d_hrmap = property
 TODO docstring. More...
 
 d_intensities = property
 Sum of intensities in each ssp. More...
 
 d_offsets = property
 TODO docstring. More...
 
 d_phasemap = property
 TODO docstring. More...
 
 d_pupil = property
 Pupil. More...
 
 d_sincar = property
 TODO docstring. More...
 
 d_slopes = property
 Slopes vector. More...
 
 d_submask = property
 TODO docstring. More...
 
 d_ttprojmat = property
 TT projection matrix from subap phase to slopes (geom wfs type 2) More...
 
 d_ttprojvec = property
 Input vector for TT projection from subap phase to slopes (geom wfs type 2) More...
 
 d_validsubsx = property
 X-position of valid ssp. More...
 
 d_validsubsy = property
 Y-position of valid ssp. More...
 
 device = property
 GPU device index. More...
 
 fakecam = property
 Flag for uint16 image. More...
 
 is_low_order = property
 Flag for low order WFS. More...
 
 kernconv = property
 Convolution kernel for spot computation. More...
 
 lgs = property
 Is the WFS a LGS one ? More...
 
 max_flux_per_pix = property
 Maximum number of photons allowed before pixel saturation. More...
 
 max_pix_value = property
 Maximum number of ADU allowed in the uint16 image. More...
 
 nfft = property
 FFT support size. More...
 
 nffthr = property
 TODO docstring. More...
 
 nmaxhr = property
 TODO docstring. More...
 
 noise = property
 WFS noise [e-]. More...
 
 nphase = property
 Number of phase point per ssp. More...
 
 nphot = property
 Number of photons/ssp/iter. More...
 
 nphot4imat = property
 Number of photons/ssp/iter used for imat computation. More...
 
 npix = property
 Pixels per ssp. More...
 
 npup = property
 Pupil support size. More...
 
 nrebin = property
 Rebin factor. More...
 
 ntot = property
 HR support size. More...
 
 nvalid = property
 Number of valid ssp. More...
 
 nxsub = property
 Number of ssp in the diameter. More...
 
 roket = property
 Is the WFS a LGS one ? More...
 
 subapd = property
 ssp diameter in pixels More...
 
 type = property
 WFS type. More...
 

Detailed Description

Definition at line 7773 of file sutraWrap.py.

Member Function Documentation

◆ comp_nphot()

int sutraWrap.SHWFS.comp_nphot (   self,
float  ittime,
float  optthroughput,
float  diam,
int  nxsub,
float   zerop = 0,
float   gsmag = 0,
float   lgsreturnperwatt = 0,
float   laserpower = 0 
)

Compute the currect number of photons for a given system.

Parameters
ittime(float): 1/loop frequency [s].
optthroughput(float): wfs global throughput.
diam(float): telescope diameter.
nxsub(float): linear number of subaps.
zerop(float): (optional for LGS) detector zero point expressed in ph/m**2/s in the bandwidth of the WFS.
gsmag(float): (optional for LGS) magnitude of guide star.
lgsreturnperwatt(float): (optional for NGS) return per watt factor (high season : 10 ph/cm2/s/W).
laserpower(float): (optional for NGS) laser power in W.

Definition at line 7794 of file sutraWrap.py.

◆ load_arrays()

int sutraWrap.SHWFS.load_arrays (   self,
numpy.ndarray[numpy.int32]  phasemap,
numpy.ndarray[numpy.int32]  hrmap,
numpy.ndarray[numpy.int32]  binmap,
numpy.ndarray[numpy.float32]  offsets,
numpy.ndarray[numpy.float32]  fluxPerSub,
numpy.ndarray[numpy.int32]  validsubsx,
numpy.ndarray[numpy.int32]  validsubsy,
numpy.ndarray[numpy.int32]  istart,
numpy.ndarray[numpy.int32]  jstart,
numpy.ndarray[numpy.float32]  ttprojmat,
numpy.ndarray[numpy.complex64]  kernel 
)

Load SH WFS arrays.

Parameters
phasemapTODO: docstring
     hrmap:

     binmap:

     offsets:
fluxPerSub(np.array[ndim=2,dtype=np.float32]): Normalized flux per ssp
validsubsx(np.array[ndim=1, dtype=np.int64]): X position of each valid ssp
validsubsy(np.array[ndim=1, dtype=np.int64]): Y position of each valid ssp
     istart:

     jstart:
ttprojmat(np.array[ndim=2, dtype=np.float32]): slope projection matrix for geom wfs.

kernel:

Definition at line 7822 of file sutraWrap.py.

◆ set_bincube()

int sutraWrap.SHWFS.set_bincube (   self,
numpy.ndarray[numpy.float32]  bincube,
int  nElem 
)

Set the bincube of the SH WFS.

Parameters
bincube(np.array[ndim=3, dtype=np.float32]) : cube of subap. images
nElem(int): Number of elements in bincube

Definition at line 7832 of file sutraWrap.py.

Property Documentation

◆ d_binmap

sutraWrap.SHWFS.d_binmap = property
static

TODO docstring.

   @n type of :  carmaWrap.obj_int

Definition at line 7839 of file sutraWrap.py.

◆ d_fsamplifoc

sutraWrap.SHWFS.d_fsamplifoc = property
static

Focal plane with field stop.

   @n type of :  carmaWrap.obj_float_complex

Definition at line 7848 of file sutraWrap.py.

◆ d_fsamplipup

sutraWrap.SHWFS.d_fsamplipup = property
static

Complex amplitude in the pupil in the field stop array size.

   @n type of :  carmaWrap.obj_float_complex

Definition at line 7857 of file sutraWrap.py.

◆ d_validpuppixx

sutraWrap.SHWFS.d_validpuppixx = property
static

X position of the bottom left corner of each ssp.

   @n type of :  carmaWrap.obj_int

Definition at line 7866 of file sutraWrap.py.

◆ d_validpuppixy

sutraWrap.SHWFS.d_validpuppixy = property
static

Y position of the bottom left corner of each ssp.

   @n type of :  carmaWrap.obj_int

Definition at line 7875 of file sutraWrap.py.


The documentation for this class was generated from the following file: