Forum der Vereinigung der Sternfreunde

Forum of the German Amateur Astronomy Association
Aktuelle Zeit: 12. Januar 2026, 18:45:15 PM

Alle Zeiten sind UTC+02:00




Ein neues Thema erstellen  Auf das Thema antworten  [ 11 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: IRAF cl script help please
BeitragVerfasst: 18. November 2017, 13:27:05 PM 
Offline
Dauernutzer

Registriert: 10. Juli 2016, 13:53:59 PM
Beiträge: 101
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


Nach oben
   
 Betreff des Beitrags: Re: IRAF cl script help please
BeitragVerfasst: 18. November 2017, 17:11:11 PM 
Offline
Meister
Benutzeravatar

Registriert: 11. November 2007, 18:11:30 PM
Beiträge: 1379
Hi Andrew,
do you use CL or pyraf?
Christian


Nach oben
   
 Betreff des Beitrags: Re: IRAF cl script help please
BeitragVerfasst: 18. November 2017, 20:13:12 PM 
Offline
Meister
Benutzeravatar

Registriert: 11. November 2007, 18:11:30 PM
Beiträge: 1379
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


Nach oben
   
 Betreff des Beitrags: Re: IRAF cl script help please
BeitragVerfasst: 18. November 2017, 20:17:31 PM 
Offline
Dauernutzer

Registriert: 10. Juli 2016, 13:53:59 PM
Beiträge: 101
Thanks I will look at the document. Regards Andrew


Nach oben
   
 Betreff des Beitrags: Re: IRAF cl script help please
BeitragVerfasst: 19. November 2017, 09:29:01 AM 
Offline
Meister
Benutzeravatar

Registriert: 11. November 2007, 18:11:30 PM
Beiträge: 1379
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


Nach oben
   
 Betreff des Beitrags: Re: IRAF cl script help please
BeitragVerfasst: 23. November 2017, 13:28:59 PM 
Offline
Dauernutzer

Registriert: 10. Juli 2016, 13:53:59 PM
Beiträge: 101
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


Nach oben
   
 Betreff des Beitrags: Re: IRAF cl script help please
BeitragVerfasst: 26. November 2017, 23:35:58 PM 
Offline
Meister
Benutzeravatar

Registriert: 11. November 2007, 18:11:30 PM
Beiträge: 1379
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


Nach oben
   
 Betreff des Beitrags: Re: IRAF cl script help please
BeitragVerfasst: 27. November 2017, 00:02:18 AM 
Offline
Dauernutzer

Registriert: 10. Juli 2016, 13:53:59 PM
Beiträge: 101
I can see that will be a help in the future, Christian

Thanks Andrew


Nach oben
   
 Betreff des Beitrags: Re: IRAF cl script help please
BeitragVerfasst: 01. Dezember 2017, 10:42:19 AM 
Offline
Meister
Benutzeravatar

Registriert: 19. August 2006, 11:45:20 AM
Beiträge: 2740
Wohnort: 66907 Glan-Münchweiler
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


Nach oben
   
 Betreff des Beitrags: Re: IRAF cl script help please
BeitragVerfasst: 01. Dezember 2017, 19:01:59 PM 
Offline
Dauernutzer

Registriert: 10. Juli 2016, 13:53:59 PM
Beiträge: 101
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


Dateianhänge:
IRAF for Amaturs.doc [17 KiB]
126-mal heruntergeladen
Nach oben
   
 Betreff des Beitrags: Re: IRAF cl script help please
BeitragVerfasst: 01. Dezember 2017, 20:35:40 PM 
Offline
Dauernutzer

Registriert: 10. Juli 2016, 13:53:59 PM
Beiträge: 101
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


Nach oben
   
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen  Auf das Thema antworten  [ 11 Beiträge ] 

Alle Zeiten sind UTC+02:00


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
Powered by phpBB® Forum Software © phpBB Limited
Deutsche Übersetzung durch phpBB.de