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

Public Member Functions

int calibrate_img (self)
 Performs the raw WFS frame calibration. More...
 
int calibrate_img_validPix (self)
 Performs the raw WFS frame calibration only on useful pixels. More...
 
int get_cog (self)
 Computes centroids and stores it in d_slopes of the WFS. More...
 
int init_calib (self, int n, int m)
 Initialize data used for calibration. More...
 
int init_img_raw (self, int n, int m)
 Initialize array to store raw WFS image in RTC standalone mode. More...
 
int load_img (self, numpy.ndarray[numpy.float32] img, int m, int n, int location)
 Load an image in a RTC standalone (host to device) More...
 
int load_img (self, numpy.ndarray[numpy.float32] img, int n, int location=-1)
 
int load_img (self, carmaWrap.obj_float img)
 
int load_validpos (self, numpy.ndarray[numpy.int32] validx, numpy.ndarray[numpy.int32] validy, int N)
 Load the validx and validy arrays. More...
 
int set_centroids_ref (self, numpy.ndarray[numpy.float32] refslopes)
 Set the references slopes. More...
 
int set_dark (self, numpy.ndarray[numpy.float32] dark, int n)
 Set the dark frame for calibration. More...
 
int set_flat (self, numpy.ndarray[numpy.float32] flat, int n)
 Set the flat frame for calibration. More...
 
int set_lutPix (self, numpy.ndarray[numpy.int32] lutPix, int n)
 Set the lookup Table Pixel vector for calibration. More...
 
int set_npix (self, int npix)
 Set the number of pixels per subap for a RTC standalone. More...
 
int set_nxsub (self, int nxsub)
 Set the number of ssp across the pupil diameter for a RTC standalone. More...
 
int set_offset (self, float offset)
 Set the controider offset [pixels]. More...
 
int set_scale (self, float scale)
 Set the controider scale factor. More...
 

Properties

 context = property
 GPU context. More...
 
 d_TT_slopes = property
 Tip/tilt slopes removed after filtering. More...
 
 d_bincube = property
 Bincube of the WFS image. More...
 
 d_centroids_ref = property
 Reference slopes vector. More...
 
 d_dark = property
 Dark frame for calibration. More...
 
 d_flat = property
 Flat frame for calibration. More...
 
 d_img = property
 Calibrated WFS image. More...
 
 d_img_raw = property
 Raw WFS image. More...
 
 d_intensities = property
 intensities of the WFS image More...
 
 d_lutPix = property
 Lookup Table of pixels for calibration. More...
 
 d_ref_Tilt = property
 Tilt mode reference for filtering. More...
 
 d_ref_Tip = property
 Tip mode reference for filtering. More...
 
 d_validMask = property
 Flat frame for calibration. More...
 
 d_validx = property
 X positions of the valid ssp. More...
 
 d_validy = property
 Y positions of the valid ssp. More...
 
 device = property
 GPU device index. More...
 
 filter_TT = property
 Tip/tilt filtering flag. More...
 
 npix = property
 Number of pixels along a side of WFS subap. More...
 
 nslopes = property
 Number of slopes. More...
 
 nvalid = property
 Number of valid ssp of the WFS. More...
 
 nxsub = property
 Number of ssp across the pupil diameter. More...
 
 offset = property
 Offset for centroiding computation. More...
 
 scale = property
 Scale factor to get slopes in arcsec. More...
 
 type = property
 Centroider type. More...
 
 wfs = property
 SutraWfs handled by this centroider. More...
 

Detailed Description

Definition at line 254 of file sutraWrap.py.

Member Function Documentation

◆ calibrate_img()

int sutraWrap.Centroider_FF.calibrate_img (   self)

Performs the raw WFS frame calibration.

Definition at line 258 of file sutraWrap.py.

◆ calibrate_img_validPix()

int sutraWrap.Centroider_FF.calibrate_img_validPix (   self)

Performs the raw WFS frame calibration only on useful pixels.

Definition at line 262 of file sutraWrap.py.

◆ get_cog()

int sutraWrap.Centroider_FF.get_cog (   self)

Computes centroids and stores it in d_slopes of the WFS.

Definition at line 266 of file sutraWrap.py.

◆ init_calib()

int sutraWrap.Centroider_FF.init_calib (   self,
int  n,
int  m 
)

Initialize data used for calibration.

Parameters
n(int): image support height
m(int): image support width

Definition at line 275 of file sutraWrap.py.

◆ init_img_raw()

int sutraWrap.Centroider_FF.init_img_raw (   self,
int  n,
int  m 
)

Initialize array to store raw WFS image in RTC standalone mode.

Parameters
n(int): image support height
m(int): image support width

Definition at line 284 of file sutraWrap.py.

◆ load_img() [1/3]

int sutraWrap.Centroider_FF.load_img (   self,
carmaWrap.obj_float  img 
)

Definition at line 321 of file sutraWrap.py.

Here is the call graph for this function:

◆ load_img() [2/3]

int sutraWrap.Centroider_FF.load_img (   self,
numpy.ndarray[numpy.float32]  img,
int  m,
int  n,
int  location 
)

Load an image in a RTC standalone (host to device)

Parameters
img(np.ndarray[ndim=2, dtype=np.float32_t]): SH image
m(int): Image support size X
n(int): Image support size Y
location(int): If -1, image is located on the CPU (hostToDevice). Else, it is the GPU index where the image is located
    Load a square image (n, n) in a RTC standalone
Parameters
img(np.ndarray[ndim=2, dtype=np.float32_t]): SH image
n(int): Image support size along one axis
location(int): (optionnal) If -1 (default), image is located on the CPU (hostToDevice). Else, it is the GPU index where the image is located
    Load an image in a RTC standalone from a CarmaObj
Parameters
img(CarmaObj): SH image

Definition at line 317 of file sutraWrap.py.

Here is the caller graph for this function:

◆ load_img() [3/3]

int sutraWrap.Centroider_FF.load_img (   self,
numpy.ndarray[numpy.float32]  img,
int  n,
int   location = -1 
)

Definition at line 319 of file sutraWrap.py.

Here is the call graph for this function:

◆ load_validpos()

int sutraWrap.Centroider_FF.load_validpos (   self,
numpy.ndarray[numpy.int32]  validx,
numpy.ndarray[numpy.int32]  validy,
int  N 
)

Load the validx and validy arrays.

Parameters
validx(np.array[ndim=1,dtype=np.float32]): X positions of the valid ssp
validy(np.array[ndim=1,dtype=np.float32]): Y positions of the valid ssp
N(int): arrays size

Definition at line 332 of file sutraWrap.py.

◆ set_centroids_ref()

int sutraWrap.Centroider_FF.set_centroids_ref (   self,
numpy.ndarray[numpy.float32]  refslopes 
)

Set the references slopes.

Parameters
refslopes(np.array[ndim1,dtype=np.float32]): reference slopes to set

Definition at line 339 of file sutraWrap.py.

◆ set_dark()

int sutraWrap.Centroider_FF.set_dark (   self,
numpy.ndarray[numpy.float32]  dark,
int  n 
)

Set the dark frame for calibration.

Parameters
dark(np.ndarray[ndim=2, dtype=np.float32_t): dark frame (size n by n)
n(int): image support size

Definition at line 348 of file sutraWrap.py.

◆ set_flat()

int sutraWrap.Centroider_FF.set_flat (   self,
numpy.ndarray[numpy.float32]  flat,
int  n 
)

Set the flat frame for calibration.

Parameters
flat(np.ndarray[ndim=2, dtype=np.float32_t): flat frame (size n by n)
n(int): image support size

Definition at line 357 of file sutraWrap.py.

◆ set_lutPix()

int sutraWrap.Centroider_FF.set_lutPix (   self,
numpy.ndarray[numpy.int32]  lutPix,
int  n 
)

Set the lookup Table Pixel vector for calibration.

Parameters
lutPix(np.ndarray[ndim=1, dtype=np.float32_t): lutPix vector
n(int): image pixel size

Definition at line 366 of file sutraWrap.py.

◆ set_npix()

int sutraWrap.Centroider_FF.set_npix (   self,
int  npix 
)

Set the number of pixels per subap for a RTC standalone.

Parameters
npix(int): number of pixel along a subap. side

Definition at line 373 of file sutraWrap.py.

◆ set_nxsub()

int sutraWrap.Centroider_FF.set_nxsub (   self,
int  nxsub 
)

Set the number of ssp across the pupil diameter for a RTC standalone.

Parameters
nxsub(int): number of ssp across the pupil diameter

Definition at line 380 of file sutraWrap.py.

◆ set_offset()

int sutraWrap.Centroider_FF.set_offset (   self,
float  offset 
)

Set the controider offset [pixels].

Parameters
offset(float): new offset [pixels]

Definition at line 387 of file sutraWrap.py.

◆ set_scale()

int sutraWrap.Centroider_FF.set_scale (   self,
float  scale 
)

Set the controider scale factor.

Parameters
scale(float): new scale factor

Definition at line 394 of file sutraWrap.py.

Property Documentation

◆ context

sutraWrap.Centroider_FF.context = property
static

GPU context.

   @n type of :  carmaWrap.context

Definition at line 401 of file sutraWrap.py.

◆ d_bincube

sutraWrap.Centroider_FF.d_bincube = property
static

Bincube of the WFS image.

   @n type of :  carmaWrap.obj_float

Definition at line 419 of file sutraWrap.py.

◆ d_centroids_ref

sutraWrap.Centroider_FF.d_centroids_ref = property
static

Reference slopes vector.

   @n type of :  carmaWrap.obj_float

Definition at line 428 of file sutraWrap.py.

◆ d_dark

sutraWrap.Centroider_FF.d_dark = property
static

Dark frame for calibration.

   @n type of :  carmaWrap.obj_float

Definition at line 437 of file sutraWrap.py.

◆ d_flat

sutraWrap.Centroider_FF.d_flat = property
static

Flat frame for calibration.

   @n type of :  carmaWrap.obj_float

Definition at line 446 of file sutraWrap.py.

◆ d_img

sutraWrap.Centroider_FF.d_img = property
static

Calibrated WFS image.

   @n type of :  carmaWrap.obj_float

Definition at line 455 of file sutraWrap.py.

◆ d_img_raw

sutraWrap.Centroider_FF.d_img_raw = property
static

Raw WFS image.

   @n type of :  carmaWrap.obj_float

Definition at line 464 of file sutraWrap.py.

◆ d_intensities

sutraWrap.Centroider_FF.d_intensities = property
static

intensities of the WFS image

   @n type of :  carmaWrap.obj_float

Definition at line 473 of file sutraWrap.py.

◆ d_lutPix

sutraWrap.Centroider_FF.d_lutPix = property
static

Lookup Table of pixels for calibration.

   @n type of :  carmaWrap.obj_int

Definition at line 482 of file sutraWrap.py.

◆ d_ref_Tilt

sutraWrap.Centroider_FF.d_ref_Tilt = property
static

Tilt mode reference for filtering.

   @n type of :  carmaWrap.obj_float

Definition at line 491 of file sutraWrap.py.

◆ d_ref_Tip

sutraWrap.Centroider_FF.d_ref_Tip = property
static

Tip mode reference for filtering.

   @n type of :  carmaWrap.obj_float

Definition at line 500 of file sutraWrap.py.

◆ d_TT_slopes

sutraWrap.Centroider_FF.d_TT_slopes = property
static

Tip/tilt slopes removed after filtering.

   @n type of :  carmaWrap.obj_float

Definition at line 410 of file sutraWrap.py.

◆ d_validMask

sutraWrap.Centroider_FF.d_validMask = property
static

Flat frame for calibration.

   @n type of :  carmaWrap.obj_int

Definition at line 509 of file sutraWrap.py.

◆ d_validx

sutraWrap.Centroider_FF.d_validx = property
static

X positions of the valid ssp.

   @n type of :  carmaWrap.obj_int

Definition at line 518 of file sutraWrap.py.

◆ d_validy

sutraWrap.Centroider_FF.d_validy = property
static

Y positions of the valid ssp.

   @n type of :  carmaWrap.obj_int

Definition at line 527 of file sutraWrap.py.

◆ device

sutraWrap.Centroider_FF.device = property
static

GPU device index.

   @n type of :  int

Definition at line 536 of file sutraWrap.py.

◆ filter_TT

sutraWrap.Centroider_FF.filter_TT = property
static

Tip/tilt filtering flag.

   @n type of :  bool

Definition at line 545 of file sutraWrap.py.

◆ npix

sutraWrap.Centroider_FF.npix = property
static

Number of pixels along a side of WFS subap.

   @n type of :  int

Definition at line 554 of file sutraWrap.py.

◆ nslopes

sutraWrap.Centroider_FF.nslopes = property
static

Number of slopes.

   @n type of :  int

Definition at line 563 of file sutraWrap.py.

◆ nvalid

sutraWrap.Centroider_FF.nvalid = property
static

Number of valid ssp of the WFS.

   @n type of :  int

Definition at line 572 of file sutraWrap.py.

◆ nxsub

sutraWrap.Centroider_FF.nxsub = property
static

Number of ssp across the pupil diameter.

   @n type of :  int

Definition at line 581 of file sutraWrap.py.

◆ offset

sutraWrap.Centroider_FF.offset = property
static

Offset for centroiding computation.

   @n type of :  float

Definition at line 590 of file sutraWrap.py.

◆ scale

sutraWrap.Centroider_FF.scale = property
static

Scale factor to get slopes in arcsec.

   @n type of :  float

Definition at line 599 of file sutraWrap.py.

◆ type

sutraWrap.Centroider_FF.type = property
static

Centroider type.

   @n type of :  str

Definition at line 608 of file sutraWrap.py.

◆ wfs

sutraWrap.Centroider_FF.wfs = property
static

SutraWfs handled by this centroider.

   @n type of :  Wfs

Definition at line 617 of file sutraWrap.py.


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