Changeset 10786
- Timestamp:
- Dec 16, 2006, 11:48:15 PM (20 years ago)
- Location:
- trunk/psModules/test/astrom
- Files:
-
- 7 edited
-
. (modified) (1 prop)
-
.cvsignore (modified) (1 diff)
-
Makefile.am (modified) (2 diffs)
-
tap_pmAstrometryWCS.c (modified) (7 diffs)
-
tap_pmAstrometryWCS_DVO.c (modified) (11 diffs)
-
tap_pmAstrometryWCS_DVO2.c (modified) (9 diffs)
-
tap_pmAstrometryWCS_DVO3.c (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/astrom
- Property svn:ignore
-
old new 9 9 tap_pmAstrometryWCS_DVO2 10 10 tap_pmAstrometryWCS_DVO3 11 tap_pmAstrometryWCS_DVO
-
- Property svn:ignore
-
trunk/psModules/test/astrom/.cvsignore
r10711 r10786 9 9 tap_pmAstrometryWCS_DVO2 10 10 tap_pmAstrometryWCS_DVO3 11 tap_pmAstrometryWCS_DVO -
trunk/psModules/test/astrom/Makefile.am
r10711 r10786 1 2 3 1 AM_CPPFLAGS = \ 4 2 $(SRCINC) \ … … 20 18 21 19 test: check 20 21 tests: $(check_PROGRAMS) 22 $(top_srcdir)/test/test.pl 23 -
trunk/psModules/test/astrom/tap_pmAstrometryWCS.c
r10615 r10786 9 9 int main (void) 10 10 { 11 plan_tests(33); 11 12 12 pmModelGroupInit (); 13 14 plan_tests(240); 15 16 diag("pmAstrometryWCS tests"); 13 note("pmAstrometryWCS tests"); 17 14 18 15 { 19 diag("test pmAstromReadWCS");16 note("test pmAstromReadWCS"); 20 17 psMemId id = psMemGetId(); 21 18 … … 51 48 // toFPA carries pixel scale (pixels per micron) 52 49 // toTPA carries plate scale (microns per arcsecond) 53 bool status = pmAstromReadWCS (fpa, chip, header, 25.0*P S_RAD_DEG/3600.0, false);50 bool status = pmAstromReadWCS (fpa, chip, header, 25.0*PM_RAD_DEG/3600.0, false); 54 51 ok (status, "converted WCS keywords to FPA astrometry"); 55 52 skip_start (!status, 1, "*** WCS Conversion FAILS *** : skipping related tests"); … … 58 55 59 56 // make these tests double 60 ok_float(fpa->toSky->R*P S_DEG_RAD, 0.0, "projection center RA %f", fpa->toSky->R*PS_DEG_RAD);61 ok_float(fpa->toSky->R*P S_DEG_RAD, 0.0, "projection center DEC %f", fpa->toSky->R*PS_DEG_RAD);57 ok_float(fpa->toSky->R*PM_DEG_RAD, 0.0, "projection center RA %f", fpa->toSky->R*PM_DEG_RAD); 58 ok_float(fpa->toSky->R*PM_DEG_RAD, 0.0, "projection center DEC %f", fpa->toSky->R*PM_DEG_RAD); 62 59 63 ok_float(fpa->toSky->Xs, 25.0*P S_RAD_DEG/3600.0, "projection X scale %f", fpa->toSky->Xs);64 ok_float(fpa->toSky->Ys, 25.0*P S_RAD_DEG/3600.0, "projection X scale %f", fpa->toSky->Ys);60 ok_float(fpa->toSky->Xs, 25.0*PM_RAD_DEG/3600.0, "projection X scale %f", fpa->toSky->Xs); 61 ok_float(fpa->toSky->Ys, 25.0*PM_RAD_DEG/3600.0, "projection X scale %f", fpa->toSky->Ys); 65 62 66 63 ok_float(fpa->toTPA->x->coeff[1][0][0][0], 0.04, "TP scale (mm per pixel): %f", fpa->toTPA->x->coeff[1][0][0][0]); … … 84 81 85 82 { 86 diag("test pmAstromReadWCS");83 note("test pmAstromReadWCS"); 87 84 psMemId id = psMemGetId(); 88 89 psPlaneTransform *wcsTrans = psPlaneTransformAlloc (1, 1);90 wcsTrans->x->coeff[0][0] = 0.0;91 wcsTrans->y->coeff[0][0] = 0.0;92 wcsTrans->x->coeff[1][0] = 1.0;93 wcsTrans->x->coeff[0][1] = 0.0;94 wcsTrans->y->coeff[1][0] = 0.0;95 wcsTrans->y->coeff[0][1] = 1.0;96 97 98 85 99 86 // construct a header with a simple set of WCS values … … 128 115 // toFPA carries pixel scale (pixels per micron) 129 116 // toTPA carries plate scale (microns per arcsecond) 130 bool status = pmAstromReadWCS (fpa, chip, header, 25.0*P S_RAD_DEG/3600.0, false);117 bool status = pmAstromReadWCS (fpa, chip, header, 25.0*PM_RAD_DEG/3600.0, false); 131 118 ok (status, "converted WCS keywords to FPA astrometry"); 132 119 skip_start (!status, 1, "*** WCS Conversion FAILS *** : skipping related tests"); … … 135 122 136 123 // make these tests double 137 ok_float(fpa->toSky->R*P S_DEG_RAD, 0.0, "projection center RA %f", fpa->toSky->R*PS_DEG_RAD);138 ok_float(fpa->toSky->R*P S_DEG_RAD, 0.0, "projection center DEC %f", fpa->toSky->R*PS_DEG_RAD);124 ok_float(fpa->toSky->R*PM_DEG_RAD, 0.0, "projection center RA %f", fpa->toSky->R*PM_DEG_RAD); 125 ok_float(fpa->toSky->R*PM_DEG_RAD, 0.0, "projection center DEC %f", fpa->toSky->R*PM_DEG_RAD); 139 126 140 ok_float(fpa->toSky->Xs, 25.0*P S_RAD_DEG/3600.0, "projection X scale %f", fpa->toSky->Xs);141 ok_float(fpa->toSky->Ys, 25.0*P S_RAD_DEG/3600.0, "projection X scale %f", fpa->toSky->Ys);127 ok_float(fpa->toSky->Xs, 25.0*PM_RAD_DEG/3600.0, "projection X scale %f", fpa->toSky->Xs); 128 ok_float(fpa->toSky->Ys, 25.0*PM_RAD_DEG/3600.0, "projection X scale %f", fpa->toSky->Ys); 142 129 143 130 ok_float(fpa->toTPA->x->coeff[1][0][0][0], 0.04, "TP scale (mm per pixel): %f", fpa->toTPA->x->coeff[1][0][0][0]); … … 152 139 ok_float(chip->toFPA->y->coeff[0][1], 1.0, "CD2_2: %f", chip->toFPA->y->coeff[0][1]); 153 140 154 // apply both systems to real data:155 156 157 141 psFree (fpa); 158 142 psFree (chip); -
trunk/psModules/test/astrom/tap_pmAstrometryWCS_DVO.c
r10775 r10786 27 27 int main (void) 28 28 { 29 plan_tests(9 84);30 31 // diag("pmAstrometryWCS tests compared with DVO coords routines");32 // diag("this file tests pmAstromWCS <-> Header representations");29 plan_tests(992); 30 31 note("pmAstrometryWCS tests compared with DVO coords routines"); 32 note("this file tests pmAstromWCS <-> Header representations"); 33 33 34 34 test1in(); … … 44 44 void test3in() 45 45 { 46 // diag("test pmAstromWCStoHeader");46 note("test pmAstromWCStoHeader"); 47 47 psMemId id = psMemGetId(); 48 48 … … 76 76 pmAstromWCS *wcs2 = pmAstromWCSfromHeader(header2); 77 77 78 psMetadataConfigWrite (header1, "head1.md");79 psMetadataConfigWrite (header2, "head2.md");80 81 78 ok (wcs2 != NULL, "converted WCS keywords to WCS astrometry"); 82 79 skip_start (wcs2 == NULL, 1, "*** WCS Conversion FAILS *** : skipping related tests"); … … 122 119 void test2in() 123 120 { 124 // diag("test pmAstromWCStoHeader");121 note("test pmAstromWCStoHeader"); 125 122 psMemId id = psMemGetId(); 126 123 … … 198 195 void test1in() 199 196 { 200 // diag("test pmAstromWCStoHeader");197 note("test pmAstromWCStoHeader"); 201 198 psMemId id = psMemGetId(); 202 199 … … 271 268 void test3 () 272 269 { 273 // diag("test pmAstromWCSfromHeader ");270 note("test pmAstromWCSfromHeader "); 274 271 psMemId id = psMemGetId(); 275 272 … … 332 329 void test2 () 333 330 { 334 // diag("test pmAstromWCSfromHeader");331 note("test pmAstromWCSfromHeader"); 335 332 psMemId id = psMemGetId(); 336 333 … … 391 388 void test1() 392 389 { 393 // diag("test pmAstromWCSfromHeader");390 note("test pmAstromWCSfromHeader"); 394 391 psMemId id = psMemGetId(); 395 392 … … 450 447 void testA() 451 448 { 452 // diag("test coord allocs");449 note("test coord allocs"); 453 450 psMemId id = psMemGetId(); 454 451 … … 460 457 void testB() 461 458 { 462 // diag("test coord allocs");459 note("test coord allocs"); 463 460 psMemId id = psMemGetId(); 464 461 … … 525 522 plan_tests(0); 526 523 527 // diag("pmAstrometryWCS tests compared with DVO coords routines : SKIPPED (libdvo not available)");524 note("pmAstrometryWCS tests compared with DVO coords routines : SKIPPED (libdvo not available)"); 528 525 529 526 return exit_status(); -
trunk/psModules/test/astrom/tap_pmAstrometryWCS_DVO2.c
r10775 r10786 24 24 int main (void) 25 25 { 26 plan_tests(14 72);27 28 diag("pmAstromReadWCS tests compared with DVO coords routines");26 plan_tests(1483); 27 28 note("pmAstromReadWCS tests compared with DVO coords routines"); 29 29 30 30 test1(); … … 41 41 void test1() 42 42 { 43 diag("test pmAstromReadWCS");43 note("test pmAstromReadWCS"); 44 44 psMemId id = psMemGetId(); 45 45 … … 112 112 void test2() 113 113 { 114 diag("test pmAstromReadWCS");114 note("test pmAstromReadWCS"); 115 115 psMemId id = psMemGetId(); 116 116 … … 183 183 void test3() 184 184 { 185 diag("test pmAstromReadWCS");185 note("test pmAstromReadWCS"); 186 186 psMemId id = psMemGetId(); 187 187 … … 257 257 void test1x() 258 258 { 259 diag("test pmAstromReadWCS");259 note("test pmAstromReadWCS"); 260 260 psMemId id = psMemGetId(); 261 261 … … 328 328 void test2x() 329 329 { 330 diag("test pmAstromReadWCS");330 note("test pmAstromReadWCS"); 331 331 psMemId id = psMemGetId(); 332 332 … … 399 399 void test3x() 400 400 { 401 diag("test pmAstromReadWCS");401 note("test pmAstromReadWCS"); 402 402 psMemId id = psMemGetId(); 403 403 … … 473 473 void test3inv() 474 474 { 475 diag("test the inversion of the non-linear polynomial for toFPA -> fromFPA in pmAstromReadWCS");476 diag("note that the tolerance for these tests are rather loose");477 diag("a 2nd order polynomial is not a great approximate to 1 over a 2nd order polynomial");478 diag("unless the non-linear terms are quite small");475 note("test the inversion of the non-linear polynomial for toFPA -> fromFPA in pmAstromReadWCS"); 476 note("note that the tolerance for these tests are rather loose"); 477 note("a 2nd order polynomial is not a great approximate to 1 over a 2nd order polynomial"); 478 note("unless the non-linear terms are quite small"); 479 479 psMemId id = psMemGetId(); 480 480 … … 621 621 plan_tests(0); 622 622 623 diag("pmAstrometryWCS tests compared with DVO coords routines : SKIPPED (libdvo not available)");623 note("pmAstrometryWCS tests compared with DVO coords routines : SKIPPED (libdvo not available)"); 624 624 625 625 return exit_status(); -
trunk/psModules/test/astrom/tap_pmAstrometryWCS_DVO3.c
r10775 r10786 20 20 void test2x(); // small rotation with central offset 21 21 void test3x(); // 2nd order term with central offset 22 void test3inv(); // 2nd order term with central offset23 22 24 23 int main (void) 25 24 { 26 plan_tests(9 84);27 28 diag("pmAstromWriteWCS tests compared with DVO coords routines");29 30 //test1();31 //test2();32 //test3();33 //test1x();25 plan_tests(991); 26 27 note("pmAstromWriteWCS tests compared with DVO coords routines"); 28 29 test1(); 30 test2(); 31 test3(); 32 test1x(); 34 33 test2x(); 35 // test3x(); 36 // test3inv(); 34 test3x(); 37 35 38 36 return exit_status(); … … 41 39 void test1() 42 40 { 43 diag("test pmAstromReadWCS");41 note("test pmAstromReadWCS"); 44 42 psMemId id = psMemGetId(); 45 43 … … 73 71 74 72 psMetadata *header2 = psMetadataAlloc(); 75 status = pmAstromWriteWCS (header2, fpa, chip );73 status = pmAstromWriteWCS (header2, fpa, chip, 0.001); 76 74 pmAstromWCS *wcs = pmAstromWCSfromHeader(header2); 77 75 … … 131 129 void test2() 132 130 { 133 diag("test pmAstromReadWCS");131 note("test pmAstromReadWCS"); 134 132 psMemId id = psMemGetId(); 135 133 … … 165 163 166 164 psMetadata *header2 = psMetadataAlloc(); 167 status = pmAstromWriteWCS (header2, fpa, chip );165 status = pmAstromWriteWCS (header2, fpa, chip, 0.001); 168 166 psMetadataConfigWrite (header2, "head2.md"); 169 167 … … 225 223 void test3() 226 224 { 227 diag("test pmAstromReadWCS");225 note("test pmAstromReadWCS"); 228 226 psMemId id = psMemGetId(); 229 227 … … 260 258 261 259 psMetadata *header2 = psMetadataAlloc(); 262 status = pmAstromWriteWCS (header2, fpa, chip );260 status = pmAstromWriteWCS (header2, fpa, chip, 0.001); 263 261 psMetadataConfigWrite (header2, "head2.md"); 264 262 … … 320 318 void test1x() 321 319 { 322 diag("test pmAstromReadWCS");320 note("test pmAstromReadWCS"); 323 321 psMemId id = psMemGetId(); 324 322 … … 352 350 353 351 psMetadata *header2 = psMetadataAlloc(); 354 status = pmAstromWriteWCS (header2, fpa, chip );352 status = pmAstromWriteWCS (header2, fpa, chip, 0.001); 355 353 pmAstromWCS *wcs = pmAstromWCSfromHeader(header2); 356 354 … … 410 408 void test2x() 411 409 { 412 diag("test pmAstromReadWCS");410 note("test pmAstromReadWCS"); 413 411 psMemId id = psMemGetId(); 414 412 … … 418 416 coords.crval1 = 0.0; 419 417 coords.crval2 = 0.0; 420 coords.crpix1 = 20.0;421 coords.crpix2 = 50.0;418 coords.crpix1 = 50.0; 419 coords.crpix2 = -20.0; 422 420 coords.cdelt1 = 1.0/3600; 423 421 coords.cdelt2 = 1.0/3600; … … 444 442 445 443 psMetadata *header2 = psMetadataAlloc(); 446 status = pmAstromWriteWCS (header2, fpa, chip );444 status = pmAstromWriteWCS (header2, fpa, chip, 0.001); 447 445 psMetadataConfigWrite (header2, "head2.md"); 448 446 … … 504 502 void test3x() 505 503 { 506 diag("test pmAstromReadWCS");504 note("test pmAstromReadWCS"); 507 505 psMemId id = psMemGetId(); 508 506 … … 539 537 540 538 psMetadata *header2 = psMetadataAlloc(); 541 status = pmAstromWriteWCS (header2, fpa, chip );539 status = pmAstromWriteWCS (header2, fpa, chip, 0.001); 542 540 psMetadataConfigWrite (header2, "head2.md"); 543 541 … … 654 652 plan_tests(0); 655 653 656 diag("pmAstrometryWCS tests compared with DVO coords routines : SKIPPED (libdvo not available)");654 note("pmAstrometryWCS tests compared with DVO coords routines : SKIPPED (libdvo not available)"); 657 655 658 656 return exit_status();
Note:
See TracChangeset
for help on using the changeset viewer.
