Skip to content

DM masking

Olivier Guyon edited this page Nov 16, 2019 · 2 revisions

Automatic calibration includes computing DM and WFS masks. This page describes how the DM mask is computed. Material in this document only applies to spatial DMs, for which a spatial relationship between actuators has been established.


1. Introduction

There are tree DM mask files used by cacao:

  • dmmaskRM: DM actuators that are directly controlled
  • dmslaved: DM actuators slaved to their neighbors
  • dmmask: Union of dmmaskRM and dmslaved

For each file, "active" pixels are at value 1 or above.

By default, the main automatic calibration scripts computes all masks using default scripts provided by cacao and copied to the local work directory.

Users can customize the steps by replacing the default scripts by their custom scripts. To do this, replace the scripts in the local work directory, not in the cacao source code directory from which the scripts are pulled when you install cacao. You may make this customization automatic (called by a top-level script you write).

2. Calibration steps leading to DM masks

Automatic calibration is performed by the following script:

./aolfuncs/aolfunc_acqWFSresp

The relevant steps, all contained within this script, are described below.

2.1. ACQUIRE ZONAL RESPONSE MATRIX

Will execute script:

./auxscripts/aolMeasureZrespmat2

# INPUT:
# 	conf/RMpokeCube.fits.gz  (poke sequence)
#		if file does not exist, create straight poke sequence (one actuator at a time) 
#
# OUTPUT: 
# 	zrespmat0.fits		# Raw RM, prior to decoding
#	wfsref00.fits       # Raw reference

2.2. PROCESS & DECODE HIGH ORDER WFS RESPONSE

Will execute script:

./auxscripts/aolCleanZrespmat2

# INPUT:
#	zrespmat0.fits
#	wfsref00.fits 
#	
# OPTIONAL INPUT:
# 	./conf/RMpokeCube.fits
#	./conf/RMmat.fits
#	./conf/RMpixindex.fits
#		if these 3 files exist, use them to decode the zrespmat0.fits
#	
# OUTPUT:
#	zrespM.fits  ... copied to   ./conf_zrm_staged/zrespM.fits
#	wfsmap.fits  ... copied to   ./conf_zrm_staged/wfsmap.fits
#	dmmap.fits   ... copied to   ./conf_zrm_staged/dmmap.fits

2.3. MAKE MASKS

Will execute script:

./auxscripts/aolmkMasks

# 
# INPUT:
#     ./conf_zrm_staged/zrespM.fits
# OUTPUT:
#     wfsmask.fits  (overwrite)  ... will be copied to ./wfsmask/
#     dmmaskRM.fits (overwrite)  ... will be copied to ./dmmaskRM/
#

2.4. MAKE SLAVED ACTUATOR DM MASK

Will execute script:

./auxscripts/mkDMslaveActprox dmmaskRM.fits 2.5

# 
# INPUT:
#	dmmaskRM.fits
# OUTPUT:
#	dmslaved.fits  (overwrite)  ... will be copied to ./dmslaved/
#	dmmask.fits    (overwrite)  ... will be copied to ./dmmask/