IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 22704


Ignore:
Timestamp:
Feb 26, 2009, 3:45:15 PM (17 years ago)
Author:
Paul Price
Message:

Actually, the HDU is not so important: we don't have a copy function that requires it, yet.

File:
1 edited

Legend:

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

    r22703 r22704  
    8181    psMetadata *specs = pmConceptsSpecs(PM_FPA_LEVEL_FPA); // Concept specifications
    8282
    83     pmHDU *hdu = pmHDUGetFirst(target); // HDU with camera format
    84     if (!hdu) {
    85         psError(PS_ERR_UNKNOWN, true, "Can't find HDU for FPA");
    86         return false;
    87     }
     83    pmHDU *hdu = target->hdu;           // Header data unit
     84    psMetadata *format = hdu ? hdu->format : NULL; // Camera format
    8885
    8986    // Copy FPA concepts
    90     if (!copyConcepts(target->concepts, source->concepts, specs, target->hdu->format,
     87    if (!copyConcepts(target->concepts, source->concepts, specs, format,
    9188                      source, NULL, NULL, dontCopyConceptsFPA)) {
    9289        return false;
     
    125122    psMetadata *specs = pmConceptsSpecs(PM_FPA_LEVEL_CHIP); // Concept specifications
    126123    pmHDU *hdu = pmHDUFromChip(target); // Header data unit
    127     if (!hdu) {
    128         hdu = pmHDUGetFirst(target->parent);
    129         if (!hdu) {
    130             psError(PS_ERR_UNKNOWN, true, "Can't find HDU for chip");
    131             return false;
    132         }
    133     }
     124    psMetadata *format = hdu ? hdu->format : NULL; // Camera format
    134125
    135126    // Copy chip concepts
    136     if (!copyConcepts(target->concepts, source->concepts, specs, hdu->format,
     127    if (!copyConcepts(target->concepts, source->concepts, specs, format,
    137128                      source->parent, source, NULL, dontCopyConceptsChip)) {
    138129        return false;
     
    172163    psMetadata *specs = pmConceptsSpecs(PM_FPA_LEVEL_CHIP); // Concept specifications
    173164    pmHDU *hdu = pmHDUFromCell(target); // Header data unit
    174     if (!hdu) {
    175         hdu = pmHDUGetFirst(target->parent->parent);
    176         if (!hdu) {
    177             psError(PS_ERR_UNKNOWN, true, "Can't find HDU for cell");
    178             return false;
    179         }
    180     }
     165    psMetadata *format = hdu ? hdu->format : NULL; // Camera format
    181166
    182     return copyConcepts(target->concepts, source->concepts, specs, hdu->format,
     167    return copyConcepts(target->concepts, source->concepts, specs, format,
    183168                        source->parent->parent, source->parent, source, dontCopyConceptsCell);
    184169}
Note: See TracChangeset for help on using the changeset viewer.