Changeset 2104
- Timestamp:
- Oct 13, 2004, 3:17:50 PM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 3 edited
-
astro/psCoord.c (modified) (2 diffs)
-
astronomy/psAstrometry.c (modified) (16 diffs)
-
astronomy/psCoord.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.c
r2103 r2104 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.2 4$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-10-14 01:1 0:58$12 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-10-14 01:17:50 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 26 26 #include "psAbort.h" 27 27 #include "psTime.h" 28 #include "psConstants.h" 29 #include "psError.h" 28 30 #include <math.h> 29 31 #include <float.h> -
trunk/psLib/src/astronomy/psAstrometry.c
r2098 r2104 8 8 * @author George Gusciora, MHPCC 9 9 * 10 * @version $Revision: 1.4 0$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-10-14 0 0:12:40 $10 * @version $Revision: 1.41 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-10-14 01:17:50 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 59 59 { 60 60 int i = 0; 61 PS_CHECK_NULL_PTR_RETURN_ NULL(transform);61 PS_CHECK_NULL_PTR_RETURN_ZERO(transform); 62 62 63 63 for (i=2;i<(transform->x->nX);i++) { … … 214 214 215 215 /* 216 *217 216 * XXX: Verify that you interpreted the SDR correctly. 218 217 * … … 499 498 const psFPA* FPA) 500 499 { 501 //printf("Entering psCellInFPA()\n"); 500 PS_CHECK_NULL_PTR_RETURN_NULL(fpaCoord); 501 PS_CHECK_NULL_PTR_RETURN_NULL(FPA); 502 502 psChip* tmpChip = NULL; 503 503 psPlane chipCoord; 504 504 psCell* outCell = NULL; 505 506 PS_CHECK_NULL_PTR_RETURN_NULL(fpaCoord);507 PS_CHECK_NULL_PTR_RETURN_NULL(FPA);508 505 509 506 // Determine which chip contains the fpaCoords. … … 519 516 outCell = psCellInChip(&chipCoord, tmpChip); 520 517 521 //printf("Exiting psCellInFPA()\n");522 518 return (outCell); 523 519 } … … 526 522 const psFPA* FPA) 527 523 { 528 //printf("Entering psChipInFPA()\n");529 524 PS_CHECK_NULL_PTR_RETURN_NULL(fpaCoord); 530 525 PS_CHECK_NULL_PTR_RETURN_NULL(FPA); … … 535 530 psCell *tmpCell = NULL; 536 531 537 // Loop through every chip in this FPA. Convert the original 538 // FPA coordinates to chip coordinates for that chip. Then,539 // determine if any cells in that chip contain those chip540 // coordinates. 532 // Loop through every chip in this FPA. Convert the original FPA 533 // coordinates to chip coordinates for that chip. Then, determine if any 534 // cells in that chip contain those chip coordinates. 535 541 536 for (int i = 0; i < nChips; i++) { 542 //printf("HERE 01 (checking chip %d)\n", i);543 537 psChip* tmpChip = chips->data[i]; 544 538 psPlaneTransformApply(&chipCoord, tmpChip->fromFPA, fpaCoord); … … 546 540 tmpCell = psCellInChip(&chipCoord, tmpChip); 547 541 if (tmpCell != NULL) { 548 //printf("Exiting psChipInFPA()\n");549 542 return(tmpChip); 550 543 } 551 544 } 552 545 553 //printf("Exiting psChipInFPA()\n");554 546 return (NULL); 555 547 } … … 558 550 const psChip* chip) 559 551 { 560 //printf("Entering psCellInChip(%f, %f, %d)\n", chipCoord->x, chipCoord->y, chip);561 552 PS_CHECK_NULL_PTR_RETURN_NULL(chipCoord); 562 553 PS_CHECK_NULL_PTR_RETURN_NULL(chip); … … 567 558 cells = chip->cells; 568 559 if (cells == NULL) { 569 //printf("Exiting psCellInChip()\n");570 560 return NULL; 571 561 } … … 590 580 cellCoord.y, 591 581 tmpReadout->image)) { 592 //printf("Exiting psCellInChip()\n");593 582 return (tmpCell); 594 583 } … … 597 586 } 598 587 599 //printf("Exiting psCellInChip()\n");600 588 return (NULL); 601 589 } … … 641 629 const psGrommit* grommit) 642 630 { 631 PS_CHECK_NULL_PTR_RETURN_NULL(tpCoord); 632 PS_CHECK_NULL_PTR_RETURN_NULL(grommit); 633 643 634 double AOB = 0.0; 644 635 double ZOB = 0.0; 645 636 double HOB = 0.0; 646 PS_CHECK_NULL_PTR_RETURN_NULL(tpCoord);647 PS_CHECK_NULL_PTR_RETURN_NULL(grommit);648 637 if (outSphere == NULL) { 649 638 outSphere = (psSphere* ) psAlloc(sizeof(psSphere)); … … 740 729 const psGrommit* grommit) 741 730 { 742 char* type = "RA";743 744 731 PS_CHECK_NULL_PTR_RETURN_NULL(in); 745 732 PS_CHECK_NULL_PTR_RETURN_NULL(grommit); 733 734 char* type = "RA"; 746 735 747 736 if (tpCoord == NULL) { … … 775 764 PS_CHECK_NULL_PTR_RETURN_NULL(chip); 776 765 PS_CHECK_NULL_PTR_RETURN_NULL(chip->parent); 777 // psFPA *FPA = chip->parent; 766 778 767 chipCoord = psPlaneTransformApply(chipCoord, chip->fromFPA, fpaCoord); 779 780 768 return(chipCoord); 781 769 } … … 790 778 791 779 cellCoord = psPlaneTransformApply(cellCoord, cell->fromChip, chipCoord); 792 793 780 return(cellCoord); 794 781 } -
trunk/psLib/src/astronomy/psCoord.c
r2103 r2104 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.2 4$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-10-14 01:1 0:58$12 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-10-14 01:17:50 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 26 26 #include "psAbort.h" 27 27 #include "psTime.h" 28 #include "psConstants.h" 29 #include "psError.h" 28 30 #include <math.h> 29 31 #include <float.h>
Note:
See TracChangeset
for help on using the changeset viewer.
