IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 17, 2008, 10:24:32 AM (18 years ago)
Author:
Paul Price
Message:

CFITSIO only supports signed 64-bit integers, so we'll use that for the image and source identifiers. Current system works: gets IMAGEID and SOURCEID into the header of outputs. Still need to read these on input, and get a mechanism for them to be set to something reasonable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_20081216/psModules/src/camera/pmHDU.c

    r21022 r21029  
    245245
    246246
    247 bool pmHDUWriteIdentifiers(pmHDU *hdu, psU64 imageId, psU64 sourceId)
     247bool pmHDUWriteIdentifiers(pmHDU *hdu, psS64 imageId, psS64 sourceId)
    248248{
    249249    PS_ASSERT_PTR_NON_NULL(hdu, false);
     
    251251    // XXX Get header keyword name from camera configuration
    252252
    253     psMetadataAddU64(hdu->header, PS_LIST_TAIL, "IMAGEID", PS_META_REPLACE, "Image identifier", imageId);
    254     psMetadataAddU64(hdu->header, PS_LIST_TAIL, "SOURCEID", PS_META_REPLACE, "Source identifier", sourceId);
    255     return true;
    256 }
    257 
    258 bool pmHDUReadIdentifiers(psU64 *imageId, psU64 *sourceId, const pmHDU *hdu)
     253    psMetadataAddS64(hdu->header, PS_LIST_TAIL, "IMAGEID", PS_META_REPLACE, "Image identifier", imageId);
     254    psMetadataAddS64(hdu->header, PS_LIST_TAIL, "SOURCEID", PS_META_REPLACE, "Source identifier", sourceId);
     255    return true;
     256}
     257
     258bool pmHDUReadIdentifiers(psS64 *imageId, psS64 *sourceId, const pmHDU *hdu)
    259259{
    260260    PS_ASSERT_PTR_NON_NULL(hdu, false);
     
    263263
    264264    bool imageOK, sourceOK;             // Status of MD lookups
    265     *imageId = psMetadataLookupU64(&imageOK, hdu->header, "IMAGEID");
    266     *sourceId = psMetadataLookupU64(&sourceOK, hdu->header, "SOURCEID");
     265    *imageId = psMetadataLookupS64(&imageOK, hdu->header, "IMAGEID");
     266    *sourceId = psMetadataLookupS64(&sourceOK, hdu->header, "SOURCEID");
    267267
    268268    return imageOK && sourceOK;
Note: See TracChangeset for help on using the changeset viewer.