IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35497 for trunk/pstamp


Ignore:
Timestamp:
May 3, 2013, 9:47:09 AM (13 years ago)
Author:
bills
Message:

fix a few really silly bugs with extracting sources from cmf file

Location:
trunk/pstamp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_job_run.pl

    r35398 r35497  
    151151        } elsif ($params->{cmf}) {
    152152            $argString .= " -write_cmf";
     153            $fileArgs  .= " -sources $params->{cmf}";
    153154            push @file_list, $params->{cmf};
    154155        } else {
  • trunk/pstamp/src/ppstampMakeStamp.c

    r34596 r35497  
    359359
    360360        if (options->writeCMF) {
    361             pmReadout *astromReadout = NULL;
     361            pmReadout *sourcesReadout = NULL;
    362362            if (astrom->fpa != input->fpa) {
    363                 astromReadout = pmFPAviewThisReadout(srcView, astrom->fpa);
    364             }
    365             if (!copySources(outReadout, astromReadout, astromReadout, extractRegion)) {
     363                sourcesReadout = pmFPAviewThisReadout(srcView, astrom->fpa);
     364            } else {
     365                sourcesReadout = readout;
     366            }
     367            if (!copySources(outReadout, sourcesReadout, sourcesReadout, extractRegion)) {
    366368                psError(PS_ERR_UNKNOWN, false, "failed to extract sources from region of interest.\n");
    367369                status = false;
     
    784786
    785787    // first look for detections in the input readout. Those would have come from the -sources file
     788    if (!inReadout->analysis) {
     789        psLogMsg("ppstampMakeStamp", PS_LOG_WARN, "no analysis metadata found on input\n");
     790        return false;
     791    }
    786792    pmDetections *inDetections = psMetadataLookupPtr (&status, inReadout->analysis, "PSPHOT.DETECTIONS");
    787793    if (!inDetections) {
  • trunk/pstamp/src/ppstampParseCamera.c

    r35431 r35497  
    119119        // see if -sources file was supplied.
    120120        // If so define the file.
    121         psPtr sourcesFile = psMetadataLookupStr(&status, config->arguments, "SOURCES");
     121        psPtr sourcesFile = psMetadataLookupPtr(&status, config->arguments, "SOURCES");
    122122        if (sourcesFile) {
    123123            pmFPAfile *sources = pmFPAfileBindFromArgs(&status, input, config, "PPSTAMP.INPUT.SOURCES", "SOURCES");
Note: See TracChangeset for help on using the changeset viewer.