Welcome to iraf.net Wednesday, May 08 2024 @ 03:03 AM GMT
stockton |
09/04/2012 11:14PM (Read 2092 times)
|
|
|
Status: offline
Registered: 07/02/2007
Posts: 8
|
Is there any way to force lintran to use double precision?
|
|
|
|
fitz |
09/04/2012 11:14PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
The transformation is already done in double precision, as is the output of the computed value (controlled by the 'min_sigdigits' param). Is there some particular reason you're asking?
|
|
|
|
stockton |
09/04/2012 11:14PM
|
|
|
Status: offline
Registered: 07/02/2007
Posts: 8
|
Yes, I was using it for the simple task of multiplying both columns of a list of number by 1. e-5. Here is part of the input list:31681385.707 2352230.0446
31681389.276 2352228.4283
31681179.145 2352917.6796
31681061.223 2351894.4836
31681062.542 2351893.6857
31680460.032 2351034.1428
31683016.969 2352223.7668
31683089.209 2349374.4062And here are the corresponding lines from the output list:316.81384907 23.522299852
316.81388476 23.522283689
316.81178345 23.529176202
316.81060423 23.518944242
316.81061742 23.518936263
316.80459232 23.510340834
316.83016169 23.522237074
316.83088409 23.493743468One can see that the numbers begin to deviate in ~ the 7th significant digit.Here are the lintran parameters:PACKAGE = lists
TASK = lintranfiles = dr1coordstrana
(xfield = 1) field containing x coordinate
(yfield = 2) field containing y coordinate
(min_sig= 15) minimum significant digits to be output
(x1 = 0.) current x origin
(y1 = 0.) current y origin
(xscale = 1.0000000000000E-5) scale factor relative to current origin
(yscale = 1.0000000000000E-5) scale factor relative to current origin
(angle = 0.) rotation angle
(x2 = 0.) new x origin
(y2 = 0.) new y origin
(radians= no) angle in radians?
(mode = ql)
|
|
|
|
fitz |
09/04/2012 11:14PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
What machine (i.e. Linux/Mac, 32- or 64-bit) and IRAF version?
|
|
|
|
stockton |
09/04/2012 11:14PM
|
|
|
Status: offline
Registered: 07/02/2007
Posts: 8
|
I tried this on 2 Macs, with identical results. One is a mid-2010 13-inch MacBook Pro running 10.7.4The other is a recent 15-inch MacBook Pro (Retina display) running 10.8.1Both are 64-bit, and both are running IRAF 2.14
|
|
|
|
fitz |
09/04/2012 11:14PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
The transformation was being done using double precision values, however the parameter structure was using single precision thereby forcing the calculations to show the round-off. I've changed this for the next update, to patch your v2.14 system I could send you the code change and instructions for relinking the system, otherwise there's no way to change the task at runtime.An alternative if all you use this task for is to scale those lists is to do it in the CL which is double-precision anyway, e.g.[code:1:cb54252036]
list = "coords.txt"
while (fscan (list, x, y) != EOF) {
printf ("%g %g\n", (x * 1.0e-5), (y * 1.0e-5))
}
[/code:1:cb54252036]
|
|
|
|
| |
|
Content generated in: 0.16 seconds |
|