Welcome to iraf.net Saturday, April 27 2024 @ 02:49 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 Finding FWHM in IRAF
   
piverson
 07/11/2007 09:09PM (Read 10150 times)  
+++--
Chatty

Status: offline


Registered: 07/10/2007
Posts: 42
I am looking for a way for IRAF to determine the average FWHM per night. I could do this by hand but if it is automated I can script it. Any advice on how to approach this?Thanks-Paul

 
Profile Email
 Quote
fitz
 07/11/2007 09:09PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Depends how rigorous you want to be: The STARFIND or DAOFIND tasks can be used to create lists of stellar detections within images and will provide either an HWHM or FWHM value in an ascii table. The FIELDS task can the extract that particular column and the AVERAGE task in the LISTS package will compute a value for you. Should be an easy enough thing to script to plow through a night's worth of data and print a single value as a result, but note this isn't the same as estimating the seeing throughout the night.Cheers,
-Mike

 
Profile Email
 Quote
piverson
 07/11/2007 09:09PM  
+++--
Chatty

Status: offline


Registered: 07/10/2007
Posts: 42
Thanks for the help Mike but I am still having some troubles.Using DAOFIND outputs star detections and other numbers to the screen but none of them seem to be HWHM or FWHM. I tried outputting the results of an imexam (using "a" cursor command) to a datafile and then used FIELDS to pull out the ENCLOSED column (Dr. Hintz said this was a decent FWHM value); however, AVERAGE does not like the blank rows between each number and refuses to compute.My questions are:
Is it possible to use the imexam method I tried?
Is it statistically sound?
How would you script the method you suggested?
How would you estimate the seeing throughout the night?How do you convert a string to an integer?Thanks again
-Paul

 
Profile Email
 Quote
fitz
 07/11/2007 09:09PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
[quote:1e63c5ac51]
1) Is it possible to use the imexam method I tried?
2) Is it statistically sound?
3) How would you script the method you suggested?
4) How would you estimate the seeing throughout the night?
5) How do you convert a string to an integer?[/quote:1e63c5ac51]1) Sure. If you don't want to do it all by hand then you can create a cursor file to drive the task automatically, i.e. create a command-input file to do the 'a' at the various positions automatically. Note however that STARFIND will produce a value you can use more easily, and that most of the functions in imexam are based on other tasks available elsewhere in the system. See "help cursors" for details on cursor files.2) Computing an average of a list of numbers is very sound. Whether your interpretation of those numbers in what you're trying to do is statistically sound - I don't know.3) I'd do it by hand first, then write it up as a procedure script to automate it for the next time. See the 'Script Programmer's Guide' in the docs page.4) A very crude way is to multiply your FWHM by the plate scale. More rigorous solutions would take into account the bandpass, airmass, bin it into time slices, etc.5) Use either the int() intrinsic function or scan it to a variable, e.g.[code:1:1e63c5ac51]s1 = "4"
i = int(s1) # ... or
print (s1) | scan (i) [/code:1:1e63c5ac51]Cheers,
-Mike

 
Profile Email
 Quote
jlcough
 07/11/2007 09:09PM  
+----
Newbie

Status: offline


Registered: 07/16/2007
Posts: 1
You might also want to look at the psfmeasure task.

 
Profile Email Website
 Quote
piverson
 07/11/2007 09:09PM  
+++--
Chatty

Status: offline


Registered: 07/10/2007
Posts: 42
Alright Mike...it almost works. I am just having trouble at the calculation of the FWHM from the HWHM (i.e. temp = 2*real(s1) >> "datalistFWHM"). It claims a syntax error and won't let me concatenate out my temp value to a file called datalistFWHM. I have tried a number of things and none of my professors seem to know how to do this.I have included the entire script for you to see.Thanks
-Paul #codetest.cl by Paul Iverson
#the purpose of this cl script is to give a tasked file that can be used to test codereal temp
string s1sections ("ngc*.fits", opt="fullname", > "datalistfile")
list = "datalistfile"
while (fscan(list,s1) != EOF){
starfind (s1)
}sections ("ngc*obj.1", opt="fullname", > "datalist1")
list = "datalist1"
while (fscan(list,s1) != EOF){
fields (s1,5, > "datalist2")
type "datalist2" | average >> "datalist3"
del datalist2
}
del datalist1field ("datalist3",1, > "datalistHWHM")
del datalist3list = "datalistHWHM"
while (fscan(list,s1) != EOF){
temp = 2*real(s1) >> "datalistFWHM"
}joinlines "datalistfile" "datalistFWHM" > "datatot"
joinlines "datatot" "datalistHWHM" > "datatotal"

 
Profile Email
 Quote
fitz
 07/11/2007 09:09PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
[quote:3f2cd2557d]temp = 2*real(s1) >> "datalistFWHM" [/quote:3f2cd2557d]Should be[code:1:3f2cd2557d]temp = 2*real(s1)
print (temp, >> "datalistFWHM")[/code:1:3f2cd2557d]Redirection in an assignment statement is a syntax error is most languages, that, or it's taken to mean a bit shift 8-)Cheers,
-Mike

 
Profile Email
 Quote
   
Content generated in: 0.20 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login