IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2941


Ignore:
Timestamp:
Jan 10, 2005, 9:47:11 AM (22 years ago)
Author:
gusciora
Message:

...

Location:
trunk/psLib/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psCoord.c

    r2933 r2941  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-01-08 00:13:07 $
     12*  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-01-10 19:47:10 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    426426        proj.type = PS_PROJ_TAN;
    427427
     428        printf("------------ position 1 is (%f, %f)\n", position1->r, position1->d);
     429        printf("------------ position 2 is (%f, %f)\n", position2->r, position2->d);
     430        lin = psProject(position1, &proj);
     431        printf("------------ projected position 1 is (%f, %f)\n", lin->y, lin->x);
    428432        lin = psProject(position2, &proj);
     433        printf("------------ projected position 2 is (%f, %f)\n", lin->y, lin->x);
    429434        tmp = psDeproject(lin, &proj);
     435        printf("------------ deprojected position 2 is (%f, %f)\n", tmp->r, tmp->d);
     436
    430437        psFree(lin);
    431438
  • trunk/psLib/src/astronomy/psCoord.c

    r2933 r2941  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-01-08 00:13:07 $
     12*  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-01-10 19:47:10 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    426426        proj.type = PS_PROJ_TAN;
    427427
     428        printf("------------ position 1 is (%f, %f)\n", position1->r, position1->d);
     429        printf("------------ position 2 is (%f, %f)\n", position2->r, position2->d);
     430        lin = psProject(position1, &proj);
     431        printf("------------ projected position 1 is (%f, %f)\n", lin->y, lin->x);
    428432        lin = psProject(position2, &proj);
     433        printf("------------ projected position 2 is (%f, %f)\n", lin->y, lin->x);
    429434        tmp = psDeproject(lin, &proj);
     435        printf("------------ deprojected position 2 is (%f, %f)\n", tmp->r, tmp->d);
     436
    430437        psFree(lin);
    431438
  • trunk/psLib/src/dataManip/psConstants.h

    r2860 r2941  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-01-03 21:58:52 $
     8 *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-01-10 19:47:11 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3535#define PS_1_PI 0.3183098861837906715377675267450287  /* 1/pi */
    3636#define PS_2_PI 0.6366197723675813430755350534900574  /* 2/pi */
     37
     38#define PS_COT(X) (1.0 / atan(X))
     39#define DEG_TO_RAD(DEGREES) ((DEGREES) * M_PI / 180.0)
     40#define MIN_TO_RAD(MINUTES) ((MINUTES) * M_PI / (180.0 * 60.0))
     41#define SEC_TO_RAD(SECONDS) ((SECONDS) * M_PI / (180.0 * 60.0 * 60.0))
     42#define RAD_TO_DEG(RADIANS) ((RADIANS) * 180.0 / M_PI)
     43#define RAD_TO_MIN(RADIANS) ((RADIANS) * 180.0 * 60.0 / M_PI)
     44#define RAD_TO_SEC(RADIANS) ((RADIANS) * 180.0 * 60.0 * 60.0 / M_PI)
    3745
    3846/*****************************************************************************
  • trunk/psLib/src/dataManip/psFunctions.c

    r2847 r2941  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.78 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-12-29 22:15:51 $
     9 *  @version $Revision: 1.79 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-01-10 19:47:11 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    19441944    if (x < bins[0]) { \
    19451945        psLogMsg(__func__, PS_LOG_WARN, \
    1946                  "vectorBinDisect##TYPE(): ordinate %f is outside vector range (%f - %f).", \
    1947                  x, bins[0], bins[numBins-1]); \
     1946                 "vectorBinDisect%s(): ordinate %f is outside vector range (%f - %f).", \
     1947                 #TYPE, x, bins[0], bins[numBins-1]); \
    19481948        return(-2); \
    19491949    } \
     
    19511951    if (x > bins[numBins-1]) { \
    19521952        psLogMsg(__func__, PS_LOG_WARN, \
    1953                  "vectorBinDisect##TYPE(): ordinate %f is outside vector range (%f - %f).", \
    1954                  x, bins[0], bins[numBins-1]); \
     1953                 "vectorBinDisect%s(): ordinate %f is outside vector range (%f - %f).", \
     1954                 #TYPE, x, bins[0], bins[numBins-1]); \
    19551955        return(-1); \
    19561956    } \
  • trunk/psLib/src/math/psConstants.h

    r2860 r2941  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-01-03 21:58:52 $
     8 *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-01-10 19:47:11 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3535#define PS_1_PI 0.3183098861837906715377675267450287  /* 1/pi */
    3636#define PS_2_PI 0.6366197723675813430755350534900574  /* 2/pi */
     37
     38#define PS_COT(X) (1.0 / atan(X))
     39#define DEG_TO_RAD(DEGREES) ((DEGREES) * M_PI / 180.0)
     40#define MIN_TO_RAD(MINUTES) ((MINUTES) * M_PI / (180.0 * 60.0))
     41#define SEC_TO_RAD(SECONDS) ((SECONDS) * M_PI / (180.0 * 60.0 * 60.0))
     42#define RAD_TO_DEG(RADIANS) ((RADIANS) * 180.0 / M_PI)
     43#define RAD_TO_MIN(RADIANS) ((RADIANS) * 180.0 * 60.0 / M_PI)
     44#define RAD_TO_SEC(RADIANS) ((RADIANS) * 180.0 * 60.0 * 60.0 / M_PI)
    3745
    3846/*****************************************************************************
  • trunk/psLib/src/math/psPolynomial.c

    r2847 r2941  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.78 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-12-29 22:15:51 $
     9 *  @version $Revision: 1.79 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-01-10 19:47:11 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    19441944    if (x < bins[0]) { \
    19451945        psLogMsg(__func__, PS_LOG_WARN, \
    1946                  "vectorBinDisect##TYPE(): ordinate %f is outside vector range (%f - %f).", \
    1947                  x, bins[0], bins[numBins-1]); \
     1946                 "vectorBinDisect%s(): ordinate %f is outside vector range (%f - %f).", \
     1947                 #TYPE, x, bins[0], bins[numBins-1]); \
    19481948        return(-2); \
    19491949    } \
     
    19511951    if (x > bins[numBins-1]) { \
    19521952        psLogMsg(__func__, PS_LOG_WARN, \
    1953                  "vectorBinDisect##TYPE(): ordinate %f is outside vector range (%f - %f).", \
    1954                  x, bins[0], bins[numBins-1]); \
     1953                 "vectorBinDisect%s(): ordinate %f is outside vector range (%f - %f).", \
     1954                 #TYPE, x, bins[0], bins[numBins-1]); \
    19551955        return(-1); \
    19561956    } \
  • trunk/psLib/src/math/psSpline.c

    r2847 r2941  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.78 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-12-29 22:15:51 $
     9 *  @version $Revision: 1.79 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-01-10 19:47:11 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    19441944    if (x < bins[0]) { \
    19451945        psLogMsg(__func__, PS_LOG_WARN, \
    1946                  "vectorBinDisect##TYPE(): ordinate %f is outside vector range (%f - %f).", \
    1947                  x, bins[0], bins[numBins-1]); \
     1946                 "vectorBinDisect%s(): ordinate %f is outside vector range (%f - %f).", \
     1947                 #TYPE, x, bins[0], bins[numBins-1]); \
    19481948        return(-2); \
    19491949    } \
     
    19511951    if (x > bins[numBins-1]) { \
    19521952        psLogMsg(__func__, PS_LOG_WARN, \
    1953                  "vectorBinDisect##TYPE(): ordinate %f is outside vector range (%f - %f).", \
    1954                  x, bins[0], bins[numBins-1]); \
     1953                 "vectorBinDisect%s(): ordinate %f is outside vector range (%f - %f).", \
     1954                 #TYPE, x, bins[0], bins[numBins-1]); \
    19551955        return(-1); \
    19561956    } \
Note: See TracChangeset for help on using the changeset viewer.