AnTaR3s |
12/12/2009 04:24PM (Read 3492 times)
|
|
|
Status: offline
Registered: 10/24/2009
Posts: 58
|
Hello everyone.I've recently done some observations and I#m trying my luck with aperture photometry in IRAF. I've managed to get a full list of my measurements, which looks something like this:#N IMAGE ID XCENTER YCENTER MAG MERR OTIME
#U imagename ## pixels pixels mag mag 1.fit 1 972.079 12.219 13.028 0.012 20:13:43
1.fit 2 972.079 12.219 13.028 0.012 20:13:43
1.fit 3 365.193 42.746 13.428 0.016 20:13:43
...
...
...
2.fit 1 972.112 12.225 13.028 0.012 20:13:59
...
...
...So: I've got:1. my stars marked
2. their positions on each of the frames
3. their magnitudes + errors in magnitudes and the observation timeBut now I'm stuck.
First problem I have is: How do I manage to extract the information in each frame of just one star (i.e.: only with a particular ID) into another file, so I can plot the magnitudes vs. time for just this star in gnuplot. It should look something like that:#N IMAGE ID XCENTER YCENTER MAG MERR OTIME
#U imagename ## pixels pixels mag mag 1.fit 1 972.079 12.219 13.028 0.012 20:13:43
2.fit 1 972.112 12.225 13.028 0.012 20:13:59
3.fit 1 972.008 12.246 13.428 0.016 20:14:15
...
...
... I hope you understand what I intend to do. Second problem I have is the time format. Can I manipulate the fits-heades i a way, that it converts my observation date from (yyyy-mm-ddThh:mm:ss) to Julian date to be able to plot that...Or is there a way to plot this data better in IRAF itself than using gnuplot.
Thanks for reading
Antares
|
|
|
|
fitz |
12/12/2009 04:24PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Quick reply for the moment: Do a Google search on 'iraf light curve", there are several exercises/tutorials on line from upper-division courses that cover some of this. Look also at the photometry cookbooks under the Docs section, and at tasks in the PTOOLS package.
|
|
|
|
AnTaR3s |
12/12/2009 04:24PM
|
|
|
Status: offline
Registered: 10/24/2009
Posts: 58
|
Hey thanks, I found a very useful tutorial on that, but I had to do some cl-scripting and copy a perl program to calculate a "plottable" time. So the steps i have to do:1) get for each image a "mag"-file with all the stars marked with always the same ID
2) list all these files in a list
3) Extracting the data I want to use for further research (date,magnitude,magn.err., etc.) for each star in a single file (star01,star02,...) using a cl-script. So I have for every single star a single file with photometric data in it...
4) converting the extracted date (hh:mm:ss) with a perl program into something i can plot
5) plot the data with gnuplotpuh, it took me all day to do my first photometric research in IRAF, and the extracted data quality isn't really good. I guess I have to deal with every step again and see what exactly introduces my relatively large scatter...So...just another question: Is this the way its done, or are there any faster techniques for more sophisticated users...?
thanksP.S.: I did aperture photometry
|
|
|
|
AnTaR3s |
12/12/2009 04:24PM
|
|
|
Status: offline
Registered: 10/24/2009
Posts: 58
|
One more question:I have a perl script (from a tutorial) where I use txdump to write certain parameters in another file.
I know I can give txtump some boolean logic expressions to select my dataMy cl-script line according this:...
txdump (s1, "otime,id,xcenter,ycenter,mag,merr,image", "id="//j , >> s2)
...So only stars with the id of the current value of j are read-out. That works great, but I want to add another boolean expression there.For example i can write directly in IRAF cl:apphot> txdump *filename* id,image,xc,yc, ... "id=1 && merr < 0.05"with that only the star with id 1 is read-out, but also only measurements with a smaller error than 0.05 mag.
This also works great, but how can I modify my perl-script so taht both boolean expressions are considered.
I tried:real e
e = 0.05
...
...
txdump (s1, "otime,id,xcenter,ycenter,mag,merr,image", "id="//j && "merr<"//e , >> s2)
...where e is my error and many other alternatives, but none of them worked. I'm not familiar with cl-scripting, so can you tell me the correct expression in the script, so that both logic limits are considered in the evaluation...?
|
|
|
|
fitz |
12/12/2009 04:24PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
[quote:86b1a25a94]
txdump (s1, "otime,id,xcenter,ycenter,mag,merr,image", "id="//j && "merr<"//e , >> s2) [/quote:86b1a25a94]The thing to remember is that you are trying to create a string of the whole expression; you can do this by concatenating actual strings with variables or else us a printf() to format the string. For example[code:1:86b1a25a94]
"id = " // j // " && merr < " // eor printf ("id = %d && merr < %.2f\n", i, e) | scan (line)
[/code:1:86b1a25a94]The first case is straightforward. In the second case, the newline is required to properly terminate the scan, and you need to use the 'line' CL parameter (or some parameter of type 'struct') to capture the whole string. You can use a simple string variable as well but need to remove the spaces from within the expression.-Mike
|
|
|
|
| |
|