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

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.uint16] 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.uint16] img, int n, int location=-1)
 
int load_img (self, carmaWrap.obj_uint16 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 621 of file sutraWrap.py.

Member Function Documentation

◆ calibrate_img()

int sutraWrap.Centroider_UF.calibrate_img (   self)

Performs the raw WFS frame calibration.

Definition at line 625 of file sutraWrap.py.

◆ calibrate_img_validPix()

int sutraWrap.Centroider_UF.calibrate_img_validPix (   self)

Performs the raw WFS frame calibration only on useful pixels.

Definition at line 629 of file sutraWrap.py.

◆ get_cog()

int sutraWrap.Centroider_UF.get_cog (   self)

Computes centroids and stores it in d_slopes of the WFS.

Definition at line 633 of file sutraWrap.py.

◆ init_calib()

int sutraWrap.Centroider_UF.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 642 of file sutraWrap.py.

◆ init_img_raw()

int sutraWrap.Centroider_UF.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 651 of file sutraWrap.py.

◆ load_img() [1/3]

int sutraWrap.Centroider_UF.load_img (   self,
carmaWrap.obj_uint16  img 
)

Definition at line 688 of file sutraWrap.py.

Here is the call graph for this function:

◆ load_img() [2/3]

int sutraWrap.Centroider_UF.load_img (   self,
numpy.ndarray[numpy.uint16]  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 684 of file sutraWrap.py.

Here is the caller graph for this function:

◆ load_img() [3/3]

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

Definition at line 686 of file sutraWrap.py.

Here is the call graph for this function:

◆ load_validpos()

int sutraWrap.Centroider_UF.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 699 of file sutraWrap.py.

◆ set_centroids_ref()

int sutraWrap.Centroider_UF.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 706 of file sutraWrap.py.

◆ set_dark()

int sutraWrap.Centroider_UF.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 715 of file sutraWrap.py.

◆ set_flat()

int sutraWrap.Centroider_UF.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 724 of file sutraWrap.py.

◆ set_lutPix()

int sutraWrap.Centroider_UF.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 733 of file sutraWrap.py.

◆ set_npix()

int sutraWrap.Centroider_UF.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 740 of file sutraWrap.py.

◆ set_nxsub()

int sutraWrap.Centroider_UF.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 747 of file sutraWrap.py.

◆ set_offset()

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

Set the controider offset [pixels].

Parameters
offset(float): new offset [pixels]

Definition at line 754 of file sutraWrap.py.

◆ set_scale()

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

Set the controider scale factor.

Parameters
scale(float): new scale factor

Definition at line 761 of file sutraWrap.py.

Property Documentation

◆ context

sutraWrap.Centroider_UF.context = property
static

GPU context.

   @n type of :  carmaWrap.context

Definition at line 768 of file sutraWrap.py.

◆ d_bincube

sutraWrap.Centroider_UF.d_bincube = property
static

Bincube of the WFS image.

   @n type of :  carmaWrap.obj_float

Definition at line 786 of file sutraWrap.py.

◆ d_centroids_ref

sutraWrap.Centroider_UF.d_centroids_ref = property
static

Reference slopes vector.

   @n type of :  carmaWrap.obj_float

Definition at line 795 of file sutraWrap.py.

◆ d_dark

sutraWrap.Centroider_UF.d_dark = property
static

Dark frame for calibration.

   @n type of :  carmaWrap.obj_float

Definition at line 804 of file sutraWrap.py.

◆ d_flat

sutraWrap.Centroider_UF.d_flat = property
static

Flat frame for calibration.

   @n type of :  carmaWrap.obj_float

Definition at line 813 of file sutraWrap.py.

◆ d_img

sutraWrap.Centroider_UF.d_img = property
static

Calibrated WFS image.

   @n type of :  carmaWrap.obj_float

Definition at line 822 of file sutraWrap.py.

◆ d_img_raw

sutraWrap.Centroider_UF.d_img_raw = property
static

Raw WFS image.

   @n type of :  carmaWrap.obj_uint16

Definition at line 831 of file sutraWrap.py.

◆ d_intensities

sutraWrap.Centroider_UF.d_intensities = property
static

intensities of the WFS image

   @n type of :  carmaWrap.obj_float

Definition at line 840 of file sutraWrap.py.

◆ d_lutPix

sutraWrap.Centroider_UF.d_lutPix = property
static

Lookup Table of pixels for calibration.

   @n type of :  carmaWrap.obj_int

Definition at line 849 of file sutraWrap.py.

◆ d_ref_Tilt

sutraWrap.Centroider_UF.d_ref_Tilt = property
static

Tilt mode reference for filtering.

   @n type of :  carmaWrap.obj_float

Definition at line 858 of file sutraWrap.py.

◆ d_ref_Tip

sutraWrap.Centroider_UF.d_ref_Tip = property
static

Tip mode reference for filtering.

   @n type of :  carmaWrap.obj_float

Definition at line 867 of file sutraWrap.py.

◆ d_TT_slopes

sutraWrap.Centroider_UF.d_TT_slopes = property
static

Tip/tilt slopes removed after filtering.

   @n type of :  carmaWrap.obj_float

Definition at line 777 of file sutraWrap.py.

◆ d_validMask

sutraWrap.Centroider_UF.d_validMask = property
static

Flat frame for calibration.

   @n type of :  carmaWrap.obj_int

Definition at line 876 of file sutraWrap.py.

◆ d_validx

sutraWrap.Centroider_UF.d_validx = property
static

X positions of the valid ssp.

   @n type of :  carmaWrap.obj_int

Definition at line 885 of file sutraWrap.py.

◆ d_validy

sutraWrap.Centroider_UF.d_validy = property
static

Y positions of the valid ssp.

   @n type of :  carmaWrap.obj_int

Definition at line 894 of file sutraWrap.py.

◆ device

sutraWrap.Centroider_UF.device = property
static

GPU device index.

   @n type of :  int

Definition at line 903 of file sutraWrap.py.

◆ filter_TT

sutraWrap.Centroider_UF.filter_TT = property
static

Tip/tilt filtering flag.

   @n type of :  bool

Definition at line 912 of file sutraWrap.py.

◆ npix

sutraWrap.Centroider_UF.npix = property
static

Number of pixels along a side of WFS subap.

   @n type of :  int

Definition at line 921 of file sutraWrap.py.

◆ nslopes

sutraWrap.Centroider_UF.nslopes = property
static

Number of slopes.

   @n type of :  int

Definition at line 930 of file sutraWrap.py.

◆ nvalid

sutraWrap.Centroider_UF.nvalid = property
static

Number of valid ssp of the WFS.

   @n type of :  int

Definition at line 939 of file sutraWrap.py.

◆ nxsub

sutraWrap.Centroider_UF.nxsub = property
static

Number of ssp across the pupil diameter.

   @n type of :  int

Definition at line 948 of file sutraWrap.py.

◆ offset

sutraWrap.Centroider_UF.offset = property
static

Offset for centroiding computation.

   @n type of :  float

Definition at line 957 of file sutraWrap.py.

◆ scale

sutraWrap.Centroider_UF.scale = property
static

Scale factor to get slopes in arcsec.

   @n type of :  float

Definition at line 966 of file sutraWrap.py.

◆ type

sutraWrap.Centroider_UF.type = property
static

Centroider type.

   @n type of :  str

Definition at line 975 of file sutraWrap.py.

◆ wfs

sutraWrap.Centroider_UF.wfs = property
static

SutraWfs handled by this centroider.

   @n type of :  Wfs

Definition at line 984 of file sutraWrap.py.


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