Welcome to iraf.net Saturday, May 11 2024 @ 07:05 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 Creating JD-Mag table in IRAF.
   
bulash
 12/12/2006 02:38PM (Read 5519 times)  
+----
Newbie

Status: offline


Registered: 12/11/2006
Posts: 7
Hi Everyone,In DAOPHOT; after phot, we have taken the " *.mag.* " (very confusing) files, It is very hard to take the magnitude value of a listed star from this files one by one, and additinally they do not contain JD.I just need a text file which contains JD of a frame and magnitudes of objects that I choose, to draw the light curve. It's not reasonable to make this by hand, it can take a lifetime for 500 frames!!Therefore, how can we write the JD of a frame and magnitude values of the stars (the stars we want), to another file? There must be a way to?Best regard.
Burak...

 
Profile Email
 Quote
fitz
 12/12/2006 02:38PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Burak,The *.mag files may look confusing but they are simply ASCII tables and can be manipulated using the TABLES package tasks. For example,. to extract the MAG and MAGERR columns you could use[code:1:62e0c31130]cl> tprint ypix.mag.1 col="C30,c31" showrow- showhdr-[/code:1:62e0c31130]where 'c30,c31' refers to columns 30 and 31 in the table, i.e. the MAG and MAGERR. There is also a TSELECT task that will let you select stars based on some expression, most tasks will let you explicitly set the rows/colums to be used. The TABLES package must be installed separate but can be found in the downloads area of this site or at ftp://ftp.stsci.edu/pub/software/stsdasThe JD is a property of the image and so would be the same for all the rows in the mag file. You can compute it using the SETJD task in the ASTUTIL package to create a JD keyword in the head you can retrieve using HSELECT. For example[code:1:62e0c31130]cl> setjd foo.fits update+
cl> hselect foo.fits JD yes[/code:1:62e0c31130]The question then is how to get the single JD value assicated with the mag file? The THEDIT task could be used to add this as a header parameter for the table itself, or you may simply add a new column cntaining that value on each row. If all 500 of your frames contain the same stars you might want instead to create a new table where each row contains the JD of the image and the MAG column from the phot file. In this way you could do a light curve of each object by extracting the JD column and the MAG for that particular object and piping it to a graphics task like GRAPH. This last suggestion may require a bit of scripting to produce, but SETJD/HSELECT will get you the JD value, and TPRINT/TDUMP will get the column you want so you just need to format the table. See also the FIELDS task for extracting columns from the final table, and the Script Programmer's Guide under the Docs link above for more information. Hope this helps.Cheers,
-Mike

 
Profile Email
 Quote
bulash
 12/12/2006 02:38PM  
+----
Newbie

Status: offline


Registered: 12/11/2006
Posts: 7
Thank you very much Mike.It was very helpful for this newbie Smile Especially, for editing the tables.however, in final stage I think I have another problem:At the level "Extracting the JD column and MAG for the object" Because of the bad tracking system of the telescope, all frames has not the same stars in the same place. For example, in first frame my star is at coordinates, say, 853,126 and 23,456, but in second frame it is at 745,234 and 42,123. Therefore, I must check the coordinates of my star in every frame, then I must find the mag for this coordinates of star in related *mag* file and then extract.(Because I dont want to extract all detected stars' mag in the frame).If I prepare table that contains jds and the mags of all stars in the frame how can i know that which is my star? (I think this is the point.... I try to extract the mag value of just one star from the mag file)Another problem related with previous reason is that every frame does not have the same number of stars. E.g. First frame has 9 stars and second has 11.
Therefore ID number is not useful too, because every *mag* file has different ID for same star.I think It is better to make more prsice tracking Idea Thank you very much again, Mike, I hope I did not miss a thing from your reply.Best regards...
Burak.

 
Profile Email
 Quote
fitz
 12/12/2006 02:38PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Burak,My last point was assuming that you had the same stars, in the same order, in each image. For instance, assuming that on your 500 images you'd only observed the same two stars, A and B. Even though these may be moving around on the image your .mag file would always have StarA as row1 and StarB as row 2. From there you could produce a table of[code:1:4d0c03ed5a]
image1_JD Mag(StarA) Mag(StarB)
image2_JD Mag(StarA) Mag(StarB)
: : :
[/code:1:4d0c03ed5a]Getting the light curve for star A is then just[code:1:4d0c03ed5a]cl> fields table.txt 1,2 | graph STDIN[/code:1:4d0c03ed5a]If you have a variable number of detections on each image then you can't easily assume that each row in a mag file corresponds to the same star. However, you can use a task like XYXYMATCH to match up the lists of positions in each image. You'll then know what the offset is between two tables and can use PCALC to apply a shift, and then something like TMATCH can extract the matching objects. Your first image can be used as a reference and you can then find all the stars in the first image in the remaining images. Again some sort of script would be required and I'm hoping somebody who knows more about this can offer a more elegant solution.Cheers,
-Mike

 
Profile Email
 Quote
   
Content generated in: 0.14 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