IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 27, 2008, 4:27:35 PM (18 years ago)
Author:
Paul Price
Message:

Adding function to re-do photometry of input sources

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackLoop.c

    r19770 r20427  
    318318                }
    319319                indSources->data[index] = psMemIncrRefCounter(sources);
     320
     321
     322                // Calculate zero points if we don't trust the source lists
     323                if (psMetadataLookupBool(NULL, recipe, "ZP")) {
     324                    psTrace("ppStack", 2, "Photometering input %d of %d....\n", index, num);
     325                    pmFPAfileActivate(config->files, false, NULL);
     326                    fileActivationSingle(config, convolveFiles, true, index);
     327                    pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT",
     328                                                            index);// File of interest
     329                    pmFPAview *view = filesIterateDown(config);
     330                    if (!view) {
     331                        psFree(globalSources);
     332                        psFree(indSources);
     333                        psFree(targetPSF);
     334                        return false;
     335                    }
     336
     337                    pmReadout *ro = pmFPAviewThisReadout(view, file->fpa); // Readout of interest
     338
     339                    if (!ppStackInputPhotometry(ro, sources, config)) {
     340                        psError(PS_ERR_UNKNOWN, false, "Unable to do photometry on input sources");
     341                        psFree(globalSources);
     342                        psFree(indSources);
     343                        psFree(targetPSF);
     344                        return false;
     345                    }
     346
     347                    psFree(view);
     348                    filesIterateUp(config);
     349                }
     350
     351
    320352#ifdef TESTING
    321353                ppStackSourcesPrint(sources);
Note: See TracChangeset for help on using the changeset viewer.