Hello Everyone,
It has been a pretty long time since my last post and even longer time since my last "scientific"work. I have been stick by procrastination since EUCYS (aww sweet EUCYS) and I could not force myself to start doing something meaningful.
Now, I want to do something that can help me with my recent or future projects, in my school or at scientific competitions. I will post it every Sunday with #ScienceSunday hashtag on my blog or Facebook so it could be used as my public research diary, inspiration for you and hopefully I stop procrastinating.
Today, for my first #ScienceSunday I am not gonna be very creative (and unfortunately I am not gonna do something new for me or my project but this is the idea of today so I do not have much time to do something new) and I am going to continue in my Data Analysis in IRAF. I wanted to make one post about combining aperture spectra and also some features of task splot but evidently I am too lazy for the post of that length so I am gonna cut it into two shorter posts.
As you can hopefully remember from my last post, we ended up with fully reduced spectrum. It had one small imperfection - it is composed of several spectra extracted from each aperture. Actually, it is more practical for you to let it be this way for many analysis steps but in case you want to create one representative spectrum which will be shown as a very important figure or which will be your new desktop background this is the best way (it is the best for me, at least) to do so.
I would like to recommend you if you have been working on more datasets of same object which were taken with the same instrument configuration you can average all spectra extracted from these datasets. You will end up with less noisy spectrum. This can be done by the first run of task scombine.
echelle> scombine @list_of_extracted_spectra out=object_avg group=apertures combine=average
Flux calibration left its not-wanted fingerprint on our spectra and we want to get rid of it.
As you can see in this printscreen, the edge of this aperture has much higher flux than the rest of it. It was caused by the worse sensitivity function at this edge. Actually, all apertures have these noisy edges and we can cut them off the image. This can be done by cutting off a few pixels from both edges with the task imcopy. Let's say that my spectra are 1500 pixels long and I want to cut off 200 (do not be scared to cut 200 pixels from each side, apertures cover their edges so you will not cut important data from it, however you can check how many pixels have shared wavelength in each aperture) pixels from each side.
imutil> imcopy object_avg[201:1300,*] out=object_atrim
Here is the result of my cutting on the same aperture as it was in previous picture.
Now is time for the second run of scombine task. We are going to combine single aperture spectra into one spectrum.
echelle> scombine object_atrim out=object_spec group=image combine=average
I would like to recommend you if you have been working on more datasets of same object which were taken with the same instrument configuration you can average all spectra extracted from these datasets. You will end up with less noisy spectrum. This can be done by the first run of task scombine.
echelle> scombine @list_of_extracted_spectra out=object_avg group=apertures combine=average
Flux calibration left its not-wanted fingerprint on our spectra and we want to get rid of it.
As you can see in this printscreen, the edge of this aperture has much higher flux than the rest of it. It was caused by the worse sensitivity function at this edge. Actually, all apertures have these noisy edges and we can cut them off the image. This can be done by cutting off a few pixels from both edges with the task imcopy. Let's say that my spectra are 1500 pixels long and I want to cut off 200 (do not be scared to cut 200 pixels from each side, apertures cover their edges so you will not cut important data from it, however you can check how many pixels have shared wavelength in each aperture) pixels from each side.
imutil> imcopy object_avg[201:1300,*] out=object_atrim
Here is the result of my cutting on the same aperture as it was in previous picture.
Now is time for the second run of scombine task. We are going to combine single aperture spectra into one spectrum.
echelle> scombine object_atrim out=object_spec group=image combine=average
You can see that there is present some continuum and we can get rid of it with the task continuum.
echelle>continuum object_spec out=spectrum type=difference
The fitting window will be opened and you can change the order of fitting, number of iterations and high or low rejection for the best fit of continuum function. You can run this task several times to get the best result. After this, you can cut the noisy edges or you can be satisfied with result but you have to keep in mind that whole combined spectrum will not be shown with very good resolution.
Hopefully, it will help you in any way. If you found any mistake let me know about it. Also if you know better way to create combined spectra do not be selfish and share your wisdom with me.
It is all for this #ScienceSunday and see you next week.
Have a nice Sunday (or any other day in your life).
Jakub
The fitting window will be opened and you can change the order of fitting, number of iterations and high or low rejection for the best fit of continuum function. You can run this task several times to get the best result. After this, you can cut the noisy edges or you can be satisfied with result but you have to keep in mind that whole combined spectrum will not be shown with very good resolution.
Hopefully, it will help you in any way. If you found any mistake let me know about it. Also if you know better way to create combined spectra do not be selfish and share your wisdom with me.
It is all for this #ScienceSunday and see you next week.
Have a nice Sunday (or any other day in your life).
Jakub
No comments:
Post a Comment