Index: unk/psLib/test/astronomy/Makefile.am
===================================================================
--- /trunk/psLib/test/astronomy/Makefile.am	(revision 7207)
+++ 	(revision )
@@ -1,75 +1,0 @@
- #Makefile for astronomy functions of psLib
-#
-INCLUDES = \
-	-I$(top_srcdir)/src \
-	-I$(top_srcdir)/src/astronomy \
-	-I$(top_srcdir)/src/collections \
-	-I$(top_srcdir)/src/dataManip \
-	-I$(top_srcdir)/src/dataIO \
-	-I$(top_srcdir)/src/image \
-	-I$(top_srcdir)/src/sysUtils \
-	$(all_includes)
-
-AM_LDFLAGS = -L$(top_builddir)/src -lpslib $(PSLIB_LIBS)
-
-TESTS = tst_psTime_01 \
-         tst_psTime_02 \
-         tst_psTime_03 \
-         tst_psTime_04 \
-         tst_psCoord \
-         tst_psCoord01 \
-         tst_psAstrometry \
-         tst_psAstrometry01
-
-check_PROGRAMS = $(TESTS)
-
-check_DATA = psTime.config \
-        test.psTime.config1 \
-        test.psTime.config2 \
-        test.psTime.config3 \
-        test.psTime.config4 \
-        test.ser7.dat
-
-TESTS_ENVIRONMENT = export PS_CONFIG_FILE="psTime.config" && perl $(top_srcdir)/test/runTest --verified=$(srcdir)/verified
-
-tests: $(check_DATA) $(TESTS)
-        
-tst_psTime_01_SOURCES = tst_psTime_01.c
-tst_psTime_02_SOURCES = tst_psTime_02.c
-tst_psTime_03_SOURCES = tst_psTime_03.c
-tst_psTime_04_SOURCES = tst_psTime_04.c
-tst_psAstrometry_SOURCES = tst_psAstrometry.c
-tst_psCoord_SOURCES = tst_psCoord.c
-tst_psCoord01_SOURCES = tst_psCoord01.c
-tst_psAstrometry01_SOURCES = tst_psAstrometry01.c
-
-EXTRA_DIST = data/test.psTime.config1.template \
-	data/test.psTime.config2.template \
-	data/test.psTime.config3.template \
-	data/test.psTime.config4.template \
-	data/test.ser7.dat \
-	verified 
-
-CLEANFILES = $(TESTS) $(check_DATA) temp/* core core.*
-
-psTime.config: $(top_srcdir)/etc/pslib/psTime.config.template
-	sed 's|PREFIX|$(top_srcdir)|' $? > $@
-
-test.psTime.config1: data/test.psTime.config1.template
-	cp $? $@
-
-test.psTime.config2: data/test.psTime.config2.template
-	sed 's|PREFIX|$(top_srcdir)|' $? > $@
-
-test.psTime.config3: data/test.psTime.config3.template
-	sed 's|PREFIX|$(top_srcdir)|' $? > $@
-
-test.psTime.config4: data/test.psTime.config4.template
-	cp $? $@
-
-test.ser7.dat: data/test.ser7.dat
-	cp $? $@
-
-test: check
-
-
Index: unk/psLib/test/astronomy/data/psTime.config.template
===================================================================
--- /trunk/psLib/test/astronomy/data/psTime.config.template	(revision 7207)
+++ 	(revision )
@@ -1,23 +1,0 @@
-# This configuration file specifies values required for time calculations by psLib.
-psLib.time.tables.dir STR PREFIX/share/pslib                                            # Directory for time tables
-psLib.time.tables.n S32 4                                                               # Number of time tables
-psLib.time.tables.files STR ser7.dat eopc01_1900_2004.dat finals_all.dat tai_utc.dat    # These are the table file names
-@psLib.time.tables.from F64 53258.0, 15020.0, 41684.0 2437300.5                         # Valid from these dates
-@psLib.time.tables.to F64 53622.0, 53258.0, 53627.0 2451179.5                           # Valid to these dates
-psLib.time.before.xp F64 0.0                                                            # Value of XP for before the earliest MJD
-psLib.time.before.yp F64 0.0                                                            # Value of YP for before the earliest MJD
-psLib.time.before.dut F64 0.0                                                           # Value of UT1-UTC for before the earliest MJD
-
-# Now follows formulae for predicting ahead of the most recent available table entry.
-# xp = [0] + [1]*cos A + [2]*sin A + [3]*cos C + [4]*sin C
-# yp = [0] + [1]*cos A + [2]*sin A + [3]*cos C + [4]*sin C
-# A = 2*pi*(MJD - pslib.time.predict.mjd)/365.25
-# C = 2*pi*(MJD - pslib.time.predict.mjd)/435.0
-# dut = ut1-utc = [0] + [1]*(MJD - [2]) - (UT2-UT1)
-# ut2-ut1 = 0.022 sin(2*pi*T) - 0.012 cos(2*pi*T) - 0.006 sin(4*pi*T) + 0.007 cos(4*pi*T)
-# T = 2000.0 + (MJD - 51544.03)/365.2422
-@psLib.time.predict.xp F64 0.0569, 0.0555, -0.0200, 0.0513, 0.1483
-@psLib.time.predict.yp F64 0.3498, -0.0176, -0.0498, 0.1483, -0.0513
-psLib.time.predict.mjd F64 53257.0
-@psLib.time.predict.dut F64 -0.4944, -0.00023, 53262.0
-
Index: unk/psLib/test/astronomy/data/test.psTime.config1.template
===================================================================
--- /trunk/psLib/test/astronomy/data/test.psTime.config1.template	(revision 7207)
+++ 	(revision )
@@ -1,23 +1,0 @@
-# This configuration file specifies values required for time calculations by psLib.
-psLib.time.tables.dir STR bogus                                                    # Directory for time tables
-psLib.time.tables.n S32 4                                                               # Number of time tables
-psLib.time.tables.files STR ser7.dat eopc01_1900_2004.dat finals_all.dat tai_utc.dat    # These are the table file names
-@psLib.time.tables.from F64 53258.0, 15020.0, 41684.0 2437300.5                         # Valid from these dates
-@psLib.time.tables.to F64 53622.0, 53258.0, 53627.0 2451179.5                           # Valid to these dates
-psLib.time.before.xp F64 0.0                                                            # Value of XP for before the earliest MJD
-psLib.time.before.yp F64 0.0                                                            # Value of YP for before the earliest MJD
-psLib.time.before.dut F64 0.0                                                           # Value of UT1-UTC for before the earliest MJD
-
-# Now follows formulae for predicting ahead of the most recent available table entry.
-# xp = [0] + [1]*cos A + [2]*sin A + [3]*cos C + [4]*sin C
-# yp = [0] + [1]*cos A + [2]*sin A + [3]*cos C + [4]*sin C
-# A = 2*pi*(MJD - pslib.time.predict.mjd)/365.25
-# C = 2*pi*(MJD - pslib.time.predict.mjd)/435.0
-# dut = ut1-utc = [0] + [1]*(MJD - [2]) - (UT2-UT1)
-# ut2-ut1 = 0.022 sin(2*pi*T) - 0.012 cos(2*pi*T) - 0.006 sin(4*pi*T) + 0.007 cos(4*pi*T)
-# T = 2000.0 + (MJD - 51544.03)/365.2422
-@psLib.time.predict.xp F64 0.0569, 0.0555, -0.0200, 0.0513, 0.1483
-@psLib.time.predict.yp F64 0.3498, -0.0176, -0.0498, 0.1483, -0.0513
-psLib.time.predict.mjd F64 53257.0
-@psLib.time.predict.dut F64 -0.4944, -0.00023, 53262.0
-
Index: unk/psLib/test/astronomy/data/test.psTime.config2.template
===================================================================
--- /trunk/psLib/test/astronomy/data/test.psTime.config2.template	(revision 7207)
+++ 	(revision )
@@ -1,23 +1,0 @@
-# This configuration file specifies values required for time calculations by psLib.
-psLib.time.tables.dir STR PREFIX/share/pslib                                            # Directory for time tables
-psLib.time.tables.n S32 4                                                               # Number of time tables
-psLib.time.tables.files STR eopc01_1900_2004.dat finals_all.dat tai_utc.dat    # These are the table file names
-@psLib.time.tables.from F64 53258.0, 15020.0, 41684.0 2437300.5                         # Valid from these dates
-@psLib.time.tables.to F64 53622.0, 53258.0, 53627.0 2451179.5                           # Valid to these dates
-psLib.time.before.xp F64 0.0                                                            # Value of XP for before the earliest MJD
-psLib.time.before.yp F64 0.0                                                            # Value of YP for before the earliest MJD
-psLib.time.before.dut F64 0.0                                                           # Value of UT1-UTC for before the earliest MJD
-
-# Now follows formulae for predicting ahead of the most recent available table entry.
-# xp = [0] + [1]*cos A + [2]*sin A + [3]*cos C + [4]*sin C
-# yp = [0] + [1]*cos A + [2]*sin A + [3]*cos C + [4]*sin C
-# A = 2*pi*(MJD - pslib.time.predict.mjd)/365.25
-# C = 2*pi*(MJD - pslib.time.predict.mjd)/435.0
-# dut = ut1-utc = [0] + [1]*(MJD - [2]) - (UT2-UT1)
-# ut2-ut1 = 0.022 sin(2*pi*T) - 0.012 cos(2*pi*T) - 0.006 sin(4*pi*T) + 0.007 cos(4*pi*T)
-# T = 2000.0 + (MJD - 51544.03)/365.2422
-@psLib.time.predict.xp F64 0.0569, 0.0555, -0.0200, 0.0513, 0.1483
-@psLib.time.predict.yp F64 0.3498, -0.0176, -0.0498, 0.1483, -0.0513
-psLib.time.predict.mjd F64 53257.0
-@psLib.time.predict.dut F64 -0.4944, -0.00023, 53262.0
-
Index: unk/psLib/test/astronomy/data/test.psTime.config3.template
===================================================================
--- /trunk/psLib/test/astronomy/data/test.psTime.config3.template	(revision 7207)
+++ 	(revision )
@@ -1,23 +1,0 @@
-# This configuration file specifies values required for time calculations by psLib.
-psLib.time.tables.dir STR PREFIX/share/pslib                                            # Directory for time tables
-psLib.time.tables.n S32 4                                                               # Number of time tables
-psLib.time.tables.files STR ser7.dat eopc01_1900_2004.dat finals_all.dat tai_utc.dat    # These are the table file names
-@psLib.time.tables.from F64 15020.0, 41684.0 2437300.5                         # Valid from these dates
-@psLib.time.tables.to F64 53622.0, 53258.0, 53627.0 2451179.5                           # Valid to these dates
-psLib.time.before.xp F64 0.0                                                            # Value of XP for before the earliest MJD
-psLib.time.before.yp F64 0.0                                                            # Value of YP for before the earliest MJD
-psLib.time.before.dut F64 0.0                                                           # Value of UT1-UTC for before the earliest MJD
-
-# Now follows formulae for predicting ahead of the most recent available table entry.
-# xp = [0] + [1]*cos A + [2]*sin A + [3]*cos C + [4]*sin C
-# yp = [0] + [1]*cos A + [2]*sin A + [3]*cos C + [4]*sin C
-# A = 2*pi*(MJD - pslib.time.predict.mjd)/365.25
-# C = 2*pi*(MJD - pslib.time.predict.mjd)/435.0
-# dut = ut1-utc = [0] + [1]*(MJD - [2]) - (UT2-UT1)
-# ut2-ut1 = 0.022 sin(2*pi*T) - 0.012 cos(2*pi*T) - 0.006 sin(4*pi*T) + 0.007 cos(4*pi*T)
-# T = 2000.0 + (MJD - 51544.03)/365.2422
-@psLib.time.predict.xp F64 0.0569, 0.0555, -0.0200, 0.0513, 0.1483
-@psLib.time.predict.yp F64 0.3498, -0.0176, -0.0498, 0.1483, -0.0513
-psLib.time.predict.mjd F64 53257.0
-@psLib.time.predict.dut F64 -0.4944, -0.00023, 53262.0
-
Index: unk/psLib/test/astronomy/data/test.psTime.config4.template
===================================================================
--- /trunk/psLib/test/astronomy/data/test.psTime.config4.template	(revision 7207)
+++ 	(revision )
@@ -1,23 +1,0 @@
-# This configuration file specifies values required for time calculations by psLib.
-psLib.time.tables.dir STR .                                                             # Directory for time tables
-psLib.time.tables.n S32 1                                                               # Number of time tables
-psLib.time.tables.files STR test.ser7.dat                                               # This the table file
-@psLib.time.tables.from F64 53258.0                                                     # Valid from this date
-@psLib.time.tables.to F64 53622.0                                                       # Valid to this date
-psLib.time.before.xp F64 0.0                                                            # Value of XP for before the earliest MJD
-psLib.time.before.yp F64 0.0                                                            # Value of YP for before the earliest MJD
-psLib.time.before.dut F64 0.0                                                           # Value of UT1-UTC for before the earliest MJD
-
-# Now follows formulae for predicting ahead of the most recent available table entry.
-# xp = [0] + [1]*cos A + [2]*sin A + [3]*cos C + [4]*sin C
-# yp = [0] + [1]*cos A + [2]*sin A + [3]*cos C + [4]*sin C
-# A = 2*pi*(MJD - pslib.time.predict.mjd)/365.25
-# C = 2*pi*(MJD - pslib.time.predict.mjd)/435.0
-# dut = ut1-utc = [0] + [1]*(MJD - [2]) - (UT2-UT1)
-# ut2-ut1 = 0.022 sin(2*pi*T) - 0.012 cos(2*pi*T) - 0.006 sin(4*pi*T) + 0.007 cos(4*pi*T)
-# T = 2000.0 + (MJD - 51544.03)/365.2422
-@psLib.time.predict.xp F64 0.0569
-@psLib.time.predict.yp F64 0.3498
-psLib.time.predict.mjd F64 53257.0
-@psLib.time.predict.dut F64 -0.4944
-
Index: unk/psLib/test/astronomy/data/test.ser7.dat
===================================================================
--- /trunk/psLib/test/astronomy/data/test.ser7.dat	(revision 7207)
+++ 	(revision )
@@ -1,380 +1,0 @@
-#  ser7.dat
-#
-#  This file comes from http://maia.usno.navy.mil (Click on General Information about Earth Orientation). This
-#  file may also be directly downloaded from ftp://maia.usno.navy.mil/ser7/ser7.dat. See readme.ser7 (located
-#  in the psLib/data directory) for details.
-#
-#  @author Ross Harman, MHPCC
-#
-#  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
-#  @date $Date: 2005-02-17 01:58:43 $
-#
-#
-#        MJD         PM-x        PM-y       UT1-UTC
-#      (days)      (arcsec)    (arcsec)      (sec)
-        psF64        psF64       psF64       psF64
-        53yyy244       0.1377      0.5027     -0.45210
-        53245       0.1394      0.5015     -0.45190
-        53246       0.1411      0.5002     -0.45197
-        53247       0.1429      0.4989     -0.45234
-        53248       0.1447      0.4976     -0.45293
-        53249       0.1465      0.4962     -0.45361
-        53250       0.1484      0.4948     -0.45424
-        53251       0.1503      0.4934     -0.45476
-        53252       0.1521      0.4920     -0.45512
-        53253       0.1540      0.4905     -0.45530
-        53254       0.1558      0.4890     -0.45531
-        53255       0.1577      0.4874     -0.45519
-        53256       0.1595      0.4859     -0.45497
-        53257       0.1613      0.4843     -0.45474
-        53258       0.1631      0.4827     -0.45458
-        53259       0.1649      0.4810     -0.45456
-        53260       0.1667      0.4794     -0.45474
-        53261       0.1684      0.4777     -0.45514
-        53262       0.1701      0.4760     -0.45578
-        53263       0.1717      0.4742     -0.45660
-        53264       0.1734      0.4725     -0.45754
-        53265       0.1750      0.4707     -0.45849
-        53266       0.1765      0.4689     -0.45932
-        53267       0.1780      0.4671     -0.45996
-        53268       0.1795      0.4652     -0.46036
-        53269       0.1810      0.4634     -0.46055
-        53270       0.1824      0.4615     -0.46061
-        53271       0.1838      0.4596     -0.46068
-        53272       0.1852      0.4576     -0.46086
-        53273       0.1865      0.4557     -0.46126
-        53274       0.1878      0.4537     -0.46192
-        53275       0.1890      0.4517     -0.46280
-        53276       0.1902      0.4497     -0.46382
-        53277       0.1914      0.4477     -0.46486
-        53278       0.1925      0.4457     -0.46581
-        53279       0.1936      0.4436     -0.46658
-        53280       0.1946      0.4415     -0.46715
-        53281       0.1956      0.4394     -0.46750
-        53282       0.1966      0.4373     -0.46766
-        53283       0.1976      0.4352     -0.46772
-        53284       0.1985      0.4331     -0.46773
-        53285       0.1993      0.4309     -0.46778
-        53286       0.2001      0.4288     -0.46795
-        53287       0.2009      0.4266     -0.46830
-        53288       0.2017      0.4244     -0.46887
-        53289       0.2024      0.4222     -0.46968
-        53290       0.2031      0.4200     -0.47071
-        53291       0.2037      0.4178     -0.47191
-        53292       0.2043      0.4155     -0.47317
-        53293       0.2049      0.4133     -0.47435
-        53294       0.2054      0.4111     -0.47536
-        53295       0.2059      0.4088     -0.47610
-        53296       0.2063      0.4065     -0.47659
-        53297       0.2067      0.4042     -0.47691
-        53298       0.2071      0.4020     -0.47718
-        53299       0.2075      0.3997     -0.47755
-        53300       0.2078      0.3974     -0.47811
-        53301       0.2080      0.3951     -0.47893
-        53302       0.2083      0.3928     -0.47998
-        53303       0.2085      0.3905     -0.48119
-        53304       0.2086      0.3881     -0.48247
-        53305       0.2088      0.3858     -0.48369
-        53306       0.2089      0.3835     -0.48477
-        53307       0.2089      0.3812     -0.48565
-        53308       0.2090      0.3789     -0.48630
-        53309       0.2089      0.3765     -0.48674
-        53310       0.2089      0.3742     -0.48701
-        53311       0.2088      0.3719     -0.48718
-        53312       0.2088      0.3696     -0.48732
-        53313       0.2086      0.3672     -0.48753
-        53314       0.2085      0.3649     -0.48785
-        53315       0.2082      0.3626     -0.48835
-        53316       0.2080      0.3603     -0.48906
-        53317       0.2077      0.3579     -0.48997
-        53318       0.2074      0.3556     -0.49106
-        53319       0.2071      0.3533     -0.49226
-        53320       0.2067      0.3510     -0.49344
-        53321       0.2063      0.3487     -0.49449
-        53322       0.2059      0.3464     -0.49531
-        53323       0.2054      0.3441     -0.49585
-        53324       0.2049      0.3418     -0.49618
-        53325       0.2044      0.3396     -0.49639
-        53326       0.2038      0.3373     -0.49664
-        53327       0.2032      0.3350     -0.49705
-        53328       0.2026      0.3328     -0.49769
-        53329       0.2020      0.3305     -0.49854
-        53330       0.2013      0.3283     -0.49953
-        53331       0.2006      0.3261     -0.50058
-        53332       0.1999      0.3239     -0.50158
-        53333       0.1991      0.3217     -0.50243
-        53334       0.1983      0.3195     -0.50308
-        53335       0.1975      0.3173     -0.50350
-        53336       0.1967      0.3151     -0.50369
-        53337       0.1958      0.3130     -0.50370
-        53338       0.1949      0.3108     -0.50358
-        53339       0.1940      0.3087     -0.50342
-        53340       0.1931      0.3066     -0.50329
-        53341       0.1921      0.3045     -0.50327
-        53342       0.1911      0.3024     -0.50340
-        53343       0.1901      0.3004     -0.50372
-        53344       0.1890      0.2983     -0.50423
-        53345       0.1880      0.2963     -0.50493
-        53346       0.1869      0.2943     -0.50574
-        53347       0.1858      0.2923     -0.50660
-        53348       0.1846      0.2903     -0.50739
-        53349       0.1835      0.2883     -0.50808
-        53350       0.1823      0.2864     -0.50851
-        53351       0.1811      0.2844     -0.50870
-        53352       0.1799      0.2825     -0.50874
-        53353       0.1786      0.2807     -0.50875
-        53354       0.1773      0.2788     -0.50890
-        53355       0.1760      0.2769     -0.50927
-        53356       0.1747      0.2751     -0.50987
-        53357       0.1734      0.2733     -0.51064
-        53358       0.1720      0.2715     -0.51148
-        53359       0.1707      0.2698     -0.51228
-        53360       0.1693      0.2680     -0.51295
-        53361       0.1679      0.2663     -0.51342
-        53362       0.1664      0.2646     -0.51367
-        53363       0.1650      0.2629     -0.51371
-        53364       0.1635      0.2613     -0.51357
-        53365       0.1620      0.2596     -0.51330
-        53366       0.1605      0.2580     -0.51298
-        53367       0.1590      0.2565     -0.51268
-        53368       0.1575      0.2549     -0.51247
-        53369       0.1559      0.2534     -0.51241
-        53370       0.1543      0.2519     -0.51253
-        53371       0.1528      0.2504     -0.51283
-        53372       0.1511      0.2489     -0.51331
-        53373       0.1495      0.2475     -0.51391
-        53374       0.1479      0.2461     -0.51458
-        53375       0.1463      0.2447     -0.51522
-        53376       0.1446      0.2434     -0.51574
-        53377       0.1429      0.2420     -0.51605
-        53378       0.1412      0.2407     -0.51614
-        53379       0.1395      0.2395     -0.51605
-        53380       0.1378      0.2382     -0.51590
-        53381       0.1361      0.2370     -0.51585
-        53382       0.1344      0.2358     -0.51603
-        53383       0.1326      0.2347     -0.51648
-        53384       0.1308      0.2335     -0.51717
-        53385       0.1291      0.2324     -0.51800
-        53386       0.1273      0.2313     -0.51881
-        53387       0.1255      0.2303     -0.51951
-        53388       0.1237      0.2293     -0.52000
-        53389       0.1219      0.2283     -0.52027
-        53390       0.1200      0.2273     -0.52032
-        53391       0.1182      0.2264     -0.52018
-        53392       0.1164      0.2255     -0.51992
-        53393       0.1145      0.2246     -0.51959
-        53394       0.1126      0.2237     -0.51928
-        53395       0.1108      0.2229     -0.51905
-        53396       0.1089      0.2221     -0.51897
-        53397       0.1070      0.2213     -0.51908
-        53398       0.1051      0.2206     -0.51939
-        53399       0.1032      0.2199     -0.51987
-        53400       0.1013      0.2192     -0.52050
-        53401       0.0994      0.2186     -0.52119
-        53402       0.0975      0.2180     -0.52187
-        53403       0.0956      0.2174     -0.52246
-        53404       0.0936      0.2168     -0.52288
-        53405       0.0917      0.2163     -0.52309
-        53406       0.0898      0.2158     -0.52311
-        53407       0.0878      0.2153     -0.52305
-        53408       0.0859      0.2149     -0.52303
-        53409       0.0840      0.2144     -0.52321
-        53410       0.0820      0.2141     -0.52368
-        53411       0.0801      0.2137     -0.52444
-        53412       0.0781      0.2134     -0.52542
-        53413       0.0761      0.2131     -0.52646
-        53414       0.0742      0.2128     -0.52744
-        53415       0.0722      0.2126     -0.52822
-        53416       0.0703      0.2124     -0.52877
-        53417       0.0683      0.2122     -0.52907
-        53418       0.0663      0.2120     -0.52916
-        53419       0.0644      0.2119     -0.52910
-        53420       0.0624      0.2118     -0.52897
-        53421       0.0605      0.2117     -0.52883
-        53422       0.0585      0.2117     -0.52876
-        53423       0.0566      0.2117     -0.52882
-        53424       0.0546      0.2117     -0.52907
-        53425       0.0526      0.2118     -0.52951
-        53426       0.0507      0.2118     -0.53014
-        53427       0.0487      0.2119     -0.53091
-        53428       0.0468      0.2121     -0.53174
-        53429       0.0449      0.2122     -0.53254
-        53430       0.0429      0.2124     -0.53321
-        53431       0.0410      0.2126     -0.53368
-        53432       0.0391      0.2129     -0.53392
-        53433       0.0372      0.2131     -0.53393
-        53434       0.0352      0.2134     -0.53380
-        53435       0.0333      0.2138     -0.53366
-        53436       0.0314      0.2141     -0.53365
-        53437       0.0296      0.2145     -0.53389
-        53438       0.0277      0.2149     -0.53443
-        53439       0.0258      0.2154     -0.53526
-        53440       0.0239      0.2159     -0.53627
-        53441       0.0221      0.2164     -0.53733
-        53442       0.0202      0.2169     -0.53830
-        53443       0.0184      0.2174     -0.53908
-        53444       0.0166      0.2180     -0.53964
-        53445       0.0147      0.2186     -0.53998
-        53446       0.0129      0.2192     -0.54014
-        53447       0.0111      0.2198     -0.54018
-        53448       0.0093      0.2205     -0.54018
-        53449       0.0076      0.2212     -0.54022
-        53450       0.0058      0.2219     -0.54037
-        53451       0.0040      0.2227     -0.54069
-        53452       0.0023      0.2234     -0.54118
-        53453       0.0005      0.2242     -0.54185
-        53454      -0.0012      0.2250     -0.54266
-        53455      -0.0029      0.2258     -0.54356
-        53456      -0.0046      0.2267     -0.54447
-        53457      -0.0063      0.2276     -0.54530
-        53458      -0.0079      0.2285     -0.54598
-        53459      -0.0096      0.2294     -0.54647
-        53460      -0.0112      0.2303     -0.54675
-        53461      -0.0128      0.2313     -0.54688
-        53462      -0.0144      0.2323     -0.54699
-        53463      -0.0160      0.2333     -0.54724
-        53464      -0.0176      0.2343     -0.54775
-        53465      -0.0191      0.2353     -0.54858
-        53466      -0.0207      0.2364     -0.54970
-        53467      -0.0222      0.2375     -0.55097
-        53468      -0.0237      0.2386     -0.55228
-        53469      -0.0252      0.2397     -0.55354
-        53470      -0.0267      0.2408     -0.55465
-        53471      -0.0281      0.2420     -0.55556
-        53472      -0.0295      0.2431     -0.55626
-        53473      -0.0310      0.2443     -0.55677
-        53474      -0.0323      0.2455     -0.55715
-        53475      -0.0337      0.2468     -0.55748
-        53476      -0.0351      0.2480     -0.55785
-        53477      -0.0364      0.2493     -0.55833
-        53478      -0.0377      0.2505     -0.55899
-        53479      -0.0390      0.2518     -0.55988
-        53480      -0.0403      0.2531     -0.56095
-        53481      -0.0415      0.2545     -0.56216
-        53482      -0.0427      0.2558     -0.56347
-        53483      -0.0439      0.2572     -0.56478
-        53484      -0.0451      0.2585     -0.56599
-        53485      -0.0463      0.2599     -0.56699
-        53486      -0.0474      0.2613     -0.56769
-        53487      -0.0485      0.2627     -0.56808
-        53488      -0.0496      0.2641     -0.56824
-        53489      -0.0507      0.2656     -0.56830
-        53490      -0.0517      0.2670     -0.56839
-        53491      -0.0527      0.2685     -0.56860
-        53492      -0.0537      0.2700     -0.56897
-        53493      -0.0547      0.2714     -0.56955
-        53494      -0.0556      0.2729     -0.57032
-        53495      -0.0565      0.2744     -0.57119
-        53496      -0.0574      0.2760     -0.57204
-        53497      -0.0583      0.2775     -0.57277
-        53498      -0.0591      0.2790     -0.57329
-        53499      -0.0600      0.2806     -0.57354
-        53500      -0.0607      0.2821     -0.57350
-        53501      -0.0615      0.2837     -0.57328
-        53502      -0.0622      0.2853     -0.57298
-        53503      -0.0630      0.2869     -0.57261
-        53504      -0.0636      0.2885     -0.57218
-        53505      -0.0643      0.2901     -0.57175
-        53506      -0.0649      0.2917     -0.57143
-        53507      -0.0655      0.2933     -0.57124
-        53508      -0.0661      0.2949     -0.57117
-        53509      -0.0667      0.2966     -0.57124
-        53510      -0.0672      0.2982     -0.57139
-        53511      -0.0677      0.2999     -0.57158
-        53512      -0.0682      0.3015     -0.57166
-        53513      -0.0686      0.3032     -0.57155
-        53514      -0.0690      0.3048     -0.57116
-        53515      -0.0694      0.3065     -0.57057
-        53516      -0.0698      0.3082     -0.56989
-        53517      -0.0701      0.3098     -0.56921
-        53518      -0.0704      0.3115     -0.56860
-        53519      -0.0707      0.3132     -0.56818
-        53520      -0.0710      0.3149     -0.56799
-        53521      -0.0712      0.3166     -0.56800
-        53522      -0.0714      0.3183     -0.56809
-        53523      -0.0716      0.3200     -0.56815
-        53524      -0.0717      0.3217     -0.56808
-        53525      -0.0718      0.3234     -0.56781
-        53526      -0.0719      0.3251     -0.56728
-        53527      -0.0720      0.3268     -0.56651
-        53528      -0.0720      0.3285     -0.56557
-        53529      -0.0720      0.3302     -0.56454
-        53530      -0.0720      0.3319     -0.56347
-        53531      -0.0720      0.3336     -0.56244
-        53532      -0.0719      0.3353     -0.56148
-        53533      -0.0718      0.3370     -0.56060
-        53534      -0.0717      0.3387     -0.55990
-        53535      -0.0715      0.3404     -0.55943
-        53536      -0.0713      0.3421     -0.55916
-        53537      -0.0711      0.3438     -0.55897
-        53538      -0.0709      0.3455     -0.55881
-        53539      -0.0707      0.3472     -0.55859
-        53540      -0.0704      0.3489     -0.55820
-        53541      -0.0701      0.3506     -0.55751
-        53542      -0.0697      0.3523     -0.55650
-        53543      -0.0694      0.3540     -0.55529
-        53544      -0.0690      0.3557     -0.55402
-        53545      -0.0686      0.3573     -0.55279
-        53546      -0.0682      0.3590     -0.55173
-        53547      -0.0677      0.3607     -0.55093
-        53548      -0.0673      0.3623     -0.55037
-        53549      -0.0668      0.3640     -0.54994
-        53550      -0.0662      0.3656     -0.54947
-        53551      -0.0657      0.3673     -0.54884
-        53552      -0.0651      0.3689     -0.54798
-        53553      -0.0645      0.3705     -0.54689
-        53554      -0.0639      0.3721     -0.54560
-        53555      -0.0633      0.3738     -0.54414
-        53556      -0.0626      0.3754     -0.54257
-        53557      -0.0620      0.3770     -0.54101
-        53558      -0.0613      0.3786     -0.53952
-        53559      -0.0605      0.3801     -0.53819
-        53560      -0.0598      0.3817     -0.53705
-        53561      -0.0590      0.3833     -0.53611
-        53562      -0.0583      0.3848     -0.53535
-        53563      -0.0575      0.3864     -0.53475
-        53564      -0.0566      0.3879     -0.53425
-        53565      -0.0558      0.3895     -0.53374
-        53566      -0.0549      0.3910     -0.53315
-        53567      -0.0541      0.3925     -0.53243
-        53568      -0.0532      0.3940     -0.53152
-        53569      -0.0523      0.3955     -0.53042
-        53570      -0.0513      0.3969     -0.52913
-        53571      -0.0504      0.3984     -0.52776
-        53572      -0.0494      0.3998     -0.52644
-        53573      -0.0485      0.4013     -0.52532
-        53574      -0.0475      0.4027     -0.52451
-        53575      -0.0464      0.4041     -0.52400
-        53576      -0.0454      0.4055     -0.52377
-        53577      -0.0444      0.4069     -0.52366
-        53578      -0.0433      0.4083     -0.52344
-        53579      -0.0423      0.4096     -0.52299
-        53580      -0.0412      0.4110     -0.52228
-        53581      -0.0401      0.4123     -0.52130
-        53582      -0.0390      0.4136     -0.52010
-        53583      -0.0378      0.4149     -0.51872
-        53584      -0.0367      0.4162     -0.51725
-        53585      -0.0356      0.4175     -0.51578
-        53586      -0.0344      0.4188     -0.51436
-        53587      -0.0332      0.4200     -0.51310
-        53588      -0.0320      0.4212     -0.51204
-        53589      -0.0309      0.4224     -0.51120
-        53590      -0.0297      0.4236     -0.51055
-        53591      -0.0284      0.4248     -0.51006
-        53592      -0.0272      0.4260     -0.50966
-        53593      -0.0260      0.4271     -0.50922
-        53594      -0.0247      0.4283     -0.50872
-        53595      -0.0235      0.4294     -0.50809
-        53596      -0.0222      0.4305     -0.50729
-        53597      -0.0210      0.4315     -0.50638
-        53598      -0.0197      0.4326     -0.50535
-        53599      -0.0184      0.4336     -0.50431
-        53600      -0.0171      0.4347     -0.50339
-        53601      -0.0158      0.4357     -0.50273
-        53602      -0.0145      0.4367     -0.50244
-        53603      -0.0132      0.4376     -0.50247
-        53604      -0.0119      0.4386     -0.50267
-        53605      -0.0106      0.4395     -0.50286
-        53606      -0.0093      0.4404     -0.50287
-        53607      -0.0079      0.4413     -0.50263
-        53608      -0.0066      0.4422     -0.50217
Index: unk/psLib/test/astronomy/tst_psAstrometry.c
===================================================================
--- /trunk/psLib/test/astronomy/tst_psAstrometry.c	(revision 7207)
+++ 	(revision )
@@ -1,786 +1,0 @@
-/** @file  tst_psAstrometry.c
- *
- *  @brief Contains the tests for psAstrometry.[ch]
- *
- *  @author Robert DeSonia, MHPCC
- *
- *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-04-18 23:55:29 $
- *
- *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
- */
-
-#include "config.h"
-
-#include <math.h>
-#include <string.h>
-
-#include "psTest.h"
-#include "pslib_strict.h"
-
-static psS32 testExposureAlloc(void);
-static psS32 testObservatoryAlloc(void);
-static psS32 testFPAAlloc(void);
-static psS32 testChipAlloc(void);
-static psS32 testCellAlloc(void);
-static psS32 testReadoutAlloc(void);
-
-testDescription tests[] = {
-                              {testExposureAlloc,735,"psExposureAlloc",0,false},
-                              {testObservatoryAlloc,736,"psObservatoryAlloc",0,false},
-                              {testFPAAlloc,739,"psFPAAlloc",0,false},
-                              {testChipAlloc,740,"psChipAlloc",0,false},
-                              {testCellAlloc,741,"psCellAlloc",0,false},
-                              {testReadoutAlloc,742,"psReadoutAlloc",0,false},
-                              {NULL}
-                          };
-
-psS32 main(psS32 argc, char* argv[])
-{
-    psLogSetLevel(PS_LOG_INFO);
-
-    return ! runTestSuite(stderr,"psAstrometry",tests,argc,argv);
-}
-
-static psS32 testExposureAlloc(void)
-{
-    psTime* now = psTimeGetNow(PS_TIME_UTC);
-    char* name = "The Kaiser Royal Observatory";
-
-    psObservatory* obs = psObservatoryAlloc(name,
-                                            20.7, 156.3, 3055.0, 9.0);
-
-    psExposure* exp = psExposureAlloc(1.0, 2.0, 3.0, 4.0, 5.0,
-                                      now, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, obs);
-
-    if (fabs(exp->ra - 1.0) > DBL_EPSILON) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psExposureAlloc did not set ra.");
-        return 1;
-    }
-
-    if (fabs(exp->dec - 2.0) > DBL_EPSILON) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psExposureAlloc did not set dec.");
-        return 2;
-    }
-
-    if (fabs(exp->hourAngle - 3.0) > DBL_EPSILON) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psExposureAlloc did not set hourAngle.");
-        return 3;
-    }
-
-    if (fabs(exp->zenithDistance - 4.0) > DBL_EPSILON) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psExposureAlloc did not set zenithDistance.");
-        return 4;
-    }
-
-    if (fabs(exp->azimuth - 5.0) > DBL_EPSILON) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psExposureAlloc did not set azimuth.");
-        return 5;
-    }
-    if (exp->time != now) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psExposureAlloc did not set time.");
-        return 6;
-    }
-
-    if (fabsf(exp->rotAngle - 6.0f) > FLT_EPSILON) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psExposureAlloc did not set rotAngle.");
-        return 7;
-    }
-
-    if (fabsf(exp->temperature - 7.0f) > FLT_EPSILON) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psExposureAlloc did not set temperature.");
-        return 8;
-    }
-
-    if (fabsf(exp->pressure - 8.0f) > FLT_EPSILON) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psExposureAlloc did not set pressure.");
-        return 9;
-    }
-
-    if (fabsf(exp->humidity - 9.0f) > FLT_EPSILON) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psExposureAlloc did not set humidity.");
-        return 10;
-    }
-
-    if (fabsf(exp->exposureTime - 10.0f) > FLT_EPSILON) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psExposureAlloc did not set exposureTime.");
-        return 11;
-    }
-
-    if (fabsf(exp->wavelength - 11.0f) > FLT_EPSILON) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psExposureAlloc did not set wavelength.");
-        return 12;
-    }
-
-    if (exp->observatory != obs) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psExposureAlloc did not set wavelength.");
-        return 12;
-    }
-
-    psFree(exp);
-    psFree(now);
-    psFree(obs);
-    psLibFinalize();
-    return 0;
-}
-
-static psS32 testObservatoryAlloc(void)
-{
-    char* name = "The Kaiser Royal Observatory";
-
-    psObservatory* obs = psObservatoryAlloc(name,
-                                            20.7*M_PI/180.0, 156.3*M_PI/180.0, 3055.0, 9.0);
-
-    if (fabs(obs->latitude - 20.7*M_PI/180.0) > DBL_EPSILON) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psObservatoryAlloc did not set latitude.");
-        return 1;
-    }
-
-    if (fabs(obs->longitude - 156.3*M_PI/180.0) > DBL_EPSILON) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psObservatoryAlloc did not set longitude.");
-        return 2;
-    }
-
-    if (fabs(obs->height - 3055.0) > DBL_EPSILON) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psObservatoryAlloc did not set height.");
-        return 3;
-    }
-
-    if (fabs(obs->tlr - 9.0) > DBL_EPSILON) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psObservatoryAlloc did not set tlr.");
-        return 4;
-    }
-
-    if (strcmp(obs->name,name) != 0) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psObservatoryAlloc did not set name.");
-        return 5;
-    }
-
-    if (obs->name == name) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psObservatoryAlloc did not copy name.");
-        return 6;
-    }
-
-    psObservatory* obs2 = psObservatoryAlloc(NULL,
-                          20.7*M_PI/180.0, 156.3*M_PI/180.0, 3055.0, 9.0);
-
-    if (obs2->name != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psObservatoryAlloc did not handle NULL name.");
-        return 7;
-    }
-
-    psFree(obs);
-    psFree(obs2);
-
-    return 0;
-}
-
-static psS32 testFPAAlloc(void)
-{
-
-    psTime* now = psTimeGetNow(PS_TIME_TAI);
-    char* name = "The Kaiser Royal Observatory";
-
-    psObservatory* obs = psObservatoryAlloc(name,
-                                            20.7*M_PI/180.0, 156.3*M_PI/180.0, 3055.0, 0.0065f);
-
-    psExposure* exp = psExposureAlloc(1.0, 2.0, 3.0, 4.0, 5.0,
-                                      now, 6.0f, 260.0f, 1013.0f, 0.7f, 10.0f, 0.650f, obs);
-
-    /*
-        1. Call psFPAAlloc with nChips > 0 and a non-NULL psExposure.
-        a) Verify that the psExposure reference is: 1. is set in struct as
-        exposure; 2. its reference count is incremented.
-        b) Verify that the chip attribute is of the size specified by the
-        parameter nChips and that the chips array elements are all NULL.
-        c) verify that all other references in the struct is NULL.
-    */
-
-    psFPA* fpa = psFPAAlloc(8, exp);
-
-    if (fpa == NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psFPAAlloc returned a NULL.");
-        return 1;
-    }
-
-    if (fpa->exposure != exp) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psFPAAlloc did not set the exposure.");
-        return 2;
-    }
-
-    if (psMemGetRefCounter(exp) != 2) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psFPAAlloc did not increment reference counter for exposure.");
-        return 3;
-    }
-
-    if (fpa->chips->n != 0) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psFPAAlloc did not set the number of chips properly.");
-        return 4;
-    }
-
-    if (fpa->chips->nalloc != 8) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psFPAAlloc did not allocate space for the number of chips properly.");
-        return 4;
-    }
-
-    for (psS32 lcv=0; lcv < 8; lcv++) {
-        if (fpa->chips->data[lcv] != NULL) {
-            psLogMsg(__func__,PS_LOG_ERROR,
-                     "psFPAAlloc did not set chip %d to NULL.", lcv);
-            return 5;
-        }
-    }
-
-    if (fpa->metadata != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psFPAAlloc did not set metadata to NULL.");
-        return 6;
-    }
-
-    if (fpa->fromTangentPlane != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psFPAAlloc did not set fromTangentPlane to NULL.");
-        return 7;
-    }
-
-    if (fpa->toTangentPlane != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psFPAAlloc did not set toTangentPlane to NULL.");
-        return 8;
-    }
-
-    if (fpa->pattern != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psFPAAlloc did not set pattern to NULL.");
-        return 9;
-    }
-
-    if (fpa->grommit == NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psFPAAlloc did not set grommit using given exposure.");
-        return 10;
-    }
-
-    if (fpa->colorPlus != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psFPAAlloc did not set colorPlus to NULL.");
-        return 11;
-    }
-
-    if (fpa->colorMinus != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psFPAAlloc did not set colorMinus to NULL.");
-        return 12;
-    }
-
-    if (fpa->projection != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psFPAAlloc did not set projection to NULL.");
-        return 13;
-    }
-
-    /*
-        2. Call psFPAAlloc with nChips = 0. Verify that the chips array is
-           zero in size and the program execution does not stop.
-    */
-
-    psFPA* fpa2 = psFPAAlloc(0,exp);
-
-    if (fpa2->chips->n != 0) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psFPAAlloc did not set the number of chips properly.");
-        return 14;
-    }
-
-    if (fpa2->chips->nalloc != 0) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psFPAAlloc did not set the nalloc number of chips properly.");
-        return 14;
-    }
-
-    /*
-        3. Call psFPAAlloc with a NULL psExposure. Verify that the program
-           execution doe not stop and the exposure attribute is NULL.
-    */
-
-    psFPA* fpa3 = psFPAAlloc(4,NULL);
-    if (fpa3->exposure != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psFPAAlloc did not set the exposure to NULL given NULL parameter.");
-        return 15;
-    }
-
-    /*
-        4. Call psFPAAlloc and set all references in the struct to a memory
-           buffer. Verify that psFree cleans up all the buffers referenced in
-           the struct, i.e., there is no memory leaks generated.
-    */
-
-    fpa->chips->n = fpa->chips->nalloc;
-    for (psS32 lcv=0; lcv < 8; lcv++) {
-        fpa->chips->data[lcv] = psAlloc(4);
-    }
-
-    fpa->metadata = psAlloc(4);
-    fpa->fromTangentPlane = psAlloc(4);
-    fpa->toTangentPlane = psAlloc(4);
-    fpa->pattern = psAlloc(4);
-    fpa->colorPlus  = psAlloc(4);
-    fpa->colorMinus  = psAlloc(4);
-    fpa->projection  = psAlloc(4);
-
-    psFree(fpa3);
-    psFree(fpa2);
-    psFree(fpa);
-    psFree(exp);
-    psFree(obs);
-    psFree(now);
-    psLibFinalize();
-
-    return 0;
-}
-
-static psS32 testChipAlloc(void)
-{
-    char* name = "The Kaiser Royal Observatory";
-
-    psTime* now = psTimeGetNow(PS_TIME_TAI);
-
-    psObservatory* obs = psObservatoryAlloc(name,
-                                            20.7*M_PI/180.0, 156.3*M_PI/180.0, 3055.0, 0.0065f);
-
-    psExposure* exp = psExposureAlloc(1.0, 2.0, 3.0, 4.0, 5.0,
-                                      now, 6.0f, 260.0f, 1013.0f, 0.7f, 10.0f, 0.650f, obs);
-
-    psFPA* fpa = psFPAAlloc(8, exp);
-
-    // N.B. psFPAAlloc made made a reference to any of these that it is
-    // referencing, so these don't necessary are actually freed here.  Just
-    // these references to the buffers are freed.
-    psFree(exp);
-    psFree(obs);
-    psFree(now);
-
-    /*
-        1. invoke psChipAlloc with nCells > 0 and parentFPA non-NULL. Verify
-           that:
-        a. the cells array is of the size nCells and all elements are NULL.
-        b. parent attribute is set to parentFPA parameter and the ref. count
-           was incremented.
-        c. all other attributes are initialized to NULL or 0.
-    */
-
-    psChip* chip = psChipAlloc(8, fpa);
-
-    if (chip == NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psChipAlloc returned NULL.");
-        return 1;
-    }
-
-    if (chip->cells->n != 0) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psChipAlloc did not set the number of cells properly.");
-        return 2;
-    }
-
-    if (chip->cells->nalloc != 8) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psChipAlloc did not allocate cell array size properly.");
-        return 2;
-    }
-
-    for (psS32 lcv=0; lcv < 8; lcv++) {
-        if (chip->cells->data[lcv] != NULL) {
-            psLogMsg(__func__,PS_LOG_ERROR,
-                     "psChipAlloc did not set cell %d to NULL.", lcv);
-            return 3;
-        }
-        chip->cells->data[lcv] = psAlloc(4); // to check if these are freed.
-    }
-    chip->cells->n = 8;
-
-    if (chip->parent != fpa) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psChipAlloc did not set the parent properly.");
-        return 4;
-    }
-
-    if (psMemGetRefCounter(fpa) != 1) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psChipAlloc incremented reference counter for parent FPA.");
-        return 5;
-    }
-
-    if (chip->metadata != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psChipAlloc did not set metadata to NULL.");
-        return 6;
-    }
-    chip->metadata = psAlloc(4); // to check if these are freed.
-
-    if (chip->toFPA != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psChipAlloc did not set toFPA to NULL.");
-        return 7;
-    }
-    chip->toFPA = psAlloc(4); // to check if these are freed.
-
-    if (chip->fromFPA != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psChipAlloc did not set fromFPA to NULL.");
-        return 8;
-    }
-    chip->fromFPA = psAlloc(4); // to check if these are freed.
-
-    /*
-        2. invoke psChipAlloc with nCells = 0. Verify that:
-        a. execution does not halt
-        b. the cells array is of the size of one.
-    */
-
-    psChip* chip2 = psChipAlloc(0,fpa);
-
-    if (chip2 == NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psChipAlloc returned NULL.");
-        return 11;
-    }
-
-    if (chip2->cells->n != 0) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psChipAlloc did not set the number of cells properly.");
-        return 12;
-    }
-
-    if (chip2->cells->nalloc != 1) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psChipAlloc did not allocate cell array size properly.");
-        return 12;
-    }
-
-    if (chip2->parent != fpa) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psChipAlloc did not set the parent properly.");
-        return 14;
-    }
-
-    if (psMemGetRefCounter(fpa) != 1) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psChipAlloc incremented reference counter for parent FPA.");
-        return 15;
-    }
-
-    /*
-        3. invoke psChipAlloc with parentFPA = NULL. Verify that parent
-           attribute is NULL and no error is generated.
-    */
-
-    psChip* chip3 = psChipAlloc(8,NULL);
-
-    if (chip3 == NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psChipAlloc returned NULL.");
-        return 21;
-    }
-
-    if (chip3->cells->n != 0) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psChipAlloc did not set the number of cells properly.");
-        return 22;
-    }
-
-    if (chip3->cells->nalloc != 8) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psChipAlloc did not allocate cell array properly.");
-        return 23;
-    }
-
-    if (chip3->parent != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psChipAlloc did not set the parent to NULL.");
-        return 24;
-    }
-
-    psFree(chip);
-    psFree(chip2);
-    psFree(chip3);
-    psFree(fpa);
-    psLibFinalize();
-
-    return 0;
-}
-
-static psS32 testCellAlloc(void)
-{
-    char* name = "The Kaiser Royal Observatory";
-
-    psTime* now = psTimeGetNow(PS_TIME_TAI);
-
-    psObservatory* obs = psObservatoryAlloc(name,
-                                            20.7*M_PI/180.0,
-                                            156.3*M_PI/180.0,
-                                            3055.0,
-                                            0.0065f);
-
-    psExposure* exp = psExposureAlloc(1.0,
-                                      2.0,
-                                      3.0,
-                                      4.0,
-                                      5.0,
-                                      now,
-                                      6.0f,
-                                      260.0f,
-                                      1013.0f,
-                                      0.7f,
-                                      10.0f,
-                                      0.650f,
-                                      obs);
-
-    psFPA* fpa = psFPAAlloc(8, exp);
-
-    psChip* chip = psChipAlloc(8, fpa);
-
-    // N.B. psChipAlloc made a reference to any of these that it is
-    // referencing, so these are not actually freed here.  Just
-    // these references to the buffers are freed.
-    psFree(fpa);
-    psFree(exp);
-    psFree(obs);
-    psFree(now);
-
-    /*
-        1. invoke psCellAlloc with nReadouts > 0 and parentChip non-NULL. Verify that:
-        a. the readouts array is of the size nReadouts and all elements are NULL.
-        b. parent attribute is set to parentChip parameter and the ref. count
-           was incremented.
-        c. all other attributes are initialized to NULL or 0.
-    */
-
-    psCell* cell1 = psCellAlloc(8,chip);
-
-    if (cell1 == NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psCellAlloc returned NULL.");
-        return 1;
-    }
-
-    if (cell1->readouts->n != 0) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psCellAlloc did not set the number of readouts properly.");
-        return 2;
-    }
-
-    if (cell1->readouts->nalloc != 8) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psCellAlloc did not allocat the readout array properly.");
-        return 2;
-    }
-
-    for (psS32 lcv=0; lcv < 8; lcv++) {
-        if (cell1->readouts->data[lcv] != NULL) {
-            psLogMsg(__func__,PS_LOG_ERROR,
-                     "psCellAlloc did not set readout %d to NULL.", lcv);
-            return 3;
-        }
-        cell1->readouts->data[lcv] = psAlloc(4); // to check if these are freed.
-    }
-    cell1->readouts->n = 8;
-
-    if (cell1->parent != chip) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psCellAlloc did not set the parent properly.");
-        return 4;
-    }
-
-    if (psMemGetRefCounter(chip) != 1) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psCellAlloc incremented reference counter for parent.");
-        return 5;
-    }
-
-    if (cell1->metadata != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psCellAlloc did not set metadata to NULL.");
-        return 6;
-    }
-    cell1->metadata = psAlloc(4); // to check if these are freed.
-
-    if (cell1->toChip != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psCellAlloc did not set toChip to NULL.");
-        return 7;
-    }
-    cell1->toChip = psAlloc(4); // to check if these are freed.
-
-    if (cell1->fromChip != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psCellAlloc did not set fromChip to NULL.");
-        return 8;
-    }
-    cell1->fromChip = psAlloc(4); // to check if these are freed.
-
-    if (cell1->toFPA != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psCellAlloc did not set toFPA to NULL.");
-        return 9;
-    }
-    cell1->toFPA = psAlloc(4); // to check if these are freed.
-
-    if (cell1->toTP != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psCellAlloc did not set toTP to NULL.");
-        return 10;
-    }
-    cell1->toTP = psAlloc(4); // to check if these are freed.
-
-    /*
-        2. invoke psChipAlloc with nCells = 0. Verify that:
-        a. execution does not halt
-        b. the cells array is of the size of one.
-    */
-
-    psCell* cell2 = psCellAlloc(0,chip);
-
-    if (cell2 == NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psCellAlloc returned NULL.");
-        return 11;
-    }
-
-    if (cell2->readouts->n != 0) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psCellAlloc did not set the number of readouts properly.");
-        return 12;
-    }
-
-    if (cell2->readouts->nalloc != 1) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psCellAlloc did not allocate the readout array properly.");
-        return 13;
-    }
-
-    if (cell2->parent != chip) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psCellAlloc did not set the parent properly.");
-        return 14;
-    }
-
-    if (psMemGetRefCounter(chip) != 1) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psCellAlloc incremented reference counter for parent FPA.");
-        return 15;
-    }
-
-    /*
-        3. invoke psChipAlloc with parentFPA = NULL. Verify that parent
-           attribute is NULL and no error is generated.
-    */
-
-    psCell* cell3 = psCellAlloc(8,NULL);
-
-    if (cell3 == NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psCellAlloc returned NULL.");
-        return 21;
-    }
-
-    if (cell3->readouts->n != 0) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psCellAlloc did not set the number of cells properly.");
-        return 22;
-    }
-
-    if (cell3->readouts->nalloc != 8) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psCellAlloc did not set the number of cells properly.");
-        return 23;
-    }
-
-    if (cell3->parent != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psCellAlloc did not set the parent to NULL.");
-        return 24;
-    }
-
-    psFree(chip);
-    psFree(cell1);
-    psFree(cell2);
-    psFree(cell3);
-    psLibFinalize();
-
-    return 0;
-}
-
-static psS32 testReadoutAlloc(void)
-{
-    psReadout* readout = psReadoutAlloc();
-
-    if (readout == NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psReadoutAlloc returned NULL.");
-        return 1;
-    }
-
-    if (readout->col0 != 0) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psReadoutAlloc did not set col0 properly.");
-        return 2;
-    }
-
-    if (readout->row0 != 0) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psReadoutAlloc did not set row0 properly.");
-        return 3;
-    }
-
-    if (readout->image != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psReadoutAlloc did not set the image properly.");
-        return 4;
-    }
-
-    readout->image = psAlloc(4); // to check if these are freed.
-
-    if (readout->metadata != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psReadoutAlloc did not set metadata to NULL.");
-        return 6;
-    }
-    readout->metadata = psAlloc(4); // to check if these are freed.
-
-    if (readout->mask != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psReadoutAlloc did not set mask to NULL.");
-        return 7;
-    }
-    readout->mask = psAlloc(4); // to check if these are freed.
-
-    if (readout->objects != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,
-                 "psReadoutAlloc did not set objects to NULL.");
-        return 8;
-    }
-    readout->objects = psAlloc(4); // to check if these are freed.
-
-    /*
-        2. invoke psReadoutAlloc with NULL image. Verify that:
-        a. execution does not halt
-        b. the image attribute is NULL.
-    */
-
-    psReadout* readout2 = psReadoutAlloc(3,4,NULL);
-
-    if (readout2 == NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psReadoutAlloc returned NULL.");
-        return 11;
-    }
-
-    if (readout2->image != NULL) {
-        psLogMsg(__func__,PS_LOG_ERROR,"psReadoutAlloc didn't set image to NULL, as given.");
-        return 12;
-    }
-
-    psFree(readout);
-    psFree(readout2);
-
-    return 0;
-}
Index: unk/psLib/test/astronomy/tst_psAstrometry01.c
===================================================================
--- /trunk/psLib/test/astronomy/tst_psAstrometry01.c	(revision 7207)
+++ 	(revision )
@@ -1,986 +1,0 @@
-/** @file  tst_psAstrometry01.c
-*
-*  @brief This code will test the code in psAstrometry.[ch]
-*
-*  @author GLG, MHPCC
-*
-*  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-02-06 21:23:46 $
-*
-* XXX: Must test
-* pmSourceAddModel
-* pmSourceSubModel
-* pmSourceFitModel
-* pmSourceContour
-* pmSourceModelGuess
-* pmSourceRoughClass
-* pmSourceMoments
-* pmSourceLocalSky
-*
-*
-*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
-*/
-
-#include <stdlib.h>
-
-#include "psTest.h"
-#include "pslib_strict.h"
-
-static psS32 test1( void );
-static psS32 test2( void );
-static psS32 test3( void );
-static psS32 test4( void );
-static psS32 test5( void );
-static psS32 test6( void );
-
-testDescription tests[] = {
-                              {test1, -1, "Tests psFixedPatternAlloc()", 0, false},
-                              {test2, -2, "Tests psGrommitAlloc()", 0, false},
-                              {test3, -3, "MISC", 0, false},
-                              {test4, -1, "psPlaneTransformCombine()", 0, false},
-                              {test5, -1, "psPlaneTransformFit()", 0, false},
-                              {test6, -1, "psPlaneTransformInvert()", 0, false},
-                              {NULL}
-                          };
-
-#define PS_PERCENT_COMPARE(X, Y, PERCENT_FRACTION) \
-(fabs((Y)-(X))/fabs(X) < (PERCENT_FRACTION))
-
-#define RA  1.0
-#define DEC  2.0
-#define HA  3.0
-#define ZD  4.0
-#define AZ  5.0
-#define ROT_ANGLE 6.0
-#define TEMPERATURE 7.0
-#define PRESSURE 8.0
-#define HUMIDITY 20.0
-#define EXP_TIME 22.0
-#define WAVELENGTH 11.0
-#define NAME  "The Kaiser Royal Observatory"
-#define LATITUDE 20.7
-#define LONGITUDE 156.3
-#define HEIGHT  3055.0
-#define LAPSERATE 20.0
-
-#define NUM_READOUTS 2
-#define READOUT_NUM_ROWS 8
-#define READOUT_NUM_COLS 8
-
-#define CELL_WIDTH READOUT_NUM_COLS
-#define CELL_HEIGHT READOUT_NUM_ROWS
-
-#define CELL_GAP 2
-
-#define NUM_CELLS 4
-#define CELL_MIN_X 0
-#define CELL_MAX_X CELL_WIDTH
-#define CELL_MIN_Y 0
-#define CELL_MAX_Y CELL_HEIGHT
-
-#define NUM_CHIPS 2
-#define CHIP_MIN_X 0
-#define CHIP_MAX_X ((NUM_CELLS * CELL_WIDTH) + ((NUM_CELLS) * CELL_GAP))
-#define CHIP_MIN_Y 0
-#define CHIP_MAX_Y CELL_HEIGHT
-
-#define CHIP_WIDTH CHIP_MAX_X
-#define CHIP_HEIGHT CHIP_MAX_Y
-#define CHIP_GAP 2
-
-#define FPA_MIN_X 0
-#define FPA_MAX_X ((NUM_CHIPS * CHIP_WIDTH) + ((NUM_CHIPS) * CHIP_GAP))
-#define FPA_MIN_Y 0
-#define FPA_MAX_Y CHIP_HEIGHT
-
-#define ROW0  0
-#define COL0  0
-
-static void psPlaneDistortFree(psPlaneDistort *pd)
-{
-    psFree(pd->x);
-    psFree(pd->y);
-}
-
-static void psPlaneTransformFree(psPlaneTransform *pd)
-{
-    psFree(pd->x);
-    psFree(pd->y);
-}
-
-#define PS_CREATE_2D_IDENTITY_PLANE_TRANSFORM(NAME) \
-{\
-    NAME = (psPlaneTransform *) psAlloc(sizeof(psPlaneTransform)); \
-    psMemSetDeallocator(NAME, (psFreeFunc) psPlaneTransformFree); \
-    NAME->x = psPolynomial2DAlloc(PS_POLYNOMIAL_ORD, 2, 2); \
-    NAME->y = psPolynomial2DAlloc(PS_POLYNOMIAL_ORD, 2, 2); \
-    NAME->x->coeff[1][0] = 1.0; \
-    NAME->y->coeff[0][1] = 1.0; \
-}
-
-#define PS_CREATE_4D_IDENTITY_PLANE_DISTORT(NAME) \
-{\
-    NAME = (psPlaneDistort *) psAlloc(sizeof(psPlaneDistort)); \
-    psMemSetDeallocator(NAME, (psFreeFunc) psPlaneDistortFree); \
-    NAME->x = psPolynomial4DAlloc(PS_POLYNOMIAL_ORD, 2, 2, 2, 2); \
-    NAME->y = psPolynomial4DAlloc(PS_POLYNOMIAL_ORD, 2, 2, 2, 2); \
-    NAME->x->coeff[1][0][0][0] = 1.0; \
-    NAME->y->coeff[0][1][0][0] = 1.0; \
-}
-
-/*
-    This routine will create a system of FPAs/Chips/Cells/Readouts.  For
-    simplicity, an FPA is defined as a linear array of chips, and a chip is
-    defined as a linear array of cells, both in the x direction.  The transforms
-    between the various layers take into account the cell/chip and the boundaries
-    between each.
-*/
-psFPA *genSystem()
-{
-    psS32 i;
-    psS32 j;
-    psS32 k;
-    psImage *tmpImage;
-    //    psTime* now = psTimeGetNow(PS_TIME_UTC);
-    //    psObservatory* obs = psObservatoryAlloc(NAME, LATITUDE, LONGITUDE, HEIGHT, LAPSERATE);
-    //    psExposure* exp = psExposureAlloc(RA, DEC, HA, ZD, AZ,
-    //                                      now, ROT_ANGLE, TEMPERATURE, PRESSURE, HUMIDITY,
-    //                                      EXP_TIME, WAVELENGTH, obs);
-    //    psGrommit *grom = psGrommitAlloc(exp);
-    psFPA *myFPA = psFPAAlloc(NUM_CHIPS, NULL);
-    psChip **chips;
-    psCell **cells;
-    psReadout **readouts;
-
-    // We create the transforms between the FPA and tangent plane.  The
-    // transform is a simple identity transform.
-    PS_CREATE_4D_IDENTITY_PLANE_DISTORT(myFPA->fromTangentPlane);
-    PS_CREATE_4D_IDENTITY_PLANE_DISTORT(myFPA->toTangentPlane);
-
-    chips = (psChip **) myFPA->chips->data;
-    myFPA->chips->n = NUM_CHIPS;
-
-    for (i=0;i<NUM_CHIPS;i++) {
-        chips[i] = psChipAlloc(NUM_CELLS, myFPA);
-        // We create the transforms between the chip and FPA.  The
-        // transform is a simple identity transform.
-        PS_CREATE_2D_IDENTITY_PLANE_TRANSFORM(chips[i]->toFPA);
-        chips[i]->toFPA->x->coeff[0][0] = (double) (i * (CHIP_WIDTH + CHIP_GAP));
-        chips[i]->toFPA->x->coeff[1][1] = 0.0;
-        PS_CREATE_2D_IDENTITY_PLANE_TRANSFORM(chips[i]->fromFPA);
-        chips[i]->fromFPA->x->coeff[0][0] = (double) (-i * (CHIP_WIDTH + CHIP_GAP));
-        chips[i]->fromFPA->x->coeff[1][1] = 0.0;
-
-        cells = (psCell **) chips[i]->cells->data;
-        chips[i]->cells->n = NUM_CELLS;
-
-        for (j=0;j<NUM_CELLS;j++) {
-            cells[j] = psCellAlloc(NUM_READOUTS, chips[i]);
-            // We create the transforms between the cell and the chip.  The
-            // transform is a simple identity transform.
-            PS_CREATE_2D_IDENTITY_PLANE_TRANSFORM(cells[j]->toChip);
-            cells[j]->toChip->x->coeff[0][0] = (double) (j * (CELL_WIDTH + CELL_GAP));
-            cells[j]->toChip->x->coeff[1][1] = 0.0;
-            PS_CREATE_2D_IDENTITY_PLANE_TRANSFORM(cells[j]->fromChip);
-            cells[j]->fromChip->x->coeff[0][0] = (double) (-j * (CELL_WIDTH + CELL_GAP));
-            cells[j]->fromChip->x->coeff[1][1] = 0.0;
-            PS_CREATE_2D_IDENTITY_PLANE_TRANSFORM(cells[j]->toFPA);
-            cells[j]->toFPA->x->coeff[0][0] = (double) ((i * (CHIP_WIDTH + CHIP_GAP)) +
-                                              (j * (CELL_WIDTH + CELL_GAP)));
-            cells[j]->toFPA->x->coeff[1][1] = 0.0;
-            PS_CREATE_2D_IDENTITY_PLANE_TRANSFORM(cells[j]->toTP);
-            cells[j]->toTP->x->coeff[0][0] = cells[j]->toFPA->x->coeff[0][0];
-            cells[j]->toTP->x->coeff[1][1] = 0.0;
-
-            readouts = (psReadout **) cells[j]->readouts->data;
-            cells[j]->readouts->n = NUM_READOUTS;
-
-            for (k=0;k<NUM_READOUTS;k++) {
-                tmpImage = psImageAlloc(READOUT_NUM_COLS, READOUT_NUM_ROWS, PS_TYPE_F32);
-                for (psS32 row=0;row<READOUT_NUM_ROWS;row++) {
-                    for(psS32 col=0;col<READOUT_NUM_COLS;col++) {
-                        tmpImage->data.F32[row][col] = (float) ((i * (CHIP_WIDTH + CHIP_GAP)) +
-                                                                (j * (CELL_WIDTH + CELL_GAP)));
-                    }
-                }
-                readouts[k] = psReadoutAlloc();
-                readouts[k]->image = tmpImage;
-                *(psS32*)&readouts[k]->col0 = (j * (CELL_WIDTH + CELL_GAP));
-                *(psS32*)&readouts[k]->row0 = 0;
-
-
-            }
-        }
-    }
-
-    return(myFPA);
-}
-
-psS32 main( psS32 argc, char* argv[] )
-{
-    psLogSetLevel( PS_LOG_INFO );
-
-    return ( ! runTestSuite( stderr, "psAstrometry", tests, argc, argv ) );
-}
-
-#define X_NUM_ROWS 4
-#define X_NUM_COLS 5
-#define Y_NUM_ROWS 6
-#define Y_NUM_COLS 7
-#define X_SCALE  1.0
-#define Y_SCALE  2.0
-#define X0  50.0
-#define Y0  60.0
-
-psS32 test1( void )
-{
-    psS32 i;
-    psS32 j;
-    psFixedPattern *tmp = NULL;
-    float x0 = X0;
-    float y0 = Y0;
-    float xScale = X_SCALE;
-    float yScale = Y_SCALE;
-    psImage *x = psImageAlloc(X_NUM_COLS, X_NUM_ROWS, PS_TYPE_F64);
-    psImage *y = psImageAlloc(Y_NUM_COLS, Y_NUM_ROWS, PS_TYPE_F64);
-    psS32 testStatus = 0;
-    psS32 numPixels = 0;
-
-    for (i=0;i<X_NUM_ROWS;i++) {
-        for (j=0;j<X_NUM_COLS;j++) {
-            x->data.F64[i][j] = (double) (i + j);
-        }
-    }
-    for (i=0;i<Y_NUM_ROWS;i++) {
-        for (j=0;j<Y_NUM_COLS;j++) {
-            y->data.F64[i][j] = (double) (i - j);
-        }
-    }
-
-    tmp = psFixedPatternAlloc(x0, y0, xScale, yScale, x, y);
-
-    // Test the x pattern
-    for (i=0;i<X_NUM_ROWS;i++) {
-        for (j=0;j<X_NUM_COLS;j++) {
-            if ((tmp->x)[i][j] != x->data.F64[i][j]) {
-                printf("ERROR: (tmp->x)[%d][%d] is %.2f, should be %.2f\n", i, j,
-                       (tmp->x)[i][j], x->data.F64[i][j]);
-                testStatus = 1;
-                numPixels++;
-            }
-        }
-    }
-    if (numPixels != 0) {
-        printf("ERROR: x: %d incorrect pixels\n", numPixels);
-    }
-
-    // Test the y pattern
-    numPixels = 0;
-    for (i=0;i<Y_NUM_ROWS;i++) {
-        for (j=0;j<Y_NUM_COLS;j++) {
-            if ((tmp->y)[i][j] != y->data.F64[i][j]) {
-                printf("ERROR: (tmp->y)[%d][%d] is %.2f, should be %.2f\n", i, j,
-                       (tmp->y)[i][j], y->data.F64[i][j]);
-
-                testStatus = 1;
-                numPixels++;
-            }
-        }
-    }
-    if (numPixels != 0) {
-        printf("ERROR: y: %d incorrect pixels\n", numPixels);
-    }
-
-    // Test the x variables
-    if (tmp->nX != (X_NUM_ROWS * X_NUM_COLS)) {
-        printf("ERROR: tmp->nX is %d, should be %d\n", tmp->nX, (X_NUM_ROWS * X_NUM_COLS));
-        testStatus = 1;
-    }
-    if (tmp->x0 != X0) {
-        printf("ERROR: tmp->x0 is %.2f, should be %.2f\n", tmp->x0, X0);
-        testStatus = 1;
-    }
-    if (tmp->xScale != X_SCALE) {
-        printf("ERROR: tmp->xScale is %.2f, should be %.2f\n", tmp->xScale, X_SCALE);
-        testStatus = 1;
-    }
-
-    // Test the y variables
-    if (tmp->nY != (Y_NUM_ROWS * Y_NUM_COLS)) {
-        printf("ERROR: tmp->nY is %d, should be %d\n", tmp->nY, (Y_NUM_ROWS * Y_NUM_COLS));
-        testStatus = 1;
-    }
-    if (tmp->y0 != Y0) {
-        printf("ERROR: tmp->y0 is %.2f, should be %.2f\n", tmp->y0, Y0);
-        testStatus = 1;
-    }
-    if (tmp->yScale != Y_SCALE) {
-        printf("ERROR: tmp->yScale is %.2f, should be %.2f\n", tmp->yScale, Y_SCALE);
-        testStatus = 1;
-    }
-
-    psFree(tmp);
-    psFree(x);
-    psFree(y);
-
-    return 0;
-}
-
-psS32 test2()
-{
-    psS32 testStatus = 0;
-
-    psTime* now = psTimeGetNow(PS_TIME_TAI);
-
-    psObservatory* obs = psObservatoryAlloc(NAME, LATITUDE, LONGITUDE, HEIGHT, LAPSERATE);
-
-    psExposure* exp = psExposureAlloc(RA, DEC, HA, ZD, AZ,
-                                      now, ROT_ANGLE, TEMPERATURE, PRESSURE, HUMIDITY,
-                                      EXP_TIME, WAVELENGTH, obs);
-
-    psGrommit *grom = psGrommitAlloc(exp);
-
-    if (grom->height != HEIGHT) {
-        printf("ERROR: grom->height is %.2f, should be %.2f\n", grom->height, HEIGHT);
-        testStatus = 1;
-    }
-    if (grom->temperature != TEMPERATURE) {
-        printf("ERROR: grom->temperature is %.2f, should be %.2f\n", grom->temperature, TEMPERATURE);
-        testStatus = 2;
-    }
-
-    if (grom->pressure != PRESSURE) {
-        printf("ERROR: grom->pressure is %.2f, should be %.2f\n", grom->pressure, PRESSURE);
-        testStatus = 3;
-    }
-
-    if (grom->humidity != HUMIDITY) {
-        printf("ERROR: grom->humidity is %.2f, should be %.2f\n", grom->humidity, HUMIDITY);
-        testStatus = 4;
-    }
-
-    if (grom->wavelength != WAVELENGTH) {
-        printf("ERROR: grom->wavelength is %.2f, should be %.2f\n", grom->wavelength, WAVELENGTH);
-        testStatus = 5;
-    }
-
-    if (grom->lapseRate != LAPSERATE) {
-        printf("ERROR: grom->lapseRate is %.2f, should be %.2f\n", grom->lapseRate, LAPSERATE);
-        testStatus = 6;
-    }
-
-    /*
-        XXX: Don't know how to verify: latitude, sinLat, cosLat, abberationMag,
-             refractA, refractB, longitudeOffset, siderealTime
-
-       if (grom-> != ) {
-            printf("ERROR: grom-> is %.2f, should be %.2f\n", grom->, );
-            testStatus = 1;
-       }
-    */
-
-    printf("grom->latitude is %.2f\n", grom->latitude);
-    printf("grom->longitude is %.2f\n", grom->longitude);
-    printf("grom->height is %.2f\n", grom->height);
-    printf("grom->abberationMag is %.2f\n", grom->abberationMag);
-    printf("grom->temperature is %.2f\n", grom->temperature);
-    printf("grom->pressure is %.2f\n", grom->pressure);
-    printf("grom->humidity is %.2f\n", grom->humidity);
-    printf("grom->wavelength is %.2f\n", grom->wavelength);
-    printf("grom->lapseRate is %.2f\n", grom->lapseRate);
-    printf("grom->refractA is %.2f\n", grom->refractA);
-    printf("grom->refractB is %.2f\n", grom->refractB);
-
-    // printf("grom->siderealTime is %.2f\n", grom->siderealTime);
-
-    psFree(now);
-    psFree(obs);
-    psFree(exp);
-    psFree(grom);
-    psLibFinalize();
-
-    return(testStatus);
-}
-
-psS32 printCell(psCell *cell)
-{
-    psReadout **readouts = (psReadout **) cell->readouts->data;
-    psReadout *readout = readouts[0];
-
-    printf("-------------------------------\n");
-    for (psS32 i = 0; i < readout->image->numRows ; i++) {
-        for (psS32 j = 0; j < readout->image->numCols ; j++) {
-            printf("(%.1f) ", readout->image->data.F32[i][j]);
-        }
-        printf("\n");
-    }
-    return(0);
-}
-
-
-/******************************************************************************
-This routine tests many Astrometry functions:
-    psChipInFPA()
-    psCellInFPA()
-    psCoordFPAToChip()
-    psCoordChipToCell()
-This routine loops through all valid cell coordinates and maintains a running
-set of (x,y) coordinates in the FPA plane.  It calls the first two functions
-with each FPA coordinate and determines the chip/cell that that coordinate
-corresponds to.  It then calls the last two functions to determine the actual
-chip and cell coordinates.  The cell coordinate is verified for correctness.
- 
-It then calls
-    psCoordCellToChip()
-to determine if the chip coordinates that were generated agree with the chip
-coords returned above.
- 
-Then, it calls
-    psCellInChip()
-and flags an ERROR if the cell it returns is different from that of
-psCellInFPA().
- 
-Then, it calls
-    psCoordChipToFPA
-to determine if the FPA coordinates are correct.
- 
- 
- *****************************************************************************/
-psS32 test3( void )
-{
-    psS32 x;
-    psS32 y;
-    psPlane fpaCoord;
-    psFPA *myFPA = genSystem();
-    psCell *myCell = NULL;
-    psPlane chipCoord;
-    psPlane cellCoord;
-    psPlane testCoord;
-
-    psS32 xReadout = 0;
-    psS32 xFPA = 0;
-    for (psS32 chip=0;chip<NUM_CHIPS;chip++) {
-        for (psS32 cell=0;cell<NUM_CELLS;cell++) {
-            for(x=0;x<CELL_WIDTH;x++) {
-                for (y=0;y<CELL_HEIGHT;y++) {
-                    fpaCoord.x = (double) xFPA;
-                    fpaCoord.y = (double) y;
-                    //printf("------------------ (%.2f, %.2f) ------------------\n", fpaCoord.x, fpaCoord.y);
-                    psChip* tmpChip = psChipInFPA(&fpaCoord, myFPA);
-                    myCell = psCellInFPA(&fpaCoord, myFPA);
-
-                    if ((myCell == NULL) || (tmpChip == NULL)) {
-                        if (myCell == NULL) {
-                            printf("ERROR: myCell is NULL\n");
-                        }
-                        if (tmpChip == NULL) {
-                            printf("ERROR: tmpChip is NULL\n");
-                        }
-                    } else {
-                        psCoordFPAToChip(&chipCoord, &fpaCoord, tmpChip);
-                        psCoordChipToCell(&cellCoord, &chipCoord, myCell);
-
-                        if (x != (psS32) cellCoord.x) {
-                            printf("ERROR: x coord was %.2f, should be %d\n", cellCoord.x, x);
-                        }
-                        if (y != (psS32) cellCoord.y) {
-                            printf("ERROR: y coord was %.2f, should be %d\n", cellCoord.y, y);
-                        }
-
-                        psCoordCellToChip(&testCoord, &cellCoord, myCell);
-                        if (testCoord.x != chipCoord.x) {
-                            printf("ERROR: psCoordCellToChip() x coord was %.2f, should be %d\n", cellCoord.x, x);
-                        }
-                        if (testCoord.y != chipCoord.y) {
-                            printf("ERROR: psCoordCellToChip() y coord was %.2f, should be %d\n", cellCoord.y, y);
-                        }
-
-                        psCell *myCell2 = psCellInChip(&chipCoord, tmpChip);
-                        if (myCell2 != myCell) {
-                            printf("ERROR: psCellInFPA() != psCellInChip(psChipInFPA()) (%p %p)\n", myCell2, myCell);
-                            printCell(myCell2);
-                            printCell(myCell);
-
-                        }
-
-                        psCoordChipToFPA(&testCoord, &chipCoord, tmpChip);
-                        if (testCoord.x != xFPA) {
-                            printf("ERROR: psCoordChipToFPA() x coord was %.2f, should be %d\n", cellCoord.x, x);
-                        }
-                        if (testCoord.y != y) {
-                            printf("ERROR: psCoordChipToFPA() y coord was %.2f, should be %d\n", cellCoord.y, y);
-                        }
-
-                        psCoordFPAToTP(&testCoord, &fpaCoord, 0.0, 0.0, myFPA);
-                        if (testCoord.x != fpaCoord.x) {
-                            printf("ERROR: psCoordFPAToTP() x coord was %.2f, should be %d\n", cellCoord.x, x);
-                        }
-                        if (testCoord.y != fpaCoord.y) {
-                            printf("ERROR: psCoordFPAToTP() y coord was %.2f, should be %d\n", cellCoord.y, y);
-                        }
-
-                        psCoordCellToFPA(&testCoord, &cellCoord, myCell);
-                        if (testCoord.x != fpaCoord.x) {
-                            printf("ERROR: psCoordFPAToTP() x coord was %.2f, should be %d\n", cellCoord.x, x);
-                        }
-                        if (testCoord.y != fpaCoord.y) {
-                            printf("ERROR: psCoordFPAToTP() y coord was %.2f, should be %d\n", cellCoord.y, y);
-                        }
-
-                        psCoordTPToFPA(&testCoord, &fpaCoord, 0.0, 0.0, myFPA);
-                        if (testCoord.x != fpaCoord.x) {
-                            printf("ERROR: psCoordFPAToTP() x coord was %.2f, should be %d\n", cellCoord.x, x);
-                        }
-                        if (testCoord.y != fpaCoord.y) {
-                            printf("ERROR: psCoordFPAToTP() y coord was %.2f, should be %d\n", cellCoord.y, y);
-                        }
-                    }
-                }
-                xFPA++;
-                xReadout++;
-            }
-            // We skip the gaps between cells.
-            for(x=0;x<CELL_GAP;x++) {
-                xFPA++;
-                xReadout=0;
-            }
-        }
-        // We skip the gaps between chips.
-        for (x=0;x<CHIP_GAP;x++) {
-            xFPA++;
-            xReadout=0;
-        }
-    }
-    psFree(myFPA);
-
-    return(0);
-}
-
-int printTrans(psPlaneTransform *trans)
-{
-    printf("-------------------- trans->x coeffs --------------------\n");
-    for (psS32 i = 0 ; i < trans->x->nX ; i++) {
-        for (psS32 j = 0 ; j < trans->x->nY ; j++) {
-            printf("(%.1f) ", trans->x->coeff[i][j]);
-        }
-        printf("\n");
-    }
-    printf("-------------------- trans->y coeffs --------------------\n");
-    for (psS32 i = 0 ; i < trans->y->nX ; i++) {
-        for (psS32 j = 0 ; j < trans->y->nY ; j++) {
-            printf("(%.1f) ", trans->y->coeff[i][j]);
-        }
-        printf("\n");
-    }
-    return(0);
-}
-
-
-/******************************************************************************
-TEST04: The strategy behind test04() is to generate a pair of transforms t1
-and t2 with a wide variety of sizes for the x/y components of the x/y
-transforms, then set the coefficients of t1/t2 to arbitray values, then
-generate a new transform t3 via psPlaneTransformCombine() function.  Then, for
-several arbitrary input plane coordinates, we tarnsform them via the new
-transform t3, as well as individually via t1 then t2, and verify that they
-produce identical output coordinates.
- *****************************************************************************/
-// These macros determine the number of x/y test points which will be x-formed.
-#define TST04_X_MIN 0.0
-#define TST04_X_MAX 10.0
-#define TST04_Y_MIN 0.0
-#define TST04_Y_MAX 10.0
-#define TST04_NUM 5.0
-// These macros define the max sizes of the various input transforms.
-#define TST04_T1_X_X 6
-#define TST04_T1_X_Y 3
-#define TST04_T1_Y_X 3
-#define TST04_T1_Y_Y 3
-#define TST04_T2_X_X 3
-#define TST04_T2_X_Y 3
-#define TST04_T2_Y_X 3
-#define TST04_T2_Y_Y 3
-/******************************************************************************
-tstTransforms(t1, t2, t3): this function generates a set of arbitrary x/y
-coordinates, then transforms them into output coordinates via the t3
-transform, as well as the t1 followed by the t2 transform.  It verifies the
-output coordinates are identical and returns TRUE if so.  Otherwise, it prints
-an error message and returns FALSE.
- *****************************************************************************/
-bool tstTransforms(psPlaneTransform *t1, psPlaneTransform *t2, psPlaneTransform *t3)
-{
-    bool testStatus = true;
-    psPlane *in = psPlaneAlloc();
-    in->xErr = 0.0;
-    in->yErr = 0.0;
-
-    for (in->x = TST04_X_MIN ;
-            in->x <= TST04_X_MAX ;
-            in->x+= (TST04_X_MAX-TST04_X_MIN) / TST04_NUM) {
-        for (in->y = TST04_Y_MIN ; in->y <= TST04_Y_MAX ; in->y+= (TST04_Y_MAX-TST04_Y_MIN) / TST04_NUM) {
-            // Apply the t1/t2 transforms individually to the in coords.
-            psPlane *mid = psPlaneTransformApply(NULL, t1, in);
-            if (mid == NULL) {
-                printf("TEST ERROR: intermediate psPlane coords are NULL.\n");
-                psFree(in);
-                return(false);
-            }
-
-            psPlane *outT1T2 = psPlaneTransformApply(NULL, t2, mid);
-            if (outT1T2 == NULL) {
-                printf("TEST ERROR: intermediate psPlane coords are NULL.\n");
-                psFree(mid);
-                return(false);
-            }
-
-            // Apply the t3 transforms individually to the in coords.
-            psPlane *outT3 = psPlaneTransformApply(NULL, t3, in);
-            if (outT3 == NULL) {
-                printf("TEST ERROR: intermediate psPlane coords are NULL.\n");
-                psFree(mid);
-                psFree(outT1T2);
-                return(false);
-            }
-
-            // Verify that the results are identical.
-            if (fabs(outT3->x - outT1T2->x) > FLT_EPSILON) {
-                printf("TEST ERROR: x is %f, should be %f\n", outT3->x, outT1T2->x);
-                testStatus = false;
-            }
-            if (fabs(outT3->y - outT1T2->y) > FLT_EPSILON) {
-                printf("TEST ERROR: y is %f, should be %f\n", outT3->y, outT1T2->y);
-                testStatus = false;
-            }
-            psFree(mid);
-            psFree(outT1T2);
-            psFree(outT3);
-        }
-    }
-
-    psFree(in);
-    return(testStatus);
-}
-
-/******************************************************************************
-setCoeffs(t1, t2): this function sets the coefficients of the t1 and t2
-transforms to somewhat arbitrary values.
- *****************************************************************************/
-int setCoeffs(psPlaneTransform *t1, psPlaneTransform *t2)
-{
-    for (psS32 t1xx = 0 ; t1xx < t1->x->nX ; t1xx++) {
-        for (psS32 t1xy = 0 ; t1xy < t1->x->nY ; t1xy++) {
-            t1->x->coeff[t1xx][t1xy] = (psF32) (t1xx + t1xy);
-        }
-    }
-
-    for (psS32 t1yx = 0 ; t1yx < t1->y->nX ; t1yx++) {
-        for (psS32 t1yy = 0 ; t1yy < t1->y->nY ; t1yy++) {
-            t1->y->coeff[t1yx][t1yy] = (psF32) (t1yx + t1yy - 10);
-        }
-    }
-    for (psS32 t2xx = 0 ; t2xx < t2->x->nX ; t2xx++) {
-        for (psS32 t2xy = 0 ; t2xy < t2->x->nY ; t2xy++) {
-            t2->x->coeff[t2xx][t2xy] = (psF32) (2 + (t2xx * t2xy));
-        }
-    }
-    for (psS32 t2yx = 0 ; t2yx < t2->y->nX ; t2yx++) {
-        for (psS32 t2yy = 0 ; t2yy < t2->y->nY ; t2yy++) {
-            t2->y->coeff[t2yx][t2yy] = (psF32) (3 - t2yx + t2yy);
-        }
-    }
-
-    return(0);
-}
-
-/******************************************************************************
-test04(): We test psPlaneTransformCombine() with a variety of input
-transforms, as well as input coordinates, as well as erroneous input
-parameters.
- *****************************************************************************/
-psS32 test4( void )
-{
-    bool testStatus = true;
-
-
-    //
-    // Create a variety of input input transforms, then test them.
-    //
-    for (psS32 t1xx = 1 ; t1xx < TST04_T1_X_X ; t1xx++) {
-        for (psS32 t1xy = 1 ; t1xy < TST04_T1_X_Y ; t1xy++) {
-            for (psS32 t1yx = 1 ; t1yx < TST04_T1_Y_X ; t1yx++) {
-                for (psS32 t1yy = 1 ; t1yy < TST04_T1_Y_Y ; t1yy++) {
-                    for (psS32 t2xx = 1 ; t2xx < TST04_T2_X_X ; t2xx++) {
-                        for (psS32 t2xy = 1 ; t2xy < TST04_T2_X_Y ; t2xy++) {
-                            for (psS32 t2yx = 1 ; t2yx < TST04_T2_Y_X ; t2yx++) {
-                                for (psS32 t2yy = 1 ; t2yy < TST04_T2_Y_Y ; t2yy++) {
-                                    psPlaneTransform *trans1 = psPlaneTransformAlloc(PS_MAX(t1xx, t1yx), PS_MAX(t1xy, t1yy));
-                                    psPlaneTransform *trans2 = psPlaneTransformAlloc(PS_MAX(t2xx, t2yx), PS_MAX(t2xy, t2yy));
-                                    psPlaneTransform *trans3 = NULL;
-                                    setCoeffs(trans1, trans2);
-                                    trans3 = psPlaneTransformCombine(NULL, trans1, trans2,psRegionSet(NAN,NAN,NAN,NAN),0);
-                                    //XXX: the last two parameters are bogus.  Needs to change.  -rdd
-
-                                    if (trans3 == NULL) {
-                                        printf("TEST ERROR: psPlaneTransformCombine() returned NULL/\n");
-                                        testStatus = false;
-                                    } else {
-                                        testStatus = tstTransforms(trans1, trans2, trans3);
-                                    }
-                                    psFree(trans1);
-                                    psFree(trans2);
-                                    psFree(trans3);
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-
-    //
-    // Test erroneous input parameter combinations
-    //
-    psPlaneTransform *trans1 = psPlaneTransformAlloc(2, 2);
-    psPlaneTransform *trans2 = psPlaneTransformAlloc(2, 2);
-    psPlaneTransform *trans3 = NULL;
-
-    printf("----------------------------------------------------------------------------------\n");
-    printf("Calling psPlaneTransformCombine with NULL trans1.  Should generate error and return NULL.\n");
-    trans3 = psPlaneTransformCombine(NULL, NULL, trans2, psRegionSet(0,0,0,0), 10);
-    if (trans3 != NULL) {
-        printf("TEST ERROR: psPlaneTransformCombine() returned a non-NULL psPlaneTransform.\n");
-        testStatus = false;
-        psFree(trans3);
-    }
-
-    printf("----------------------------------------------------------------------------------\n");
-    printf("Calling psPlaneTransformCombine with NULL trans2.  Should generate error and return NULL.\n");
-    trans3 = psPlaneTransformCombine(NULL, trans1, NULL, psRegionSet(0,0,0,0), 10);
-    if (trans3 != NULL) {
-        printf("TEST ERROR: psPlaneTransformCombine() returned a non-NULL psPlaneTransform.\n");
-        testStatus = false;
-        psFree(trans3);
-    }
-
-    psFree(trans1);
-    psFree(trans2);
-    return(!testStatus);
-}
-
-
-#define TST05_X_MIN 0.0
-#define TST05_X_MAX 10.0
-#define TST05_Y_MIN 0.0
-#define TST05_Y_MAX 10.0
-#define TST05_NUM_X 5.0
-#define TST05_NUM_Y 5.0
-#define TST05_X_POLY_ORDER 2
-#define TST05_Y_POLY_ORDER 2
-#define TST05_NUM_DATA (TST05_NUM_X * TST05_NUM_Y)
-/******************************************************************************
-XXX: This is only a rudimentary test of the psPlaneTransformFit() function.
-It tests a few NULL input parameter conditions, and some simple linear
-transformations.
- *****************************************************************************/
-psS32 test5( void )
-{
-    bool testStatus = true;
-    psPlaneTransform *trans = psPlaneTransformAlloc(TST05_X_POLY_ORDER, TST05_Y_POLY_ORDER);
-    psPlaneTransform *transInit = psPlaneTransformAlloc(TST05_X_POLY_ORDER, TST05_Y_POLY_ORDER);
-    psArray *src = psArrayAlloc((int) TST05_NUM_DATA);
-    psArray *dst = psArrayAlloc((int) TST05_NUM_DATA);
-    bool rc;
-
-    //
-    // We set an arbitrary non-linear transformation.
-    //
-    for (psS32 x = 0 ; x < TST05_X_POLY_ORDER ; x++) {
-        for (psS32 y = 0 ; y < TST05_Y_POLY_ORDER ; y++) {
-            transInit->x->coeff[x][y] = (psF32)rand() / (psF32)RAND_MAX * 10.0f;
-            transInit->y->coeff[x][y] = (psF32)rand() / (psF32)RAND_MAX * 10.0f;
-        }
-    }
-
-    // okay, for now, it's linear.
-    transInit->x->coeff[1][1] = 0.1;
-    transInit->y->coeff[1][1] = 0.1;
-
-    /* HEY
-        //
-        // We set an arbitrary linear transformation.
-        //
-        transInit->x->coeff[0][0] = 1.0;
-        transInit->x->coeff[0][1] = 3.0;
-        transInit->x->coeff[1][0] = 2.0;
-        transInit->x->coeff[1][1] = 7.0;
-        transInit->y->coeff[0][0] = 4.0;
-        transInit->y->coeff[0][1] = 6.0;
-        transInit->y->coeff[1][0] = 5.0;
-        transInit->y->coeff[1][1] = 3.0;
-    */
-    //
-    // We generate a grid of input data points in the x1,y1 plane, calculate the
-    // corresponding values in the transformed plane, and set these to
-    // the src and dst psVectors.
-    //
-    psS32 i = 0;
-    for (psF32 x = TST05_X_MIN ; x < TST05_X_MAX ; x+= (TST05_X_MAX-TST05_X_MIN)/TST05_NUM_X) {
-        for (psF32 y = TST05_Y_MIN ; y < TST05_Y_MAX ; y+= (TST05_Y_MAX-TST05_Y_MIN)/TST05_NUM_Y) {
-            src->data[i] = (psPtr *) psPlaneAlloc();
-            ((psPlane *) src->data[i])->x = x;
-            ((psPlane *) src->data[i])->y = y;
-
-            dst->data[i] = psPlaneTransformApply(NULL, transInit, ((psPlane *) src->data[i]));
-            i++;
-        }
-    }
-
-    printf("----------------------------------------------------------------------------------\n");
-    printf("Calling psPlaneTransformFit with NULL trans.  Should generate error and return NULL.\n");
-    rc = psPlaneTransformFit(NULL, src, dst, 100, 100.0);
-    if (rc == true) {
-        printf("TEST ERROR: psPlaneTransformFit() returned TRUE.\n");
-        testStatus = false;
-    }
-
-    printf("----------------------------------------------------------------------------------\n");
-    printf("Calling psPlaneTransformFit with NULL src psArray.  Should generate error and return NULL.\n");
-    rc = psPlaneTransformFit(trans, NULL, dst, 100, 100.0);
-    if (rc == true) {
-        printf("TEST ERROR: psPlaneTransformFit() returned TRUE.\n");
-        testStatus = false;
-    }
-
-    printf("----------------------------------------------------------------------------------\n");
-    printf("Calling psPlaneTransformFit with NULL dst psArray.  Should generate error and return NULL.\n");
-    rc = psPlaneTransformFit(trans, src, NULL, 100, 100.0);
-    if (rc == true) {
-        printf("TEST ERROR: psPlaneTransformFit() returned TRUE.\n");
-        testStatus = false;
-    }
-
-    printf("----------------------------------------------------------------------------------\n");
-    printf("Calling psPlaneTransformFit with acceptable data.\n");
-    rc = psPlaneTransformFit(trans, src, dst, 100, 100.0);
-    if (rc != true) {
-        printf("TEST ERROR: psPlaneTransformFit() returned FALSE.\n");
-        testStatus = false;
-    }
-
-    //
-    // For the initial grid of input points, we transform them to output points with
-    // the derived transformation, and verify that they are within 10%.
-    //
-
-    // XXX: We ignore endpoints.
-    for (psS32 i = 1 ; i < src->n-1 ; i++) {
-        psPlane *inData = (psPlane *) src->data[i];
-        psPlane *outData = (psPlane *) dst->data[i];
-        psPlane *outDataDeriv = psPlaneTransformApply(NULL, trans, inData);
-        if (!PS_PERCENT_COMPARE(outDataDeriv->x, outData->x, 0.20) ||
-                !PS_PERCENT_COMPARE(outDataDeriv->y, outData->y, 0.20)) {
-            printf("TEST ERROR: the derived output coords (%d) were (%f, %f) should have been (%f, %f).\n",
-                   i, outDataDeriv->x, outDataDeriv->y, outData->x, outData->y);
-            testStatus = false;
-        }
-        psFree(outDataDeriv);
-    }
-
-    psFree(transInit);
-    psFree(trans);
-    psFree(src);
-    psFree(dst);
-
-    return(!testStatus);
-}
-
-/******************************************************************************
-XXX: This is only a rudimentary test of the psPlaneTransformInvert()
-function.  It tests a few NULL input parameter conditions.
- 
-XXX: We call it with acceptable data, but we do not verify the output.
- *****************************************************************************/
-psS32 test6( void )
-{
-    bool testStatus = true;
-    psPlaneTransform *trans = psPlaneTransformAlloc(2, 2);
-    psPlaneTransform *transOut = NULL;
-    psRegion myRegion = psRegionSet(1.0, 5.0, 1.0, 5.0);
-
-    //
-    // Set non-linear transformation
-    //
-    trans->x->coeff[0][0] = 1.0;
-    trans->x->coeff[0][1] = 3.0;
-    trans->x->coeff[1][0] = 2.0;
-    trans->x->coeff[1][1] = 1.0;
-    trans->y->coeff[0][0] = 4.0;
-    trans->y->coeff[0][1] = 6.0;
-    trans->y->coeff[1][0] = 5.0;
-    trans->y->coeff[1][1] = 1.0;
-
-    printf("----------------------------------------------------------------------------------\n");
-    printf("Calling psPlaneTransformInvert with NULL trans.  Should generate error and return NULL.\n");
-    transOut = psPlaneTransformInvert(NULL, NULL, myRegion, 10);
-    if (transOut != NULL) {
-        printf("TEST ERROR: psPlaneTransformInvert() returned a non-NULL psPlaneTransform.\n");
-        testStatus = false;
-        psFree(transOut);
-    }
-
-    printf("----------------------------------------------------------------------------------\n");
-    printf("Calling psPlaneTransformInvert with zero nSamples.  Should generate error and return NULL.\n");
-    transOut = psPlaneTransformInvert(NULL, trans, myRegion, 0);
-    if (transOut != NULL) {
-        printf("TEST ERROR: psPlaneTransformInvert() returned a non-NULL psPlaneTransform.\n");
-        testStatus = false;
-        psFree(transOut);
-    }
-
-    printf("Calling psPlaneTransformInvert with an acceptable linear transformation.\n");
-    for (psS32 n = 0 ; n < 100 ; n++) {
-        //
-        // We create a rand() linear transformation and hope it is invertible.
-        //
-        trans->x->coeff[0][0] = (psF32)rand() / (psF32)RAND_MAX * 10.0f;
-        trans->x->coeff[0][1] = (psF32)rand() / (psF32)RAND_MAX * 10.0f;
-        trans->x->coeff[1][0] = (psF32)rand() / (psF32)RAND_MAX * 10.0f;
-        trans->x->coeff[1][1] = 0.0;
-        trans->y->coeff[0][0] = (psF32)rand() / (psF32)RAND_MAX * 10.0f;
-        trans->y->coeff[0][1] = (psF32)rand() / (psF32)RAND_MAX * 10.0f;
-        trans->y->coeff[1][0] = (psF32)rand() / (psF32)RAND_MAX * 10.0f;
-        trans->y->coeff[1][1] = 0.0;
-
-        transOut = psPlaneTransformInvert(NULL, trans, myRegion, 10);
-        if (transOut == NULL) {
-            printf("TEST ERROR: psPlaneTransformInvert() returned a NULL psPlaneTransform.\n");
-            testStatus = false;
-        }
-        psPlane *in = psPlaneAlloc();
-        in->x = 2.0;
-        in->y = 3.0;
-
-        psPlane *mid = psPlaneTransformApply(NULL, trans, in);
-        psPlane *out = psPlaneTransformApply(NULL, transOut, mid);
-
-        if (((fabs(in->x - out->x) > FLT_EPSILON)) ||
-                ((fabs(in->y - out->y) > FLT_EPSILON))) {
-            printf("TEST ERROR: in coords were (%f, %f), out coords were (%f, %f).\n",
-                   in->x, in->y, out->x, out->y);
-            testStatus = false;
-        }
-
-        psFree(in);
-        psFree(mid);
-        psFree(out);
-        psFree(transOut);
-    }
-
-    psFree(trans);
-
-    fflush(stdout);
-
-    return(!testStatus);
-}
Index: unk/psLib/test/astronomy/verified/tst_psAstrometry.stderr
===================================================================
--- /trunk/psLib/test/astronomy/verified/tst_psAstrometry.stderr	(revision 7207)
+++ 	(revision )
@@ -1,54 +1,0 @@
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psAstrometry.c                                         *
-*            TestPoint: psAstrometry{psExposureAlloc}                              *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psAstrometry{psExposureAlloc} | tst_psAstrometry.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psAstrometry.c                                         *
-*            TestPoint: psAstrometry{psObservatoryAlloc}                           *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psAstrometry{psObservatoryAlloc} | tst_psAstrometry.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psAstrometry.c                                         *
-*            TestPoint: psAstrometry{psFPAAlloc}                                   *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psAstrometry{psFPAAlloc} | tst_psAstrometry.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psAstrometry.c                                         *
-*            TestPoint: psAstrometry{psChipAlloc}                                  *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psAstrometry{psChipAlloc} | tst_psAstrometry.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psAstrometry.c                                         *
-*            TestPoint: psAstrometry{psCellAlloc}                                  *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psAstrometry{psCellAlloc} | tst_psAstrometry.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psAstrometry.c                                         *
-*            TestPoint: psAstrometry{psReadoutAlloc}                               *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psAstrometry{psReadoutAlloc} | tst_psAstrometry.c)
-
Index: unk/psLib/test/astronomy/verified/tst_psAstrometry01.stderr
===================================================================
--- /trunk/psLib/test/astronomy/verified/tst_psAstrometry01.stderr	(revision 7207)
+++ 	(revision )
@@ -1,68 +1,0 @@
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psAstrometry01.c                                       *
-*            TestPoint: psAstrometry{Tests psFixedPatternAlloc()}                  *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psAstrometry{Tests psFixedPatternAlloc()} | tst_psAstrometry01.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psAstrometry01.c                                       *
-*            TestPoint: psAstrometry{Tests psGrommitAlloc()}                       *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psAstrometry{Tests psGrommitAlloc()} | tst_psAstrometry01.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psAstrometry01.c                                       *
-*            TestPoint: psAstrometry{MISC}                                         *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psAstrometry{MISC} | tst_psAstrometry01.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psAstrometry01.c                                       *
-*            TestPoint: psAstrometry{psPlaneTransformCombine()}                    *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-<DATE><TIME>|<HOST>|E|psPlaneTransformCombine (FILE:LINENO)
-    Unallowable operation: trans1 is NULL.
-<DATE><TIME>|<HOST>|E|psPlaneTransformCombine (FILE:LINENO)
-    Unallowable operation: trans2 is NULL.
-
----> TESTPOINT PASSED (psAstrometry{psPlaneTransformCombine()} | tst_psAstrometry01.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psAstrometry01.c                                       *
-*            TestPoint: psAstrometry{psPlaneTransformFit()}                        *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-<DATE><TIME>|<HOST>|E|psPlaneTransformFit (FILE:LINENO)
-    Unallowable operation: trans is NULL.
-<DATE><TIME>|<HOST>|E|psPlaneTransformFit (FILE:LINENO)
-    Unallowable operation: source is NULL.
-<DATE><TIME>|<HOST>|E|psPlaneTransformFit (FILE:LINENO)
-    Unallowable operation: dest is NULL.
-
----> TESTPOINT PASSED (psAstrometry{psPlaneTransformFit()} | tst_psAstrometry01.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psAstrometry01.c                                       *
-*            TestPoint: psAstrometry{psPlaneTransformInvert()}                     *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-<DATE><TIME>|<HOST>|E|psPlaneTransformInvert (FILE:LINENO)
-    Unallowable operation: in is NULL.
-<DATE><TIME>|<HOST>|E|psPlaneTransformInvert (FILE:LINENO)
-    Error: (1 > nSamples) (1 0).
-
----> TESTPOINT PASSED (psAstrometry{psPlaneTransformInvert()} | tst_psAstrometry01.c)
-
Index: unk/psLib/test/astronomy/verified/tst_psAstrometry01.stdout
===================================================================
--- /trunk/psLib/test/astronomy/verified/tst_psAstrometry01.stdout	(revision 7207)
+++ 	(revision )
@@ -1,28 +1,0 @@
-grom->latitude is 20.70
-grom->longitude is 156.30
-grom->height is 3055.00
-grom->abberationMag is 0.00
-grom->temperature is 7.00
-grom->pressure is 8.00
-grom->humidity is 20.00
-grom->wavelength is 11.00
-grom->lapseRate is 20.00
-grom->refractA is 0.26
-grom->refractB is 0.26
-----------------------------------------------------------------------------------
-Calling psPlaneTransformCombine with NULL trans1.  Should generate error and return NULL.
-----------------------------------------------------------------------------------
-Calling psPlaneTransformCombine with NULL trans2.  Should generate error and return NULL.
-----------------------------------------------------------------------------------
-Calling psPlaneTransformFit with NULL trans.  Should generate error and return NULL.
-----------------------------------------------------------------------------------
-Calling psPlaneTransformFit with NULL src psArray.  Should generate error and return NULL.
-----------------------------------------------------------------------------------
-Calling psPlaneTransformFit with NULL dst psArray.  Should generate error and return NULL.
-----------------------------------------------------------------------------------
-Calling psPlaneTransformFit with acceptable data.
-----------------------------------------------------------------------------------
-Calling psPlaneTransformInvert with NULL trans.  Should generate error and return NULL.
-----------------------------------------------------------------------------------
-Calling psPlaneTransformInvert with zero nSamples.  Should generate error and return NULL.
-Calling psPlaneTransformInvert with an acceptable linear transformation.
