IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21029


Ignore:
Timestamp:
Dec 17, 2008, 10:24:32 AM (17 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.

Location:
branches/pap_branch_20081216/psModules/src/camera
Files:
5 edited

Legend:

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

    r21022 r21029  
    252252
    253253// Update the FPA.OBS, CHIP.NAME and CELL.NAME in the FITS header, if required
    254 bool pmFPAUpdateNames(pmFPA *fpa, pmChip *chip, pmCell *cell, psU64 imageId, psU64 sourceId)
     254bool pmFPAUpdateNames(pmFPA *fpa, pmChip *chip, pmCell *cell, psS64 imageId, psS64 sourceId)
    255255{
    256256    pmHDU *hduHigh = pmHDUGetHighest(fpa, chip, cell); // Highest HDU, i.e., the PHU
  • branches/pap_branch_20081216/psModules/src/camera/pmFPAWrite.h

    r21022 r21029  
    44 * @author Paul Price, IfA
    55 *
    6  * @version $Revision: 1.11.36.1 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2008-12-17 02:37:03 $
     6 * @version $Revision: 1.11.36.2 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2008-12-17 20:24:32 $
    88 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    99 */
     
    171171                      pmChip *chip,     ///< Chip, or NULL
    172172                      pmCell *cell,     ///< Cell, or NULL
    173                       psU64 imageId,    ///< Image identifier
    174                       psU64 sourceId    ///< Source identifier
     173                      psS64 imageId,    ///< Image identifier
     174                      psS64 sourceId    ///< Source identifier
    175175    );
    176176
  • branches/pap_branch_20081216/psModules/src/camera/pmFPAfile.h

    r21022 r21029  
    44 * @author EAM, IfA
    55 *
    6  * @version $Revision: 1.33.14.1 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2008-12-17 02:37:03 $
     6 * @version $Revision: 1.33.14.2 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2008-12-17 20:24:32 $
    88 * Copyright 2004-2005 Institute for Astronomy, University of Hawaii
    99 */
     
    107107    psString formatName;                // name of the camera format
    108108
    109     psU64 imageId, sourceId;            // Image and source identifiers
     109    psS64 imageId, sourceId;            // Image and source identifiers
    110110} pmFPAfile;
    111111
  • 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;
  • branches/pap_branch_20081216/psModules/src/camera/pmHDU.h

    r21022 r21029  
    44 * @author Paul Price, IfA
    55 *
    6  * @version $Revision: 1.9.14.1 $ $Name: not supported by cvs2svn $
    7  * @date $Date: 2008-12-17 02:37:03 $
     6 * @version $Revision: 1.9.14.2 $ $Name: not supported by cvs2svn $
     7 * @date $Date: 2008-12-17 20:24:32 $
    88 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    99 */
     
    8787
    8888/// Read identifiers from FITS header
    89 bool pmHDUReadIdentifiers(psU64 *imageId, ///< Image identifer, returned
    90                           psU64 *sourceId, ///< Source identifier, returned
     89bool pmHDUReadIdentifiers(psS64 *imageId, ///< Image identifer, returned
     90                          psS64 *sourceId, ///< Source identifier, returned
    9191                          const pmHDU *hdu ///< HDU from which to read
    9292    );
     
    9494/// Write identifiers to FITS header
    9595bool pmHDUWriteIdentifiers(pmHDU *hdu, ///< HDU to which to write
    96                            psU64 imageId, ///< Image identifer
    97                            psU64 sourceId ///< Source identifier
     96                           psS64 imageId, ///< Image identifer
     97                           psS64 sourceId ///< Source identifier
    9898                           );
    9999
Note: See TracChangeset for help on using the changeset viewer.