Changeset 8245 for trunk/psLib/src/astro
- Timestamp:
- Aug 8, 2006, 4:26:44 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astro/psCoord.c (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.c
r8232 r8245 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.12 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-08-0 8 23:32:22$12 * @version $Revision: 1.123 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-09 02:26:44 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 589 589 psPolynomial2D *trans2) 590 590 { 591 psTrace( __func__, 4, "---- %s() begin ----\n", __func__);592 psTrace( __func__, 5, "multiplyDPoly2D(%d %d: %d %d)\n", trans1->nX, trans1->nY, trans2->nX, trans2->nY);591 psTrace("psLib.astro", 4, "---- %s() begin ----\n", __func__); 592 psTrace("psLib.astro", 5, "multiplyDPoly2D(%d %d: %d %d)\n", trans1->nX, trans1->nY, trans2->nX, trans2->nY); 593 593 psS32 orderX = trans1->nX + trans2->nX; 594 594 psS32 orderY = trans1->nY + trans2->nY; 595 psTrace( __func__, 5, "out poly (nX, nY) is (%d, %d)\n", orderX, orderY);595 psTrace("psLib.astro", 5, "out poly (nX, nY) is (%d, %d)\n", orderX, orderY); 596 596 597 597 psPolynomial2D *out = psPolynomial2DAlloc(PS_POLYNOMIAL_ORD, orderX, orderY); 598 psTrace( __func__, 5, "Creating poly (%d, %d)\n", orderX, orderY);598 psTrace("psLib.astro", 5, "Creating poly (%d, %d)\n", orderX, orderY); 599 599 600 600 for (psS32 t1x = 0 ; t1x < (1 + trans1->nX) ; t1x++) { … … 609 609 } 610 610 } 611 psTrace( __func__, 4, "---- %s() end ----\n", __func__);611 psTrace("psLib.astro", 4, "---- %s() end ----\n", __func__); 612 612 return(out); 613 613 } … … 623 623 int nSamples) 624 624 { 625 psTrace( __func__, 3, "---- %s() begin ----\n", __func__);626 psTrace( __func__, 3, "tracelevel(%s) is %d\n", __func__, psTraceGetLevel(__func__));625 psTrace("psLib.astro", 3, "---- %s() begin ----\n", __func__); 626 psTrace("psLib.astro", 3, "tracelevel(%s) is %d\n", __func__, psTraceGetLevel(__func__)); 627 627 628 628 PS_ASSERT_PTR_NON_NULL(trans1, NULL); 629 629 PS_ASSERT_PTR_NON_NULL(trans2, NULL); 630 psTrace( __func__, 5, "trans1->x is (%d, %d) order.\n", trans1->x->nX, trans1->x->nY);631 psTrace( __func__, 5, "trans1->y is (%d, %d) order.\n", trans1->y->nX, trans1->y->nY);632 psTrace( __func__, 5, "trans2->x is (%d, %d) order.\n", trans2->x->nX, trans2->x->nY);633 psTrace( __func__, 5, "trans2->y is (%d, %d) order.\n", trans2->y->nX, trans2->y->nY);630 psTrace("psLib.astro", 5, "trans1->x is (%d, %d) order.\n", trans1->x->nX, trans1->x->nY); 631 psTrace("psLib.astro", 5, "trans1->y is (%d, %d) order.\n", trans1->y->nX, trans1->y->nY); 632 psTrace("psLib.astro", 5, "trans2->x is (%d, %d) order.\n", trans2->x->nX, trans2->x->nY); 633 psTrace("psLib.astro", 5, "trans2->y is (%d, %d) order.\n", trans2->y->nX, trans2->y->nY); 634 634 if (psTraceGetLevel(__func__) >= 6) { 635 635 PS_POLY_PRINT_2D(trans1->x); … … 648 648 psS32 orderX = PS_MAX(orderXnX, orderYnX); 649 649 psS32 orderY = PS_MAX(orderXnY, orderYnY); 650 psTrace( __func__, 5, "The new (orderX, orderY) is (%d, %d)\n", orderX, orderY);650 psTrace("psLib.astro", 5, "The new (orderX, orderY) is (%d, %d)\n", orderX, orderY); 651 651 652 652 // … … 679 679 } 680 680 } 681 psTrace( __func__, 5, "New polynomial ranks are (%d %d %d %d)\n", myPT->x->nX, myPT->x->nY, myPT->y->nX, myPT->y->nY);681 psTrace("psLib.astro", 5, "New polynomial ranks are (%d %d %d %d)\n", myPT->x->nX, myPT->x->nY, myPT->y->nX, myPT->y->nY); 682 682 683 683 // … … 707 707 } 708 708 709 psTrace( __func__, 5, "Determine the new x-polynomial\n");709 psTrace("psLib.astro", 5, "Determine the new x-polynomial\n"); 710 710 for (psS32 t2x = 0 ; t2x < (trans2->x->nX + 1) ; t2x++) { 711 711 for (psS32 t2y = 0 ; t2y < (trans2->x->nY + 1) ; t2y++) { 712 psTrace( __func__, 6, "X: -------------------- (t2x, t2y) (%d, %d) --------------------\n", t2x, t2y);712 psTrace("psLib.astro", 6, "X: -------------------- (t2x, t2y) (%d, %d) --------------------\n", t2x, t2y); 713 713 if (trans2->x->mask[t2x][t2y] == 0) { 714 psTrace( __func__, 6, "In this iteration, we raise trans1->x to the %d power and trans1->y to the %d-power.\n", t2x, t2y);714 psTrace("psLib.astro", 6, "In this iteration, we raise trans1->x to the %d power and trans1->y to the %d-power.\n", t2x, t2y); 715 715 psPolynomial2D *newPoly = multiplyDPoly2D(trans1XPolys[t2x], trans1YPolys[t2y]); 716 716 … … 734 734 } 735 735 if (psTraceGetLevel(__func__) >= 6) { 736 psTrace( __func__, 6, "The final x-polynomial\n");736 psTrace("psLib.astro", 6, "The final x-polynomial\n"); 737 737 PS_POLY_PRINT_2D(myPT->x); 738 738 } … … 741 741 // Determine the new y-polynomial 742 742 // 743 psTrace( __func__, 5, "Determine the new y-polynomial\n");743 psTrace("psLib.astro", 5, "Determine the new y-polynomial\n"); 744 744 for (psS32 t2x = 0 ; t2x < (trans2->y->nX + 1) ; t2x++) { 745 745 for (psS32 t2y = 0 ; t2y < (trans2->y->nY + 1) ; t2y++) { 746 psTrace( __func__, 5, "Y: -------------------- (t2x, t2y) (%d, %d) --------------------\n", t2x, t2y);746 psTrace("psLib.astro", 5, "Y: -------------------- (t2x, t2y) (%d, %d) --------------------\n", t2x, t2y); 747 747 if (trans2->y->mask[t2x][t2y] == 0) { 748 psTrace( __func__, 5, "In this iteration, we raise trans1->x to the %d power and trans1->y to the %d-power.\n", t2x, t2y);748 psTrace("psLib.astro", 5, "In this iteration, we raise trans1->x to the %d power and trans1->y to the %d-power.\n", t2x, t2y); 749 749 psPolynomial2D *newPoly = multiplyDPoly2D(trans1XPolys[t2x], trans1YPolys[t2y]); 750 750 … … 767 767 } 768 768 if (psTraceGetLevel(__func__) >= 6) { 769 psTrace( __func__, 6, "The final y-polynomial\n");769 psTrace("psLib.astro", 6, "The final y-polynomial\n"); 770 770 PS_POLY_PRINT_2D(myPT->y); 771 771 } … … 778 778 psFree(trans1YPolys); 779 779 780 psTrace( __func__, 3, "---- %s() end ----\n", __func__);780 psTrace("psLib.astro", 3, "---- %s() end ----\n", __func__); 781 781 return(myPT); 782 782 } … … 969 969 970 970 out->x+= xPoly->coeff[loop_x][loop_y] * xSum * ySum * ((psF32) loop_x); 971 psTrace( __func__, 6, "out->x+= (%.2f * %.2f * %.2f * %.2f)\n", xPoly->coeff[loop_x][loop_y], xSum, ySum, ((psF32) loop_x));971 psTrace("psLib.astro", 6, "out->x+= (%.2f * %.2f * %.2f * %.2f)\n", xPoly->coeff[loop_x][loop_y], xSum, ySum, ((psF32) loop_x)); 972 972 ySum*= coord->y; 973 973 } … … 991 991 992 992 out->y+= yPoly->coeff[loop_x][loop_y] * xSum * ySum * ((psF32) loop_y); 993 psTrace( __func__, 6, "out->y+= (%.2f * %.2f * %.2f * %.2f)\n", yPoly->coeff[loop_x][loop_y], xSum, ySum, ((psF32) loop_y));993 psTrace("psLib.astro", 6, "out->y+= (%.2f * %.2f * %.2f * %.2f)\n", yPoly->coeff[loop_x][loop_y], xSum, ySum, ((psF32) loop_y)); 994 994 ySum*= coord->y; 995 995 }
Note:
See TracChangeset
for help on using the changeset viewer.
