Changeset 2098
- Timestamp:
- Oct 13, 2004, 2:12:40 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astronomy/psAstrometry.c (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astronomy/psAstrometry.c
r2097 r2098 8 8 * @author George Gusciora, MHPCC 9 9 * 10 * @version $Revision: 1. 39$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-10-14 00: 06:17$10 * @version $Revision: 1.40 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-10-14 00:12:40 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 59 59 { 60 60 int i = 0; 61 if (transform == NULL) { 62 psAbort(__func__, "input parameter transform is NULL."); 63 } 61 PS_CHECK_NULL_PTR_RETURN_NULL(transform); 64 62 65 63 for (i=2;i<(transform->x->nX);i++) { … … 116 114 double F = transform->y->coeff[0][1]; 117 115 118 if (transform == NULL) { 119 psAbort(__func__, "input parameter transform is NULL."); 120 } 116 PS_CHECK_NULL_PTR_RETURN_NULL(transform); 121 117 psPlaneTransform *out = psAlloc(sizeof(psPlaneTransform)); 122 118 … … 291 287 const psObservatory* observatory) 292 288 { 289 PS_CHECK_NULL_PTR_RETURN_NULL(observatory); 293 290 psExposure* exp = psAlloc(sizeof(psExposure)); 294 291 … … 472 469 psGrommit* psGrommitAlloc(const psExposure* exp) 473 470 { 474 if (exp == NULL) { 475 psAbort(__func__, "the 'exp' parameter is NULL\n"); 476 } 471 PS_CHECK_NULL_PTR_RETURN_NULL(exp); 477 472 478 473 double date = psTimeToMJD(exp->time); … … 610 605 const psCell* cell) 611 606 { 612 if (inCoord == NULL) { 613 psAbort(__func__, "input parameter inCoord is NULL."); 614 } 615 if (cell == NULL) { 616 psAbort(__func__, "input parameter cell is NULL."); 617 } 607 PS_CHECK_NULL_PTR_RETURN_NULL(inCoord); 608 PS_CHECK_NULL_PTR_RETURN_NULL(cell); 618 609 619 610 return (psPlaneTransformApply(outCoord, cell->toChip, inCoord)); … … 624 615 const psChip* chip) 625 616 { 626 if (inCoord == NULL) { 627 psAbort(__func__, "input parameter inCoord is NULL."); 628 } 629 if (chip == NULL) { 630 psAbort(__func__, "input parameter chip is NULL."); 631 } 617 PS_CHECK_NULL_PTR_RETURN_NULL(inCoord); 618 PS_CHECK_NULL_PTR_RETURN_NULL(chip); 632 619 633 620 return (psPlaneTransformApply(outCoord, chip->toFPA, inCoord)); … … 640 627 const psFPA* fpa) 641 628 { 642 if (inCoord == NULL) { 643 psAbort(__func__, "input parameter inCoord is NULL."); 644 } 645 if (fpa == NULL) { 646 psAbort(__func__, "input parameter fpa is NULL."); 647 } 629 PS_CHECK_NULL_PTR_RETURN_NULL(inCoord); 630 PS_CHECK_NULL_PTR_RETURN_NULL(fpa); 648 631 649 632 return(psPlaneDistortApply(outCoord, fpa->toTangentPlane, inCoord, … … 661 644 double ZOB = 0.0; 662 645 double HOB = 0.0; 663 664 if (tpCoord == NULL) { 665 psAbort(__func__, "input parameter tpCoord is NULL."); 666 } 667 if (grommit == NULL) { 668 psAbort(__func__, "input parameter grommit is NULL."); 669 } 646 PS_CHECK_NULL_PTR_RETURN_NULL(tpCoord); 647 PS_CHECK_NULL_PTR_RETURN_NULL(grommit); 670 648 if (outSphere == NULL) { 671 649 outSphere = (psSphere* ) psAlloc(sizeof(psSphere)); … … 682 660 const psCell* cell) 683 661 { 684 if (cellCoord == NULL) { 685 psAbort(__func__, "input parameter cellCoord is NULL."); 686 } 687 if (cell == NULL) { 688 psAbort(__func__, "input parameter cell is NULL."); 689 } 662 PS_CHECK_NULL_PTR_RETURN_NULL(cellCoord); 663 PS_CHECK_NULL_PTR_RETURN_NULL(cell); 690 664 691 665 return (psPlaneTransformApply(fpaCoord, cell->toFPA, cellCoord)); … … 698 672 const psCell* cell) 699 673 { 700 if (cellCoord == NULL) { 701 psAbort(__func__, "input parameter cellCoord is NULL."); 702 } 703 if (cell == NULL) { 704 psAbort(__func__, "input parameter cell is NULL."); 705 } 674 PS_CHECK_NULL_PTR_RETURN_NULL(cellCoord); 675 PS_CHECK_NULL_PTR_RETURN_NULL(cell); 706 676 707 677 psPlane* fpaCoord = NULL; … … 734 704 const psCell* cell) 735 705 { 736 if (cellCoord == NULL) { 737 psAbort(__func__, "input parameter cellCoord is NULL."); 738 } 739 if (cell == NULL) { 740 psAbort(__func__, "input parameter cell is NULL."); 741 } 706 PS_CHECK_NULL_PTR_RETURN_NULL(cellCoord); 707 PS_CHECK_NULL_PTR_RETURN_NULL(cell); 742 708 743 709 psPlane *tpCoord = NULL; … … 776 742 char* type = "RA"; 777 743 778 if (in == NULL) { 779 psAbort(__func__, "input parameter in is NULL."); 780 } 781 if (grommit == NULL) { 782 psAbort(__func__, "input parameter grommit is NULL."); 783 } 744 PS_CHECK_NULL_PTR_RETURN_NULL(in); 745 PS_CHECK_NULL_PTR_RETURN_NULL(grommit); 746 784 747 if (tpCoord == NULL) { 785 748 tpCoord = (psPlane* ) psAlloc(sizeof(psPlane)); … … 798 761 const psFPA* fpa) 799 762 { 800 if (tpCoord == NULL) { 801 psAbort(__func__, "input parameter tpCoord is NULL."); 802 } 803 if (fpa == NULL) { 804 psAbort(__func__, "input parameter fpa is NULL."); 805 } 763 PS_CHECK_NULL_PTR_RETURN_NULL(tpCoord); 764 PS_CHECK_NULL_PTR_RETURN_NULL(fpa); 806 765 807 766 return (psPlaneDistortApply(fpaCoord, fpa->fromTangentPlane, … … 813 772 const psChip* chip) 814 773 { 815 if (fpaCoord == NULL) { 816 psAbort(__func__, "input parameter fpaCoord is NULL."); 817 } 818 if (chip == NULL) { 819 psAbort(__func__, "input parameter chip is NULL."); 820 } 821 822 psFPA *FPA = chip->parent; 823 if (FPA == NULL) { 824 psAbort(__func__, "chip->parent is NULL"); 825 } 826 774 PS_CHECK_NULL_PTR_RETURN_NULL(fpaCoord); 775 PS_CHECK_NULL_PTR_RETURN_NULL(chip); 776 PS_CHECK_NULL_PTR_RETURN_NULL(chip->parent); 777 // psFPA *FPA = chip->parent; 827 778 chipCoord = psPlaneTransformApply(chipCoord, chip->fromFPA, fpaCoord); 828 779 … … 834 785 const psCell* cell) 835 786 { 836 if (chipCoord == NULL) { 837 psAbort(__func__, "input parameter chipCoord is NULL."); 838 } 839 if (cell == NULL) { 840 psAbort(__func__, "input parameter cell is NULL."); 841 } 842 843 psChip *chip = cell->parent; 844 if (chip == NULL) { 845 psAbort(__func__, "cell->parent is NULL"); 846 } 787 PS_CHECK_NULL_PTR_RETURN_NULL(chipCoord); 788 PS_CHECK_NULL_PTR_RETURN_NULL(cell); 789 PS_CHECK_NULL_PTR_RETURN_NULL(cell->parent); 847 790 848 791 cellCoord = psPlaneTransformApply(cellCoord, cell->fromChip, chipCoord); … … 857 800 const psCell* cell) 858 801 { 859 if (skyCoord == NULL) { 860 psAbort(__func__, "input parameter skyCoord is NULL."); 861 } 862 if (cell == NULL) { 863 psAbort(__func__, "input parameter cell is NULL."); 864 } 802 PS_CHECK_NULL_PTR_RETURN_NULL(skyCoord); 803 PS_CHECK_NULL_PTR_RETURN_NULL(cell); 865 804 866 805 psChip *parChip = cell->parent; … … 892 831 const psCell* cell) 893 832 { 894 if (skyCoord == NULL) { 895 psAbort(__func__, "input parameter skyCoord is NULL."); 896 } 897 if (cell == NULL) { 898 psAbort(__func__, "input parameter cell is NULL."); 899 } 833 PS_CHECK_NULL_PTR_RETURN_NULL(skyCoord); 834 PS_CHECK_NULL_PTR_RETURN_NULL(cell); 900 835 901 836 psPlane *tpCoord = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.
