shesha.config

class shesha.config.Param_atmos
property L0

Get the L0 per layers

Returns

(lit of float) : L0 for each layers

property alt

Get the altitudes of each layer

Returns

(lit of float) : altitudes

property dim_screens

Get the size of the phase screens

Returns

(lit of float) : phase screens sizes

property frac

Get the fraction of r0 for each layers

Returns

(lit of float) : fraction of r0

get_L0()

Get the L0 per layers

Returns

(lit of float) : L0 for each layers

get_alt()

Get the altitudes of each layer

Returns

(lit of float) : altitudes

get_deltax()

Get the translation speed on axis x for each layer

Returns

(lit of float) : translation speed

get_deltay()

Get the translation speed on axis y for each layer

Returns

(lit of float) : translation speed

get_dim_screens()

Get the size of the phase screens

Returns

(lit of float) : phase screens sizes

get_frac()

Get the fraction of r0 for each layers

Returns

(lit of float) : fraction of r0

get_nscreens()

Set the number of turbulent layers

Returns

(long) number of screens.

get_pupixsize()

Get the pupil pixel size

Returns

(float) : pupil pixel size

get_r0()

Get the global r0

Returns

(float) : global r0

get_seeds()

Get the seed for each layer

Returns

(lit of int) : seed

get_winddir()

Get the wind direction for each layer

Returns

(lit of float) : wind directions

get_windspeed()

Get the the wind speed for each layer

Returns

(list of float) : wind speeds

property nscreens

Set the number of turbulent layers

Returns

(long) number of screens.

property pupixsize

Get the pupil pixel size

Returns

(float) : pupil pixel size

property r0

Get the global r0

Returns

(float) : global r0

property seeds

Get the seed for each layer

Returns

(lit of int) : seed

set_L0(l)

Set the L0 per layers

Parameters

l – (lit of float) : L0 for each layers

set_alt(h)

Set the altitudes of each layer

Parameters

h – (lit of float) : altitudes

set_deltax(l)

Set the translation speed on axis x for each layer

Parameters

l – (lit of float) : translation speed

set_deltay(l)

Set the translation speed on axis y for each layer

Parameters

l – (lit of float) : translation speed

set_dim_screens(l)

Set the size of the phase screens

Parameters

l – (lit of float) : phase screens sizes

set_frac(l)

Set the fraction of r0 for each layers

Parameters

l – (lit of float) : fraction of r0

set_nscreens(n)

Set the number of turbulent layers

Parameters

n – (long) number of screens.

set_pupixsize(xsize)

Set the pupil pixel size

Parameters

xsize – (float) : pupil pixel size

set_r0(r)

Set the global r0

Parameters

r – (float) : global r0

set_seeds(l)

Set the seed for each layer

Parameters

l – (lit of int) : seed

set_winddir(l)

Set the wind direction for each layer

Parameters

l – (lit of float) : wind directions

set_windspeed(l)

Set the the wind speed for each layer

Parameters

l – (list of float) : wind speeds

property winddir

Get the wind direction for each layer

Returns

(lit of float) : wind directions

property windspeed

Get the the wind speed for each layer

Returns

(list of float) : wind speeds

class shesha.config.Param_centroider
property filter_TT

Get the filter_TT flag used to filter out TT from the slopes (LGS mode)

Returns

(bool) : filter_TT

get_filter_TT()

Get the filter_TT flag used to filter out TT from the slopes (LGS mode)

Returns

(bool) : filter_TT

get_interpmat()

Get the interp mat for corr centroider

Returns

(np.ndarray[ndim=2, dtype=np.float32]) : sizey

get_method()
Get the method used by a pyr centroider:

0: nosinus global 1: sinus global 2: nosinus local 3: sinus local

Returns

(int) : method

get_nmax()

Get the nmax pixels used by a bpcog centroider

Returns

(int) : nmax

get_nslope()

Get the number of slope

Returns

(long) :number of slope

get_nwfs()

Get the index of the WFS handled by the centroider

Returns

(long) : WFS index

get_pyrscale()

TODO Get the … (p_wfs.Lambda * 1e-6 / sim.config.p_tel.diam) * p_wfs.pyr_ampl * CONST.RAD2ARCSEC

Returns

(float) : pyrscale

get_sizex()

Get the x size of inter mat for corr centroider

Returns

(int) : sizex

get_sizey()

Get the y size of interp mat for corr centroider

Returns

(int) : sizey

get_thresh()

Get the threshold used by a tcog centroider

Returns

(float) : thresh

get_type()

Get the centroider type

Returns

(string) : type

get_type_fct()

TODO: docstring

Returns

(string) : type

get_weights()

Get the weights used by a wcog cetroider

Returns

(np.ndarray[ndim=1, dtype=np.float32]) : weights

get_width()

Get the width of the gaussian used by a corr centroider

Returns

(float) : width

property interpmat

Get the interp mat for corr centroider

Returns

(np.ndarray[ndim=2, dtype=np.float32]) : sizey

property method
Get the method used by a pyr centroider:

0: nosinus global 1: sinus global 2: nosinus local 3: sinus local

Returns

(int) : method

property nmax

Get the nmax pixels used by a bpcog centroider

Returns

(int) : nmax

property nwfs

Get the index of the WFS handled by the centroider

Returns

(long) : WFS index

property pyrscale

TODO Get the … (p_wfs.Lambda * 1e-6 / sim.config.p_tel.diam) * p_wfs.pyr_ampl * CONST.RAD2ARCSEC

Returns

(float) : pyrscale

set_filter_TT(t)

Set the filter_TT flag used to filter out TT from the slopes (LGS mode)

Parameters

t – (bool) : filter_TT

set_interpmat(imap)

Set the interp mat for corr centroider

Parameters

imap – (np.ndarray[ndim=2, dtype=np.float32]) : sizey

set_method(n)
Set the method used by a pyr centroider:

0: nosinus global 1: sinus global 2: nosinus local 3: sinus local

Parameters

n – (int) : method

set_nmax(n)

Set the nmax pixels used by a bpcog centroider

Parameters

n – (int) : nmax

set_nslope(n)

Set the number of slope

Parameters

n – (long) :number of slope

set_nwfs(n)

Set the index of the WFS handled by the centroider

Parameters

n – (long) : WFS index

set_pyrscale(t)

TODO Set the … (p_wfs.Lambda * 1e-6 / sim.config.p_tel.diam) * p_wfs.pyr_ampl * CONST.RAD2ARCSEC

Parameters

t – (float) : pyrscale

set_sizex(n)

Set the x size of inter mat for corr centroider

Parameters

n – (int) : sizex

set_sizey(n)

Set the y size of interp mat for corr centroider

Parameters

n – (int) : sizey

set_thresh(t)

Set the threshold used by a tcog centroider

Parameters

t – (float) : thresh

set_type(t)

Set the centroider type

Parameters

t – (string) : type

set_type_fct(t)

TODO: docstring

Parameters

t – (string) : type

set_weights(w)

Set the weights used by a wcog cetroider

Parameters

w – (np.ndarray[ndim=1, dtype=np.float32]) : weights

set_width(t)

Set the width of the gaussian used by a corr centroider

Parameters

t – (float) : width

property sizex

Get the x size of inter mat for corr centroider

Returns

(int) : sizex

property sizey

Get the y size of interp mat for corr centroider

Returns

(int) : sizey

property thresh

Get the threshold used by a tcog centroider

Returns

(float) : thresh

property type

Get the centroider type

Returns

(string) : type

property type_fct

TODO: docstring

Returns

(string) : type

property weights

Get the weights used by a wcog cetroider

Returns

(np.ndarray[ndim=1, dtype=np.float32]) : weights

property width

Get the width of the gaussian used by a corr centroider

Returns

(float) : width

class shesha.config.Param_controller
property TTcond

Get the tiptilt condition number for cmat filtering with mv controller

Returns

(float) : tiptilt condition number

property cured_ndivs

Get the subdivision levels in cured

Returns

(long) : subdivision levels in cured

property delay

Get the loop delay expressed in frames

Returns

(float) :delay [frames]

property do_kl_imat

Get type imat, for imat on kl set at 1

Returns

(int) : imat kl

property gain

Get the loop gain

Returns

(float) : loop gain

get_TTcond()

Get the tiptilt condition number for cmat filtering with mv controller

Returns

(float) : tiptilt condition number

get_cmat()

Get the full control matrix

Returns

(np.ndarray[ndim=2,dtype=np.float32_t]) : full control matrix

get_cured_ndivs()

Get the subdivision levels in cured

Returns

(long) : subdivision levels in cured

get_delay()

Get the loop delay expressed in frames

Returns

(float) :delay [frames]

get_do_kl_imat()

Get type imat, for imat on kl set at 1

Returns

(int) : imat kl

get_gain()

Get the loop gain

Returns

(float) : loop gain

get_gmax()

Get the maximum gain for modal optimization

Returns

(float) : maximum gain for modal optimization

get_gmin()

Get the minimum gain for modal optimization

Returns

(float) : minimum gain for modal optimization

get_imat()

Get the full interaction matrix

Returns

(np.ndarray[ndim=2,dtype=np.float32_t]) : full interaction matrix

get_klgain()

Get klgain for imatkl size = number of kl mode

Returns

(np.ndarray[ndim=1, dtype=np.float32]) : g

get_klpush()

Get klgain for imatkl size = number of kl mode

Returns

(np.ndarray[ndim=1, dtype=np.float32]) : g

get_maxcond()

Get the max condition number

Returns

(float) : max condition number

get_modopti()

Get the flag for modal optimization

Returns

(int) : flag for modal optimization

get_nactu()

Get the number of actuators

Returns

(int) : number of actus

get_ndm()

Get the indices of dms

Returns

(np.ndarray[ndim=1, dtype=np.int32]) : indices of dms

get_ngain()

Get the number of tested gains

Returns

(int) : number of tested gains

get_nkl()

Get the number of KL modes used in imat_kl and used for computation of covmat in case of minimum variance controller

Returns

(long) : number of KL modes

get_nmodes()

Get the number of modes for M2V matrix (modal optimization)

Returns

(int) : number of modes

get_nrec()

Get the number of sample of open loop slopes for modal optimization computation

Returns

(int) : number of sample

get_nslope()

Get the number of slopes

Returns

(int) : number of slopes

get_nstates()

Get the number of states

Returns

(int) : number of states

get_nvalid()

Get the number of valid subaps

Returns

(list of int) : number of valid subaps

get_nwfs()

Get the indices of wfs

Returns

(np.ndarray[ndim=1, dtype=np.int32]) : indices of wfs

get_type()

Get the controller type

Returns

(string) : type

property gmax

Get the maximum gain for modal optimization

Returns

(float) : maximum gain for modal optimization

property gmin

Get the minimum gain for modal optimization

Returns

(float) : minimum gain for modal optimization

property klgain

Get klgain for imatkl size = number of kl mode

Returns

(np.ndarray[ndim=1, dtype=np.float32]) : g

property klpush

Get klgain for imatkl size = number of kl mode

Returns

(np.ndarray[ndim=1, dtype=np.float32]) : g

property maxcond

Get the max condition number

Returns

(float) : max condition number

property modopti

Get the flag for modal optimization

Returns

(int) : flag for modal optimization

property nactu

Get the number of actuators

Returns

(int) : number of actus

property ndm

Get the indices of dms

Returns

(np.ndarray[ndim=1, dtype=np.int32]) : indices of dms

property ngain

Get the number of tested gains

Returns

(int) : number of tested gains

property nkl

Get the number of KL modes used in imat_kl and used for computation of covmat in case of minimum variance controller

Returns

(long) : number of KL modes

property nmodes

Get the number of modes for M2V matrix (modal optimization)

Returns

(int) : number of modes

property nrec

Get the number of sample of open loop slopes for modal optimization computation

Returns

(int) : number of sample

property nslope

Get the number of slopes

Returns

(int) : number of slopes

property nstates

Get the number of states

Returns

(int) : number of states

property nvalid

Get the number of valid subaps

Returns

(list of int) : number of valid subaps

property nwfs

Get the indices of wfs

Returns

(np.ndarray[ndim=1, dtype=np.int32]) : indices of wfs

set_TTcond(m)

Set the tiptilt condition number for cmat filtering with mv controller

Parameters

m – (float) : tiptilt condition number

set_cmat(cmat)

Set the full control matrix

Parameters

cmat – (np.ndarray[ndim=2,dtype=np.float32_t]) : full control matrix

set_cured_ndivs(n)

Set the subdivision levels in cured

Parameters

c – (long) : subdivision levels in cured

set_delay(d)

Set the loop delay expressed in frames

Parameters

d – (float) :delay [frames]

set_do_kl_imat(n)

Set type imat, for imat on kl set at 1

Parameters

k – (int) : imat kl

set_gain(g)

Set the loop gain

Parameters

g – (float) : loop gain

set_gmax(g)

Set the maximum gain for modal optimization

Parameters

g – (float) : maximum gain for modal optimization

set_gmin(g)

Set the minimum gain for modal optimization

Parameters

g – (float) : minimum gain for modal optimization

set_imat(imat)

Set the full interaction matrix

Parameters

imat – (np.ndarray[ndim=2,dtype=np.float32_t]) : full interaction matrix

set_klgain(g)

Set klgain for imatkl size = number of kl mode

Parameters

g – (np.ndarray[ndim=1, dtype=np.float32]) : g

set_klpush(g)

Set klgain for imatkl size = number of kl mode

Parameters

g – (np.ndarray[ndim=1, dtype=np.float32]) : g

set_maxcond(m)

Set the max condition number

Parameters

m – (float) : max condition number

set_modopti(n)

Set the flag for modal optimization

Parameters

n – (int) : flag for modal optimization

set_nactu(l)

Set the number of actuators

Parameters

l – (int) : number of actus

set_ndm(l)

Set the indices of dms

Parameters

l – (np.ndarray[ndim=1, dtype=np.int32]) : indices of dms

set_ngain(n)

Set the number of tested gains

Parameters

n – (int) : number of tested gains

set_nkl(n)

Set the number of KL modes used in imat_kl and used for computation of covmat in case of minimum variance controller

Parameters

n – (long) : number of KL modes

set_nmodes(n)

Set the number of modes for M2V matrix (modal optimization)

Parameters

n – (int) : number of modes

set_nrec(n)

Set the number of sample of open loop slopes for modal optimization computation

Parameters

n – (int) : number of sample

set_nslope(l)

Set the number of slopes

Parameters

l – (int) : number of slopes

set_nstates(l)

Set the number of states

Parameters

l – (int) : number of states

set_nvalid(l)

Set the number of valid subaps

Parameters

l – (list of int) : number of valid subaps

set_nwfs(l)

Set the indices of wfs

Parameters

l – (np.ndarray[ndim=1, dtype=np.int32]) : indices of wfs

set_type(t)

Set the controller type

Parameters

t – (string) : type

property type

Get the controller type

Returns

(string) : type

class shesha.config.Param_dm
property G

Get the magnifying factor

Returns

(float) : magnifying factor

property alt

Get the conjugaison altitude

Returns

(float) : conjugaison altitude (im m)

property ap

Get ap TODO!!!

Returns

(float) : TODO

property center_name

Get the name of hdf5 influence file

Returns

(str) : Hdf5 file influence name

property coupling

Get the actuators coupling

Returns

(float) : actuators coupling (<0.3)

property cube_name

Get the name of influence cube in hdf5

Returns

(str) : name of influence cube

property diam_dm

Get the diameter of the tel pupil projected on the dm plane

Returns

(float) : diameter (meters) of the tel pupil projected on the dm plane

property diam_dm_proj

Get the diameter of the dm pupil projected on the tel pupil plane

Returns

(float) : diameter (meters) of the dm pupil projected on the tel pupil plane

property dx

Get the X axis misalignment

Returns

(float) : dx (pix)

property dy

Get the Y axis misalignment

Returns

(float) : dy (pix)

property file_influ_fits

Get the name of hdf5 influence file

Returns

(str) : Hdf5 file influence name

property gain

Get the gain to apply to the actuators of the dm

Returns

(float) : gain

get_G()

Get the magnifying factor

Returns

(float) : magnifying factor

get_alt()

Get the conjugaison altitude

Returns

(float) : conjugaison altitude (im m)

get_ap()

Get ap TODO!!!

Returns

(float) : TODO

get_azbas()

Get the azimuthal array of the KL basis

Returns

(np.ndarray[ndim=1,dtype=np.float32_t]) : azimuthal array

get_center_name()

Get the name of hdf5 influence file

Returns

(str) : Hdf5 file influence name

get_coupling()

Get the actuators coupling

Returns

(float) : actuators coupling (<0.3)

get_cp()

Get the phi coordinates in carthesian grid

Returns

(np.ndarray[ndim=1,dtype=np.float32_t]) : phi coordinates in carthesian grid

get_cr()

Get the radial coordinates in carthesian grid

Returns

(np.ndarray[ndim=1,dtype=np.float32_t]) : radial coordinates in carthesian grid

get_cube_name()

Get the name of influence cube in hdf5

Returns

(str) : name of influence cube

get_diam_dm()

Get the diameter of the tel pupil projected on the dm plane

Returns

(float) : diameter (meters) of the tel pupil projected on the dm plane

get_diam_dm_proj()

Get the diameter of the dm pupil projected on the tel pupil plane

Returns

(float) : diameter (meters) of the dm pupil projected on the tel pupil plane

get_dx()

Get the X axis misalignment

Returns

(float) : dx (pix)

get_dy()

Get the Y axis misalignment

Returns

(float) : dy (pix)

get_file_influ_fits()

Get the name of hdf5 influence file

Returns

(str) : Hdf5 file influence name

get_gain()

Get the gain to apply to the actuators of the dm

Returns

(float) : gain

get_i1()

Get the X-position of the bottom left corner of each influence function

Returns

(np.ndarray[ndim=1,dtype=np.int32_t]) :

get_influ()

Get the influence function

Returns

(np.ndarray[ndim=3,dtype=np.float32_t]) : influence function

get_influ_res()

Get the name of influence fonction resolution in file

Returns

(str) : name of resoltion (meter/pixel) of influence

get_influ_type()

Get the influence function type for pzt DM

Returns

(str) : centroider type

get_influpos()

Get the influence functions pixels that contributes to each DM pixel

Returns

(np.ndarray[ndim=1, drype=np.int32]) : influpos

get_influsize()

Get the actuators influsize [pixels]

Returns

(int) : actuators influsize [pixels]

get_influstart()

Get the index where to start a new DM pixel shape in the array influpos to each DM pixel

Returns

(np.ndarray[ndim=1, drype=np.int32]) : influstart

get_j1()

Get the Y-position of the bottom left corner of each influence function

Returns

(np.ndarray[ndim=1,dtype=np.int32_t]) :

get_margin_in()

Get the margin for inside actuator select (central obstruction)

Returns

(float) : unit is actuator pitch (+) for extra (-) for intra

get_margin_out()

Get the margin for outside actuator select

Returns

(float) : unit is actuator pitch (+) for extra (-) for intra

get_n1()

Get the position of bottom left pixel in the largest support

Returns

(int) : actuators n1 [pixels]

get_n2()

Get the position of bottom right pixel in the largest support

Returns

(int) : actuators n2 [pixels]

get_nact()

Get the number of actuator

Returns

(long) : number of actuators in the dm

get_ncp()

Get the dimension of grid (?)

Returns

(int) : dimension

get_nfunc()

Get nfunc TODO !!!

Returns

(int) : TODO

get_ninflu()

Get the number of influence functions pixels that contributes to each DM pixel

Returns

(np.ndarray[ndim=1, drype=np.int32]) : ninflu

get_nkl()

Get the number of KL modes used for computation of covmat in case of minimum variance controller

Returns

(long) : number of KL modes

get_npp()

Get the number of elements (?) for KL

Returns

(int) : number of elements

get_nr()

Get the number of radial points for KL

Returns

(int) : number of radial points

get_ntotact()

Get the total number of actuators

Returns

(long) : total number of actuators

get_ord()

Get the radial orders of the basis

Returns

(int) : radial order of the basis

get_outscl()

Get the outer scale for KL with Von Karman spectrum

Returns

(float) : outer scale [m]

get_pitch()

Get the actuators pitch [pixels]

Returns

(float) : actuators pitch [pixels]

get_pupoffset()

Get the pupil offset in meters

Returns

(np.ndarray[ndim=1,dtype=np.float32_t]) : offsets [m]

get_puppixoffset()

Get the pupil offset in pixels

Returns

(np.ndarray[ndim=1,dtype=np.float32_t]) : offsets [pixels]

get_push4imat()

Get the nominal voltage for imat

Returns

(float) : nominal voltage for imat

get_pzt_extent()

Get extent of pzt dm in pich unit default = 5

Returns

(int) : extent pzt dm

get_rabas()

Get the radial array of the KL basis

Returns

(np.ndarray[ndim=1,dtype=np.float32_t]) : radial array

get_theta()

Get the rotation angle in the pupil

Returns

(float) : rotation angle (rad)

get_thresh()

Get the threshold on response for selection

Returns

(float) : threshold on response for selection (<1)

get_type()

Get the dm type

Returns

(str) : type of dm

get_type_kl()

Get the type of KL used for computation

Returns

(string) : KL types : kolmo or karman

get_type_pattern()

Get the pattern type

Returns

(str) : type of pattern

get_unitpervolt()

Get the Influence function sensitivity

Returns

(float) : Influence function sensitivity in unit/volt

get_x_name()

Get the name of x coord of influence fonction in file

Returns

(str) : name of x coord of influence

get_xpos()

Get the x positions of influ functions (lower left corner)

Returns

(np.ndarray[ndim=1,dtype=np.float32_t]) : x positions of influ functions

get_y_name()

Get the name of y coord of influence fonction in file

Returns

(str) : name of y coord of influence

get_ypos()

Get the y positions of influ functions (lower left corner)

Returns

(np.ndarray[ndim=1,dtype=np.float32_t]) : y positions of influ functions

property influ_res

Get the name of influence fonction resolution in file

Returns

(str) : name of resoltion (meter/pixel) of influence

property influ_type

Get the influence function type for pzt DM

Returns

(str) : centroider type

property margin_in

Get the margin for inside actuator select (central obstruction)

Returns

(float) : unit is actuator pitch (+) for extra (-) for intra

property margin_out

Get the margin for outside actuator select

Returns

(float) : unit is actuator pitch (+) for extra (-) for intra

property nact

Get the number of actuator

Returns

(long) : number of actuators in the dm

property nfunc

Get nfunc TODO !!!

Returns

(int) : TODO

property nkl

Get the number of KL modes used for computation of covmat in case of minimum variance controller

Returns

(long) : number of KL modes

property outscl

Get the outer scale for KL with Von Karman spectrum

Returns

(float) : outer scale [m]

property pupoffset

Get the pupil offset in meters

Returns

(np.ndarray[ndim=1,dtype=np.float32_t]) : offsets [m]

property push4imat

Get the nominal voltage for imat

Returns

(float) : nominal voltage for imat

property pzt_extent

Get extent of pzt dm in pich unit default = 5

Returns

(int) : extent pzt dm

set_G(G)

Set the magnifying factor

Parameters

G – (float) : magnifying factor

set_alt(a)

set the conjugaison altitude

Parameters

a – (float) : conjugaison altitude (im m)

set_ap(ap)

Set ap TODO!!!

Parameters

ap – (float) : TODO

set_azbas(r)

Set the azimuthal array of the KL basis

Parameters

r – (np.ndarray[ndim=1,dtype=np.float32_t]) : azimuthal array

set_center_name(f)

set the name of hdf5 influence file

Parameters

filename – (str) : Hdf5 file influence name

set_coupling(c)

set the actuators coupling

Parameters

c – (float) : actuators coupling (<0.3)

set_cp(r)

Set the phi coordinates in carthesian grid

Parameters

r – (np.ndarray[ndim=1,dtype=np.float32_t]) : phi coordinates in carthesian grid

set_cr(r)

Set the radial coordinates in carthesian grid

Parameters

r – (np.ndarray[ndim=1,dtype=np.float32_t]) : radial coordinates in carthesian grid

set_cube_name(cubename)

set the name of influence cube in hdf5

Parameters

cubename – (str) : name of influence cube

set_diam_dm(di)

Set the diameter of the tel pupil projected on the dm plane

Parameters

di – (float) : diameter (meters) of the tel pupil projected on the dm plane

set_diam_dm_proj(dp)

Set the diameter of the dm pupil projected on the tel pupil plane

Parameters

dp – (float) : diameter (meters) of the dm pupil projected on the tel pupil plane

set_dx(dx)

Set the X axis misalignment

Parameters

dx – (float) : dx (pix)

set_dy(dy)

Set the Y axis misalignment

Parameters

dy – (float) : dy (pix)

set_file_influ_fits(f)

set the name of hdf5 influence file

Parameters

filename – (str) : Hdf5 file influence name

set_gain(g)

Set the gain to apply to the actuators of the dm

Parameters

g – (float) : gain

set_i1(i1)

Set the X-position of the bottom left corner of each influence function

Parameters

i1 – (np.ndarray[ndim=1,dtype=np.int32_t]) :

set_influ(influ)

Set the influence function

Parameters

influ – (np.ndarray[ndim=3,dtype=np.float32_t]) : influence function

set_influ_res(res)

set the name of influence fonction resolution in file

Parameters

res – (str) : name of resoltion (meter/pixel) of influence

set_influ_type(t)

Set the influence function type for pzt DM

Parameters

t – (str) : centroider type

set_influpos(ip)

Set the influence functions pixels that contributes to each DM pixel

Parameters

ip – (np.ndarray[ndim=1, drype=np.int32]) : influpos

set_influsize(s)

set the actuators influsize [pixels]

Parameters

s – (int) : actuators influsize [pixels]

set_influstart(n)

Set the index where to start a new DM pixel shape in the array influpos to each DM pixel

Parameters

n – (np.ndarray[ndim=1, drype=np.int32]) : influstart

set_j1(j1)

Set the Y-position of the bottom left corner of each influence function

Parameters

j1 – (np.ndarray[ndim=1,dtype=np.int32_t]) :

set_margin_in(n)

set the margin for inside actuator select (central obstruction)

Parameters

n – (float) : unit is actuator pitch (+) for extra (-) for intra

set_margin_out(n)

set the margin for outside actuator select

Parameters

n – (float) : unit is actuator pitch (+) for extra (-) for intra

set_n1(n)

set the position of bottom left pixel in the largest support

Parameters

n – (int) : actuators n1 [pixels]

set_n2(n)

set the position of bottom right pixel in the largest support

Parameters

n – (int) : actuators n2 [pixels]

set_nact(n)

set the number of actuator

Parameters

n – (long) : number of actuators in the dm

set_ncp(n)

Set the dimension of grid (?)

Parameters

n – (int) : dimension

set_nfunc(nfunc)

Set nfunc TODO !!!

Parameters

nfunc – (int) : TODO

set_ninflu(n)

Set the number of influence functions pixels that contributes to each DM pixel

Parameters

n – (np.ndarray[ndim=1, drype=np.int32]) : ninflu

set_nkl(n)

Set the number of KL modes used for computation of covmat in case of minimum variance controller

Parameters

n – (long) : number of KL modes

set_npp(n)

Set the number of elements (?) for KL

Parameters

n – (int) : number of elements

set_nr(n)

Set the number of radial points for KL

Parameters

n – (int) : number of radial points

set_ntotact(n)

set the total number of actuators

Parameters

n – (long) : total number of actuators

set_ord(n)

Set the radial orders of the basis

Parameters

n – (int) : radial order of the basis

set_outscl(L0)

Set the outer scale for KL with Von Karman spectrum

Parameters

L0 – (float) : outer scale [m]

set_pitch(p)

set the actuators pitch [pixels]

Parameters

p – (float) : actuators pitch [pixels]

set_pupoffset(off)

Set the pupil offset in meters

Parameters

off – (np.ndarray[ndim=1,dtype=np.float32_t]) : offsets [m]

set_puppixoffset(off)

Set the pupil offset in pixels

Parameters

off – (np.ndarray[ndim=1,dtype=np.float32_t]) : offsets [pixels]

set_push4imat(p)

set the nominal voltage for imat

Parameters

p – (float) : nominal voltage for imat

set_pzt_extent(p)

Set extent of pzt dm in pich unit default = 5

Parameters

p – (int) : extent pzt dm

set_rabas(r)

Set the radial array of the KL basis

Parameters

r – (np.ndarray[ndim=1,dtype=np.float32_t]) : radial array

set_segmented_mirror(b)

Define mirror influence functions to be cropped by the spiders (more generally, pupil edges)

Parameters

p – (bool) : segment the mirror

set_theta(theta)

Set the rotation angle in the pupil

Parameters

theta – (float) : rotation angle (rad)

set_thresh(t)

set the threshold on response for selection

Parameters

t – (float) : threshold on response for selection (<1)

set_type(t)

set the dm type

Parameters

t – (str) : type of dm

set_type_kl(t)

Set the type of KL used for computation

Parameters

t – (string) : KL types : kolmo or karman

set_type_pattern(t)

set the pattern type

Parameters

t – (str) : type of pattern

set_unitpervolt(u)

set the Influence function sensitivity

Parameters

u – (float) : Influence function sensitivity in unit/volt

set_x_name(xname)

set the name of x coord of influence fonction in file

Parameters

t – (str) : name of x coord of influence

set_xpos(xpos)

Set the x positions of influ functions (lower left corner)

Parameters

xpos – (np.ndarray[ndim=1,dtype=np.float32_t]) : x positions of influ functions

set_y_name(yname)

set the name of y coord of influence fonction in file

Parameters

yname – (str) : name of y coord of influence

set_ypos(ypos)

Set the y positions of influ functions (lower left corner)

Parameters

ypos – (np.ndarray[ndim=1,dtype=np.float32_t]) : y positions of influ functions

property theta

Get the rotation angle in the pupil

Returns

(float) : rotation angle (rad)

property thresh

Get the threshold on response for selection

Returns

(float) : threshold on response for selection (<1)

property type

Get the dm type

Returns

(str) : type of dm

property type_kl

Get the type of KL used for computation

Returns

(string) : KL types : kolmo or karman

property type_pattern

Get the pattern type

Returns

(str) : type of pattern

property unitpervolt

Get the Influence function sensitivity

Returns

(float) : Influence function sensitivity in unit/volt

property x_name

Get the name of x coord of influence fonction in file

Returns

(str) : name of x coord of influence

property y_name

Get the name of y coord of influence fonction in file

Returns

(str) : name of y coord of influence

class shesha.config.Param_geom
property apod
Gells if the apodizer is used

The apodizer is used if a is not 0

Returns

(int) boolean for apodizer

property apod_file

Get the path of apodizer file

Returns

(str) : apodizer file name

property cent

Get the central point of the simulation

Returns

(float) : central point of the simulation.

get_apod()
Gells if the apodizer is used

The apodizer is used if a is not 0

Returns

(int) boolean for apodizer

get_apod_file()

Get the path of apodizer file

Returns

(str) : apodizer file name

get_apodizer()

Get the apodizer defined in spupil support

Returns

(np.ndarray[ndim=2, dtype=np.float32]) : apodizer

get_cent()

Get the central point of the simulation

Returns

(float) : central point of the simulation.

get_ipupil()

Get the pupil in the biggest support

Returns

(np.ndarray[ndim=2, dtype=np.float32]) : pupil

get_is_init()

Get the is_init flag

Returns

(bool) : is_init flag

get_mpupil()

Get the pupil in the middle support

Returns

(np.ndarray[ndim=2, dtype=np.float32]) : pupil

get_n()

Get the linear size of mpupil

Returns

(long) : coordinate (same in x and y) [pixel]

get_n1()

Get the bottom-left corner coordinates of the pupil in the ipupil support

Returns

(long) : coordinate (same in x and y) [pixel]

get_n2()

Get the upper-right corner coordinates of the pupil in the ipupil support

Returns

(long) : coordinate (same in x and y) [pixel]

get_p1()

Get the bottom-left corner coordinates of the pupil in the mpupil support

Returns

(long) : coordinate (same in x and y) [pixel]

get_p2()

Get the upper-right corner coordinates of the pupil in the mpupil support

Returns

(long) : coordinate (same in x and y) [pixel]

get_phase_ab_M1()

Get the phase aberration of the M1 defined in spupil support

Returns

(np.ndarray[ndim=2, dtype=np.float32]) : phase aberrations

get_phase_ab_M1_m()

Get the phase aberration of the M1 defined in mpupil support

Returns

(np.ndarray[ndim=2, dtype=np.float32]) : phase aberrations

get_pixsize()

Get the pixsizeral point of the simulation

Returns

(float) : pixsizeral point of the simulation.

get_pupdiam()

Get the linear size of total pupil

Returns

(long) : linear size of total pupil (in pixels).

get_spupil()

Get the pupil in the smallest support

Returns

(np.ndarray[ndim=2, dtype=np.float32]) : pupil

get_ssize()

Get linear size of full image

Returns

(long) : linear size of full image (in pixels).

get_zenithangle()

Get observations zenith angle

Returns

(float) : observations zenith angle (in deg).

property is_init

Get the is_init flag

Returns

(bool) : is_init flag

property pupdiam

Get the linear size of total pupil

Returns

(long) : linear size of total pupil (in pixels).

set_apod(a)
Tells if the apodizer is used

The apodizer is used if a is not 0

Parameters

a – (int) boolean for apodizer

set_apod_file(f)

Set the path of apodizer file

Parameters

filename – (str) : apodizer file name

set_apodizer(s)

Set the apodizer defined in spupil support

Parameters

s – (np.ndarray[ndim=2, dtype=np.float32]) : apodizer

set_cent(c)

Set the central point of the simulation

Parameters

c – (float) : central point of the simulation.

set_ipupil(s)

Set the pupil in the biggest support

Parameters

s – (np.ndarray[ndim=2, dtype=np.float32]) : pupil

set_is_init(i)

set the is_init flag

Parameters

i – (bool) : is_init flag

set_mpupil(s)

Set the pupil in the middle support

Parameters

s – (np.ndarray[ndim=2, dtype=np.float32]) : pupil

set_n(s)

Set the linear size of mpupil

Parameters

s – (long) : coordinate (same in x and y) [pixel]

set_n1(s)

Set the bottom-left corner coordinates of the pupil in the ipupil support

Parameters

s – (long) : coordinate (same in x and y) [pixel]

set_n2(s)

Set the upper-right corner coordinates of the pupil in the ipupil support

Parameters

s – (long) : coordinate (same in x and y) [pixel]

set_p1(s)

Set the bottom-left corner coordinates of the pupil in the mpupil support

Parameters

s – (long) : coordinate (same in x and y) [pixel]

set_p2(s)

Set the upper-right corner coordinates of the pupil in the mpupil support

Parameters

s – (long) : coordinate (same in x and y) [pixel]

set_phase_ab_M1(s)

Set the phase aberration of the M1 defined in spupil support

Parameters

s – (np.ndarray[ndim=2, dtype=np.float32]) : phase aberrations

set_phase_ab_M1_m(s)

Set the phase aberration of the M1 defined in mpupil support

Parameters

s – (np.ndarray[ndim=2, dtype=np.float32]) : phase aberrations

set_pixsize(c)

Set the pixel size of the simulation

Parameters

c – (float) : pixel size of the simulation.

set_pupdiam(p)

Set the linear size of total pupil

Parameters

p – (long) : linear size of total pupil (in pixels).

set_spupil(s)

Set the pupil in the smallest support

Parameters

s – (np.ndarray[ndim=2, dtype=np.float32]) : pupil

set_ssize(s)

Set linear size of full image

Parameters

s – (long) : linear size of full image (in pixels).

set_zenithangle(z)

Set observations zenith angle

Parameters

z – (float) : observations zenith angle (in deg).

property ssize

Get linear size of full image

Returns

(long) : linear size of full image (in pixels).

property zenithangle

Get observations zenith angle

Returns

(float) : observations zenith angle (in deg).

class shesha.config.Param_loop
property devices

Get the list of GPU devices used

Returns

(np.ndarray[ndim=1, dtype=np.int32_t]) : list of GPU devices

get_devices()

Get the list of GPU devices used

Returns

(np.ndarray[ndim=1, dtype=np.int32_t]) : list of GPU devices

get_ittime()

Get iteration time

Returns

(float) :iteration time

get_niter()

Get the number of iteration

Returns

(long) : number of iteration

property ittime

Get iteration time

Returns

(float) :iteration time

property niter

Get the number of iteration

Returns

(long) : number of iteration

set_devices(devices)

Set the list of GPU devices used

Parameters

devices: (np.ndarray[ndim=1, dtype=np.int32_t]) : list of GPU devices

set_ittime(t)

Set iteration time

Parameters

t: (float) :iteration time

set_niter(n)

Set the number of iteration

Parameters

n: (long) : number of iteration

class shesha.config.Param_target
property Lambda

Get the wavelength of targets

Returns

(np.ndarray[ndim=2, dtype=np.float32]) : wavelength of targets

property apod

Get apodizer flag

Returns

(bool) : apod

property dms_seen

Get the dms_seen by the targets

Returns

(np.ndarray[ndim=2, dtype=np.int32]) : index of dms seen

get_Lambda()

Get the wavelength of targets

Returns

(np.ndarray[ndim=2, dtype=np.float32]) : wavelength of targets

get_apod()

Get apodizer flag

Returns

(bool) : apod

get_dms_seen()

Get the dms_seen by the targets

Returns

(np.ndarray[ndim=2, dtype=np.int32]) : index of dms seen

get_mag()

Get the magnitudes of targets

Returns

(np.ndarray[ndim=2, dtype=np.float32]) : magnitudes

get_xpos()

Get the X-position of targets in the field [arcsec]

Returns

(np.ndarray[ndim=2, dtype=np.float32]) : X position of targets [arcsec]

get_ypos()

Get the Y-position of targets in the field [arcsec]

Returns

(np.ndarray[ndim=2, dtype=np.float32]): Y position of targets [arcsec]

get_zerop()

Get the zero point of targets

Returns

(float) : zero point of targets

property mag

Get the magnitudes of targets

Returns

(np.ndarray[ndim=2, dtype=np.float32]) : magnitudes

set_Lambda(n)

Set the wavelength of targets

Parameters

n – (np.ndarray[ndim=2, dtype=np.float32]) : wavelength of targets

set_apod(l)

Set apodizer flag

Parameters

l – (bool) : apod

set_dms_seen(n)

Set the dms_seen by the targets

Parameters

n – (np.ndarray[ndim=2, dtype=np.int32]) : index of dms seen

set_mag(n)

Set the magnitudes of targets

Parameters

n – (np.ndarray[ndim=2, dtype=np.float32]) : magnitudes

set_xpos(n)

Set the X-position of targets in the field [arcsec]

Parameters

n – (np.ndarray[ndim=2, dtype=np.float32]) : X position of targets [arcsec]

set_ypos(n)

Set the Y-position of targets in the field [arcsec]

Parameters

n – (np.ndarray[ndim=2, dtype=np.float32]): Y position of targets [arcsec]

set_zerop(n)

Set the zero point of targets

Parameters

n – (float) : zero point of targets

property xpos

Get the X-position of targets in the field [arcsec]

Returns

(np.ndarray[ndim=2, dtype=np.float32]) : X position of targets [arcsec]

property ypos

Get the Y-position of targets in the field [arcsec]

Returns

(np.ndarray[ndim=2, dtype=np.float32]): Y position of targets [arcsec]

property zerop

Get the zero point of targets

Returns

(float) : zero point of targets

class shesha.config.Param_tel
property cobs

Get the central obstruction ratio

Returns

(float) : central obstruction ratio

property diam

Get the telescope diameter

Returns

(float) : telescope diameter (in meters)

property gap

Get the Gap between segments

Returns

(float) : Gap between segments (meters)

get_cobs()

Get the central obstruction ratio

Returns

(float) : central obstruction ratio

get_diam()

Get the telescope diameter

Returns

(float) : telescope diameter (in meters)

get_gap()

Get the Gap between segments

Returns

(float) : Gap between segments (meters)

get_nbrmissing()

Get the number of missing segments for EELT pupil

Returns

(long) : number of missing segments for EELT pupil (max is 20)

get_pupangle()

Get the rotation angle of pupil

Returns

(float) : rotation angle of pupil

get_referr()

Get the std of reflectivity errors for EELT segments

Returns

(float) : std of reflectivity errors for EELT segments (fraction)

get_spiders_type()

Get the secondary supports type

Returns

(str) : secondary supports type

get_std_piston()

Get the std of piston errors for EELT segments

Returns

(float) : std of piston errors for EELT segments

get_std_tt()

Get the std of tip-tilt errors for EELT segments

Returns

(float) : std of tip-tilt errors for EELT segments

get_t_spiders()

Get the secondary supports ratio

Returns

(float) : secondary supports ratio

get_type_ap()

Get the EELT aperture type

Returns

(str) : EELT aperture type

get_vect_seg()

Get the segment number for construct ELT pupil”

Returns

(list of int32) : segment numbers

property nbrmissing

Get the number of missing segments for EELT pupil

Returns

(long) : number of missing segments for EELT pupil (max is 20)

property pupangle

Get the rotation angle of pupil

Returns

(float) : rotation angle of pupil

property referr

Get the std of reflectivity errors for EELT segments

Returns

(float) : std of reflectivity errors for EELT segments (fraction)

set_cobs(c)

Set the central obstruction ratio

Parameters

c – (float) : central obstruction ratio

set_diam(d)

Set the telescope diameter

Parameters

d – (float) : telescope diameter (in meters)

set_gap(gap)

Set the Gap between segments

Parameters

gap – (float) : Gap between segments (meters)

set_nbrmissing(nb)

Set the number of missing segments for EELT pupil

Parameters

nb – (long) : number of missing segments for EELT pupil (max is 20)

set_pupangle(p)

Set the rotation angle of pupil

Parameters

p – (float) : rotation angle of pupil

set_referr(ref)

Set the std of reflectivity errors for EELT segments

Parameters

ref – (float) : std of reflectivity errors for EELT segments (fraction)

set_spiders_type(spider)

Set the secondary supports type

Parameters

spider – (str) : secondary supports type

set_std_piston(piston)

Set the std of piston errors for EELT segments

Parameters

piston – (float) : std of piston errors for EELT segments

set_std_tt(tt)

Set the std of tip-tilt errors for EELT segments

Parameters

tt – (float) : std of tip-tilt errors for EELT segments

set_t_spiders(spider)

Set the secondary supports ratio

Parameters

spider – (float) : secondary supports ratio

set_type_ap(t)

Set the EELT aperture type

Parameters

t – (str) : EELT aperture type

set_vect_seg(vect)

Set the segment number for construct ELT pupil”

Parameters

vect – (list of int32) : segment numbers

property spiders_type

Get the secondary supports type

Returns

(str) : secondary supports type

property std_piston

Get the std of piston errors for EELT segments

Returns

(float) : std of piston errors for EELT segments

property std_tt

Get the std of tip-tilt errors for EELT segments

Returns

(float) : std of tip-tilt errors for EELT segments

property t_spiders

Get the secondary supports ratio

Returns

(float) : secondary supports ratio

property type_ap

Get the EELT aperture type

Returns

(str) : EELT aperture type

property vect_seg

Get the segment number for construct ELT pupil”

Returns

(list of int32) : segment numbers

class shesha.config.Param_wfs(roket=False)
property G

Get the magnifying factor

Returns

(float) : magnifying factor

property Lambda

Get the observation wavelength

Returns

(float) : observation wavelength (in um) for a subap

property atmos_seen

Gells if the wfs sees the atmosphere layers

Returns

(bool) :True if the WFS sees the atmosphere layers

property beamsize

Get the laser beam fwhm on-sky

Returns

(float) : laser beam fwhm on-sky (in arcsec)

property dms_seen

Get the index of dms seen by the WFS

Returns

(np.ndarray[ndim=1,dtype=np.int32_t) : index of dms seen by the WFS

property dx

Get the X axis misalignment

Returns

(float) : dx (pix)

property dy

Get the Y axis misalignment

Returns

(float) : dy (pix)

property fakecam

Get the fakecam flag

Returns

(bool) : fakecam flag

property fracsub

Get the minimal illumination fraction for valid subaps

Returns

(float) : minimal illumination fraction for valid subaps

property fssize

Get the size of field stop

Returns

(float) : size of field stop in arcsec

property fstop

Get the size of field stop

Returns

(str) : size of field stop in arcsec

get_G()

Get the magnifying factor

Returns

(float) : magnifying factor

get_Lambda()

Get the observation wavelength

Returns

(float) : observation wavelength (in um) for a subap

get_Nfft()

Get the size of FFT support for a subap

Returns

(long) : size of FFT support

get_Ntot()

Get the size of hr image for a subap

Returns

(long) : size of hr image for a subap

get_altna()

Get the corresponding altitude

Returns

(np.ndarray[ndim=1,dtype=np.float32]) : corresponding altitude

get_atmos_seen()

Gells if the wfs sees the atmosphere layers

Returns

(bool) :True if the WFS sees the atmosphere layers

get_azimuth()

TODO : docstring

get_beam()

TODO : docstring

get_beamsize()

Get the laser beam fwhm on-sky

Returns

(float) : laser beam fwhm on-sky (in arcsec)

get_binmap()

TODO : docstring

get_dms_seen()

Get the index of dms seen by the WFS

Returns

(np.ndarray[ndim=1,dtype=np.int32_t) : index of dms seen by the WFS

get_dx()

Get the X axis misalignment

Returns

(float) : dx (pix)

get_dy()

Get the Y axis misalignment

Returns

(float) : dy (pix)

get_fakecam()

Get the fakecam flag

Returns

(bool) : fakecam flag

get_fluxPerSub()

Get the subap diameter (m)

Returns

(np.array(ndim=2, dtype=np.float32)) : subap diameter (m)

get_fracsub()

Get the minimal illumination fraction for valid subaps

Returns

(float) : minimal illumination fraction for valid subaps

get_fssize()

Get the size of field stop

Returns

(float) : size of field stop in arcsec

get_fstop()

Get the size of field stop

Returns

(str) : size of field stop in arcsec

get_ftbeam()

TODO : docstring

get_ftkernel()

TODO : docstring

get_gsalt()

Get the altitude of guide star

Returns

(float) : altitude of guide star (in m) 0 if ngs

get_gsmag()

Get the magnitude of guide star

Returns

(float) : magnitude of guide star

get_halfxy()

TODO : docstring

get_hrmap()

TODO : docstring

get_is_low_order()

Get the low order flag : if True, WFS arrays will not be mutualised

Returns

(bool) : low order flag

get_isvalid()

Get the valid subapertures array

Returns

(int*) array of 0/1 for valid subaps

get_kernel()

Get the attribute kernel

Returns

(float) :

get_laserpower()

Get the laser power

Returns

(float) : laser power in W

get_lgskern()

TODO : docstring

get_lgsreturnperwatt()

Get the return per watt factor

Returns

(float) : return per watt factor (high season : 10 ph/cm2/s/W)

get_lltx()

Get the x position of llt

Returns

(float) : x position (in meters) of llt

get_llty()

Get the y position of llt

Returns

(float) : y position (in meters) of llt

get_maxFluxPerPix()

Get the max_flux_per_pix

Returns

(int) : max_flux_per_pix

get_maxPixValue()

Get the max_pix_value

Returns

(int) : max_pix_value

get_nPupils()

Get the number of pupil images

Returns

(long) : number of pupil images

get_noise()

Get the desired noise

Returns

(float) : desired noise : < 0 = no noise / 0 = photon only / > 0 photon + ron

get_nphotons()

Get number of photons per subap

Returns

(float) : number of photons per subap

get_nphotons4imat()

Get the desired numner of photons used for doing imat

Returns

(float) : desired number of photons

get_npix()

Get the number of pixels per subap

Returns

(long) : number of pixels per subap

get_nrebin()

Get the rebin factor from hr to binned image for a subap

Returns

(long) : rebin factor

get_nvalid()

Get the number of valid subapertures

Returns

(long) : number of valid subapertures

get_nxsub()

Get the linear number of subaps

Returns

(long) : linear number of subaps

get_open_loop()

Get the loop state (open or closed)

Returns

(long) : 1 if in “open-loop” mode (i.e. does not see dm)

get_optthroughput()

Get the wfs global throughput

Returns

(float) : wfs global throughput

get_pdiam()

Get the subap diameter in pixels

Returns

(long) : subap diam in pixels

get_phasemap()

TODO : docstring

get_pixsize()

Get the pixel size

Returns

(float) : pixel size (in arcsec) for a subap

get_prof1d()

TODO : docstring

get_profcum()

TODO : docstring

get_profna()

Get the sodium profile

Returns

(np.ndarray[ndim=1,dtype=np.float32]) : sodium profile

get_proftype()

Get the type of sodium profile

Returns

(str) : type of sodium profile “gauss”, “exp”, etc …

get_pyr_ampl()

Get the pyramid wfs modulation amplitude radius

Returns

(float) : pyramid wfs modulation amplitude radius (in arsec)

get_pyr_compute_focalplane()

Get the status of the pyramid wfs focal plane computation

get_pyr_cx()

Get the x position of modulation points for pyramid sensor

Returns

(np.ndarray[ndim=1,dtype=np.floatt32_t) : x positions

get_pyr_cy()

Get the y position of modulation points for pyramid sensor

Returns

(np.ndarray[ndim=1,dtype=np.floatt32_t) : y positions

get_pyr_loc()

Get the location of modulation

Returns

(str) : location of modulation, before/after the field stop. valid value are “before” or “after” (default “after”)

get_pyr_npts()

Get the total number of point along modulation circle

Returns

(long) : total number of point along modulation circle

get_pyr_pos()

TODO : docstring

get_pyr_pup_sep()

Get the pyramid pupil separation. (default: long(wfs.nxsub))

Returns

(long) : pyramid pupil separation wanted

get_pyr_scale_pos()

Get the pixel size

Returns

(float) : pixel size (in arcsec) for a subap

get_pyr_weights()

TODO : docstring

get_pyrtype()

Get the type of pyramid,

Returns

(str) : type of pyramid, either 0 for “Pyramid” or 1 for “RoofPrism”

get_qpixsize()

Get the quantum pixel size for the simulation

Returns

(float) : quantum pixel size

get_roket()

Get the error budget flag : if True, enable error budget analysis for this simulation

Returns

(bool) : error budget flag

get_sincar()

TODO : docstring

get_subapd()

Get the subap diameter (m)

Returns

(float) : subap diameter (m)

get_submask()

TODO : docstring

get_thetaML()

Get the rotation angle in the pupil

Returns

(float) : rotation angle (rad)

get_type()

Get the type of wfs

Returns

(str) : type of wfs (“sh” or “pyr”)

get_validpuppixx()

TODO : docstring

get_validpuppixy()

TODO : docstring

get_validsub()

Return both validsubsx and validsubsy

Returns

(tuple) : (self._validsubsx, self._validsubsy)

get_validsubsx()

Get the valid subapertures along X-axis

Returns

(np.array(dim=1, dtype=np.int32)) : validsubsx

get_validsubsy()

Get the valid subapertures along Y-axis

Returns

(np.array(dim=1, dtype=np.int32)) : validsubsy

get_xpos()

Get the guide star x position on sky

Returns

(float) : guide star x position on sky (in arcsec)

get_ypos()

Get the guide star y position on sky

Returns

(float) : guide star y position on sky (in arcsec)

get_zerop()

Get the detector zero point

Returns

(float) : detector zero point

property gsalt

Get the altitude of guide star

Returns

(float) : altitude of guide star (in m) 0 if ngs

property gsmag

Get the magnitude of guide star

Returns

(float) : magnitude of guide star

property is_low_order

Get the low order flag : if True, WFS arrays will not be mutualised

Returns

(bool) : low order flag

property kernel

Get the attribute kernel

Returns

(float) :

property laserpower

Get the laser power

Returns

(float) : laser power in W

property lgsreturnperwatt

Get the return per watt factor

Returns

(float) : return per watt factor (high season : 10 ph/cm2/s/W)

property lltx

Get the x position of llt

Returns

(float) : x position (in meters) of llt

property llty

Get the y position of llt

Returns

(float) : y position (in meters) of llt

property max_flux_per_pix

Get the max_flux_per_pix

Returns

(int) : max_flux_per_pix

property max_pix_value

Get the max_pix_value

Returns

(int) : max_pix_value

property nPupils

Get the number of pupil images

Returns

(long) : number of pupil images

property noise

Get the desired noise

Returns

(float) : desired noise : < 0 = no noise / 0 = photon only / > 0 photon + ron

property nphotons4imat

Get the desired numner of photons used for doing imat

Returns

(float) : desired number of photons

property npix

Get the number of pixels per subap

Returns

(long) : number of pixels per subap

property nxsub

Get the linear number of subaps

Returns

(long) : linear number of subaps

property open_loop

Get the loop state (open or closed)

Returns

(long) : 1 if in “open-loop” mode (i.e. does not see dm)

property optthroughput

Get the wfs global throughput

Returns

(float) : wfs global throughput

property pixsize

Get the pixel size

Returns

(float) : pixel size (in arcsec) for a subap

property proftype

Get the type of sodium profile

Returns

(str) : type of sodium profile “gauss”, “exp”, etc …

property pyr_ampl

Get the pyramid wfs modulation amplitude radius

Returns

(float) : pyramid wfs modulation amplitude radius (in arsec)

property pyr_compute_focalplane

Get the status of the pyramid wfs focal plane computation

property pyr_loc

Get the location of modulation

Returns

(str) : location of modulation, before/after the field stop. valid value are “before” or “after” (default “after”)

property pyr_npts

Get the total number of point along modulation circle

Returns

(long) : total number of point along modulation circle

property pyr_pos

TODO : docstring

property pyr_pup_sep

Get the pyramid pupil separation. (default: long(wfs.nxsub))

Returns

(long) : pyramid pupil separation wanted

property pyrtype

Get the type of pyramid,

Returns

(str) : type of pyramid, either 0 for “Pyramid” or 1 for “RoofPrism”

property roket

Get the error budget flag : if True, enable error budget analysis for this simulation

Returns

(bool) : error budget flag

set_G(G)

Set the magnifying factor

Parameters

G – (float) : magnifying factor

set_Lambda(L)

Set the observation wavelength

Parameters

L – (float) : observation wavelength (in um) for a subap

set_Nfft(n)

Set the size of FFT support for a subap

Parameters

n – (long) : size of FFT support

set_Ntot(n)

Set the size of hr image for a subap

Parameters

n – (long) : size of hr image for a subap

set_altna(a)

Set the corresponding altitude

Parameters

a – (np.ndarray[ndim=1,dtype=np.float32]) : corresponding altitude

set_atmos_seen(i)

Tells if the wfs sees the atmosphere layers

Parameters

i – (bool) :True if the WFS sees the atmosphere layers

set_azimuth(data)

TODO : docstring

set_beam(data)

TODO : docstring

set_beamsize(b)

Set the laser beam fwhm on-sky

Parameters

b – (float) : laser beam fwhm on-sky (in arcsec)

set_binmap(data)

TODO : docstring

set_dms_seen(dms_seen)

Set the index of dms seen by the WFS

Parameters

dms_seen – (np.ndarray[ndim=1,dtype=np.int32_t) : index of dms seen by the WFS

set_dx(dx)

Set the X axis misalignment

Parameters

dx – (float) : dx (pix)

set_dy(dy)

Set the Y axis misalignment

Parameters

dy – (float) : dy (pix)

set_fakecam(fakecam)

Set the fakecam flag

Returns

(bool) : fakecam flag

set_fluxPerSub(data)

Set the subap diameter (m)

Parameters

data – (np.array(ndim=2, dtype=np.float32)) : subap diameter (m)

set_fracsub(f)

Set the minimal illumination fraction for valid subaps

Parameters

f – (float) : minimal illumination fraction for valid subaps

set_fssize(f)

Set the size of field stop

Parameters

f – (float) : size of field stop in arcsec

set_fstop(f)

Set the size of field stop

Parameters

f – (str) : size of field stop in arcsec

set_ftbeam(data)

TODO : docstring

set_ftkernel(data)

TODO : docstring

set_gsalt(g)

Set the altitude of guide star

Parameters

g – (float) : altitude of guide star (in m) 0 if ngs

set_gsmag(g)

Set the magnitude of guide star

Parameters

g – (float) : magnitude of guide star

set_halfxy(data)

TODO : docstring

set_hrmap(data)

TODO : docstring

set_is_low_order(is_low_order)

Set the low order flag : if True, WFS arrays will not be mutualised

Parameters

is_low_order – (bool) : low order flag

set_isvalid(data)

Set the valid subapertures array

Parameters

data – (int*) array of 0/1 for valid subaps

set_kernel(k)

Set the attribute kernel

Parameters

k – (float) :

set_laserpower(l)

Set the laser power

Parameters

l – (float) : laser power in W

set_lgskern(data)

TODO : docstring

set_lgsreturnperwatt(lpw)

Set the return per watt factor

Parameters

lpw – (float) : return per watt factor (high season : 10 ph/cm2/s/W)

set_lltx(l)

Set the x position of llt

Parameters

l – (float) : x position (in meters) of llt

set_llty(l)

Set the y position of llt

Parameters

l – (float) : y position (in meters) of llt

set_max_flux_per_pix(max_flux_per_pix)

Set the max_flux_per_pix

Returns

(int) : max_flux_per_pix

set_max_pix_value(max_pix_value)

Set the max_pix_value

Returns

(int) : max_pix_value

set_nPupils(n)

Set the number of pupil images

Parameters

n – (long) : number of pupil images

set_noise(n)

Set the desired noise

Parameters

n – (float) : desired noise : < 0 = no noise / 0 = photon only / > 0 photon + ron

set_nphotons(n)

Set number of photons per subap

Parameters

n – (float) : number of photons per subap

set_nphotons4imat(nphot)

Set the desired numner of photons used for doing imat

Parameters

nphot – (float) : desired number of photons

set_npix(n)

Set the number of pixels per subap

Parameters

n – (long) : number of pixels per subap

set_nrebin(n)

Set the rebin factor from hr to binned image for a subap

Parameters

n – (long) : rebin factor

set_nvalid(n)

Set the number of valid subapertures

Parameters

n – (long) : number of valid subapertures

set_nxsub(n)

Set the linear number of subaps

Parameters

n – (long) : linear number of subaps

set_open_loop(o)

Set the loop state (open or closed)

Parameters

o – (long) : 1 if in “open-loop” mode (i.e. does not see dm)

set_optthroughput(o)

Set the wfs global throughput

Parameters

o – (float) : wfs global throughput

set_pdiam(n)

Set the subap diameter in pixels

Parameters

n – (long) : subap diam in pixels

set_phasemap(data)

TODO : docstring

set_pixsize(p)

Set the pixel size

Parameters

p – (float) : pixel size (in arcsec) for a subap

set_prof1d(data)

TODO : docstring

set_profcum(data)

TODO : docstring

set_profna(p)

Set the sodium profile

Parameters

p – (np.ndarray[ndim=1,dtype=np.float32]) : sodium profile

set_proftype(p)

Set the type of sodium profile

Parameters

p – (str) : type of sodium profile “gauss”, “exp”, etc …

set_pyr_ampl(p)

Set the pyramid wfs modulation amplitude radius

Parameters

p – (float) : pyramid wfs modulation amplitude radius (in arsec)

set_pyr_compute_focalplane(compute_focalplane)

Set the status of the pyramid wfs focal plane computation

set_pyr_cx(cx)

Set the x position of modulation points for pyramid sensor

Parameters

cx – (np.ndarray[ndim=1,dtype=np.floatt32_t) : x positions

set_pyr_cy(cy)

Set the y position of modulation points for pyramid sensor

Parameters

cy – (np.ndarray[ndim=1,dtype=np.floatt32_t) : y positions

set_pyr_loc(p)

Set the location of modulation

Parameters

p – (str) : location of modulation, before/after the field stop. valid value are “before” or “after” (default “after”)

set_pyr_npts(p)

Set the total number of point along modulation circle

Parameters

p – (long) : total number of point along modulation circle

set_pyr_pos(data)

TODO : docstring

set_pyr_pup_sep(pyr_pup_sep)

Set the pyramid pupil separation. (default: long(wfs.nxsub))

Parameters

pyr_pup_sep – (long) : pyramid pupil separation wanted

set_pyr_scale_pos(p)

Set the pixel size

Parameters

p – (float) : pixel size (in arcsec) for a subap

set_pyr_weights(data)

TODO : docstring

set_pyrtype(p)

Set the type of pyramid,

Parameters

p – (str) : type of pyramid, either 0 for “Pyramid” or 1 for “RoofPrism”

set_qpixsize(n)

Set the quantum pixel size for the simulation

Parameters

n – (float) : quantum pixel size

set_roket(roket)

Set the error budget flag : if True, enable error budget analysis for this simulation

Parameters

roket – (bool) : error budget flag

set_sincar(data)

TODO : docstring

set_subapd(n)

Set the subap diameter (m)

Parameters

n – (float) : subap diameter (m)

set_submask(data)

TODO : docstring

set_thetaML(thetaML)

Set the rotation angle in the pupil

Parameters

thetaML – (float) : rotation angle (rad)

set_type(typewfs)

Set the type of wfs

Parameters

t – (str) : type of wfs (“sh” or “pyr”)

set_validpuppixx(data)

TODO : docstring

set_validpuppixy(data)

TODO : docstring

set_validsubsx(vx)

Set the valid subapertures along X-axis

Parameters

vx – (np.array(dim=1, dtype=np.int32)) : validsubsx

set_validsubsy(vy)

Set the valid subapertures along Y-axis

Parameters

vy – (np.array(dim=1, dtype=np.int32)) : validsubsy

set_xpos(x)

Set the guide star x position on sky

Parameters

x – (float) : guide star x position on sky (in arcsec)

set_ypos(y)

Set the guide star y position on sky

Parameters

y – (float) : guide star y position on sky (in arcsec)

set_zerop(z)

Set the detector zero point

Parameters

z – (float) : detector zero point

property thetaML

Get the rotation angle in the pupil

Returns

(float) : rotation angle (rad)

property type

Get the type of wfs

Returns

(str) : type of wfs (“sh” or “pyr”)

property xpos

Get the guide star x position on sky

Returns

(float) : guide star x position on sky (in arcsec)

property ypos

Get the guide star y position on sky

Returns

(float) : guide star y position on sky (in arcsec)

property zerop

Get the detector zero point

Returns

(float) : detector zero point