Image Reconstruction with MATISSE

A guide for the intrepid traveler in Fourier space

Rainer Köhler
March 2014


This is an attempt to help others follow my experiments with image reconstruction from (simulated) MATISSE data. If you don't know anything about infrared interferometry, or that MATISSE is an instrument for the VLTI, then you've come to the wrong place.

Introduction

My tools are an interface between Walter Jaffe's MATISSE simulator and Eric Thiebaut's MiRA program for image reconstruction.
This guide describes where to get the necessary pieces and what to do with them.

Installation

To install MiRA, you have to install a few other packages first.
I have create a tar ball that should contain everything you need: Mira-complete.tar.gz.
After unpacking the tar file, you have to install the packages one by one:

  1. Yorick:
    cd to dhmunro-yorick-e974bcc and follow the installation instructions in "README.md"
    They tell you that "make install" should be enough.
    The executable will be in relocate/bin/yorick.
    To make running it easier, I created a symbolic link from a directory in my path to it.

  2. Yeti:
    Go to yeti-6.3.2 and read the README file. The following commands should do the trick:
    	yorick -batch ./config.i
    	make
    	make install
    

  3. OptimPack:
    Installation instructions are in OptimPack-1.3.2/README. For MiRA, you only need support for yorick, so the commands for the installation are:
    	cd OptimPack-1.3.2/yorick/
    	yorick -batch make.i
    	make clean
    	make
    	make install
    
    For more information, read the instructions on the OptimPack page, in the section "Yorick Installation". Note that you don't need the LBF... algorithms.

  4. MiRA itself:
    You don't have to compile anything, unpacking the tar-file was enough.

MiRA will allow you to reconstruct images from data stored in files in oifits-format. You will probably want a tool to simulate data coming from MATISSE:
  1. MIA+EWS:
    Walter's simulator is based on our data reduction software for MIDI: Download MIA+EWS
    You must download the latest daily snapshot, anything else is just not shiny enough.
    You don't have to install the full package, since the MATISSE simulator requires only the IDL-routines. To set up those, it is enough to unpack the tar-file, go to the directory created, and type make startup. This means you can also install it on Mac OS without any modifications.

  2. Walter's MATISSE simulator:
    The link to download the simulator is at the bottom of the download page for MIA+EWS.
    A user guide can be found here.

Now you will probably want to download my routines to bring everything together (last update: 28-mar-2014).
Create a directory for it, put the tar-file there, and extract its contents with tar xvfz matisseImgReco.tgz.
As a final installation step, you have to tell my routine where you installed MiRA on your computer. To do this, open "mira.pro" with a text editor. Change the definition of "mirapath" in or near line 26 to the full path of "mira.i" on your computer.


Operation

Once you installed everything, you can start it up:
  1. Start MIA+EWS by typing mia (if it is in your PATH) or the command that was printed when you installed MIA+EWS.
  2. Change to the directory where you installed Walter's simulator:
    cd,'/path/to/simulator'
  3. type @setup to setup the simulator.
  4. Change to the directory where you installed my routines:
    cd,'/path/to/Rainers_stuff'
    (You can install my routines in the same directory as Walter's simulator, in which case you don't have to switch directories.)
  5. type @setupIRec to setup my routines.
Now everything should be set up and ready to go.
You might be able to simplify the last 4 steps by combining the setup-scripts into one big startup file. However, be careful to get the paths and the order of compilation right!

To simulate MATISSE observations, refer to Walters user guide. The final result should be a set of files with calibrated visibilities, squared visibilties, and triple products. These are usually named "...CalVis.fits", "...CalVis2.fits", and "...CalT3.fits".

You can now try to run an image reconstruction with

    mira,'bla.LMCalVis.fits',3.2e-6,'bla_test'

This will create a file "bla_test.i", which contains yorick-code to run mira with some (more or less reasonable) default parameters. To spare you direct contact with yorick, it will also run the script, which will hopefully create two files named "bla_test_reco0.fits" and "bla_test_reco1.fits". These are the images reconstructed by two consecutive runs of MiRA. The number 3.2e-6 is the wavelength of the data used for the image reconstruction (in meters).

Test Script

I have provided an example to demonstrate how an image can be reconstructed successfully. To run it, go to the directory "testimg" and execute the script:

	@testimgN
This script will first run Walter's simulator to simulate observations of the science target and the calibrator, and then call mira twice. The first run uses the regularisation "total variation", the second run uses "smoothness". Both contain three iterations with different values of the hyperparameter mu.

The input image is "F5513bb.fits", the reconstructed images are called "*_reco1.fits" to "*_reco3.fits".



The Details

This section is a reference manual for my routines, with explanations of all the options.

clone_image

The simulator needs at least four images at different wavelengths, in order to interpolate the spectrum of the source. Since image reconstruction is (so far) only monochromatic, one usually has only one image for the simulation. This routines clones the image a few times and puts the LAMBDA keyword in the header. The cloned images will make the simulator run happily.

merge_V2T3

Merges files containing OI_VIS2- and OI_T3-tables into one file with both tables. This is necessary because MiRA requires all tables in one file.

mira

The IDL-routine "mira" is actually just an interface to the yorick-program "mira". Its main purpose is to create a yorick-script and run it, which will save you from learning to write yorick code.

plotUV

This routines plots the uv-coordinates of the data points stored in one or more oifits-files or the OBlist-files used by the simulator.
(It supersedes the routine plotUV_oifits, which could read only oifits-files).
Rainer Köhler
Last modified: Fri Apr 4 16:34:57 2014