AMBER logo AMBER instrument Visit the VLTI website
Site map Come back to home Restricted acces
You are here : Home > Astronomical community > Data Processing > Amber Data Reduction Tutorial
Recent Events

Check also the AMBER/ESO site
http://www.eso.org/sci/facilities/paranal/instruments/amber

Astronomical community

Part of the web site dedicated to the astronomical community

AMBER Documents
Observing with AMBER
Data Processing
Publications
Miscellaneous

Public outreach

Part of the web site dedicated to the general audience.

AMBER Consortium
Picture Gallery
Short presentation
VLT Interferometer
Press room

 

In the same section :
Data Reduction Overview Presentation
P2PP Presentation
AMB-DRWS04 Data Reduction Workshop Final Announcement
AMMYORICK Presentations
AMB-DRWS04 Workshop details (8/10/2004)
AMB-DRWS04 working groups
Data Reduction Algorithm Presentation
AMB-DRWS04 final program
ASPRO Presentation

Amber Data Reduction Tutorial
Friday 3 December 2004, by Oscar Hernandez


THIS TUTORIAL IS NOT UP-TO-DATE. PLEASE REFER TO THE JMMC DOCUMENTATION FOR AN UP-TO-DATE TUTORIAL

Here is the tutorial corresponding to the presentation made by Florentin Millour at the data reduction workshop

PDF - 866.9 kb

AMBER Data Reduction Software Tutorial

Oscar Hernández Utrera

<Oscar.Hernandez@obs.ujf-grenoble.fr>


This tutorial develops step by step all the examples that were introduced in the Amber Data Reduction Workshop in November 2004. It assumes that you have a good knowledge of Unix operating system (or Unix-Like systems) and that you have already properly installed the AMBER Data Reduction Software (A.D.R.S.)1 in your computer.

As a background information to start this tutorial, you can download Florentin Millour's presentations and also important is to read the Yorick User's Manual2 for those users that are not well familiarized with Yorick's environment.



INTRODUCTION


At this point it is good to establish some definitions that we are going to deal with throughout this tutorial.


All the paths indicated stands for your local A.D.R.S. installation path, that is referenced here as work directory. However, the examples shows the local installation path of the computer where the exercises were done in order to give an explicit outputs of each command used in each step. That is:


Work directory:


Your computer:


/{PATH=A.D.R.S. installation directory}/


My computer:


/gagax1/ur2/ohernand/amberSoft/ - work directory

/gagax1/ur2/ohernand/amberSoft/drwsData/ - Raw Data files

/gagax1/ur2/ohernand/amberSoft/drwsData/calib/ - calibration files


From now on, all commands, functions, directories and file names will appear in italic format within the text and in courier font in the explicit examples.


You can obtain documented help related to A.D.R.S. just typing « help, command», where command stands for the function or command's name you need information of. Here a help output example of the ShowVis function.



> help, ShowVis

/* DOCUMENT ShowVis(fileName,&wave,&vis,&vis2,&triple3,&opd,click=,

verbose=,noErrors=,visType=,noplot=)

From an IAU file name, plots the visibilities, the phases and other data

related to AMBER interferometric data.

* if click = 0, do not enable mouse interaction

* if verbose = 0, do not display text.

* visType correspond to observables to plot:

"v2" (default), "phase", "piston", "fringe"

SEE ALSO: c_ComputeVis, ComputeVis, readVis, plotVis, c_ComputeP2VM, ComputeP2VM, ShowP2VM, AmberViewer

*/

defined at: LINE: 966 FILE: /mnt/hdd/amberSoft/bin/ammyorickVis.i


The output help is organized in three parts. The first part corresponds to function's description indicating the incoming variables or parameters.


> help, ShowVis

/* DOCUMENT ShowVis(fileName,&wave,&vis,&vis2,&triple3,&opd,click=,

verbose=,noErrors=,visType=,noplot=)


The second part gives a small explanation of the function's parameters and their usage.


From an IAU file name, plots the visibilities, the phases and other data

related to AMBER interferometric data.

* if click = 0, do not enable mouse interaction

* if verbose = 0, do not display text.

* visType correspond to observables to plot:

"v2" (default), "phase", "piston", "fringe"


The last part shows the source file that indeed contains the function and displays similar functions that can be used.


SEE ALSO: c_ComputeVis, ComputeVis, readVis, plotVis, c_ComputeP2VM, ComputeP2VM, ShowP2VM, AmberViewer

*/

defined at: LINE: 966 FILE: /mnt/hdd/amberSoft/bin/ammyorickVis.i


Sometimes it is not possible to obtain function's help because of the system is in continuous developpment and sometimes is not well documented. In that case, you can get the function's call by typing « info, command » (this command applies to a Yorick's variables that have been already defined).


> help, cfitsRead

<DOCUMENT comment not found>

defined at: LINE: 118 FILE: /mnt/hdd/amberSoft/bin/ammfyorickHL.i

> info, cfitsRead

func cfitsRead(fileName)

> x=span(1,10,100)

> info, x

array(double,100)


The proper text ticks and marks of all the plots generated during this tutorial are let to the reader to experiment with it in order to present the results in the way that better fits the physical parameters involved.

As a final note, the way in which the commands are used is not always the most efficient, but the clearest as possible so the reader can easily reproduce and understand the results in their computer.


EXERCISES


Once you have obtained the Bad Pixel Map (AMBER_BPM_fuzzy_img.fits), Flat Field Map (AMBER_BPM_fuzzy_img.fits) and the data files3, the first step is to launch AMMYORICK. Depending on your preference you can type in a terminal (or inside Emacs):


a) To work in a terminal:

> rlterm ammyorick

b) To launch ammyorick in Emacs:

> emacs -f yorick

c) To load yorick if you are already in Emacs:

<alt>-x yorick


Exercise 1


Unfortunately file names in ESO DVD's not corresponds to those that were used at the mountain during the observation. To create a Log File of your data, use the function « autoLogMaker », which opens a navigation window4 that works in a similar way that any file manager window. Once you are in the directory containing your data, click on « THISDIR » button and the Log File will be created in your work directory.


> autoLogMaker


The output file is: [dataFolderName]_autolog.csv. For our particular case, where the data files are in the drwsData directory.


drwsData_autolog.csv


You can open this file with any text editor like Emacs. It is recomendable let it open during all the Exercises because we are going to use that information to find the right files in the data directory that corresponds to the scientific object.


Throughout this tutorial we are going to work with the following observing file and their corresponding bias file:


AMBER.2004-10-26T01:08:14.367.fits - Bias or Dark file

AMBER.2004-10-26T01:09:04.917.fits - Object


Find it in the Log File and look for a complete description of each file!



Exercise 2


The goal of this Exercise is to plot the calibration files and the dark file and to explore the AmberViewer function. The functions used for that purpose are: loadRawData, cfitsRead, pli, avg (remember that you can ask help information for each command or function at any time!).


a) Bad Pixel Map

Yorick

Action/Description

> BPM=cfitsRead("/gagax1/ur2/ohernand/amberSoft/drwsData/

calib/AMBER_BMP_fuzzy_img.fits")

Read file

> window, 1

Open graphic window

> pli, BMP

Display image




b) Flat Field Map

Yorick

Action/Description

> FFM=cfitsRead("/gagax1/ur2/ohernand/amberSoft/drwsData/

calib/AMBER_FFM_img.fits")

Read file

> window, 2

Open graphic window

> pli, FFM

Display image















c) Pixel Bias Map

Yorick

Action/Description

> loadRawData("/gagax1/ur2/ohernand/amberSoft/drwsData/

AMBER.2004-10-26T01:08:14.367.fits",,,,,,Dark)

Read file. The image is stored in Dark variable.

> info, Dark

array(float,20,30,1000)

Display variable information.


As we can see in the table above our variable Dark contains 1000 images with dimension of 20x30 pixels. From here, one can display any of the 1000 images or an average image of all.


Yorick

Action/Description

> window, 3

Open graphic window

> pli, Dark(,,25)

Display image 25.

> window, 4

Open graphic window

> pli, Dark(,,avg)

Display average image.














d) AmberViewer


Just type AmberViewer in the command line and follow the instructions in the pop-up window. Load the file: AMBER.2004-10-26T01:09:04.917.fits


> AmberViewer


These function help us to make a quick data processing. Once the image selected is loaded and displayed, the reader can try the options that appears in yorick's environment. It is possible to perform the cosmetics procedure (Detector Test Report, VLT-TRE-AMB-15830-30105) to our Raw Data and obtain the Science Data (Data Reduction Plan, VLT-PLA-AMB-15830-60045) as follow.



From menu (in each step look at the result in the image!):


  • choose: "b"

    • give Bad Pixel Map

    • give Flat Field Map

  • choose: "p"

    • give Dark File (AMBER.2004-10-26T01:08:14.367.fits)

  • choose: "s" (obtain Science Data. This option is not included in the menu!6)

  • try the other options as you would

    • plot a waterfall of the interferograms

    • animate

    • etc.




Exercise 3


Read the Raw Data file (the same file used in AmberViewer) using loadRawData function with its parameter scienceData equal to 1 and determine the mean flux on the photometric channels, estimate the standard deviation of each set and plot the photometric channels versus time. Repeat the exercise for the interferometric channel.


Yorick

Action/Description

> help, loadRawData

Getting help

> loadRawData("/gagax1/ur2/ohernand/amberSoft/drwsData/

AMBER.2004-10-26T01:09:04.917.fits","/gagax1/ur2/ohernand/

amberSoft/drwsData/calib/AMBER_BPM_fuzzy_img.fits","/gagax1/

ur2/ohernand/amberSoft/drwsData/calib/AMBER_FFM_img.fits","/

gagax1/ur2/ohernand/amberSoft/drwsData/AMBER.2004-10-26T01:

08:14.367.fits",fr,wl,da,ph,int,scienceData=1)

Read file


All the information we need is stored in the variables fr, wl, da, ph, e int as we have defined in loadRawData function. From help the reader can establish easily the meaning of each variable!


a) Temporal series of the photometric channels, mean flux and rms.

Yorick

Action/Description

> info, ph

array(double,3,23,1000)

Display variable information


As it shows the variable ph contain 1000 images, where 3 stands for the photometric channels and 23 is the wavelength. From here, one can display the three channels against wavelength for an average image.


Yorick

Action/Description

> window, 0

Open graphic window

> pli,ph(,,avg)

Display image



Temporal series, average flux and rms.


- Channel 1 -

Yorick

Action/Description

> window, 1

Open graphic window

> plg, ph(1,avg,)

Display image

> ph(1,avg,avg)

1048.35

Mean flux

> ph(1,avg,rms)

579.184

rms of the photometric channel over wavelength.













- Channel 2 -

Yorick

Action/Description

> window, 2

Open graphic window

> plg, ph(2,avg,)

Display image

> ph(2,avg,avg)

1590.66

Mean flux

> ph(2,avg,rms)

618.007

rms of the photometric channel over wavelength.














- Channel 3 -

Yorick

Action/Description

> window, 3

Open graphic window

> plg, ph(3,avg,)

Display image

> ph(3,avg,avg)

1712.07

Mean flux

> ph(3,avg,rms)

560.435

rms of the photometric channel over wavelength.
















b) Interferometric channels

Yorick

Action/Description

> info, int

array(double,32,23,1000)

Display variable information

> window, 4

Open graphic window

> pli, int(,,avg)

Display image

> int(avg,avg,avg)

48.5416

Mean flux

> int(avg,avg,rms)

11.2833

rms of the interferometric channels over wavelength













Exercise 4


Compute calibration data (P2VM) and plot it.


a) To compute the P2VM one must find the calibration files in the Log File and use the c_ComputeP2VM function (follow the instruction in the pop-up window). Here the specific calibration files corresponding to: AMBER.2004-10-26T01:09:04.917.fits.


File name

description in Log File

AMBER.2004-10-26T00:09:30.437.fits

(...3P2V CALIB 0...)

AMBER.2004-10-26T00:09:49.896.fits

(...3P2V CALIB 1...)

AMBER.2004-10-26T00:10:05.464.fits

(...3P2V CALIB 2...)

AMBER.2004-10-26T00:10:55.865.fits

(...3P2V CALIB 3...)

AMBER.2004-10-26T00:10:25.045.fits

(...3P2V CALIB 4...)

AMBER.2004-10-26T00:11:41.118.fits

(...3P2V CALIB 5...)

AMBER.2004-10-26T00:11:10.482.fits

(...3P2V CALIB 6...)

AMBER.2004-10-26T00:10:41.168.fits

(...3P2V CALIB 7...)

AMBER.2004-10-26T00:11:57.548.fits

(...3P2V CALIB 8...)

AMBER.2004-10-26T00:11:25.373.fits

(...3P2V CALIB 9...)


For a complete description of each file look at the Log File!


NOTE: In the pop-up window, select each calibration file by clicking on them while holding <CTRL>. When all the calibration files are marked click right button of the mouse to confirm yorick choice.


> c_ComputeP2VM


The output file is saved in the data directory with the name:


AMBER.2004-10-26T00:11:57.548_P2VM.fits


b) Show P2VM


> ShowP2VM



c) use autoComputeP2VM function to compute all the P2VM posibles corresponding to your data set. This function creates a new directory in your work directory named:


dataFolderName_autoP2VM


tutorial particular case:

/gagax1/ur2/ohernand/amberSoft/drwsData_autoP2VM/


and the output files are:

AMBER.2004-10-26T00:04:25.698_P2VM.fits

AMBER.2004-10-26T00:11:57.548_P2VM.fits

AMBER.2004-10-26T02:18:00.769_P2VM.fits


To show any of these files one can use ShowP2VM function!

Exercise 5


According to (E. Tatulli & A. Chelli, AMB-IGR-0197) the instrumental contrast is given by:

V² = Ck² + Dk²


Read the file created in the last exercise to obtain the values Ck and Dk and then compute the instrumental contrast. Use the loadP2VM function.

Yorick

Action/Description

> info, loadP2VM

func loadP2VM(fileName,&mat,&Phot,&Vk,&wlen,&Flag,

&phi_MCS,&legende,ntels=,verbose=,noErrors=)

Display call function

> loadP2VM("/gagax1/ur2/ohernand/amberSoft/drwsData/

AMBER.2004-10-26T00:11:57.548_P2VM.fits",ma,ph,,,,,)

Read file.

> info, ma

array(double,6,32,505)

Variable ma contains Ck and Dk values as follow:

ma={ | 1 | 2 | 3 | 4 | 5 | 6 | }

| Ck12| Ck23 | Ck31 | Dk12 | Dk23 | Dk31 |


From here:

Yorick

Action/Description

> contrast12=((ma(1,,))^2 + (ma(4,,))^2)(sum,,)

Compute contrast (V12)2

> contrast23=((ma(2,,))^2 + (ma(5,,))^2)(sum,,)

Compute contraste (V23)2

> contrast31=((ma(3,,))^2 + (ma(6,,))^2)(sum,,)

Compute contraste (V31)2


First we plot the photometry for each channel.

Yorick

Action/Description

> window, 1

Open graphic window

> plg, ph(,1,avg)

Display image

> window, 2

Open graphic window

> plg, ph(,2,avg)

Display image

> window, 3

Open graphic window

> plg, ph(,3,avg)

Display image




Instrumental Channel vs. Time


Yorick

Action/Description

> window, 1

Open graphic window

> plg, ((ma(1,,))^2)(sum,)

Display image

> limits, , , 0, 0.5

Adjust plot limits. X axis unchanged and Y axis from 0.0 to 0.5

> window, 2

Open graphic window

> plg, ((ma(2,,))^2)(sum,)

Display image

> limits, , , 0, 0.5

Adjust plot limits. X axis unchanged and Y axis from 0.0 to 0.5

> window, 3

Open graphic window

> plg, ((ma(3,,))^2)(sum,)

Display image

> limits, , , 0, 0.5

Adjust plot limits. X axis unchanged and Y axis from 0.0 to 0.5




At these point it is possible to compute de visibility using the c_ComputeVis function (NOTE: when the pop-up window ask for the sky or the pixel bias map file, click the right button of the mouse to discard it and continue with the computation if you don't have a sky file). By default, this function computes visibility with its option binsize equal to total number of frames (1000 in this case).


> c_ComputeVis


The output file is saved by default in the data directory with the name:


AMBER.2004-10-26T01:09:04.917_VIS.fits


To show the results use ShowVis function:


> ShowVis








Exercise 6


In these exercise we are going to use the c_ComputeVis in the command line with its parameter binsize set to 1, 5, 10 and any that you would like to select between 1 and 1000 (the total number of frames).


Yorick

Action/Description

> c_ComputeVis("/gagax1/ur2/ohernand/amberSoft/

drwsData/calib/AMBER_BPM_fuzzy_img.fits","/gagax1/

ur2/ohernand/amberSoft/drwsData/calib/AMBER_FFM_img.

fits","/gagax1/ur2/ohernand/amberSoft/drwsData/AMBER

.2004-10-26T01:08:14.367.fits","/gagax1/ur2/

ohernand/amberSoft/drwsData/AMBER.2004-10-26T00:11:

57.548_P2VM.fits","/gagax1/ur2/ohernand/amberSoft/

drwsData/AMBER.2004-10-26T01:09:04.917.fits",

destFileName="visBinsize1.fits",binsize=1)

Compute visibility: binsize=1


NOTE: apply the same for binsize 5, 10 y 100. Change the number in binsize option and in the destFileName parameter. The output files: visBinsize1.fits, visBinsize5.fits, visBinsize10.fits, visBinsize100.fits.


As in the later case, use ShowVis to display any of these files. Here visBinsize100.fits





b) Make a plot Visibility vs. SNR and SNR vs. Time.


Use readVis, easyGetFringeContrastSNR and easyGetVis2 functions to obtain the Visibility and SNR values. Remember to ask help for each function!


Yorick

Action/Description

> readVis("/gagax1/ur2/ohernand/amberSoft/drwsData/AMBER.2004

-10-26T01:09:04.917_VIS.fits",,vis,vis2,,)

Read file.

> VIS2=easyGetVis2(vis2)

Compute (V)2

> SNR=easyGetFrgContrastSNR(vis)

Compute SNR

> window, 0

Open graphic window

> plg, VIS2(1,10,), sqrt(abs(SNR(1,))), type="none",

marker='\2'

Plot Visibility vs. SNR.

type="none" avoid to connect the points with lines, as it be by default.

Marker='\2' choose « + » marker to plot each point.

> window, 1

Open graphic window

> plg, SNR(1,)

Plot SNR vs. Time








Acknowledgements


I would like to acknowledge Florentin Millour the time invested regarding and correcting this small and simply tutorial!

2ftp://ftp-icf.llnl.gov/pub/Yorick/doc/manual/yorick.html

3http://amber.obs.ujf-grenoble.fr/

4To exit from a navigation window at any time just click the right button of the mouse.

6This will be fixed in the next A.D.R.S. version.

7http://amber.obs.ujf-grenoble.fr/article.php3?id_article=94





Site map | Home | Admin