IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5841


Ignore:
Timestamp:
Dec 23, 2005, 2:33:22 PM (20 years ago)
Author:
desonia
Message:

merged branch eam_rel9_b1. Contains many fixes made by IfA.

Location:
trunk/psLib/src
Files:
7 edited

Legend:

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

    r5816 r5841  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.98 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-12-20 05:20:50 $
     12*  @version $Revision: 1.99 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-12-24 00:33:13 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    380380    PS_ASSERT_PTR_NON_NULL(projection, NULL);
    381381
    382     psF64 phi, theta;
    383     psF64 sinDp, cosDp, sinAlpha, cosAlpha, sinDelta, cosDelta;
    384     psF64 sinTheta, cosPhiCT, sinPhiCT, zeta;
     382    psF64 phi = 0;
     383    psF64 theta = 0;
     384    psF64 sinTheta = 0;
     385    psF64 cosPhiCT = 0;
     386    psF64 sinPhiCT = 0;
     387    psF64 sinDp, cosDp, sinAlpha, cosAlpha, sinDelta, cosDelta, zeta;
    385388
    386389    bool zenithal = (projection->type == PS_PROJ_TAN) ||(projection->type == PS_PROJ_SIN);
  • trunk/psLib/src/db/psDB.c

    r5216 r5841  
    1212 *  @author Joshua Hoblitt
    1313 *
    14  *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-10-01 02:22:09 $
     14 *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-12-24 00:33:15 $
    1616 *
    1717 *  Copyright 2005 Joshua Hoblitt, University of Hawaii
     
    16481648static psPtr psDBGetPTypeNaN(psElemType pType)
    16491649{
    1650     psPtr           myNaN;
     1650    psPtr           myNaN = NULL;
    16511651
    16521652    switch (pType) {
     
    17031703                           psPtr data)
    17041704{
    1705     bool    isNaN;
     1705    bool    isNaN = NULL;
    17061706
    17071707    switch (pType) {
  • trunk/psLib/src/imageops/psImageStats.c

    r5783 r5841  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.85 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-12-14 00:47:27 $
     11 *  @version $Revision: 1.86 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-12-24 00:33:17 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
  • trunk/psLib/src/mathtypes/psImage.c

    r5686 r5841  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.92 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-12-05 22:14:27 $
     11 *  @version $Revision: 1.93 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-12-24 00:33:18 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    163163
    164164// set actual region based on image parameters:
    165 // compensate for negative upper limits
    166 // XXX this is inconsistent: the coordindates should always be in the parent
    167 //     frame, which means the negative values should subtract from Nx,Ny of
    168 //     the parent, not the child.  but, we don't carry the dimensions of the
    169 //     parent in the psImage container.  for now, us the child Nx,Ny
    170 // force range to be on this subimage
    171 // XXX EAM : this needs to be changes to use psRegion rather than psRegion*
     165// - compensate for negative upper limits
     166// - force range to be on this image
     167// - saturate on upper and lower limits of image
     168// - flip x0,x1 if x0>x1
     169// - flip y0,y1 if y0>y1
     170// psRegion in refers to coordinates in the
    172171psRegion psRegionForImage(psImage *image,
    173172                          psRegion in)
    174173{
    175174
    176     // x0,y0, x1,y1 are in *parent* units
    177     //    PS_ASSERT_PTR_NON_NULL(in, NULL);
    178     /*
    179         if( in == NULL ) {
    180             psError(PS_ERR_BAD_PARAMETER_NULL, true, "Unallowable operation.  psRegion in is NULL.");
    181             return in;
    182         }
    183     */    /*    if (out == NULL) {
    184         //    out = psRegionAlloc(in->x0, in->x1, in->y0, in->y1);
    185             *out = psRegionSet(in->x0, in->x1, in->y0, in->y1);
    186             } else {
    187             *out = *in;
    188             }
    189         */    // XXX these are probably wrong (see above)
    190     if (in.x1 <= 0) {
    191         in.x1 = image->col0 + image->numCols + in.x1;
    192     }
    193     if (in.y1 <= 0) {
    194         in.y1 = image->row0 + image->numRows + in.y1;
    195     }
    196 
    197     // force the lower-limits to be on the child
    198     in.x0 = PS_MAX(image->col0, in.x0);
    199     in.y0 = PS_MAX(image->row0, in.y0);
    200 
    201     // force the upper-limits to be on the child
    202     in.x1 = PS_MIN(image->col0 + image->numCols, in.x1);
    203     in.y1 = PS_MIN(image->row0 + image->numRows, in.y1);
     175    if (image == NULL) {
     176        return in;
     177    }
     178
     179    // convert non-positive upper-limits
     180    in.x1 = (in.x1 <= 0) ? (image->numCols + in.x1) : in.x1;
     181    in.y1 = (in.y1 <= 0) ? (image->numRows + in.y1) : in.y1;
     182
     183    // force the upper-limits to be on the image
     184    in.x1 = PS_MIN(image->numCols, in.x1);
     185    in.y1 = PS_MIN(image->numRows, in.y1);
     186
     187    // force the lower-limits to be on the image
     188    in.x0 = PS_MAX(0, in.x0);
     189    in.y0 = PS_MAX(0, in.y0);
     190    in.x0 = PS_MIN(image->numCols, in.x0);
     191    in.y0 = PS_MIN(image->numRows, in.y0);
     192
     193    // flip start and end if out of order
     194    if (in.x0 > in.x1) {
     195        PS_SWAP (in.x0, in.x1);
     196    }
     197    if (in.y0 > in.y1) {
     198        PS_SWAP (in.y0, in.y1);
     199    }
     200
    204201    return (in);
    205202}
  • trunk/psLib/src/mathtypes/psVector.c

    r5568 r5841  
    99*  @author Robert DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.62 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2005-11-22 19:07:35 $
     11*  @version $Revision: 1.63 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2005-12-24 00:33:18 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    778778                          psElemType type)
    779779{
    780     psVector *out;
     780    psVector *out = NULL;
    781781    switch (type) {
    782782    case PS_TYPE_S8:
  • trunk/psLib/src/types/psMetadataConfig.c

    r5216 r5841  
    1010*  @author Eric Van Alst, MHPCC
    1111*
    12 *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-10-01 02:22:15 $
     12*  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-12-24 00:33:20 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    753753    p_psParseLevelInfo*  nextLevelInfo = NULL;
    754754    psTime *mTime;
    755     psTimeType timeType;
     755    psTimeType timeType = PS_TIME_TAI;
    756756
    757757    // Get the metadata item type
     
    12941294            snprintf(content, MAXSTR, "%s F32  ", item->name);
    12951295            strncat(mdString, content, MAXSTR);
    1296             snprintf(content, MAXSTR, "%f ", item->data.F32);
     1296            snprintf(content, MAXSTR, "%22.15g ", item->data.F32);
    12971297            strncat(mdString, content, MAXSTR);
    12981298            if ( strncmp(item->comment,"",2) ) {
     
    13101310            snprintf(content, MAXSTR, "%s F64  ", item->name);
    13111311            strncat(mdString, content, MAXSTR);
    1312             snprintf(content, MAXSTR, "%f ", item->data.F64);
     1312            snprintf(content, MAXSTR, "%22.15g ", item->data.F64);
    13131313            strncat(mdString, content, MAXSTR);
    13141314            if ( strncmp(item->comment,"",2) ) {
  • trunk/psLib/src/xml/psXML.c

    r5136 r5841  
    1010*  @author David Robbins, MHPCC
    1111*
    12 *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-09-26 21:13:28 $
     12*  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-12-24 00:33:22 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4848
    4949    psXMLDoc *XML = psXMLDocAlloc();
    50     xmlNode *cur_node;
     50    xmlNode *cur_node = NULL;
    5151    xmlNode *root = NULL;
    5252    xmlAttr *prop = NULL;
Note: See TracChangeset for help on using the changeset viewer.