Submit a Story  :  IRAF Links  :  Past Polls  :  Calendar  :  Advanced Search  
     iraf.net
FAQ
 Forum FAQForum FAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

lintran double precision?

 
Post new topic   Reply to topic    iraf.net Forum Index -> Applications
View previous topic :: View next topic  
Author Message
stockton



Joined: 02 Jul 2007
Posts: 8

PostPosted: Tue Sep 04, 2012 11:14 pm    Post subject: lintran double precision? Reply with quote

Is there any way to force lintran to use double precision?
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Tue Sep 04, 2012 11:20 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
stockton



Joined: 02 Jul 2007
Posts: 8

PostPosted: Tue Sep 04, 2012 11:36 pm    Post subject: Reply with quote

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.4062

And 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.493743468

One can see that the numbers begin to deviate in ~ the 7th significant digit.

Here are the lintran parameters:

PACKAGE = lists
TASK = lintran

files = 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)
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Tue Sep 04, 2012 11:42 pm    Post subject: Reply with quote

What machine (i.e. Linux/Mac, 32- or 64-bit) and IRAF version?
Back to top
View user's profile Send private message
stockton



Joined: 02 Jul 2007
Posts: 8

PostPosted: Tue Sep 04, 2012 11:49 pm    Post subject: Reply with quote

I tried this on 2 Macs, with identical results.

One is a mid-2010 13-inch MacBook Pro running 10.7.4

The other is a recent 15-inch MacBook Pro (Retina display) running 10.8.1

Both are 64-bit, and both are running IRAF 2.14
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Wed Sep 05, 2012 6:05 am    Post subject: Reply with quote

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:

list = "coords.txt"
while (fscan (list, x, y) != EOF) {
    printf ("%g %g\n", (x * 1.0e-5), (y * 1.0e-5))
}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> Applications All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2009 phpBB Group
 Copyright © 2005-2011 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 2.17 seconds