Welcome to iraf.net Saturday, April 27 2024 @ 10:17 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 Question!!
   
leocastaneda
 06/17/2007 04:58PM (Read 3132 times)  
+----
Newbie

Status: offline


Registered: 06/17/2007
Posts: 1
Good Morning!!!
I am using IRAF for surface photometry. I need to get photometry for some
slits directons on my fits files. For this task I have an IRAF script, but
I have a real problem:The data that I have to use in some iraf task as imstat are storaged in
strings, they are real values but the format are strings, I need to recover the
REAL value from the string, in order to be able to use in different tasks.
Can you help me with it?Best regards,Leonardo
AIFA Bonn

 
Profile Email
 Quote
fitz
 06/17/2007 04:58PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
If I understand your question, you have a text file of values you want to convert to an image so you can use tasks like IMSTAT? If so, see the RTEXTIMAGE task to convert to a FITS file. If the values aren't really representative of an image but simply a table of values, you can use the TABLES external package (needs to be installed separately) to do the same, e.g. the TSTAT task in the TTOOLS package.Cheers,
-Mike

 
Profile Email
 Quote
fitz
 06/17/2007 04:58PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
[quote:536da4e265]Thanks a lot for your answer. May be the question was not enough clear.
My question is as follows:
I have two arrays x[(i)],y[(i)] generated by a cl script. They are positions on m y fits files, actually I am fitting slits with it, it means x[(i)],y[(i)] are pairs as (200,500) for example, but after this fitting I need to use the coordinates in dome iraf tasks as
imstat (image=image//"[x:y,x[j]:y[(j)]]") and x[(i)],[y(i)] are formally STRINGS variables and the tasks need REAL values, the question is how I can go from strings to real vaues of my coordinates. [/quote:536da4e265]What you need to do in this case is to create an image section based on the values, e.g. "image[200:500,200:500]". Note this is different than simply the pixel value at location (200,500) but makes more sense for calling IMSTAT. In any case, you would use the '//' string concatenation operator as in[code:1:536da4e265]string sec = image // "[" // x[i] // ":" // y[i] // "," // x[i] // ":" // y[i] // "]"
imstat(images=sec, .....)[/code:1:536da4e265]
Let me know if I still don't understand the question.Cheers,
-Mike

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