IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 26, 2009, 11:47:00 AM (17 years ago)
Author:
Paul Price
Message:

Use pmConceptsCopy functions to copy the concepts, instead of blindly using psMetadataCopy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPACopy.c

    r21510 r22687  
    452452    // Update the concepts
    453453    psMetadataItem *chipName = psMemIncrRefCounter(psMetadataLookup(target->concepts, "CHIP.NAME"));
    454     psMetadataCopy(target->concepts, source->concepts);
     454    pmConceptsCopyChip(target, source, false);
    455455    psMetadataAddItem(target->concepts, chipName, PS_LIST_TAIL, PS_META_REPLACE);
    456456    psFree(chipName);
    457     psMetadataCopy(target->parent->concepts, source->parent->concepts);
     457    pmConceptsCopyFPA(target->parent, source->parent, false, false);
    458458
    459459    // Update the astrometric parameters
     
    467467
    468468    if (targetFPA && sourceFPA) {
    469         if (targetFPA->toSky) {
    470             psAssert (targetFPA->toSky == sourceFPA->toSky, "chips within FPA have inconsistent astrometry references");
    471         } else {
    472             targetFPA->toSky = psMemIncrRefCounter (sourceFPA->toSky);
    473         }
    474         if (targetFPA->toTPA) {
    475             psAssert (targetFPA->toTPA == sourceFPA->toTPA, "chips within FPA have inconsistent astrometry references");
    476         } else {
    477             targetFPA->toTPA = psMemIncrRefCounter (sourceFPA->toTPA);
    478         }
    479         if (targetFPA->fromTPA) {
    480             psAssert (targetFPA->fromTPA == sourceFPA->fromTPA, "chips within FPA have inconsistent astrometry references");
    481         } else {
    482             targetFPA->fromTPA = psMemIncrRefCounter (sourceFPA->fromTPA);
    483         }
     469        if (targetFPA->toSky) {
     470            psAssert (targetFPA->toSky == sourceFPA->toSky, "chips within FPA have inconsistent astrometry references");
     471        } else {
     472            targetFPA->toSky = psMemIncrRefCounter (sourceFPA->toSky);
     473        }
     474        if (targetFPA->toTPA) {
     475            psAssert (targetFPA->toTPA == sourceFPA->toTPA, "chips within FPA have inconsistent astrometry references");
     476        } else {
     477            targetFPA->toTPA = psMemIncrRefCounter (sourceFPA->toTPA);
     478        }
     479        if (targetFPA->fromTPA) {
     480            psAssert (targetFPA->fromTPA == sourceFPA->fromTPA, "chips within FPA have inconsistent astrometry references");
     481        } else {
     482            targetFPA->fromTPA = psMemIncrRefCounter (sourceFPA->fromTPA);
     483        }
    484484    }
    485485
     
    525525
    526526    // Update the concepts
    527     psMetadataCopy(targetChip->concepts, sourceChip->concepts);
     527    pmConceptsCopyChip(targetChip, sourceChip, false);
    528528
    529529    // update the attributes
     
    572572
    573573    // Update the concepts
    574     psMetadataCopy(target->concepts, source->concepts);
     574    pmConceptsCopyFPA(target, source, false, false);
    575575
    576576    return status;
Note: See TracChangeset for help on using the changeset viewer.