IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 19, 2008, 1:53:16 PM (18 years ago)
Author:
eugene
Message:

do not overwrite results in header from earlier stages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroMosaicChipAstrom.c

    r17786 r20269  
    44bool psastroMosaicChipAstrom (pmFPA *fpa, psMetadata *recipe, int iteration) {
    55
     6    bool status;
    67    pmChip *chip = NULL;
    78    pmCell *cell = NULL;
     
    2526
    2627                // save WCS and analysis metadata in update header
    27                 psMetadata *updates = psMetadataAlloc();
     28                // (pull or create local view to entry on readout->analysis)
     29                psMetadata *updates = psMetadataLookupMetadata (&status, readout->analysis, "PSASTRO.HEADER");
     30                if (!updates) {
     31                    updates = psMetadataAlloc ();
     32                    psMetadataAddMetadata (readout->analysis, PS_LIST_TAIL, "PSASTRO.HEADER",  PS_META_REPLACE, "psastro header stats", updates);
     33                    psFree (updates);
     34                }
    2835
    2936                if (!psastroMosaicOneChip (chip, readout, recipe, updates, iteration)) {
     
    3138                    psError(PS_ERR_UNKNOWN, false, "failed to find a solution for %d,%d,%d\n",
    3239                            view->chip, view->cell, view->readout);
    33                     psFree(updates);
    3440                    psFree(view);
    3541                    return false;
     
    3844                // create the header keywords to descripe the results
    3945                pmAstromWriteBilevelChip (updates, chip, NONLIN_TOL);
    40                 psMetadataAddMetadata (readout->analysis, PS_LIST_TAIL, "PSASTRO.HEADER",  PS_META_REPLACE, "psastro header stats", updates);
    41                 psFree (updates);
    4246            }
    4347        }
Note: See TracChangeset for help on using the changeset viewer.