IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13529


Ignore:
Timestamp:
May 25, 2007, 5:09:39 PM (19 years ago)
Author:
eugene
Message:

fixed the psf I/O functions

Location:
trunk/psphot/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotLoadPSF.c

    r13416 r13529  
    1616
    1717    if (!psphotPSFstats (readout, recipe, psf)) psAbort("cannot measure PSF shape terms");
     18
     19    psLogMsg ("psphot", 3, "using externally supplied PSF model for this readout");
     20
     21    // we return a psf which can be free (and which may be removed from the metadata)
     22    psMemIncrRefCounter (psf);
    1823    return psf;
    1924}
  • trunk/psphot/src/psphotMakeResiduals.c

    r13408 r13529  
    1212
    1313    int SPATIAL_ORDER = psMetadataLookupS32(&status, recipe, "PSF.RESIDUALS.SPATIAL_ORDER");
    14 #if 0                                   // True when PSF.RESIDUALS.SPATIAL_ORDER's in default recipe
    15     PS_ASSERT (status, false);
    16 #else
    17     if (!status) {
    18         SPATIAL_ORDER = 1;              // i.e. linear
    19     }
    20 #endif
     14    PS_ASSERT (status, false);
    2115    if (SPATIAL_ORDER != 0 && SPATIAL_ORDER != 1) {
    2216        psError(PSPHOT_ERR_CONFIG, true, "PSF.RESIDUALS.SPATIAL_ORDER must be 0 or 1 (not %d)",
  • trunk/psphot/src/psphotReadoutCleanup.c

    r13008 r13529  
    4040    }
    4141    if (psf) {
    42         psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.PSF",     PS_DATA_UNKNOWN,  "psphot psf", psf);
     42        // save the psf for possible output.  if there was already an entry, it was loaded from external sources
     43        // the new one may have been updated or modified, so replace the existing entry
     44        psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.PSF", PS_DATA_UNKNOWN | PS_META_REPLACE,  "psphot psf", psf);
    4345    }
    4446
     
    4850    pmFPAfileDropInternal (config->files, "PSPHOT.BACKGND");
    4951
    50     if (psErrorCodeLast() != PS_ERR_NONE) abort();
     52    if (psErrorCodeLast() != PS_ERR_NONE) {
     53        psErrorStackPrint(stderr, "unexpected remaining errors");
     54        abort();
     55    }
    5156
    5257    // XXX move this to top of loop
Note: See TracChangeset for help on using the changeset viewer.