Guess what?
I am back with new IRAF!
It's been a while since my last post about Data Analysis in IRAF. We ended up with fully reduced data but they are absolutely useless if we are unable to analyze them. For this purpose, we will use the splot task for inspecting and analyzing our spectra.
"splot provides an interactive facility to display and analyze spectra." That is for the theory from help pages of this task. Actually, I am not going to tell you anything more than you could read from manual. What I am going to tell you are the important information about the features of this task that you will appreciate in the basic analysis process. splot is really powerful facility so it is no surprise that it has a very long manual in which some information can get lost.
If you have read my previous posts, you should know about this task since I referred to it several times. In case you haven't used it yet, I will show you also how to run this task.
***
NOTE: I'd like to point out that this post shows only the most basic routines of splot task. Though, I will update this post every time I will be doing something new in it.
***
splot has a huge number of parameters and all needed parameters can be changed interactively so now there is no need to check them with epar splot. We can directly open spectrum that we have already reduced and want to analyze (object_red.fits):
cl> splot object_red.fits
In case of echelle spectrum (object_ech_red1.fits, object_ech_red2.fits), you will be asked for the number of aperture you want to display after you press enter:
cl> splot object_ech_red1.fits
Image line/aperture to plot (0:) (1):
It is up to you, which one you want to display since you can move between apertures in the graphics window by typing '(' or ')'. The number of displayed aperture is indicated in the second line of header in square brackets [combine1.fits[*,2]].
***
NOTE: links above are links to the spectra used in my project and which are uploaded on my drive. You can download them to try all the described steps.
***
Now we can proceed to the inspection of our spectra (I am going to work only with object_red.fits since all the steps for echelle spectra are the same)
In the first picture we can see several spectral lines. To find out their wavelengths, hover the cursor above one of them and press <space>. Coordinates of nearest pixel will be shown in lower left corner of the screen (you can see there some more information but the relevant to the wavelength is only the first number 5005.519).
For the more detailed inspection we want to zoon to the specific part of the spectrum. This is done in the same way as in other tasks like apall. Press 'w' to enter window mode and the double 'e' in the opposite corners of the new view.
To unzoom the view, you can use the 'w' + 'a' or just 'c' keys.
The matter of flux determination is another important thing you will probably want to do with your spectra. This can be done in several ways. The first and fastest way is double clicking 'e' on each side of the spectral line (exactly at the side and at the background level).
Central wavelength, equivalent width, continuum and flux are printed in the lower left corner (and also in the logfile specified by save_file parameter). However this method is not the most accurate one.
Two another methods are based on fitting functions on the spectrum.
If you want to fit only one line at the time, use double 'k'. Press 'k' on the one side of the spectral line (keep some distance from the line because it will be calculating also with the background) and also on the other side.
Green dashed line is the background and red dashed line is the fit. In the lower left corner are printed values of central wavelength, flux, equivalent width and gfwhm (gaussian full width at half maximum since it fits gaussian function).
To fit more lines at the time you can use double 'd'. As in the case of 'k' press 'd' on the one side of region with analyzed lines and also on the other side with some distance from the nearest line for the background.
After that it will ask you to choose the function for each line. You will do it by hovering cursor above center of the line and pressing 'g' for gaussian function, 'l' for lorentzian function and 'v' for voight function. You can also read lines from file or type the exact wavelength.
When you are done, press 'q'.
It will then ask you if you want central positions and gaussian/lorentzian widths to be fixed or not:
Fit positions (fixed, single, all, quit):
Fit Gaussian widths (fixed, single, all, quit):
Choose 'all' (positions of all lines will be take as parameters) unless you have reason not to.
Then it will ask, if you want to fit the background. Answer yes. It can also ask you:
Fitting...Overplot (total, components, both, none):
It means, if you want to see total fit, components for all line respectively, both fits or none.
This fit is the result of both lines fitted with gaussian function and showing only total fit.
In the lower left corner are printed values for the first line (numbered from left to right): central wavelength, flux, equivalent width and g(l)fwhm. You can change the printed line by '+' or '-' and pressing 'r' will show the rms. Pressing 'q' will allow you to try fit with other parameters. If you are satisfied with the fit, press 'q' twice.
That's all for now. As I mentioned above, I will update this post for other uses of splot. In case of any questions/uncertainties/ideas/thoughts/notes/whatever feel free to leave a comment or contact me.
Enjoy your day.
Jakub
***
NOTE: I'd like to point out that this post shows only the most basic routines of splot task. Though, I will update this post every time I will be doing something new in it.
***
splot has a huge number of parameters and all needed parameters can be changed interactively so now there is no need to check them with epar splot. We can directly open spectrum that we have already reduced and want to analyze (object_red.fits):
cl> splot object_red.fits
In case of echelle spectrum (object_ech_red1.fits, object_ech_red2.fits), you will be asked for the number of aperture you want to display after you press enter:
cl> splot object_ech_red1.fits
Image line/aperture to plot (0:) (1):
It is up to you, which one you want to display since you can move between apertures in the graphics window by typing '(' or ')'. The number of displayed aperture is indicated in the second line of header in square brackets [combine1.fits[*,2]].
***
NOTE: links above are links to the spectra used in my project and which are uploaded on my drive. You can download them to try all the described steps.
***
Now we can proceed to the inspection of our spectra (I am going to work only with object_red.fits since all the steps for echelle spectra are the same)
In the first picture we can see several spectral lines. To find out their wavelengths, hover the cursor above one of them and press <space>. Coordinates of nearest pixel will be shown in lower left corner of the screen (you can see there some more information but the relevant to the wavelength is only the first number 5005.519).
For the more detailed inspection we want to zoon to the specific part of the spectrum. This is done in the same way as in other tasks like apall. Press 'w' to enter window mode and the double 'e' in the opposite corners of the new view.
To unzoom the view, you can use the 'w' + 'a' or just 'c' keys.
The matter of flux determination is another important thing you will probably want to do with your spectra. This can be done in several ways. The first and fastest way is double clicking 'e' on each side of the spectral line (exactly at the side and at the background level).
Central wavelength, equivalent width, continuum and flux are printed in the lower left corner (and also in the logfile specified by save_file parameter). However this method is not the most accurate one.
Two another methods are based on fitting functions on the spectrum.
If you want to fit only one line at the time, use double 'k'. Press 'k' on the one side of the spectral line (keep some distance from the line because it will be calculating also with the background) and also on the other side.
Green dashed line is the background and red dashed line is the fit. In the lower left corner are printed values of central wavelength, flux, equivalent width and gfwhm (gaussian full width at half maximum since it fits gaussian function).
To fit more lines at the time you can use double 'd'. As in the case of 'k' press 'd' on the one side of region with analyzed lines and also on the other side with some distance from the nearest line for the background.
After that it will ask you to choose the function for each line. You will do it by hovering cursor above center of the line and pressing 'g' for gaussian function, 'l' for lorentzian function and 'v' for voight function. You can also read lines from file or type the exact wavelength.
When you are done, press 'q'.
It will then ask you if you want central positions and gaussian/lorentzian widths to be fixed or not:
Fit positions (fixed, single, all, quit):
Fit Gaussian widths (fixed, single, all, quit):
Choose 'all' (positions of all lines will be take as parameters) unless you have reason not to.
Then it will ask, if you want to fit the background. Answer yes. It can also ask you:
Fitting...Overplot (total, components, both, none):
It means, if you want to see total fit, components for all line respectively, both fits or none.
This fit is the result of both lines fitted with gaussian function and showing only total fit.
In the lower left corner are printed values for the first line (numbered from left to right): central wavelength, flux, equivalent width and g(l)fwhm. You can change the printed line by '+' or '-' and pressing 'r' will show the rms. Pressing 'q' will allow you to try fit with other parameters. If you are satisfied with the fit, press 'q' twice.
That's all for now. As I mentioned above, I will update this post for other uses of splot. In case of any questions/uncertainties/ideas/thoughts/notes/whatever feel free to leave a comment or contact me.
Enjoy your day.
Jakub
And here comes something cute and adorable that will make you smile :-)
Hey Dano, this cat is here only for you!
No comments:
Post a Comment