IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4920


Ignore:
Timestamp:
Aug 30, 2005, 4:07:12 PM (21 years ago)
Author:
drobbin
Message:

Updated code w.r.t the latest api-delta report

Location:
trunk/psLib/src
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psTime.h

    r4898 r4920  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-08-30 01:14:10 $
     13 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-08-31 02:07:09 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6060 *  seconds and microseconds.
    6161 */
    62 typedef struct psTime
     62typedef struct
    6363{
    6464    psS64 sec;                         ///< Seconds since epoch, Jan 1, 1970.
  • trunk/psLib/src/imageops/psImageConvolve.c

    r4898 r4920  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2005-08-30 01:14:13 $
     7 *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2005-08-31 02:07:11 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    488488
    489489void psImageSmooth (psImage *image,
    490                     float sigma,
    491                     float Nsigma)
     490                    double sigma,
     491                    double Nsigma)
    492492{
    493493
    494494    int Nx, Ny, Npixel, Nrange;
    495     float factor, g, s;
     495    double factor, g, s;
    496496    psVector *temp;
    497497
     
    505505
    506506    // generate gaussian
    507     psVector *gaussnorm = psVectorAlloc (Npixel, PS_TYPE_F32);
     507    psVector *gaussnorm = psVectorAlloc (Npixel, PS_TYPE_F64);
    508508    for (int i = -Nrange; i < Nrange + 1; i++) {
    509         gaussnorm->data.F32[i+Nrange] = exp (factor*i*i);
    510     }
    511     psF32 *gauss = &gaussnorm->data.F32[Nrange];
     509        gaussnorm->data.F64[i+Nrange] = exp (factor*i*i);
     510    }
     511    psF64 *gauss = &gaussnorm->data.F64[Nrange];
    512512
    513513    // smooth in X direction
    514     temp = psVectorAlloc (Nx, PS_TYPE_F32);
     514    temp = psVectorAlloc (Nx, PS_TYPE_F64);
    515515    for (int j = 0; j < Ny; j++) {
    516         psF32 *vi = image->data.F32[j];
    517         psF32 *vo = temp->data.F32;
     516        psF64 *vi = image->data.F64[j];
     517        psF64 *vo = temp->data.F64;
    518518        for (int i = 0; i < Nx; i++) {
    519519            g = s = 0;
     
    528528            vo[i] = s / g;
    529529        }
    530         memcpy (image->data.F32[j], temp->data.F32, Nx*sizeof(psF32));
     530        memcpy (image->data.F64[j], temp->data.F64, Nx*sizeof(psF64));
    531531    }
    532532    psFree (temp);
    533533
    534534    // smooth in Y direction
    535     temp = psVectorAlloc (image->numRows, PS_TYPE_F32);
     535    temp = psVectorAlloc (image->numRows, PS_TYPE_F64);
    536536    for (int i = 0; i < Nx; i++) {
    537         psF32  *vo = temp->data.F32;
    538         psF32 **vi = image->data.F32;
     537        psF64  *vo = temp->data.F64;
     538        psF64 **vi = image->data.F64;
    539539        for (int j = 0; j < Ny; j++) {
    540540            g = s = 0;
  • trunk/psLib/src/imageops/psImageConvolve.h

    r4898 r4920  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-08-30 01:14:13 $
     9 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-08-31 02:07:11 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    144144void psImageSmooth(
    145145    psImage *image,                    ///< the image to be smoothed
    146     float sigma,                       ///< the width of the smoothing kernel in pixels
    147     float Nsigma                       ///< the size of the smoothing box in sigmas
     146    double  sigma,                     ///< the width of the smoothing kernel in pixels
     147    double  Nsigma                     ///< the size of the smoothing box in sigmas
    148148);
    149149
  • trunk/psLib/src/imageops/psImageGeomManip.c

    r4608 r4920  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-07-25 20:49:04 $
     12 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-08-31 02:07:11 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    305305                       const psImage* input,
    306306                       float angle,
    307                        complex exposed,
     307                       complex double exposed,
    308308                       psImageInterpolateMode mode)
    309309{
     
    597597                      float dx,
    598598                      float dy,
    599                       complex exposed,
     599                      complex double exposed,
    600600                      psImageInterpolateMode mode)
    601601{
  • trunk/psLib/src/imageops/psImageGeomManip.h

    r4608 r4920  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-07-25 20:49:04 $
     10 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-08-31 02:07:11 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7777    const psImage* input,              ///< input image
    7878    float angle,                       ///< the rotation angle in radians.
    79     complex exposed,                   ///< the output image pixel values for non-imagery areas
     79    complex double exposed,            ///< the output image pixel values for non-imagery areas
    8080    psImageInterpolateMode mode        ///< the interpolation mode used
    8181);
     
    9797    float dx,                          ///< the shift in x direction.
    9898    float dy,                          ///< the shift in y direction.
    99     complex exposed,                   ///< the output image pixel values for non-imagery areas
     99    complex double exposed,            ///< the output image pixel values for non-imagery areas
    100100    psImageInterpolateMode mode        ///< the interpolation mode to use
    101101);
     
    151151    psRegion region,                   ///< the size of the transformed image
    152152    const psPixels* pixels,            /**< if not NULL, consists of psPixelCoords and specifies which pixels in
    153                                                                  *  output image shall be transformed; otherwise, entire image generated*/
     153                                                                     *  output image shall be transformed; otherwise, entire image generated*/
    154154    psImageInterpolateMode mode,       ///< the interpolation scheme to be used
    155155    double exposedValue                   ///< Exposed value to which non-corresponding pixels are set
  • trunk/psLib/src/imageops/psImagePixelManip.c

    r4815 r4920  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-08-18 21:44:40 $
     12 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-08-31 02:07:11 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    311311
    312312int psImageClipComplexRegion(psImage* input,
    313                              complex min,
    314                              complex vmin,
    315                              complex max,
    316                              complex vmax)
     313                             complex double min,
     314                             complex double vmin,
     315                             complex double max,
     316                             complex double vmax)
    317317{
    318318    psS32 numClipped = 0;
     
    401401                       psRegion *region,
    402402                       bool logical_and,
    403                        int maskValue)
     403                       psMaskType maskValue)
    404404{
    405405
     
    428428                       psRegion *region,
    429429                       bool logical_and,
    430                        int maskValue)
     430                       psMaskType maskValue)
    431431{
    432432
     
    459459                       double radius,
    460460                       bool logical_and,
    461                        int maskValue)
     461                       psMaskType maskValue)
    462462{
    463463
     
    489489                       double radius,
    490490                       bool logical_and,
    491                        int maskValue)
     491                       psMaskType maskValue)
    492492{
    493493
  • trunk/psLib/src/imageops/psImagePixelManip.h

    r4815 r4920  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-08-18 21:44:40 $
     10 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-08-31 02:07:11 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5151int psImageClipComplexRegion(
    5252    psImage* input,                    ///< the image to clip
    53     complex min,                       ///< the minimum image value allowed
    54     complex vmin,                      ///< the value pixels < min are set to
    55     complex max,                       ///< the maximum image value allowed
    56     complex vmax                       ///< the value pixels > max are set to
     53    complex double min,                       ///< the minimum image value allowed
     54    complex double vmin,                      ///< the value pixels < min are set to
     55    complex double max,                       ///< the maximum image value allowed
     56    complex double vmax                       ///< the value pixels > max are set to
    5757);
    5858
     
    9696    psRegion *region,                  ///< the specified region
    9797    bool logical_and,                  ///< the logical operation
    98     int maskValue                      ///< the specified bits
     98    psMaskType maskValue               ///< the specified bits
    9999);
    100100
     
    108108    psRegion *region,                  ///< the specified region
    109109    bool logical_and,                  ///< the logical operation
    110     int maskValue                      ///< the specified bits
     110    psMaskType maskValue               ///< the specified bits
    111111);
    112112
     
    122122    double radius,                     ///< the radius of the specified circle
    123123    bool logical_and,                  ///< the logical operation
    124     int maskValue                      ///< the specified bits
     124    psMaskType maskValue               ///< the specified bits
    125125);
    126126
     
    136136    double radius,                     ///< the radius of the specified circle
    137137    bool logical_and,                  ///< the logical operation
    138     int maskValue                      ///< the specified bits
     138    psMaskType maskValue               ///< the specified bits
    139139);
    140140
  • trunk/psLib/src/mathtypes/psImage.c

    r4898 r4920  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.78 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-08-30 01:14:13 $
     11 *  @version $Revision: 1.79 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-08-31 02:07:11 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    199199
    200200// define a square region centered on the given coordinate
    201 psRegion psRegionForSquare(float x,
    202                            float y,
    203                            float radius)
     201psRegion psRegionForSquare(double x,
     202                           double y,
     203                           double radius)
    204204{
    205205    psRegion region;
  • trunk/psLib/src/mathtypes/psImage.h

    r4898 r4920  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.64 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-08-30 01:14:13 $
     13 *  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-08-31 02:07:11 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    179179 */
    180180psRegion psRegionForSquare(
    181     float x,                           ///< x coordinate at square-center
    182     float y,                           ///< y coordinate at square-center
    183     float radius                       ///< radius of square
     181    double x,                           ///< x coordinate at square-center
     182    double y,                           ///< y coordinate at square-center
     183    double radius                       ///< radius of square
    184184);
    185185
  • trunk/psLib/src/mathtypes/psScalar.c

    r4898 r4920  
    88 *  @author Ross Harman, MHPCC
    99 *
    10  *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-08-30 01:14:13 $
     10 *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-08-31 02:07:11 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2727}
    2828
    29 psScalar* psScalarAlloc(complex value, psElemType type)
     29psScalar* psScalarAlloc(complex double value, psElemType type)
    3030{
    3131    psScalar* scalar = NULL;
  • trunk/psLib/src/mathtypes/psScalar.h

    r4898 r4920  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-08-30 01:14:13 $
     13 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-08-31 02:07:11 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6666 */
    6767psScalar* psScalarAlloc(
    68     complex value,                     ///< Data to be put into psScalar.
     68    complex double value,                     ///< Data to be put into psScalar.
    6969    psElemType type                    ///< Type of data to be held by psScalar.
    7070);
  • trunk/psLib/src/sys/psMemory.c

    r4898 r4920  
    88*  @author Robert Lupton, Princeton University
    99*
    10 *  @version $Revision: 1.62 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2005-08-30 01:14:13 $
     10*  @version $Revision: 1.63 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2005-08-31 02:07:11 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    480480 */
    481481int psMemCheckLeaks(psMemId id0,
    482                     psMemBlock* ** arr,
     482                    psMemBlock ***array,
    483483                    FILE * fd,
    484                     psBool persistence)
     484                    bool persistence)
    485485{
    486486    psS32 nleak = 0;
     
    509509    pthread_mutex_unlock(&memBlockListMutex);
    510510
    511     if (nleak == 0 || arr == NULL) {
     511    if (nleak == 0 || array == NULL) {
    512512        return nleak;
    513513    }
    514514
    515     *arr = p_psAlloc(nleak * sizeof(psMemBlock), __FILE__, __LINE__);
     515    *array = p_psAlloc(nleak * sizeof(psMemBlock), __FILE__, __LINE__);
    516516    pthread_mutex_lock(&memBlockListMutex);
    517517
     
    521521                (iter->id >= id0)) {
    522522
    523             (*arr)[j++] = iter;
     523            (*array)[j++] = iter;
    524524            if (j == nleak) {              // found them all
    525525                break;
     
    897897                    break;
    898898                }
    899          
     899
    900900        *//*    case PS_DATA_REGION:
    901901                if ( psMemCheckRegion(ptr) )
  • trunk/psLib/src/sys/psMemory.h

    r4898 r4920  
    1212 *  @ingroup MemoryManagement
    1313 *
    14  *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-08-30 01:14:13 $
     14 *  @version $Revision: 1.50 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-08-31 02:07:11 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    277277int psMemCheckLeaks(
    278278    psMemId id0,                       ///< don't list blocks with id < id0
    279     psMemBlock* ** arr,                ///< pointer to array of pointers to leaked blocks, or NULL
     279    psMemBlock ***array,               ///< pointer to array of pointers to leaked blocks, or NULL
    280280    FILE * fd,                         ///< print list of leaks to fd (or NULL)
    281     psBool persistence                 ///< make check across all object even persistent ones
     281    bool persistence                   ///< make check across all object even persistent ones
    282282);
    283283
  • trunk/psLib/src/sys/psType.h

    r4600 r4920  
    1010*  @author Ross Harman, MHPCC
    1111*
    12 *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-07-22 23:47:13 $
     12*  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-08-31 02:07:11 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    287287    psElemType type;                   ///< The type
    288288    psDimen dimen;                     ///< The dimensionality.
    289     //    psElemType type;                   ///< The type
    290289}
    291290psMathType;
  • trunk/psLib/src/types/psHash.h

    r4898 r4920  
    1111 *  @author GLG, MHPCC
    1212 *
    13  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-08-30 01:14:13 $
     13 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-08-31 02:07:12 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3838
    3939/** The hash-table itself. */
    40 typedef struct psHash
     40typedef struct
    4141{
    4242    long n;                            ///< Number of buckets in hash table.
  • trunk/psLib/src/types/psMetadata.h

    r4898 r4920  
    1111*  @author Ross Harman, MHPCC
    1212*
    13 *  @version $Revision: 1.60 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2005-08-30 01:14:13 $
     13*  @version $Revision: 1.61 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2005-08-31 02:07:12 $
    1515*
    1616*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    9090 *  allows fast lookup when given a metadata keyword.
    9191 */
    92 typedef struct psMetadata
     92typedef struct
    9393{
    9494    psList*  list;                     ///< Metadata in linked-list
     
    114114 * information about the item name, flags, comments, and other items with the same name.
    115115 */
    116 typedef struct psMetadataItem
     116typedef struct
    117117{
    118118    const psS32 id;                    ///< Unique ID for metadata item.
     
    333333    int format,                        ///< psMetadataFlag options/flags
    334334    const char* comment,               ///< Comment for metadata item
    335     psBool value                       ///< Value for metadata item data
     335    bool value                       ///< Value for metadata item data
    336336);
    337337
Note: See TracChangeset for help on using the changeset viewer.