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

Public Member Functions

int comp_nphot (self, float ittime, float optthroughput, float diam, float cobs, float zerop=0, float gsmag=0)
 Compute the currect number of photons for a given system. More...
 
int copy_valid_pix (self, numpy.ndarray[numpy.float32] data, numpy.ndarray[numpy.int32] validx, numpy.ndarray[numpy.int32] validy, int dim)
 Copy the given pixels on the right place in the binimg of PWFS. More...
 
int load_arrays (self, numpy.ndarray[numpy.complex64] halfxy, numpy.ndarray[numpy.float32] cx, numpy.ndarray[numpy.float32] cy, numpy.ndarray[numpy.float32] weights, numpy.ndarray[numpy.float32] sincar, numpy.ndarray[numpy.float32] submask, numpy.ndarray[numpy.int32] validsubsx, numpy.ndarray[numpy.int32] validsubsy, numpy.ndarray[numpy.int32] phasemap, numpy.ndarray[numpy.float32] fluxPerSub, numpy.ndarray[numpy.float32] ttprojmat)
 Load PYRHR WFS arrays. More...
 
int set_phalfxy (self, numpy.ndarray[numpy.complex64] phalfxy)
 Set the pyramid mask for each modulation point. More...
 
int set_pyr_mod_weights (self, numpy.ndarray[numpy.float32] weights, int npts)
 Set the modulation points weights of a PWFS. More...
 
int set_pyr_modulation_points (self, numpy.ndarray[numpy.float32] cx, numpy.ndarray[numpy.float32] cy, int npts)
 Set the modulation points of a PWFS. More...
 
int set_pyr_modulation_points (self, numpy.ndarray[numpy.float32] cx, numpy.ndarray[numpy.float32] cy, numpy.ndarray[numpy.float32] weights, int npts)
 
None set_pyrimg (self, numpy.ndarray[numpy.float32] img)
 Set the image of the PWFS. More...
 
None set_submask (self, numpy.ndarray[numpy.float32] mask)
 Set the field stop of the PWFS. More...
 
None set_validpix (self, numpy.ndarray[numpy.int32] datax, numpy.ndarray[numpy.int32] datay)
 Set the valid pixels of the PWFS. 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

 compute_pyrfocalplane = property
 TODO docstring. More...
 
 d_hrimg = property
 TODO docstring. More...
 
 d_phalfxy = property
 TODO docstring. More...
 
 d_poffsets = property
 TODO docstring. More...
 
 d_psum = property
 TODO docstring. More...
 
 d_pyrfocalplane = property
 TODO docstring. More...
 
 npupils = property
 Number of pupil images. More...
 
 pyr_cx = property
 TODO docstring. More...
 
 pyr_cy = property
 Modulation points X-positions. More...
 
 pyr_mod_weights = property
 Ponderation weights for each modulation points. 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 9048 of file sutraWrap.py.

Member Function Documentation

◆ comp_nphot()

int sutraWrap.PYRWFS.comp_nphot (   self,
float  ittime,
float  optthroughput,
float  diam,
float  cobs,
float   zerop = 0,
float   gsmag = 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.
cobs(float): telescope central obstruction.
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.

Definition at line 9065 of file sutraWrap.py.

◆ copy_valid_pix()

int sutraWrap.PYRWFS.copy_valid_pix (   self,
numpy.ndarray[numpy.float32]  data,
numpy.ndarray[numpy.int32]  validx,
numpy.ndarray[numpy.int32]  validy,
int  dim 
)

Copy the given pixels on the right place in the binimg of PWFS.

        data:

        validx:

        validy:

        dim:

Definition at line 9079 of file sutraWrap.py.

◆ load_arrays()

int sutraWrap.PYRWFS.load_arrays (   self,
numpy.ndarray[numpy.complex64]  halfxy,
numpy.ndarray[numpy.float32]  cx,
numpy.ndarray[numpy.float32]  cy,
numpy.ndarray[numpy.float32]  weights,
numpy.ndarray[numpy.float32]  sincar,
numpy.ndarray[numpy.float32]  submask,
numpy.ndarray[numpy.int32]  validsubsx,
numpy.ndarray[numpy.int32]  validsubsy,
numpy.ndarray[numpy.int32]  phasemap,
numpy.ndarray[numpy.float32]  fluxPerSub,
numpy.ndarray[numpy.float32]  ttprojmat 
)

Load PYRHR WFS arrays.

        halfxy:

        cx:

        cy:

        weights:

        sincar:

        submask:

        validsubsx:

        validsubsy:

        phasemap:

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

Definition at line 9109 of file sutraWrap.py.

◆ set_phalfxy()

int sutraWrap.PYRWFS.set_phalfxy (   self,
numpy.ndarray[numpy.complex64]  phalfxy 
)

Set the pyramid mask for each modulation point.

Parameters
phalfxy(np.ndarray[ndim=2, dtype=np.complex64]): pyramid mask for each modulation point

Definition at line 9117 of file sutraWrap.py.

◆ set_pyr_mod_weights()

int sutraWrap.PYRWFS.set_pyr_mod_weights (   self,
numpy.ndarray[numpy.float32]  weights,
int  npts 
)

Set the modulation points weights of a PWFS.

Parameters
weights(np.ndarray[ndim=1, dtype=np.float32_t]): modulation points weights ponderation
npts(int): number of modulation points

Definition at line 9127 of file sutraWrap.py.

◆ set_pyr_modulation_points() [1/2]

int sutraWrap.PYRWFS.set_pyr_modulation_points (   self,
numpy.ndarray[numpy.float32]  cx,
numpy.ndarray[numpy.float32]  cy,
int  npts 
)

Set the modulation points of a PWFS.

Parameters
cx(np.ndarray[ndim=1, dtype=np.float32_t]): X position of modulation points
cy(np.ndarray[ndim=1, dtype=np.float32_t]): Y position of modulation points
npts(int): number of modulation points
    Set the modulation points and weights of a PWFS
Parameters
cx(np.ndarray[ndim=1, dtype=np.float32_t]): X position of modulation points
cy(np.ndarray[ndim=1, dtype=np.float32_t]): Y position of modulation points
weights(np.ndarray[ndim=1, dtype=np.float32_t]): modulation points weights ponderation
npts(int): number of modulation points

Definition at line 9153 of file sutraWrap.py.

Here is the caller graph for this function:

◆ set_pyr_modulation_points() [2/2]

int sutraWrap.PYRWFS.set_pyr_modulation_points (   self,
numpy.ndarray[numpy.float32]  cx,
numpy.ndarray[numpy.float32]  cy,
numpy.ndarray[numpy.float32]  weights,
int  npts 
)

Definition at line 9155 of file sutraWrap.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_pyrimg()

None sutraWrap.PYRWFS.set_pyrimg (   self,
numpy.ndarray[numpy.float32]  img 
)

Set the image of the PWFS.

Parameters
img(np.array[ndim=2,dtype=np.float32]): new image to set

Definition at line 9163 of file sutraWrap.py.

◆ set_submask()

None sutraWrap.PYRWFS.set_submask (   self,
numpy.ndarray[numpy.float32]  mask 
)

Set the field stop of the PWFS.

Parameters
mask(np.array[ndim=2,dtype=np.float32]): new field stop to set

Definition at line 9171 of file sutraWrap.py.

◆ set_validpix()

None sutraWrap.PYRWFS.set_validpix (   self,
numpy.ndarray[numpy.int32]  datax,
numpy.ndarray[numpy.int32]  datay 
)

Set the valid pixels of the PWFS.

Parameters
datax(np.array[ndim=2,dtype=np.float32]): new X positions of valid pixels
datay(np.array[ndim=2,dtype=np.float32]): new Y positions of valid pixels

Definition at line 9181 of file sutraWrap.py.

Property Documentation

◆ compute_pyrfocalplane

sutraWrap.PYRWFS.compute_pyrfocalplane = property
static

TODO docstring.

   @n type of :  bool

Definition at line 9188 of file sutraWrap.py.

◆ d_hrimg

sutraWrap.PYRWFS.d_hrimg = property
static

TODO docstring.

   @n type of :  carmaWrap.obj_float

Definition at line 9203 of file sutraWrap.py.

◆ d_phalfxy

sutraWrap.PYRWFS.d_phalfxy = property
static

TODO docstring.

   @n type of :  carmaWrap.obj_float_complex

Definition at line 9212 of file sutraWrap.py.

◆ d_poffsets

sutraWrap.PYRWFS.d_poffsets = property
static

TODO docstring.

   @n type of :  carmaWrap.obj_float_complex

Definition at line 9221 of file sutraWrap.py.

◆ d_psum

sutraWrap.PYRWFS.d_psum = property
static

TODO docstring.

   @n type of :  carmaWrap.obj_float

Definition at line 9230 of file sutraWrap.py.

◆ d_pyrfocalplane

sutraWrap.PYRWFS.d_pyrfocalplane = property
static

TODO docstring.

   @n type of :  carmaWrap.obj_float

Definition at line 9239 of file sutraWrap.py.

◆ npupils

sutraWrap.PYRWFS.npupils = property
static

Number of pupil images.

   @n type of :  int

Definition at line 9248 of file sutraWrap.py.

◆ pyr_cx

sutraWrap.PYRWFS.pyr_cx = property
static

TODO docstring.

   @n type of :  carmaWrap.host_obj_float

Definition at line 9257 of file sutraWrap.py.

◆ pyr_cy

sutraWrap.PYRWFS.pyr_cy = property
static

Modulation points X-positions.

   @n type of :  carmaWrap.host_obj_float

Definition at line 9266 of file sutraWrap.py.

◆ pyr_mod_weights

sutraWrap.PYRWFS.pyr_mod_weights = property
static

Ponderation weights for each modulation points.

   @n type of :  carmaWrap.host_obj_float

Definition at line 9275 of file sutraWrap.py.


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