using rd2xy task
Felipe Navarete wrote on Jul 20, 2010
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:
when I run it, I get the following message:
ERROR: may not convert string to other types
What should I do?
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:
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)
}
when I run it, I get the following message:
ERROR: may not convert string to other types
What should I do?
Mike Fitzpatrick wrote on Jul 20, 2010
The 'ra' and 'dec' parameters to RD2XY are real parameters, you're passing in strings. Simply declare your ra/dec variable to be reals.
Last post on Jul 20, 2010