COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
shesha.util.wfs_util Namespace Reference

Functions

def add_doc_content (*content)
 adds content to a docstring (to be used as decorator) More...
 
fits.HDUList write_wfs_custom_fits (str file_name, str WFS_type, np.ndarray xpos, np.ndarray ypos, xcenter, ycenter, pixsize, pupm, subap_diam)
 Write a custom_wfs fits file based on user provided data. More...
 
def export_custom_wfs (str file_name, p_wfs, p_geom, *p_tel=None)
 Return an HDUList (FITS) with the data required for a WFS. More...
 

Variables

string wfs_fits_content
 

Function Documentation

◆ add_doc_content()

def shesha.util.wfs_util.add_doc_content ( content)

adds content to a docstring (to be used as decorator)

Definition at line 26 of file wfs_util.py.

◆ export_custom_wfs()

def shesha.util.wfs_util.export_custom_wfs ( str  file_name,
  p_wfs,
  p_geom,
p_tel = None 
)

Return an HDUList (FITS) with the data required for a WFS.

and write the associated fits file

{}
Parameters
file_name(str) : name of the wfs fits file
p_wfs(Param_wfs) : wfs settings

Definition at line 95 of file wfs_util.py.

Here is the call graph for this function:

◆ write_wfs_custom_fits()

fits.HDUList shesha.util.wfs_util.write_wfs_custom_fits ( str  file_name,
str  WFS_type,
np.ndarray  xpos,
np.ndarray  ypos,
  xcenter,
  ycenter,
  pixsize,
  pupm,
  subap_diam 
)

Write a custom_wfs fits file based on user provided data.

Parameters
file_name(str) : name of the wfs fits file
WFS_type(str) : the wfs type (sh:shack-hartmann)
xpos(np.ndarray): x coordinate of the bottom left corner of the subapertures in the pupil (meters)
ypos(np.ndarray): y coordinate of the bottom left corner of the subapertures in the pupil (meters)
xcenter(float) : x coordinate of the centre of the pupil, expressed in pixels
ycenter(float) : y coordinate of the centre of the pupil, expressed in pixels
pixsize(float) : size of the pixels on the maps in meters
pupm(float) : diameter of pupil stop (meters).
subap_diam(float) : subaperture diameter (meters) i.e. side of the subaperture square.
Returns
(HDUList) : wfs data

Definition at line 60 of file wfs_util.py.

Here is the caller graph for this function:

Variable Documentation

◆ wfs_fits_content

string shesha.util.wfs_util.wfs_fits_content
Initial value:
1 = """
2  The primary header contains the keywords:
3  * TYPE : the WFS type (only supported for now sh:shack-hartmann).
4 
5  * XCENTER, YCENTER are the coordinates of the centre of the pupil, expressed in pixels,
6  in a reference frame conformable to (i,j) coords. The translation from pixels to meters
7  can be done using:
8  meters = (pixels - XCENTER) * PIXSIZE
9 
10  * PIXSIZE : the size of the pixels on the maps in meters.
11 
12  * PUPM is the diameter of pupil stop (meters).
13 
14  * SUBAPD : the subaperture diameter (meters) i.e. the side of the subaperture square.
15 
16  This FITS file contains a single extension:
17  * Extension 'XPOS_YPOS' are the coordinates (xpos, ypos) of the bottom left corner of the
18  subapertures in the pupil (in meters).
19 """

Definition at line 5 of file wfs_util.py.