Image Reconstruction with MATISSE
A guide for the intrepid traveler in Fourier space
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
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
To install MiRA, you have to install a few other packages first.
I have create a tar ball that should contain everything you need:
After unpacking the tar file, you have to install the packages one by one:
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.
Go to yeti-6.3.2 and read the README file.
The following commands should do the trick:
yorick -batch ./config.i
Installation instructions are in OptimPack-1.3.2/README.
For MiRA, you only need support for yorick, so the commands for the
yorick -batch make.i
For more information, read the instructions on the
OptimPack page, in the section "Yorick Installation".
Note that you don't need the LBF... algorithms.
- 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
You will probably want a tool to simulate data coming from MATISSE:
Now you will probably want to download
my routines to bring everything
together (last update: 28-mar-2014).
Walter's simulator is based on our data reduction software for MIDI:
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.
- 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
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.
Once you installed everything, you can start it up:
Now everything should be set up and ready to go.
- Start MIA+EWS by typing mia (if it is in your PATH)
or the command that was printed when you installed MIA+EWS.
- Change to the directory where you installed Walter's
- type @setup to setup the simulator.
- Change to the directory where you installed my routines:
(You can install my routines in the same directory as Walter's
simulator, in which case you don't have to switch directories.)
- type @setupIRec to setup my routines.
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
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).
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:
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".
This section is a reference manual for my routines, with explanations
of all the options.
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.
clone_image, input.fits [, output [, list_of_wavelengths]]
Name of an image in fits-format.
One fits-file for each wavelength given.
|input.fits ||name of the input-file in fits-format|
||name of the cloned images.|
The wavelength and ".fits" will be appended.
If output is not given, the names will be derived from the
||a list of wavelengths in meters to put into the
If the list is not given,
(2.0, 2.8, 3.6, 4.5)·10-6 meters will be
||Factor to scale the flux in the image|
||Pixel size to put into the header, in mas/pixel.
Default is 1 mas/pix.|
Merges files containing OI_VIS2- and OI_T3-tables into one file with
both tables. This is necessary because MiRA requires all tables in
merge_V2T3, vis2fname, t3fname [, v2t3fname]
Names of two files in oifits-format with OI_VIS2 and OI_T3 tables.
One file in oifits-format with both OI_VIS2 and OI_T3 tables.
||name of the input-file with the OI_VIS2 table|
||name of the input-file with the OI_T3 table|
||name of the output-file. If omitted, the name will be
derived from vis2fname.|
merge_v2t3, "mice.LMCalVis2.fits", "mice.LMCalT3.fits"
Make sure both input files contain the same OI_WAVELENGTH,
OI_TARGET, and OI_ARRAY tables. This is the case if both
files were produced by the same run of the MATISSE simulator.
If the tables are not the same,
the output file will be garbage!
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.
mira, input, wavelenght, output[, options]
Name of a file in oifits-format.
For the MATISSE simulations, we decided it should contain an
OI_ARRAY table with all the stations on Paranal, an OI_TARGET
table, an OI_WAVELENGTH table, and either an OI_VIS table with
complex visibilities or two tables OI_VIS2 and OI_T3 with
squared visibilities and triple products.
NOTE: all observations have to be in one file!
A text file containing the output printed by mira to the
One FITS file with the reconstructed image for each value of
mu passed via the keyword parameter (see below).
|input ||name of the input-file in oifits-format|
|wave ||wavelength of observations in meters |
|output ||name for the output files (without extension)|
name of the regularisation algorithm
(see Mira documentation for possible values)|
|MAXITER=maxiter || maximum number of iterations|
|PIXSIZE=pixsize || pixel size in milliarcsec|
|IMGSIZE=imgsize || size of reconstructed image in pixels|
array of hyperparameter mu for series of mira-runs.
For each number in the array, one image will be
reconstructed and written to a FITS file.
The reconstructed image is used as starting point
for the reconstruction with the next value of mu.|
||Do not wait for the user to press return before starting
and quitting mira|
||Do not use wish to manage the graphics windows|
More parameters will be added later.
mira, "observations.oifits", 10e-6, "image", REGUL="smoothness", MU=[1e10,1e9,1e8]
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).
plotUV, filenames [, DEC=dec] [,/VERBOSE] [,OUTFILE=outfile] [, PLOT_OPTIONS]
Name(s) of oifits-files (with OI_VIS, OI_VIS2, and/or OI_T3 tables) or OBlist-files.
Plots of uv-coordinates on the screen or in a Postscript-file.
|filenames||Name(s) of the input-file(s).|
||Gives the declination for the object (only used for OBlist-files).|
||Option to activate printing of error messages.|
||Use crosses instead of frame numbers as plot symbols.|
||Set brightness of plot symbols (between 0.0 and 1.0).|
When plotting to a postscript file, this number will be
multiplied by 0.4
||Wait time seconds after plotting the points for one baseline.|
||Name of a Postscript-file where the plots will be written.|
One page will be generated for each input file.
||Any additional arguments will be passed on to the plot-command.|
This can be used, e.g., to set the XRANGE or YRANGE of the plot.
plotUV, ["mice.LMCalVis.fits", "mice.LMCalVis2.fits", "mice.LMCalT3.fits"]
plotUV, 'oblistN.star', DEC=-42