Spectral treatment with IRIS is (almost) a Children's game
__________________________________________________________________________________________________________________________________________________________
This page presents a simplified method to treat an image spectrum with IRIS (Christian BUIL)
It doesn't pretend to be THE best method. This a first contact with spectral processing.
1. Get IRIS : http://www.astrosurf.com/~buil/us/iris/zip/iris.zip (Christian Buil)
2. Open IRIS
3. Settings
Before begining, you have to verifiy two settings
Open File Menu, then Settings
1. Verify File Type = FIT
2. Set Working path (here : "D:\acquisition" )
4. Load your image
We consider that the image has been pre-processed i.e. : bias, dark substracted, flat-fied divided, cosmetics removed and stacked.
Note that with a good CCD, the traitment can be simplified. So far, I have just used (in MaximDL) :
- dark substraction and hot points (bad pixel map)
- stack (median addition)
and that's all ! (I know that purists and other orthodoxes will disapprove ... but The proof of the pudding it is because we eat it.
5. We can enter the serious things
The image is loaded (here a CI Cygni spectrum)
The image is very dark. You have to adjust the levels with the "Threshold Box".
Generally, Clicking "Auto" button (1) is sufficient .
If not, you can adjust the levels wtith the two cursors (2a and 2b)
NOTE : if the "Threshold Box" doesn't appear, get it in the View>threshold ... menu
The image after Treshold (auto) adjustment. Note the cursors position has changed.
This is an image of CI Cygni, a symbiotic star with proéminents emission lines, obtained with a low resolution spectrograph (LHIRES III with 150 l/mm grating)
One can see :
- the spectral trace, not perfectly horizontal : the angle is the * tilt*
- the sky light pollution, with some proeminent lines (Hg, Na) tilted with regard to the vertical line The angle is the *slant*The traitement will consist in a first time to :
1. rotate the spectrum in order to get a quite horizontal trace (reduce the tilt)
2. correct the inclination of lines (reduce the slant)
3. remove the the sky light pollutionIMPORTANT REMARK : the less numeric treatment you'll use, the better will be the results. Some of them can't be avoid (for instance Slant). But other can : when tou take picture, make sure that tilt is as small as possible. It's valuable to spend time at that phase.
0. We need to open two windows :
1. The "Output window" from the File Menu. The output windows contains some informations from the fit head of the picture. These informations can be erases (in the window, not in the fit!) with Edit>Erase in the Output Window Menu (1)
2. The "Command Window" by clicking the button (2)
Now, you can have a dialog with IRIS :
- Throw Command Box you'll send "Instructions" (orders)
- Trow Output Box, you'll get informations from the softNote that in the Command Window, the instructions must be preceded by the symbol >
1. TILT = reduce the angle of the spectrum trace with regard to horizontal lineFirst, we will determine the angle of the spectrum trace in regard to horizontal line.
1. On the image, trace an horizontal box with the mouse (choose the approximate position of the upper left corner, push mouse left button, move the mouse to the bottom right corner and release the mousse button
2. In command box, write :
> L_ORI
Notes :
You can use small or capital letters
The IRIS instructions concerning spectroscopy begin by L_3. Press Enter Key : you've entered your first instruction in Iris software
The result appears in the Output Window : the angle is 0.433° from horizontal line
1. We need another information before rotate the image : the center of rotation.
This is realized by right clicking on the image. Click on the spectrum trace (Y coordinate) , about in the middle of the image (X coordinate)
Approximative position : 12. The coordinate of the point appears in the Ouput Window (2)
X (horizontal coordinate) = 352
Y (verticla coordinate) = 165This the point around which we'll choose to rotate the image.
3. Write the following intruction in the command box (3) :
>rot 352 165 0.433
Of course press Enter Key
In generic form the instruction is : >rot X Y A
i.e. : make rotation of the image of angle = A (here 0.433°) around the point whose horizontal coordinate is X (here 352) and vertical coordinate is Y (here 165)
Here's the result : the spectrum trace is quite horizontal
Note that the light pollution lines (but also the spectrum lines!) are not vertical. This is named the slant, due to optical construction of the spectrograph used.
The next step will consist to reduce it. i.e. make the lines perfectly vertical
2. Reduce the slant = reduce the angle of lines with regard to vertical lineFrist, we determine the angle of a light sky line from vertical line
The principle is the same : draw a vertical box around a sky light line (1)
Then enter the instruction (2) :
>L_SLANT
The result appears in the Output Box : the angle is 2.695°
In the Command Box, Enter the instruction :
>slant 165 2.695
In generic form the instruction is : >slant Y A
i.e. : make a modification of the image of angle = A (here 2.695°) The line whose vertical coordinate is Y (here Y = 165)is not modified.
Here's the result :
Now, we have got :
1. an horizontal spectrum trace
2. vertical linesThe geometric part of the treatment is done.
The next step consists in removing the sky (not the real sky of course! but its contribution to image).
3. Sky removal The sky removal is realized by a magic instruction which allow practicing spectroscopy under light polluted skies, even under the Tour Eiffel projectors -;)The principle is to calculate the contribution of the sky light in two horizontal zones, on both side of the spectrum trace (zones :sky1 and sky2) and the to substract it in the spectrum zone ( Spectrum zone)
If Y1, Y2, Y3 and Y4 are the Y coordinates of the two sky zones,
For each X, between Y1 and Y2, between Y3 and Y4, Iris calculates the mean intensity along the vertical line. Then, always for each X, IRIS substract the calculated intensity of the sky from each pixel along the vertical line. As a result, the light sky contribution is suppressed in the spectrum zone. (In reality the algorithm may be more sophisticated)The instruction is (1)
>L_SKY3
It is a little bit different than the previous ones : when it's launched (with Enter touch) the Output Window order to select 4 points (2) i.e. to inform IRIS of the Y1, Y2, Y3 and Y4 value. This realize manully by clicking the left mouse button successivly on points of the image.
First rule : align the points vertically
Second rule : use always the same X coordinate
Third rule : there's no rule to determine the best Y coordinates.When you'll have acquired some experiment, try to use always the same (approximate coordinates).
This a very important step : there's no rule to determine the more efficient treatment, we'll call that l'Art du Métier
Here's the begining of sky substaction : 3 points have been chosen.
Note the vertical alignment and the X position (easily reproductible)
When the fourth point have chosen, the sky has been substracted.
The image is darker.
You have to adjust the levels with Threshold Window
After levels adjustment (Auto)
The continuum and lines appears clearly. There's (almost) no trace of the sky light pollution.
One can appreciate the result on this image (obtained with MaximDL) which shows the mean intensity in the white box, i.e. in the zone where the sky light has been substracted.
No drift along the X line ; small standart deviation.
The treatment is done.
We have just to prepare the spectrum for the spectral treatment (wavelenght calibration, normalization and so on ... )
Before the next steep, you can save the result. For instance :
>save CICyg
4. Binning Now, you have to transform the image in a
The instruction is :
>L_ADD Y1 Y2
Y1 and Y2 are the Y coordinates between them the spectrum will be binned.
The three rules are :
First rule : the more signal as possible (
Second rule : the less moise as possible
Third rule : again, theres's no third rule : you'll have to optimize the result.In such a spectrum, I use Ha line (in the right part of the spectrum), the more intense line in this object.
Use the mouse cursor (with left click) to estimate the Y (low and high coordinates) just under and just above the signal produced by Ha line.
The Y coordinates of the two points appears successivly in the Output Window. Here : 155 and 176
Enter the instruction :
>L_ADD 155 176
The binned spectrum appears automatically
Save the image
You can draw a first 1D spectrum, using the intruction :
>L_PLOT 300
300 is the image height
This the raw spectrum, not wavelenght calibrated, not instrumental response corrected ... but this is another story (see for instance VSpec : http://www.astrosurf.com/vdesnoux/)
Opening two windows (Output and Command Windows)
with only 6 instructions
and a few mouse clicks, you've obtained your first 1D spectrum.It is also easy as it.
With some experience, this treatment can be realized within one minute.
When you'll have got some experiment, well understood this basic treatement, you'll be able to use more sophistical freewares such as RLhires or SpcAudace.
I hope that this tutoriel was useful for you.
If something is unclear, please email me to improve the presentation : francois.teyssier (at) dbmail.com
Intructions Summary :
>L_ORI
>ROT X0 Y0 Angle
>L_SLANT
>SLANT Y0 ANGLE
>L_SKY3
>L_ADD Y1 Y2
>L_PLOT 300>RAINBOW LAMBDA1 LAMBDA2
Note : you can save this instructions in the notepad and copy them in the Command Window when begining a new session.
To practice : download the cicyg file : cicyg1.fit
Now, for the pleasure :
We've saved the 2D-image as cicyg
The approximate wavelenght range of the spectrum is 4200 to 7400 angströms.
Enter the instruction :
>RAINBOW CICYG 4200 7400
The result appears as a COLORED 2D spectrum.
Not essential for science, but nice and educational.

