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

Public Member Functions

None __init__ (self, carmaWrap.context context, int nscreens, float global_r0, numpy.ndarray[numpy.float32] r0_per_layer, numpy.ndarray[numpy.int64] size1, numpy.ndarray[numpy.int64] size2, numpy.ndarray[numpy.float32] altitude, numpy.ndarray[numpy.float32] windspeed, numpy.ndarray[numpy.float32] winddir, numpy.ndarray[numpy.float32] deltax, numpy.ndarray[numpy.float32] deltay, int device)
 
str __str__ (self)
 
int add_screen (self, float altitude, int size, int stencil_size, float r0, float windspeed, float winddir, float deltax, float deltay, int device)
 Add a screen to the atmos object. More...
 
int del_screen (self, int idx)
 Delete the selected screen. More...
 
int init_screen (self, int idx, numpy.ndarray[numpy.float32] A, numpy.ndarray[numpy.float32] B, numpy.ndarray[numpy.uint32] istencilx, numpy.ndarray[numpy.uint32] istencily, int seed)
 Initialize an newly allocated screen. More...
 
int move_atmos (self)
 Move the turbulence in the atmos screen following loaded parameters such as windspeed and wind direction. More...
 
int refresh_screen (self, int idx)
 Refresh the selected screen by extrusion. More...
 
int set_r0 (self, float r0)
 Change the current global r0 of all layers. More...
 
int set_seed (self, int idx, float seed)
 Set the seed of the selected screen RNG. More...
 

Properties

 d_screens = property
 Vector of tscreens. More...
 
 nscreens = property
 Number of turbulent screens. More...
 
 r0 = property
 Global r0. More...
 

Detailed Description

Definition at line 101 of file sutraWrap.py.

Constructor & Destructor Documentation

◆ __init__()

None sutraWrap.Atmos.__init__ (   self,
carmaWrap.context  context,
int  nscreens,
float  global_r0,
numpy.ndarray[numpy.float32]  r0_per_layer,
numpy.ndarray[numpy.int64]  size1,
numpy.ndarray[numpy.int64]  size2,
numpy.ndarray[numpy.float32]  altitude,
numpy.ndarray[numpy.float32]  windspeed,
numpy.ndarray[numpy.float32]  winddir,
numpy.ndarray[numpy.float32]  deltax,
numpy.ndarray[numpy.float32]  deltay,
int  device 
)

Definition at line 143 of file sutraWrap.py.

Member Function Documentation

◆ __str__()

str sutraWrap.Atmos.__str__ (   self)

Definition at line 144 of file sutraWrap.py.

◆ add_screen()

int sutraWrap.Atmos.add_screen (   self,
float  altitude,
int  size,
int  stencil_size,
float  r0,
float  windspeed,
float  winddir,
float  deltax,
float  deltay,
int  device 
)

Add a screen to the atmos object.

Parameters
altitude(float) : altitude of the screen in meters
size(long) : dimension of the screen (size x size)
stencil_size(long): dimension of the stencil
r0(float) : frac of r0**(5/3)
windspeed(float) : windspeed of the screen [m/s]
winddir(float) : wind direction (deg)
deltax(float) : extrude deltax pixels in the x-direction at each iteration
deltay(float) : extrude deltay pixels in the y-direction at each iteration
device(int) : device number

Definition at line 168 of file sutraWrap.py.

◆ del_screen()

int sutraWrap.Atmos.del_screen (   self,
int  idx 
)

Delete the selected screen.

Parameters
idx(int): index of the screen

Definition at line 176 of file sutraWrap.py.

◆ init_screen()

int sutraWrap.Atmos.init_screen (   self,
int  idx,
numpy.ndarray[numpy.float32]  A,
numpy.ndarray[numpy.float32]  B,
numpy.ndarray[numpy.uint32]  istencilx,
numpy.ndarray[numpy.uint32]  istencily,
int  seed 
)

Initialize an newly allocated screen.

Parameters
idx(int): index of the screen
A(np.ndarray[ndim=2, dtype=np.float32]): A matrix (cf. Assemat)
B(np.ndarray[ndim=2, dtype=np.float32]): B matrix (cf. Assemat)
istencilx(np.ndarray[ndim=2, dtype=int32]): X stencil index
istencily(np.ndarray[ndim=2, dtype=int32]): Y stencil index
seed(int): seed for RNG

Definition at line 194 of file sutraWrap.py.

◆ move_atmos()

int sutraWrap.Atmos.move_atmos (   self)

Move the turbulence in the atmos screen following loaded parameters such as windspeed and wind direction.

Definition at line 199 of file sutraWrap.py.

◆ refresh_screen()

int sutraWrap.Atmos.refresh_screen (   self,
int  idx 
)

Refresh the selected screen by extrusion.

Parameters
idx(int): index of the screen

Definition at line 207 of file sutraWrap.py.

◆ set_r0()

int sutraWrap.Atmos.set_r0 (   self,
float  r0 
)

Change the current global r0 of all layers.

Parameters
r0(float): r0 @ 0.5 microns

Definition at line 215 of file sutraWrap.py.

◆ set_seed()

int sutraWrap.Atmos.set_seed (   self,
int  idx,
float  seed 
)

Set the seed of the selected screen RNG.

Parameters
idx(int): index of the screen
seed(int) :new seed

Definition at line 225 of file sutraWrap.py.

Property Documentation

◆ d_screens

sutraWrap.Atmos.d_screens = property
static

Vector of tscreens.

   @n type of :  typing.List[Tscreen]

Definition at line 232 of file sutraWrap.py.

◆ nscreens

sutraWrap.Atmos.nscreens = property
static

Number of turbulent screens.

(float) : number of turbulent layers

   @n type of :  int

Definition at line 241 of file sutraWrap.py.

◆ r0

sutraWrap.Atmos.r0 = property
static

Global r0.

   @n type of :  float

Definition at line 250 of file sutraWrap.py.


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