IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17819


Ignore:
Timestamp:
May 28, 2008, 8:20:44 AM (18 years ago)
Author:
Paul Price
Message:

Got photometry using the PSF determined from the sum of the convolved images --- works, but doesn't seem to fix the problem of finding objects in the noise.

Location:
trunk/ppSub/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubCamera.c

    r17813 r17819  
    142142            return false;
    143143        }
    144         if (input->type != PM_FPA_FILE_IMAGE) {
     144        if (psphot->type != PM_FPA_FILE_IMAGE) {
    145145            psError(PS_ERR_IO, true, "PSPHOT.INPUT is not of type IMAGE");
    146146            return false;
     
    151151            return false;
    152152        }
     153
     154        // Internal-ish file for getting the PSF from the matched addition
     155        pmFPAfile *psf = pmFPAfileDefineSkycell(config, output->fpa, "PSPHOT.PSF.LOAD");
     156        if (!psf) {
     157            psError(PS_ERR_IO, false, "Failed to build FPA from PSPHOT.PSF.LOAD");
     158            return false;
     159        }
     160        if (psf->type != PM_FPA_FILE_PSF) {
     161            psError(PS_ERR_IO, true, "PSPHOT.PSF.LOAD is not of type PSF");
     162            return false;
     163        }
     164        pmFPAfileActivate(config->files, false, "PSPHOT.PSF.LOAD");
     165
    153166    }
    154167
  • trunk/ppSub/src/ppSubReadout.c

    r17813 r17819  
    213213            return false;
    214214        }
    215         const char *breakpoint = psMetadataLookupStr(NULL, recipe, "BREAK_POINT"); // Current break point
     215        const char *breakpoint = psMetadataLookupStr(&mdok, recipe, "BREAK_POINT"); // Current break point
    216216        psMetadataAddStr(recipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_REPLACE,
    217217                         "ALTERED break point for psphot operations", "PSFMODEL");
     
    223223        }
    224224
    225         psMetadataAddStr(recipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_REPLACE,
    226                          "RESTORED break point for psphot operations", breakpoint);
     225        if (breakpoint) {
     226            psMetadataAddStr(recipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_REPLACE,
     227                             "RESTORED break point for psphot operations", breakpoint);
     228        }
     229
     230        // Blow away the sources psphot found --- they're irrelevant for the subtraction
     231        pmReadout *photRO = pmFPAviewThisReadout(view, photFile->fpa); // Readout with sources
     232        psMetadataRemoveKey(photRO->analysis, "PSPHOT.SOURCES");
     233        psMetadataRemoveKey(photRO->analysis, "PSPHOT.HEADER");
     234
     235        pmPSF *psf = psMetadataLookupPtr(NULL, photRO->parent->parent->analysis, "PSPHOT.PSF"); // PSF
     236        if (!psf) {
     237            psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find PSF from psphot");
     238            return false;
     239        }
     240
     241        pmCell *psfCell = pmFPAfileThisCell(config->files, view, "PSPHOT.PSF.LOAD");
     242        if (!psfCell) {
     243            psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find file PSPHOT.PSF.LOAD");
     244            return false;
     245        }
     246        pmReadout *psfRO = pmReadoutAlloc(psfCell);
     247        psMetadataAddPtr(psfRO->parent->parent->analysis, PS_LIST_TAIL, "PSPHOT.PSF", PS_DATA_UNKNOWN,
     248                         "PSF from matched addition", psf);
     249        psFree(psfRO);                  // Drop reference
    227250    }
    228251
     
    309332
    310333        pmFPAfileActivate(config->files, false, "PSPHOT.INPUT");
     334        pmFPAfileActivate(config->files, false, "PSPHOT.LOAD.PSF");
    311335
    312336        if (stats) {
Note: See TracChangeset for help on using the changeset viewer.