| Forum der Vereinigung der Sternfreunde https://forum.vdsastro.de/ |
|
| IRAF cl script help please https://forum.vdsastro.de/viewtopic.php?t=4997 |
Seite 1 von 1 |
| Autor: | Andrew Smith [ 18. November 2017, 13:27:05 PM ] |
| Betreff des Beitrags: | IRAF cl script help please |
I have developed some IRAF scripts that reduce my echelle spectra. The script has several places where it needs the date and object name. I would like to be able to set these in one place and use a variable to pass the value. I have tried for example char Target = "object" scopy ABC.fit Target.fit but get the file Target.fit rather than object.fit Is there a way to do this? Thanks in advance for any advice. Regards Andrew |
|
| Autor: | Christian Netzel [ 18. November 2017, 17:11:11 PM ] |
| Betreff des Beitrags: | Re: IRAF cl script help please |
Hi Andrew, do you use CL or pyraf? Christian |
|
| Autor: | Christian Netzel [ 18. November 2017, 20:13:12 PM ] |
| Betreff des Beitrags: | Re: IRAF cl script help please |
Hello Andrew, I didn't realize that the answer to my question was already mentioned in the subject. You will find the answer here: http://stsdas.stsci.edu/documents/SUG/U ... HEADING161 Cheers Christian |
|
| Autor: | Andrew Smith [ 18. November 2017, 20:17:31 PM ] |
| Betreff des Beitrags: | Re: IRAF cl script help please |
Thanks I will look at the document. Regards Andrew |
|
| Autor: | Christian Netzel [ 19. November 2017, 09:29:01 AM ] |
| Betreff des Beitrags: | Re: IRAF cl script help please |
Hi Andrew, perhaps I should draw your attention on the (==>)-operator. E. g. given some images im1.fit, im2.fit, ...,im10.fit plus dark.fit you can with the command files im*.fit > list generate a file with all the names of images. With imarith @list - dark.fit d//@list the dark will be subtracted from all images. The resulting images are named dim1.fit, ..., dim10.fit This technique replaces the need for scripts in many cases. The power of CL is very limited. E. g. there are only string variables called s1, s2, s3. For many cases this may be sufficient. When you use the above mentioned (==>)-operator it no Problem to write a script for the normal reduction procedure. Pyraf is a more powerful choice. It seems to be quite popular. However I have no experience with Pyraf. Regards Christian |
|
| Autor: | Andrew Smith [ 23. November 2017, 13:28:59 PM ] |
| Betreff des Beitrags: | Re: IRAF cl script help please |
Thanks Christian, I have use the (==>) and * in my script and with the other advice you gave now have just what I need. I can input the star name and observation date and do all the processing without further intervention. Thanks Andrew |
|
| Autor: | Christian Netzel [ 26. November 2017, 23:35:58 PM ] |
| Betreff des Beitrags: | Re: IRAF cl script help please |
Hi Andrew, today I used an Iraf script for the first time. I had 60 1D spectra and for each spectrum an individual calibration file. The problem was to assign each header of the object spectra the correct calibration files. Firstly I created a file spec1 cal1 spec2 cal2 .... ..... spec60 cal60 called comb.dat. My script was list = "comb.dat" while (fscan( list, s1, s2) != EOF) hedit(s1, "REFSPEC1", s, add+, ver-, show) I saw no other solution for this problem. Cheers Christian |
|
| Autor: | Andrew Smith [ 27. November 2017, 00:02:18 AM ] |
| Betreff des Beitrags: | Re: IRAF cl script help please |
I can see that will be a help in the future, Christian Thanks Andrew |
|
| Autor: | Berthold Stober [ 01. Dezember 2017, 10:42:19 AM ] |
| Betreff des Beitrags: | Re: IRAF cl script help please |
Hi Andrew I am interested and Klaus too to reduce echelle spectra with IRAF too. Do you think, I could use your Script to do so? If yes, could you give me your script? Cheers Berthold |
|
| Autor: | Andrew Smith [ 01. Dezember 2017, 19:01:59 PM ] | ||
| Betreff des Beitrags: | Re: IRAF cl script help please | ||
Hi Berthold, I am sorry but it is not that simple. You have to set up IRAF to match your spectrograph first. I did the basic image processing using elementary tasks as described here: http://www.twilightlandscapes.com/IRAFtutorial/ I then followed the setting up of the extraction and wavelength calibration (missing out flat fielding and scattered light) from here: http://citeseerx.ist.psu.edu/viewdoc/do ... 1&type=pdf I am still very much a novice at this and am reluctant to share my primitive script as it is as it is a work in progress. There are turorials on the IRAF site and I tried these as well. The main stumbling block is learning the way to use the interactive windows as they are non standard and differ in different tasks. I sent Klaus a list of IRAF references. I did do a note on getting IRAF installed on Windows (attached). I will do an overview of the steps I use and post later. I hope this helps. Regards Andrew
|
|||
| Autor: | Andrew Smith [ 01. Dezember 2017, 20:35:40 PM ] |
| Betreff des Beitrags: | Re: IRAF cl script help please |
Here are the other links I found helpful. http://iraf.noao.edu/docs/spectra.html http://iraf.noao.edu/tutorials/tutorials.html http://iraf.noao.edu/ http://stsdas.stsci.edu/gethelp/HelpSys.html Regards Andrew |
|
| Seite 1 von 1 | Alle Zeiten sind UTC+02:00 |
| Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |
|