Welcome to iraf.net Monday, May 20 2024 @ 11:42 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 using rd2xy task
   
navarete
 07/20/2010 03:34PM (Read 1778 times)  
+----
Newbie

Status: offline


Registered: 07/14/2010
Posts: 3
Hi there!
I'm using the rd2xy task to get the pixel position of a given RA and Dec in the image. The aim is to develop shifts between different images.
The procedure I'm trying to do is:
1 - read a list of files containing shifted images
2 - get the RA and DEC from the first image
3 - Convert them to X and Y using rd2xy
4 - With the same RA and DEC, get their X,Y position in the other images.For doing it, I've runned the follow cl script:[code:1:6db9908236] string scifile, ra, dec, x, y scilist = "scilist" # that's the list containing the files #read the first 4 entries of the list for (i=1; fscan(scilist, scifile) != EOF && i<=4; i=i+1) { # get RA and DEC for the first image
if (i == 1) {
hselect(scifile,"RA,DEC",yes) | scan(ra,dec)
} rd2xy(scifile,ra,dec,hour+) | scan(x,y)
print("i=",i," ",scifile," ",ra," ",dec," ",x," ",y)
}[/code:1:6db9908236]when I run it, I get the following message: [b:6db9908236]ERROR: may not convert string to other types[/b:6db9908236]What should I do?

 
Profile Email
 Quote
fitz
 07/20/2010 03:34PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
The 'ra' and 'dec' parameters to RD2XY are real parameters, you're passing in strings. Simply declare your ra/dec variable to be reals.

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