IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 9, 2006, 3:55:20 PM (20 years ago)
Author:
Paul Price
Message:

Was having trouble reading and writing concepts at different levels. Added 'propagateUp' and 'propagateDown' flags to the pmConceptsRead and pmConceptsWrite functions so we can read up and down the hierarchy. For example, when you read a header at the chip level, it may be a PHU so that you want the FPA to also read concepts from it if it doesn't have its own HDU, and you want the cell to read concepts from it if it doesn't have its own HDU. But if I add a PHU, I only want to propagate upwards, because the downwards propagation will occur when I read the header lower down.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/concepts/pmConceptsWrite.c

    r7382 r7469  
    141141    switch (item->type) {
    142142    case PS_DATA_STRING:
     143        psTrace(__func__, 9, "Writing header %s: %s\n", keyword, item->data.V);
    143144        return psMetadataAddStr(hdu->header, PS_LIST_TAIL, keyword, PS_META_REPLACE, item->comment,
    144145                                item->data.V);
    145146    case PS_DATA_S32:
     147        psTrace(__func__, 9, "Writing header %s: %d\n", keyword, item->data.S32);
    146148        return psMetadataAddS32(hdu->header, PS_LIST_TAIL, keyword, PS_META_REPLACE, item->comment,
    147149                                item->data.S32);
    148150    case PS_DATA_F32:
     151        psTrace(__func__, 9, "Writing header %s: %f\n", keyword, item->data.F32);
    149152        return psMetadataAddF32(hdu->header, PS_LIST_TAIL, keyword, PS_META_REPLACE, item->comment,
    150153                                item->data.F32);
    151154    case PS_DATA_F64:
     155        psTrace(__func__, 9, "Writing header %s: %f\n", keyword, item->data.F64);
    152156        return psMetadataAddF64(hdu->header, PS_LIST_TAIL, keyword, PS_META_REPLACE, item->comment,
    153157                                item->data.F64);
    154158    case PS_DATA_REGION: {
    155159            psString region = psRegionToString(*(psRegion*)item->data.V);
     160            psTrace(__func__, 9, "Writing header %s: %s\n", keyword, region);
    156161            bool result = psMetadataAddStr(hdu->header, PS_LIST_TAIL, keyword, PS_META_REPLACE, item->comment,
    157162                                           region);
     
    378383                continue;
    379384            }
     385            psTrace(__func__, 3, "Writing %s to header %s\n", name, headerItem->data.V);
    380386            psMetadataItem *conceptItem = psMetadataLookup(concepts, name); // The item from the concepts
    381387            psMetadataItem *formatted = conceptFormat(spec, conceptItem, cameraFormat, fpa, chip, cell);
Note: See TracChangeset for help on using the changeset viewer.