On Nov 23, 2010, at 8:18 AM, Jean-Baptiste Marquette wrote:
> Yes, it works in interactive mode :
>
> MacBookJB:Downloads marquett$ wcstran lm04510_newwcs.fits framein=pixel frameout=sky
> POSIN - Position to be transformed /'500,500'/ > 500,500
>
> p1 = 500.0 p2 = 500.0 --> RA = 5:19:58.0 Dec = -65:07:18
>
Works for me:
$ wcstran test '"500, 500"' framein=pixel frameout=sky
p1 = 500.0 p2 = 500.0 --> RA = 5:19:58.0 Dec = -65:07:18
It fails when you use a decimal "500." without an additional number. So the parser expects "500.0" or "500" but "500." fails. Note that your example run above did not have the decimal in it but the command line test did.
> My point is that I will have 15 Tb of images to autoastrom to get the QV keywords, and then to rebuild a catalogue of 87 million objects using wcstran, so I do need the command-line mode.
All Starlink command-line apps can run in scripts.
> Also, how to modify the number of digits on seconds on the output to get ss.ss on RA and ss.s on DEC ?
>
To get more digits in the output you need to run the wcsattrib command and this really means that you need to convert the file to NDF first. WCSTRAN does not let you modify the formatting itself.
$ wcsattrib test set 'format(1)' hms.2
$ wcsattrib test set 'format(2)' dms.1
$ wcstran test '"500.0,500.0"' framein=pixel frameout=sky
p1 = 500.0 p2 = 500.0 --> RA = 5:19:58.00 Dec = -65:07:18.3
--
Tim Jenness
|