IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

Need to find HDU at each level separately.

File:
1 edited

Legend:

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

    r22699 r22701  
    2626                         psMetadata *source, // Source metadata container
    2727                         psMetadata *specs, // Concept specifications
     28                         psMetadata *cameraFormat, // Camera format configuration
    2829                         const pmFPA *fpa,    // FPA of interest
    2930                         const pmChip *chip,  // Chip of interest, or NULL
     
    3637    assert(specs);
    3738    assert(dontCopyConcepts);
    38 
    39     pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); // The HDU at the lowest level
    40     if (!hdu) {
    41         psError(PS_ERR_UNKNOWN, true, "Can't find HDU for cell");
    42         return false;
    43     }
    44     psMetadata *cameraFormat = hdu->format; // The camera format
    4539
    4640    psMetadataIterator *iter = psMetadataIteratorAlloc(source, PS_LIST_HEAD, NULL);
     
    8680
    8781    psMetadata *specs = pmConceptsSpecs(PM_FPA_LEVEL_FPA); // Concept specifications
     82    if (!target->hdu) {
     83        psError(PS_ERR_UNKNOWN, true, "Can't find HDU for FPA");
     84        return false;
     85    }
    8886
    8987    // Copy FPA concepts
    90     if (!copyConcepts(target->concepts, source->concepts, specs, source, NULL, NULL, dontCopyConceptsFPA)) {
     88    if (!copyConcepts(target->concepts, source->concepts, specs, target->hdu->format,
     89                      source, NULL, NULL, dontCopyConceptsFPA)) {
    9190        return false;
    9291    }
     
    123122
    124123    psMetadata *specs = pmConceptsSpecs(PM_FPA_LEVEL_CHIP); // Concept specifications
     124    pmHDU *hdu = pmHDUFromChip(target); // Header data unit
     125    if (!hdu) {
     126        psError(PS_ERR_UNKNOWN, true, "Can't find HDU for chip");
     127        return false;
     128    }
    125129
    126130    // Copy chip concepts
    127     if (!copyConcepts(target->concepts, source->concepts, specs, source->parent, source, NULL,
    128                       dontCopyConceptsChip)) {
     131    if (!copyConcepts(target->concepts, source->concepts, specs, hdu->format,
     132                      source->parent, source, NULL, dontCopyConceptsChip)) {
    129133        return false;
    130134    }
     
    162166
    163167    psMetadata *specs = pmConceptsSpecs(PM_FPA_LEVEL_CHIP); // Concept specifications
     168    pmHDU *hdu = pmHDUFromCell(target); // Header data unit
     169    if (!hdu) {
     170        psError(PS_ERR_UNKNOWN, true, "Can't find HDU for cell");
     171        return false;
     172    }
    164173
    165     return copyConcepts(target->concepts, source->concepts, specs, source->parent->parent,
    166                         source->parent, source, dontCopyConceptsCell);
     174    return copyConcepts(target->concepts, source->concepts, specs, hdu->format,
     175                        source->parent->parent, source->parent, source, dontCopyConceptsCell);
    167176}
Note: See TracChangeset for help on using the changeset viewer.