IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3182


Ignore:
Timestamp:
Feb 9, 2005, 4:36:42 PM (21 years ago)
Author:
desonia
Message:

prepared the config/data directories to be installed into standard areas.

Location:
trunk/psLib
Files:
41 added
2 deleted
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/Makefile.am

    r3153 r3182  
    1 SUBDIRS = src config test swig
     1SUBDIRS = etc src test swig
    22
    33bin_SCRIPTS = pslib-config
     
    1010docs:
    1111        $(DOXYGEN)
     12
     13install-data-hook:
     14  $(INSTALL) share/* $(datadir)
  • trunk/psLib/configure.in

    r3153 r3182  
    66AC_SUBST(PSLIB_LT_VERSION,$PSLIB_LT_VERSION)
    77
     8dnl Setup CFLAGS with project-particulars
     9CFLAGS="${CFLAGS=} -Wall -Werror -std=c99 -D_GNU_SOURCE"
     10
    811AC_DISABLE_STATIC
    912AC_PROG_MAKE_SET
     13
     14dnl handle debug building
     15AC_ARG_ENABLE(debug,
     16  [AC_HELP_STRING([--enable-debug],[Enable debug information in compilation])],
     17  [AC_MSG_RESULT(debug information enabled)
     18   AC_DEFINE(DEBUG)
     19   CFLAGS="${CFLAGS=} -O0 -g2"],
     20  [AC_MSG_RESULT(debug information disabled)]
     21)
    1022
    1123AC_LANG(C)
     
    1628AC_PROG_INSTALL
    1729AC_PROG_LIBTOOL
     30AC_CHECK_FUNC(strtoll)
     31AC_CHECK_FUNC(strtoull)
    1832
    1933AC_PREFIX_DEFAULT([`pwd`])
    2034test "$prefix" = NONE && prefix=`pwd`
    2135
    22 dnl Setup CFLAGS/FFLAGS/LDFLAGS with project-particulars
    23 CFLAGS="${CFLAGS=} -Wall -std=c99 -D_GNU_SOURCE"
    2436
    2537dnl Setup the info for psLib for pkg-config
     
    112124AC_SUBST(PERL_PREFIX,$PERL_PREFIX)
    113125
    114 dnl ---------------- config dir options ------------------
    115 AC_ARG_WITH(configdir,
    116 [AS_HELP_STRING([--with-configdir=DIR],[Specify location of psLib's config directory. [default=PREFIX/config]])],
    117 [CONFIG_FILE="$withval/psTime.config"
    118  XML_CONFIG_FILE="$withval/psTime.xml"],
    119 [CONFIG_FILE="${prefix}/config/psTime.config"
    120  XML_CONFIG_FILE="${prefix}/config/psTime.xml"])
    121 AC_DEFINE_UNQUOTED(CONFIG_FILE, "$CONFIG_FILE", [Location of the psTime.config file])
    122 AC_DEFINE_UNQUOTED(XML_CONFIG_FILE, "$XML_CONFIG_FILE", [Location of the psTime.xml file])
    123 
    124 dnl ----------------- data dir options -------------------
    125 AC_ARG_WITH(datadir,
    126 [AS_HELP_STRING([--with-datadir=DIR],[Specify location of psLib's data directory. [default=PREFIX/data]])],
    127 [UTC_DAT_FILE="$withval/tai_utc.dat"],
    128 [UTC_DAT_FILE="${prefix}/data/tai_utc.dat"])
    129 AC_DEFINE_UNQUOTED(UTC_DAT_FILE, "$UTC_DAT_FILE", [Location of the tai_utc.dat file])
     126dnl --------- set config/data file location --------------
     127AC_DEFINE_UNQUOTED(CONFIG_FILE, "$sysconfdir/psTime.config", [Location of the psTime.config file])
     128AC_DEFINE_UNQUOTED(XML_CONFIG_FILE, "$sysconfdir/psTime.xml", [Location of the psTime.xml file])
     129AC_DEFINE_UNQUOTED(UTC_DAT_FILE, "$datadir/tai_utc.dat", [Location of the tai_utc.dat file])
    130130
    131131dnl for MacOSX, where sqrtf is in mx
     
    158158AC_CONFIG_FILES([ test/image/Makefile ])
    159159AC_CONFIG_FILES([ test/sysUtils/Makefile ])
    160 AC_CONFIG_FILES([ config/Makefile ])
     160AC_CONFIG_FILES([ etc/pslib/Makefile ])
    161161AC_CONFIG_FILES([ pslib-config ])
    162162AC_CONFIG_FILES([ pslib.pc ])
  • trunk/psLib/pslib.kdevses

    r3115 r3182  
    1 <?xml version="1.0" encoding="UTF-8"?>
     1<?xml version = '1.0' encoding = 'UTF-8'?>
    22<!DOCTYPE KDevPrjSession>
    33<KDevPrjSession>
    44 <DocsAndViews NumberOfDocuments="1" >
    5   <Doc0 NumberOfViews="1" URL="file:/home/desonia/pslib/src/pslib.c" >
    6    <View0 line="0" Type="Source" />
     5  <Doc0 NumberOfViews="1" URL="file:/home/desonia/panstarrs/psLib/configure.in" >
     6   <View0 line="15" Type="Source" />
    77  </Doc0>
    88 </DocsAndViews>
  • trunk/psLib/src/astro/psCoord.c

    r3114 r3182  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-02-03 00:45:06 $
     12*  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-02-10 02:36:41 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    267267{
    268268    while (angle < FLT_EPSILON) {
    269         angle+=M_PI;
    270     }
    271 
    272     while (angle >= M_PI) {
    273         angle-=M_PI;
     269        angle+=PS_PI;
     270    }
     271
     272    while (angle >= PS_PI) {
     273        angle-=PS_PI;
    274274    }
    275275    return(angle);
     
    547547        R = PS_SQRT_F32((coord->x * coord->x) + (coord->y * coord->y));
    548548        tmp->d = atan2(-coord->y, coord->x);
    549         tmp->r = acos((R * M_PI) / 180.0);
     549        tmp->r = acos((R * PS_PI) / 180.0);
    550550
    551551    } else if (projection->type == PS_PROJ_CAR) {
     
    555555    } else if (projection->type == PS_PROJ_MER) {
    556556        tmp->d = coord->x;
    557         tmp->r = (2.0 * atan(exp((coord->y * M_PI / 180.0)))) - 180.0;
     557        tmp->r = (2.0 * atan(exp((coord->y * PS_PI / 180.0)))) - 180.0;
    558558
    559559    } else if (projection->type == PS_PROJ_AIT) {
    560         chu1 = (coord->x * M_PI) / 720.0;
     560        chu1 = (coord->x * PS_PI) / 720.0;
    561561        chu1 *= chu1;
    562         chu2 = (coord->y * M_PI) / 360.0;
     562        chu2 = (coord->y * PS_PI) / 360.0;
    563563        chu2 *= chu2;
    564564        chu = PS_SQRT_F32(1.0 - chu1 - chu2);
    565         tmp->d = 2.0 * atan2((2.0 * chu * chu) - 1.0, (coord->x * chu * M_PI) / 360.0);
    566         tmp->r = asin((coord->y * chu * M_PI) / 180.0);
     565        tmp->d = 2.0 * atan2((2.0 * chu * chu) - 1.0, (coord->x * chu * PS_PI) / 360.0);
     566        tmp->r = asin((coord->y * chu * PS_PI) / 180.0);
    567567
    568568    } else if (projection->type == PS_PROJ_PAR) {
     
    640640        // Wrap these to an acceptable range.  This assumes that all
    641641        // angles are in radians.
    642         tmp->r = fmod(tmp->r, 2*M_PI);
    643         tmp->d = fmod(tmp->d, 2*M_PI);
     642        tmp->r = fmod(tmp->r, 2*PS_PI);
     643        tmp->d = fmod(tmp->d, 2*PS_PI);
    644644        tmp->rErr = 0.0;
    645645        tmp->dErr = 0.0;
     
    731731        tmp = (psSphere* ) psAlloc(sizeof(psSphere));
    732732        tmp->r = position->r + tmpR;
    733         tmp->r = fmod(tmp->r, 2.0*M_PI);
     733        tmp->r = fmod(tmp->r, 2.0*PS_PI);
    734734        tmp->d = position->d + tmpD;
    735         tmp->d = fmod(tmp->d, 2.0*M_PI);
     735        tmp->d = fmod(tmp->d, 2.0*PS_PI);
    736736        tmp->rErr = 0.0;
    737737        tmp->dErr = 0.0;
  • trunk/psLib/src/astro/psTime.c

    r3114 r3182  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-02-03 00:45:06 $
     12 *  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-02-10 02:36:41 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4343
    4444/** Two times pi with double precision accuracy */
    45 #define TWOPI (2.0*M_PI)
     45#define TWOPI (2.0*PS_PI)
    4646
    4747/** Conversion from radians to degrees */
    48 #define R2DEG = (180.0/M_PI)
     48#define R2DEG = (180.0/PS_PI)
    4949
    5050                /** Maximum length of time string */
     
    548548
    549549        t = 2000.0 + (mjd - 51544.03)/365.2422;
    550         dut2ut1 = 0.022*sin(TWOPI*t) - 0.012*cos(TWOPI*t) - 0.006*sin(4.0*M_PI*t) + 0.007*cos(4.0*M_PI*t);
     550        dut2ut1 = 0.022*sin(TWOPI*t) - 0.012*cos(TWOPI*t) - 0.006*sin(4.0*PS_PI*t) + 0.007*cos(4.0*PS_PI*t);
    551551        result = dut->data.F64[0] + dut->data.F64[1]*(mjd - dut->data.F64[2]) - dut2ut1;
    552552
     
    677677    }
    678678
    679     // Create output sphere and convert arcsec to radians (i.e. x/60/60*M_PI/180)
     679    // Create output sphere and convert arcsec to radians (i.e. x/60/60*PS_PI/180)
    680680    output = psAlloc(sizeof(psSphere));
    681     output->r = x * M_PI / 648000.0;
    682     output->d = y * M_PI / 648000.0;
     681    output->r = x * PS_PI / 648000.0;
     682    output->d = y * PS_PI / 648000.0;
    683683
    684684    return output;
  • trunk/psLib/src/astronomy/astronomy.i

    r3169 r3182  
    1717// add a method to add primitives to metadata
    1818%inline %{
    19 psBool psMetadataAddStr(psMetadata* md, psS32 where, const char* name, const char* comment, const char* value) {
     19psBool psMetadataAddStr(psMetadata* md, psS32 where, const char* name,
     20const char* comment, const char* value) {
    2021    return psMetadataAdd(md,where,name,PS_TYPE_PTR, PS_META_STR,comment,value);
    2122}
    22 psBool psMetadataAddF32(psMetadata* md, psS32 where, const char* name, const char* comment, psF32 value) {
     23psBool psMetadataAddF32(psMetadata* md,
     24                        psS32 where,
     25                        const char* name,
     26                        const char* comment,
     27                        psF32 value)
     28{
    2329    return psMetadataAdd(md,where,name,PS_TYPE_F32, PS_META_PRIMITIVE,comment,value);
    2430}
    25 psBool psMetadataAddF64(psMetadata* md, psS32 where, const char* name, const char* comment, psF64 value) {
     31
     32psBool psMetadataAddF64(psMetadata* md,
     33                        psS32 where,
     34                        const char* name,
     35                        const char* comment,
     36                        psF64 value)
     37{
    2638    return psMetadataAdd(md,where,name,PS_TYPE_F64, PS_META_PRIMITIVE,comment,value);
    2739}
    28 psBool psMetadataAddS32(psMetadata* md, psS32 where, const char* name, const char* comment, psS32 value) {
     40
     41psBool psMetadataAddS32(psMetadata* md,
     42                        psS32 where,
     43                        const char* name,
     44                        const char* comment,
     45                        psS32 value)
     46{
    2947    return psMetadataAdd(md,where,name,PS_TYPE_S32, PS_META_PRIMITIVE,comment,value);
    3048}
    3149
    32 psMetadataItem* psMetadataItemAllocStr(const char* name, const char* comment, const char* value) {
     50psMetadataItem* psMetadataItemAllocStr(const char* name,
     51                                       const char* comment,
     52                                       const char* value)
     53{
    3354    return psMetadataItemAlloc(name, PS_TYPE_PTR, PS_META_STR, comment, value);
    3455}
    35 psMetadataItem* psMetadataItemAllocF32(const char* name, const char* comment, psF32 value) {
     56
     57psMetadataItem* psMetadataItemAllocF32(const char* name,
     58                                       const char* comment,
     59                                       psF32 value)
     60{
    3661    return psMetadataItemAlloc(name, PS_TYPE_F32, PS_META_PRIMITIVE, comment, value);
    3762}
    38 psMetadataItem* psMetadataItemAllocF64(const char* name, const char* comment, psF64 value) {
     63
     64psMetadataItem* psMetadataItemAllocF64(const char* name,
     65                                       const char* comment,
     66                                       psF64 value)
     67{
    3968    return psMetadataItemAlloc(name, PS_TYPE_F64, PS_META_PRIMITIVE, comment, value);
    4069}
    41 psMetadataItem* psMetadataItemAllocS32(const char* name, const char* comment, psS32 value) {
     70
     71psMetadataItem* psMetadataItemAllocS32(const char* name,
     72                                       const char* comment,
     73                                       psS32 value)
     74{
    4275    return psMetadataItemAlloc(name, PS_TYPE_S32, PS_META_PRIMITIVE, comment, value);
    4376}
  • trunk/psLib/src/astronomy/psCoord.c

    r3114 r3182  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-02-03 00:45:06 $
     12*  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-02-10 02:36:41 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    267267{
    268268    while (angle < FLT_EPSILON) {
    269         angle+=M_PI;
    270     }
    271 
    272     while (angle >= M_PI) {
    273         angle-=M_PI;
     269        angle+=PS_PI;
     270    }
     271
     272    while (angle >= PS_PI) {
     273        angle-=PS_PI;
    274274    }
    275275    return(angle);
     
    547547        R = PS_SQRT_F32((coord->x * coord->x) + (coord->y * coord->y));
    548548        tmp->d = atan2(-coord->y, coord->x);
    549         tmp->r = acos((R * M_PI) / 180.0);
     549        tmp->r = acos((R * PS_PI) / 180.0);
    550550
    551551    } else if (projection->type == PS_PROJ_CAR) {
     
    555555    } else if (projection->type == PS_PROJ_MER) {
    556556        tmp->d = coord->x;
    557         tmp->r = (2.0 * atan(exp((coord->y * M_PI / 180.0)))) - 180.0;
     557        tmp->r = (2.0 * atan(exp((coord->y * PS_PI / 180.0)))) - 180.0;
    558558
    559559    } else if (projection->type == PS_PROJ_AIT) {
    560         chu1 = (coord->x * M_PI) / 720.0;
     560        chu1 = (coord->x * PS_PI) / 720.0;
    561561        chu1 *= chu1;
    562         chu2 = (coord->y * M_PI) / 360.0;
     562        chu2 = (coord->y * PS_PI) / 360.0;
    563563        chu2 *= chu2;
    564564        chu = PS_SQRT_F32(1.0 - chu1 - chu2);
    565         tmp->d = 2.0 * atan2((2.0 * chu * chu) - 1.0, (coord->x * chu * M_PI) / 360.0);
    566         tmp->r = asin((coord->y * chu * M_PI) / 180.0);
     565        tmp->d = 2.0 * atan2((2.0 * chu * chu) - 1.0, (coord->x * chu * PS_PI) / 360.0);
     566        tmp->r = asin((coord->y * chu * PS_PI) / 180.0);
    567567
    568568    } else if (projection->type == PS_PROJ_PAR) {
     
    640640        // Wrap these to an acceptable range.  This assumes that all
    641641        // angles are in radians.
    642         tmp->r = fmod(tmp->r, 2*M_PI);
    643         tmp->d = fmod(tmp->d, 2*M_PI);
     642        tmp->r = fmod(tmp->r, 2*PS_PI);
     643        tmp->d = fmod(tmp->d, 2*PS_PI);
    644644        tmp->rErr = 0.0;
    645645        tmp->dErr = 0.0;
     
    731731        tmp = (psSphere* ) psAlloc(sizeof(psSphere));
    732732        tmp->r = position->r + tmpR;
    733         tmp->r = fmod(tmp->r, 2.0*M_PI);
     733        tmp->r = fmod(tmp->r, 2.0*PS_PI);
    734734        tmp->d = position->d + tmpD;
    735         tmp->d = fmod(tmp->d, 2.0*M_PI);
     735        tmp->d = fmod(tmp->d, 2.0*PS_PI);
    736736        tmp->rErr = 0.0;
    737737        tmp->dErr = 0.0;
  • trunk/psLib/src/astronomy/psTime.c

    r3114 r3182  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-02-03 00:45:06 $
     12 *  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-02-10 02:36:41 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4343
    4444/** Two times pi with double precision accuracy */
    45 #define TWOPI (2.0*M_PI)
     45#define TWOPI (2.0*PS_PI)
    4646
    4747/** Conversion from radians to degrees */
    48 #define R2DEG = (180.0/M_PI)
     48#define R2DEG = (180.0/PS_PI)
    4949
    5050                /** Maximum length of time string */
     
    548548
    549549        t = 2000.0 + (mjd - 51544.03)/365.2422;
    550         dut2ut1 = 0.022*sin(TWOPI*t) - 0.012*cos(TWOPI*t) - 0.006*sin(4.0*M_PI*t) + 0.007*cos(4.0*M_PI*t);
     550        dut2ut1 = 0.022*sin(TWOPI*t) - 0.012*cos(TWOPI*t) - 0.006*sin(4.0*PS_PI*t) + 0.007*cos(4.0*PS_PI*t);
    551551        result = dut->data.F64[0] + dut->data.F64[1]*(mjd - dut->data.F64[2]) - dut2ut1;
    552552
     
    677677    }
    678678
    679     // Create output sphere and convert arcsec to radians (i.e. x/60/60*M_PI/180)
     679    // Create output sphere and convert arcsec to radians (i.e. x/60/60*PS_PI/180)
    680680    output = psAlloc(sizeof(psSphere));
    681     output->r = x * M_PI / 648000.0;
    682     output->d = y * M_PI / 648000.0;
     681    output->r = x * PS_PI / 648000.0;
     682    output->d = y * PS_PI / 648000.0;
    683683
    684684    return output;
  • trunk/psLib/src/dataManip/Makefile.am

    r3131 r3182  
    1111noinst_LTLIBRARIES = libpslibdataManip.la
    1212
    13 libpslibdataManip_la_SOURCES = \
    14         psMatrixVectorArithmetic.c \
    15         psStats.c  \
    16         psFunctions.c \
    17         psMatrix.c \
    18         psVectorFFT.c \
    19         psMinimize.c \
    20         psRandom.c
     13libpslibdataManip_la_SOURCES = psUnaryOp.c psBinaryOp.c psStats.c \
     14                psFunctions.c psMatrix.c psVectorFFT.c psMinimize.c psRandom.c
    2115           
    2216BUILT_SOURCES = psDataManipErrors.h
     
    3226        psFunctions.h \
    3327        psMatrix.h \
    34         psMatrixVectorArithmetic.h \
     28    psBinaryOp.h \
     29    psUnaryOp.h \
    3530        psVectorFFT.h \
    3631        psMinimize.h \
  • trunk/psLib/src/dataManip/psConstants.h

    r2941 r3182  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-01-10 19:47:11 $
     8 *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-02-10 02:36:41 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3737
    3838#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)
     39#define DEG_TO_RAD(DEGREES) ((DEGREES) * PS_PI / 180.0)
     40#define MIN_TO_RAD(MINUTES) ((MINUTES) * PS_PI / (180.0 * 60.0))
     41#define SEC_TO_RAD(SECONDS) ((SECONDS) * PS_PI / (180.0 * 60.0 * 60.0))
     42#define RAD_TO_DEG(RADIANS) ((RADIANS) * 180.0 / PS_PI)
     43#define RAD_TO_MIN(RADIANS) ((RADIANS) * 180.0 * 60.0 / PS_PI)
     44#define RAD_TO_SEC(RADIANS) ((RADIANS) * 180.0 * 60.0 * 60.0 / PS_PI)
    4545
    4646/*****************************************************************************
  • trunk/psLib/src/dataManip/psFunctions.c

    r3171 r3182  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.87 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-02-09 20:56:17 $
     9 *  @version $Revision: 1.88 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-02-10 02:36:41 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    975975
    976976    if (normal == true) {
    977         tmp = 1.0 / PS_SQRT_F32(2.0 * M_PI * (sigma * sigma));
     977        tmp = 1.0 / PS_SQRT_F32(2.0 * PS_PI * (sigma * sigma));
    978978    }
    979979
  • trunk/psLib/src/dataManip/psMinimize.c

    r3115 r3182  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.104 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-02-03 00:54:10 $
     11 *  @version $Revision: 1.105 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-02-10 02:36:41 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    538538        psF64 flux = normalization * exp(-( u*u/(2.0 * sigmaX * sigmaX) +
    539539                                            v*v/(2.0 * sigmaY * sigmaY)))/
    540                      (2.0 * M_PI * sigmaX * sigmaY);
     540                     (2.0 * PS_PI * sigmaX * sigmaY);
    541541        out->data.F32[i] = flux;
    542542
     
    865865    for (psS32 i=0;i<n;i++) {
    866866        // NR 5.8.4
    867         psF64 Y = cos(M_PI * (0.5 + ((psF32) i)) / ((psF32) n));
     867        psF64 Y = cos(PS_PI * (0.5 + ((psF32) i)) / ((psF32) n));
    868868        psF64 X = (Y + bma + bpa) - 1.0;
    869869        tmpScalar.data.F64 = X;
     
    893893        for (k=0;k<n;k++) {
    894894            sum+= f->data.F64[k] *
    895                   cos(M_PI * ((psF32) j) * (0.5 + ((psF32) k)) / ((psF32) n));
     895                  cos(PS_PI * ((psF32) j) * (0.5 + ((psF32) k)) / ((psF32) n));
    896896        }
    897897
  • trunk/psLib/src/image/psImageStats.c

    r3115 r3182  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.64 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-02-03 00:54:11 $
     11 *  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-02-10 02:36:42 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    139139    for (i = 0; i < n; i++) {
    140140        tmp = (double)(n - i);
    141         tmp = (M_PI * (tmp - 0.5)) / ((double)n);
     141        tmp = (PS_PI * (tmp - 0.5)) / ((double)n);
    142142        scalingFactors[i] = cos(tmp);
    143143    }
     
    348348    // Chebyshev polynomials are 0.
    349349    for (x = 0; x < input->numRows; x++) {
    350         double xTmp = cos(M_PI * (0.5 + ((float) x)) / ((float) input->numRows));
     350        double xTmp = cos(PS_PI * (0.5 + ((float) x)) / ((float) input->numRows));
    351351        double xNode = - ((xTmp + bma + bpa) - 1.0);
    352352        double xOrig = ((float) input->numRows) * (xNode - min) / (max - min);
    353353
    354354        for (y = 0; y < input->numCols; y++) {
    355             double yTmp = cos(M_PI * (0.5 + ((float) y)) / ((float) input->numCols));
     355            double yTmp = cos(PS_PI * (0.5 + ((float) y)) / ((float) input->numCols));
    356356            double yNode = - ((yTmp + bma + bpa) - 1.0);
    357357            double yOrig = ((float) input->numCols) * (yNode - min) / (max - min);
  • trunk/psLib/src/imageops/psImageStats.c

    r3115 r3182  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.64 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-02-03 00:54:11 $
     11 *  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-02-10 02:36:42 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    139139    for (i = 0; i < n; i++) {
    140140        tmp = (double)(n - i);
    141         tmp = (M_PI * (tmp - 0.5)) / ((double)n);
     141        tmp = (PS_PI * (tmp - 0.5)) / ((double)n);
    142142        scalingFactors[i] = cos(tmp);
    143143    }
     
    348348    // Chebyshev polynomials are 0.
    349349    for (x = 0; x < input->numRows; x++) {
    350         double xTmp = cos(M_PI * (0.5 + ((float) x)) / ((float) input->numRows));
     350        double xTmp = cos(PS_PI * (0.5 + ((float) x)) / ((float) input->numRows));
    351351        double xNode = - ((xTmp + bma + bpa) - 1.0);
    352352        double xOrig = ((float) input->numRows) * (xNode - min) / (max - min);
    353353
    354354        for (y = 0; y < input->numCols; y++) {
    355             double yTmp = cos(M_PI * (0.5 + ((float) y)) / ((float) input->numCols));
     355            double yTmp = cos(PS_PI * (0.5 + ((float) y)) / ((float) input->numCols));
    356356            double yNode = - ((yTmp + bma + bpa) - 1.0);
    357357            double yOrig = ((float) input->numCols) * (yNode - min) / (max - min);
  • trunk/psLib/src/math/psConstants.h

    r2941 r3182  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-01-10 19:47:11 $
     8 *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-02-10 02:36:41 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3737
    3838#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)
     39#define DEG_TO_RAD(DEGREES) ((DEGREES) * PS_PI / 180.0)
     40#define MIN_TO_RAD(MINUTES) ((MINUTES) * PS_PI / (180.0 * 60.0))
     41#define SEC_TO_RAD(SECONDS) ((SECONDS) * PS_PI / (180.0 * 60.0 * 60.0))
     42#define RAD_TO_DEG(RADIANS) ((RADIANS) * 180.0 / PS_PI)
     43#define RAD_TO_MIN(RADIANS) ((RADIANS) * 180.0 * 60.0 / PS_PI)
     44#define RAD_TO_SEC(RADIANS) ((RADIANS) * 180.0 * 60.0 * 60.0 / PS_PI)
    4545
    4646/*****************************************************************************
  • trunk/psLib/src/math/psMinimize.c

    r3115 r3182  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.104 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-02-03 00:54:10 $
     11 *  @version $Revision: 1.105 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-02-10 02:36:41 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    538538        psF64 flux = normalization * exp(-( u*u/(2.0 * sigmaX * sigmaX) +
    539539                                            v*v/(2.0 * sigmaY * sigmaY)))/
    540                      (2.0 * M_PI * sigmaX * sigmaY);
     540                     (2.0 * PS_PI * sigmaX * sigmaY);
    541541        out->data.F32[i] = flux;
    542542
     
    865865    for (psS32 i=0;i<n;i++) {
    866866        // NR 5.8.4
    867         psF64 Y = cos(M_PI * (0.5 + ((psF32) i)) / ((psF32) n));
     867        psF64 Y = cos(PS_PI * (0.5 + ((psF32) i)) / ((psF32) n));
    868868        psF64 X = (Y + bma + bpa) - 1.0;
    869869        tmpScalar.data.F64 = X;
     
    893893        for (k=0;k<n;k++) {
    894894            sum+= f->data.F64[k] *
    895                   cos(M_PI * ((psF32) j) * (0.5 + ((psF32) k)) / ((psF32) n));
     895                  cos(PS_PI * ((psF32) j) * (0.5 + ((psF32) k)) / ((psF32) n));
    896896        }
    897897
  • trunk/psLib/src/math/psPolynomial.c

    r3171 r3182  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.87 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-02-09 20:56:17 $
     9 *  @version $Revision: 1.88 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-02-10 02:36:41 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    975975
    976976    if (normal == true) {
    977         tmp = 1.0 / PS_SQRT_F32(2.0 * M_PI * (sigma * sigma));
     977        tmp = 1.0 / PS_SQRT_F32(2.0 * PS_PI * (sigma * sigma));
    978978    }
    979979
  • trunk/psLib/src/math/psSpline.c

    r3171 r3182  
    77 *  polynomials.  It also contains a Gaussian functions.
    88 *
    9  *  @version $Revision: 1.87 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-02-09 20:56:17 $
     9 *  @version $Revision: 1.88 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-02-10 02:36:41 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    975975
    976976    if (normal == true) {
    977         tmp = 1.0 / PS_SQRT_F32(2.0 * M_PI * (sigma * sigma));
     977        tmp = 1.0 / PS_SQRT_F32(2.0 * PS_PI * (sigma * sigma));
    978978    }
    979979
  • trunk/psLib/src/psTest.c

    r3127 r3182  
    1111//
    1212
    13 
     13#include <sys/types.h>
     14#include <unistd.h>
    1415#include <stdlib.h>
    15 #include <unistd.h>
    1616#include <sys/wait.h>
    1717#include <stdbool.h>
  • trunk/psLib/src/pslib.h

    r3115 r3182  
    99*  @author Eric Van Alst, MHPCC
    1010*
    11 *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2005-02-03 00:54:10 $
     11*  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2005-02-10 02:36:41 $
    1313*
    1414*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    126126#include "psMatrix.h"
    127127
    128 /// @defgroup MatrixVectorArithmetic Matrix Vector Arithmetic Operations
     128/// @defgroup MatrixArithmetic Matrix Arithmetic Operations
    129129/// @ingroup DataManip
    130 #include "psMatrixVectorArithmetic.h"
     130#include "psBinaryOp.h"
     131#include "psUnaryOp.h"
    131132
    132133#include "psRandom.h"
  • trunk/psLib/src/sys/psTrace.c

    r3115 r3182  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-02-03 00:54:11 $
     11 *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-02-10 02:36:42 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4040#ifndef PS_NO_TRACE
    4141
     42#include <unistd.h>
    4243#include <stdlib.h>
    4344#include <stdio.h>
     
    146147/*****************************************************************************
    147148componentAdd(): Adds the component named "addNodeName" to the root tree.
    148  
    149 NOTE: replace the call to strsep() with a call to strtok(), which conforms
    150 to ANSI-C.
    151149 *****************************************************************************/
    152150static psBool componentAdd(const char *addNodeName, psS32 level)
     
    180178
    181179    strcpy(name, addNodeName);
    182     pname = &name[1];
     180    pname = name+1;
    183181    // Iterate through the components of addNodeName.  Strip off the first
    184182    // component of the name, find that in the root tree, or add it if it
     
    186184
    187185    while (pname != NULL) {
    188         firstComponent = strsep(&pname, ".");
     186        firstComponent = pname;
     187        pname = strtok(pname, ".");
     188        if (pname != NULL) {
     189            *pname = '\0';
     190            pname++;
     191        }
    189192        nodeExists = 0;
    190193        for (i = 0; i < currentNode->n; i++) {
     
    324327    pname = &name[1];
    325328    while (pname != NULL) {
    326         firstComponent = strsep(&pname, ".");
     329        firstComponent = pname;
     330        pname = strtok(pname, ".");
     331        if (pname != NULL) {
     332            *pname = '\0';
     333            pname++;
     334        }
    327335        for (i = 0; i < currentNode->n; i++) {
    328336            if (NULL == currentNode->subcomp[i]) {
  • trunk/psLib/src/sysUtils/psTrace.c

    r3115 r3182  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-02-03 00:54:11 $
     11 *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-02-10 02:36:42 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4040#ifndef PS_NO_TRACE
    4141
     42#include <unistd.h>
    4243#include <stdlib.h>
    4344#include <stdio.h>
     
    146147/*****************************************************************************
    147148componentAdd(): Adds the component named "addNodeName" to the root tree.
    148  
    149 NOTE: replace the call to strsep() with a call to strtok(), which conforms
    150 to ANSI-C.
    151149 *****************************************************************************/
    152150static psBool componentAdd(const char *addNodeName, psS32 level)
     
    180178
    181179    strcpy(name, addNodeName);
    182     pname = &name[1];
     180    pname = name+1;
    183181    // Iterate through the components of addNodeName.  Strip off the first
    184182    // component of the name, find that in the root tree, or add it if it
     
    186184
    187185    while (pname != NULL) {
    188         firstComponent = strsep(&pname, ".");
     186        firstComponent = pname;
     187        pname = strtok(pname, ".");
     188        if (pname != NULL) {
     189            *pname = '\0';
     190            pname++;
     191        }
    189192        nodeExists = 0;
    190193        for (i = 0; i < currentNode->n; i++) {
     
    324327    pname = &name[1];
    325328    while (pname != NULL) {
    326         firstComponent = strsep(&pname, ".");
     329        firstComponent = pname;
     330        pname = strtok(pname, ".");
     331        if (pname != NULL) {
     332            *pname = '\0';
     333            pname++;
     334        }
    327335        for (i = 0; i < currentNode->n; i++) {
    328336            if (NULL == currentNode->subcomp[i]) {
Note: See TracChangeset for help on using the changeset viewer.