COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
common.fits Namespace Reference

Functions

def wfs_to_fits_hdu (sup, wfs_id)
 Return a fits Header Data Unit (HDU) representation of a single WFS. More...
 
def dm_to_fits_hdu (sup, dm_id)
 Return a fits Header Data Unit (HDU) representation of a single DM. More...
 
def dm_influ_to_fits_hdu (sup, dm_id, *influ_index=-1)
 Return a fits Header Data Unit (HDU) holding the influence functions of a specific DM. More...
 
def write_data (file_name, sup, *wfss_indices=None, dms_indices=None, controller_id=0, influ=0, compose_type="controller")
 Write data for yao compatibility. More...
 

Function Documentation

◆ dm_influ_to_fits_hdu()

def common.fits.dm_influ_to_fits_hdu (   sup,
  dm_id,
influ_index = -1 
)

Return a fits Header Data Unit (HDU) holding the influence functions of a specific DM.

Parameters
sup(compasSSupervisor) : supervisor
wfs_id(int) : index of the DM in the supervisor
influ_index(int) : (optional) default -1, index of the actuator to get the influence function from. -1 : get all influence functions
Returns
hdu (ImageHDU) : hdu holding the DM influence functions

Definition at line 60 of file fits.py.

Here is the caller graph for this function:

◆ dm_to_fits_hdu()

def common.fits.dm_to_fits_hdu (   sup,
  dm_id 
)

Return a fits Header Data Unit (HDU) representation of a single DM.

Parameters
sup(compasSSupervisor) : supervisor
wfs_id(int) : index of the DM in the supervisor
Returns
hdu (ImageHDU) : fits representation of the DM

Definition at line 36 of file fits.py.

Here is the caller graph for this function:

◆ wfs_to_fits_hdu()

def common.fits.wfs_to_fits_hdu (   sup,
  wfs_id 
)

Return a fits Header Data Unit (HDU) representation of a single WFS.

Parameters
sup(compasSSupervisor) : supervisor
wfs_id(int) : index of the WFS in the supervisor
Returns
hdu (ImageHDU) : fits representation of the WFS

Definition at line 17 of file fits.py.

Here is the caller graph for this function:

◆ write_data()

def common.fits.write_data (   file_name,
  sup,
wfss_indices = None,
  dms_indices = None,
  controller_id = 0,
  influ = 0,
  compose_type = "controller" 
)

Write data for yao compatibility.

write into a single fits:

  • number of valide subapertures
  • number of actuators
  • subapertures position (2-dim array x,y) in meters centered
  • actuator position (2-dim array x,y) in pixels starting from 0
  • interaction matrix (2*nSubap , nactu)
  • command matrix (nacy , 2*nSubap)
Parameters
file_name(str) : data file name
sup(compasSSupervisor) : supervisor
Kargs
wfss_indices (list[int]) : optional, default all, list of the wfs indices to include
dms_indices (list[int]) : optional, default all, list of the DM indices to include
controller_id (int) : optional, index of the controller passed to yao
influ (int) : optional, actuator index for the influence function
compose_type (str) : optional, possibility to specify split tomography case ("controller" or "splitTomo")

Definition at line 95 of file fits.py.

Here is the call graph for this function: