[Issues] AstrometricCorrection_test fails on 64 bit machines

John P. McFarland mcfarland at astro.rug.nl
Mon Jun 2 12:41:14 CEST 2008


Hi Kor and Erik,

The error here is on the order of 10e-2 pixels (10e-3 arcsec) and is not 
surprising.  The internal calculations on a 64-bit machine are generally 
done at a higher precision due to larger size of floats and double 
floats (I know this is true for NumPy and it should be verified for LDAC).

I don't see this as a problem with the numeric output difference.  I see it 
as a problem with the test itself.  The part of the test that fails is 
expecting exact numbers when it should be testing for a range.  We should 
think about the best way to fix this.  Should the test be looking for this 
range, or should it be testing these values in a more portable way?  Should 
we leave the test alone and make 64-bit LDAC use the same size of float as 
32-bit LDAC?

Erik, please comment on the this latter option.  Thanks.

Cheers,


-=John


On Mon, 2 Jun 2008, Kor G. Begeman wrote:

> L.S.
>
> When running the unittests om 64 bit machines the AstrometricCorrection
> test fails. See below for the error message.
>
> Cheers,
>
> Kor
>
> =======================================================================
>
> [awdpu at spider ~]$ cd /tmp
> [awdpu at spider tmp]$ env database_engine= database_name= awe
> ~/awehome/current/astro/test/processing/AstrometricCorrection_test.py
> [spider] 11:46:04 - AstrometricCorrection.make
> [spider] 11:46:04 - Using catalog raw_1.cat
> [spider] 11:46:04 - Using catalog raw_2.cat
> [spider] 11:46:04 - Using catalog raw_3.cat
> [spider] 11:46:04 - Using catalog raw_4.cat
> [spider] 11:46:04 - Using catalog raw_5.cat
> [spider] 11:46:04 - Using catalog raw_6.cat
> [spider] 11:46:04 - Using catalog raw_7.cat
> [spider] 11:46:04 - Using catalog raw_8.cat
> [spider] 11:46:04 - Building concatenated catalog
> tmp1212399964.257384.8xvyem.cat1
> [spider] 11:46:04 - RUNNING: ldacconcat -i
> /tmp/unittestdata/ldac/raw_1.cat
> /tmp/unittestdata/ldac/raw_2.cat/tmp/unittestdata/ldac/raw_3.cat
> /tmp/unittestdata/ldac/raw_4.cat /tmp/unittestdata/ldac/raw_5.cat
> /tmp/unittestdata/ldac/raw_6.cat /tmp/unittestdata/ldac/raw_7.cat
> /tmp/unittestdata/ldac/raw_8.cat -o tmp1212399964.257384.8xvyem.cat1
> [spider] 11:46:04 -
> [spider] 11:46:04 - ===================================================
> [spider] 11:46:04 - Basic information for program with key concat0
> [spider] 11:46:04 - ===================================================
> [spider] 11:46:04 -        NAME: concat
> [spider] 11:46:04 - DESCRIPTION: LDACConcat Program
> [spider] 11:46:04 -     VERSION: Version: 1.0 (Jun  2 2008)
> [spider] 11:46:04 - ---------------------------------------------------
> [spider] 11:46:04 -
> [spider] 11:46:04 - Running preastrom to produce
> tmp1212399964.257384.8xvyem.cat2
> [spider] 11:46:04 - RUNNING: preastrom -i
> tmp1212399964.257384.8xvyem.cat1 -o tmp1212399964.257384.8xvyem.cat2 -p
> tmp1212399964.257384.8xvyem.cat3 -a usno.astro-wise.org:5556 -c
> tmp1212399964.257384.8xvyem.preastrom.conf
> [spider] 11:46:07 -
> [spider] 11:46:07 - ===================================================
> [spider] 11:46:07 - Basic information for program with key preastrom0
> [spider] 11:46:07 - ===================================================
> [spider] 11:46:07 -        NAME: preastrom
> [spider] 11:46:07 - DESCRIPTION: Preastrometric Pairing Program
> [spider] 11:46:07 -     VERSION: Version: 2.0.2 (Jun  2 2008)
> [spider] 11:46:07 - ---------------------------------------------------
> [spider] 11:46:07 -
> [spider] 11:46:07 - Reading catalog tmp1212399964.257384.8xvyem.cat2
> [spider] 11:46:07 - x-offset: -167.84058 (pixels)
> [spider] 11:46:07 - y-offset:  -34.57814 (pixels)
> [spider] 11:46:07 - scale_xx:    0.99962 (pixels)
> [spider] 11:46:07 - scale_xy:   -0.00155 (pixels)
> [spider] 11:46:07 - scale_yx:    0.00006 (pixels)
> [spider] 11:46:07 - scale_yy:    0.99946 (pixels)
> F
> ======================================================================
> FAIL: test_make (__main__.testAstrometricCorrection)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File
> "/home/awdpu/awehome/current/astro/test/processing/AstrometricCorrection_test.py",
> line 18, in test_make
>     self.failUnlessAlmostEqual(ac.xoffset, -167.891, 1)
> AssertionError: -167.840576171875 != -167.89099999999999 within 1 places
>
> ----------------------------------------------------------------------
> Ran 1 test in 3.483s
>
> FAILED (failures=1)
> [awdpu at spider tmp]$
>
>
>
>
>


More information about the Issues mailing list