IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 12, 2006, 2:19:04 PM (20 years ago)
Author:
Paul Price
Message:

Scalars should be written as integers instead of floats. Changed
source for the scalar reads to be the header copy (which is likely
populated) instead of the header itself.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmFringeStats.c

    r7875 r7883  
    33 *  @author Eugene Magnier, IfA
    44 *
    5  *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2006-07-12 04:44:01 $
     5 *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2006-07-13 00:19:04 $
    77 *
    88 *  Copyright 2004 IfA
     
    128128
    129129    psMetadata *scalars = psMetadataAlloc(); // Metadata to hold the scalars; will be the header
    130     psMetadataAddF32(scalars, PS_LIST_TAIL, "PSFRNGDX", PS_META_REPLACE, "Median box half-width",
     130    psMetadataAddS32(scalars, PS_LIST_TAIL, "PSFRNGDX", PS_META_REPLACE, "Median box half-width",
    131131                     regions->dX);
    132     psMetadataAddF32(scalars, PS_LIST_TAIL, "PSFRNGDY", PS_META_REPLACE, "Median box half-height",
     132    psMetadataAddS32(scalars, PS_LIST_TAIL, "PSFRNGDY", PS_META_REPLACE, "Median box half-height",
    133133                     regions->dY);
    134     psMetadataAddF32(scalars, PS_LIST_TAIL, "PSFRNGNX", PS_META_REPLACE, "Large-scale smoothing in x",
     134    psMetadataAddS32(scalars, PS_LIST_TAIL, "PSFRNGNX", PS_META_REPLACE, "Large-scale smoothing in x",
    135135                     regions->nX);
    136     psMetadataAddF32(scalars, PS_LIST_TAIL, "PSFRNGNY", PS_META_REPLACE, "Large-scale smoothing in y",
     136    psMetadataAddS32(scalars, PS_LIST_TAIL, "PSFRNGNY", PS_META_REPLACE, "Large-scale smoothing in y",
    137137                     regions->nY);
    138138
     
    182182    // Read the scalars from the header
    183183    #define READ_SCALAR(SCALAR, NAME) \
    184     int SCALAR = psMetadataLookupS32(&mdok, header, NAME); \
     184    int SCALAR = psMetadataLookupS32(&mdok, headerCopy, NAME); \
    185185    if (!mdok || SCALAR <= 0) { \
    186186        psError(PS_ERR_IO, true, "Unable to find " NAME " in header of extension %s.\n", extname); \
Note: See TracChangeset for help on using the changeset viewer.