Welcome to iraf.net Sunday, May 19 2024 @ 10:23 PM GMT


 Forum Index > Archives > Sitemail Archives
 "-z" question on xc
   
Anonymous: Guest
 12/02/1994 10:20PM (Read 281 times)  



Hello.I am getting different results from an SPP program when I use the "-z" switch
on xc. The program is a whittled down version of zzdebug from the IRAF MWCS
subdirectory. I'm only running the test progrm "wcs" within zzdebug. The
starred lines show the different results: astoria-65: xc strange_bug.x
strange_bug.x:
sys_runtask:
t_wcs:
plterm:
strange_bug.f:
sysruk:
twcs:
plterm:
link:
astoria-66: strange_bug.e
> wcs
----- lterm -----
0.866 0.500 0.000 : 10.000
-0.500 0.866 0.000 : 20.000
0.000 0.000 1.000 : 0.000
----- lterm -----
** 3.464 2.000 0.000 : 40.000
** -0.100 0.173 0.000 : 4.000
0.000 0.000 1.000 : 0.000
> bye
astoria-68: xc -z strange_bug.x
strange_bug.x:
sys_runtask:
t_wcs:
plterm:
strange_bug.f:
sysruk:
twcs:
plterm:
link:
astoria-69: strange_bug.e
> wcs
----- lterm -----
0.866 0.500 0.000 : 10.000
-0.500 0.866 0.000 : 20.000
0.000 0.000 1.000 : 0.000
----- lterm -----
** 3.464 0.100 0.000 : 40.000
** -2.000 0.173 0.000 : 4.000
0.000 0.000 1.000 : 0.000
> bye
I'm fairly confident that these are not equivalent matrices which are
produced by the call to mw_scale(). Why should "-z" affect the results?
There is no urgency to this question -- I stumbled upon this difference
when trying to compare two different versions of some code.My sample code follows. The include file ("imwcs.h") comes directly
from the IRAF MWCS directory.Thanks,David Van Stone
-------# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.include <mach.h>
include <math.h>
include <mwset.h>
include "imwcs.h"task wcs = t_wcs
# WCS -- Test the creation and use of a world coordinate system.procedure t_wcs()pointer mw
real theta, center[2], scale[2], shift[2]
real ltm[3,3], ltv[3]
double l2m[2,2], l2v_1[2], l2v_2[2], d_theta
int ndim
pointer mw_open()begin
ndim = 3 # Create a unitary, 3 dim WCS.
mw = mw_open (NULL, ndim) # Apply a transform to the first 2 axes.
d_theta = DEGTORAD(30.0D0)
l2m[1,1] = cos(d_theta); l2m[2,1] = sin(d_theta)
l2m[1,2] = -sin(d_theta); l2m[2,2] = cos(d_theta)
l2v_1[1] = 0.0; l2v_1[2] = 0.0
l2v_2[1] = 10.0; l2v_2[2] = 20.0 theta = d_theta; call aclrr (center, 2)
call mw_rotate (mw, theta, center, 3Cool shift[1] = 10.0; shift[2] = 20.0
call mw_shift (mw, shift, 3Cool # Examine the Lterm.
call plterm (mw, ltm, ltv, ndim) scale[1] = 4.0; scale[2] = 0.2
call mw_scale (mw, scale, 3Cool# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.include <mach.h>
include <math.h>
include <mwset.h>
include "imwcs.h"task wcs = t_wcs
# WCS -- Test the creation and use of a world coordinate system.procedure t_wcs()pointer mw
real theta, center[2], scale[2], shift[2]
real ltm[3,3], ltv[3]
double l2m[2,2], l2v_1[2], l2v_2[2], d_theta
int ndim
pointer mw_open()begin
ndim = 3 # Create a unitary, 3 dim WCS.
mw = mw_open (NULL, ndim) # Apply a transform to the first 2 axes.
d_theta = DEGTORAD(30.0D0)
l2m[1,1] = cos(d_theta); l2m[2,1] = sin(d_theta)
l2m[1,2] = -sin(d_theta); l2m[2,2] = cos(d_theta)
l2v_1[1] = 0.0; l2v_1[2] = 0.0
l2v_2[1] = 10.0; l2v_2[2] = 20.0 theta = d_theta; call aclrr (center, 2)
call mw_rotate (mw, theta, center, 3Cool shift[1] = 10.0; shift[2] = 20.0
call mw_shift (mw, shift, 3Cool # Examine the Lterm.
call plterm (mw, ltm, ltv, ndim) scale[1] = 4.0; scale[2] = 0.2
call mw_scale (mw, scale, 3Cool # Examine the Lterm.
call plterm (mw, ltm, ltv, ndim) call mw_close (mw)
end
# PLTERM -- Print the Lterm.procedure plterm (mw, ltm, ltv, ndim)pointer mw
real ltm[ndim,ndim]
real ltv[ndim]
int ndimint i, jbegin
# Examine the Lterm.
call mw_gltermr (mw, ltm, ltv, ndim)
call eprintf ("----- lterm -----\n") do j = 1, ndim {
do i = 1, ndim {
call eprintf (" %8.3f")
call pargr (ltm[i,j])
}
call eprintf (" : %8.3f\n")
call pargr (ltv[j])
}
end

 
Anonymous: Guest
 12/02/1994 10:20PM  



Hi David,
Normally (with SunOS or Solaris systems) tasks are compiled to use
the IRAF shared library, when compiled with the '-z' flag the programs link
against the iraf libraries statically (libex.a in this case). It sounds
like you may have installed a "patched" version of the shared library we've
distributed to a few sites to fix a bug that affects e.g. the TEDIT/TCREATE
tasks. Since the initial release of V2.10.3beta there have been some minor
bug fixes to the MWCS code, one change affects the mr_rotate() procedure
called in the test program. If you've installed this patched shared library
you've got these mwcs changes, compiling with '-z' and you're using the
original V2.10.3 code, hence the difference.
If you're not sure you can check your system against the file dates
of the distributed binaries:
For SunOS: rwxr-xr-x212/121646592 Aug 19 13:11 1994 ./S6.e
rw-rw-r--212/121185248 May 13 14:20 1994 ./libex.a
For Solaris: rwxr-xr-x212/122158516 Aug 19 22:05 1994 ./S10.e
rw-r--r--212/991945404 Jul 29 21:27 1994 ./libex.aSince the newer code has fixed bugs it's perhaps better to use it. I hope
this explains things, let me know if you have any other questions.Cheers,
Mike Fitzpatrick

 
   

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