Changeset 6529
- Timestamp:
- Mar 6, 2006, 12:53:47 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/test/astrom/tst_pmAstrometry01.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/astrom/tst_pmAstrometry01.c
r6511 r6529 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $8 * @date $Date: 2006-03-0 4 01:01:33$7 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2006-03-06 22:53:47 $ 9 9 * 10 10 * XXX: Add tests were the coordinate does not transform to any legitimate cell … … 248 248 psPlane cellCoord; 249 249 psPlane testCoord; 250 psSphere skyCoord; 250 psSphere *skyCoord = psSphereAlloc(); 251 // XXX: This code causes a seg fault. 252 // psSphere skyTmp; 253 // psMemCheckType(PS_DATA_SPHERE, &skyTmp); 251 254 psPlane tpCoord; 252 255 psS32 testStatus = 0; … … 340 343 if (VERBOSE) { 341 344 printf("------------------ (%.2f, %.2f) ------------------\n", fpaCoord.x, fpaCoord.y); 345 printf("(chip, cell, x, y) is (%d, %d, %d, %d)\n", chip, cell, x, y); 342 346 } 343 347 pmChip* tmpChip = pmChipInFPA(&fpaCoord, myFPA); … … 405 409 // 406 410 if (1) { 407 psSphere *rc = pmCoordTPToSky( &skyCoord, &testCoord, myFPA->projection);411 psSphere *rc = pmCoordTPToSky(skyCoord, &testCoord, myFPA->projection); 408 412 if (rc == NULL) { 409 413 printf("pmCoordTPToSky() failed.\n"); 410 414 } else { 411 psPlane *rc = pmCoordSkyToTP(&tpCoord, &skyCoord, myFPA->projection);415 psPlane *rc = pmCoordSkyToTP(&tpCoord, skyCoord, myFPA->projection); 412 416 if (rc == NULL) { 413 417 printf("pmCoordSkyToTP() failed.\n"); … … 422 426 } 423 427 if (VERBOSE) { 424 printf("(%.2f %.2f) -> (%.2f %.2f) -> (%.2f %.2f)\n", testCoord.x, testCoord.y, skyCoord .r, skyCoord.d, tpCoord.x, tpCoord.y);428 printf("(%.2f %.2f) -> (%.2f %.2f) -> (%.2f %.2f)\n", testCoord.x, testCoord.y, skyCoord->r, skyCoord->d, tpCoord.x, tpCoord.y); 425 429 } 426 430 } … … 433 437 if (1) { 434 438 psPlane tmpCellCoord; 435 psSphere *rc = pmCoordCellToSky( &skyCoord, &cellCoord, 0.0, 0.0, myCell);439 psSphere *rc = pmCoordCellToSky(skyCoord, &cellCoord, 0.0, 0.0, myCell); 436 440 if (rc == NULL) { 437 441 printf("pmCoordCellToSky() failed.\n"); 438 442 } else { 439 psPlane *rc = pmCoordSkyToCell(&tmpCellCoord, &skyCoord, 0.0, 0.0, myCell);443 psPlane *rc = pmCoordSkyToCell(&tmpCellCoord, skyCoord, 0.0, 0.0, myCell); 440 444 if (rc == NULL) { 441 445 printf("pmCoordSkyToCell() failed.\n"); … … 450 454 } 451 455 if (VERBOSE) { 452 printf("(%.2f %.2f) -> (%.2f %.2f) -> (%.2f %.2f)\n", testCoord.x, testCoord.y, skyCoord .r, skyCoord.d, tmpCellCoord.x, tmpCellCoord.y);456 printf("(%.2f %.2f) -> (%.2f %.2f) -> (%.2f %.2f)\n", testCoord.x, testCoord.y, skyCoord->r, skyCoord->d, tmpCellCoord.x, tmpCellCoord.y); 453 457 } 454 458 } … … 464 468 if ((NUM_CHIPS == 1) && (NUM_CELLS == 1)) { 465 469 psPlane tmpCellCoord; 466 psSphere *rc = pmCoordCellToSkyQuick( &skyCoord, &cellCoord, myCell);470 psSphere *rc = pmCoordCellToSkyQuick(skyCoord, &cellCoord, myCell); 467 471 if (rc == NULL) { 468 472 printf("pmCoordCellToSkyQuick() failed.\n"); 469 473 } else { 470 psPlane *rc = pmCoordSkyToCellQuick(&tmpCellCoord, &skyCoord, myCell);474 psPlane *rc = pmCoordSkyToCellQuick(&tmpCellCoord, skyCoord, myCell); 471 475 if (rc == NULL) { 472 476 printf("pmCoordSkyToCellQuick() failed.\n"); … … 481 485 } 482 486 if (VERBOSE) { 483 printf("(%.2f %.2f) -> (%.2f %.2f) -> (%.2f %.2f)\n", testCoord.x, testCoord.y, skyCoord .r, skyCoord.d, tmpCellCoord.x, tmpCellCoord.y);487 printf("(%.2f %.2f) -> (%.2f %.2f) -> (%.2f %.2f)\n", testCoord.x, testCoord.y, skyCoord->r, skyCoord->d, tmpCellCoord.x, tmpCellCoord.y); 484 488 } 485 489 } … … 512 516 } 513 517 psFree(myFPA); 518 psFree(skyCoord); 514 519 515 520 return(testStatus);
Note:
See TracChangeset
for help on using the changeset viewer.
