IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 11, 2011, 1:42:35 PM (15 years ago)
Author:
eugene
Message:

fix forced photometry of matched objects (psf model only) : needed to generate a guess model, which meant re-working psphotGuessModels to apply to only the unguessed objects in the allSources detections, not the newSources, so they could be applied to the matched objects

Location:
branches/eam_branches/ipp-20111122/psphot/src
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/psphot/src/psphotFitSourcesLinear.c

    r32695 r32924  
    137137        // psAssert (source->peak, "source without peak??");
    138138        // psAssert (source->peak->footprint, "peak without footprint??");
     139
     140        // XXX TEST
     141        if (source->mode2 & PM_SOURCE_MODE2_MATCHED) {
     142            fprintf (stderr, "forced photometry on supplied source\n");
     143        }
    139144
    140145        // turn this bit off and turn it on again if we pass this test
  • branches/eam_branches/ipp-20111122/psphot/src/psphotForcedReadout.c

    r29936 r32924  
    5555    psphotLoadExtSources (config, view, filerule);
    5656
    57     // construct an initial model for each object, set the radius to fitRadius, set circular fit mask
     57    // Construct an initial model for each object, set the radius to fitRadius, set circular
     58    // fit mask.  NOTE: only applied to sources without guess models
    5859    psphotGuessModels (config, view, filerule);
    5960
  • branches/eam_branches/ipp-20111122/psphot/src/psphotGuessModels.c

    r32633 r32924  
    4646    psAssert (detections, "missing detections?");
    4747
    48     psArray *sources = detections->newSources;
     48    psArray *sources = detections->allSources;
    4949    psAssert (sources, "missing sources?");
    5050
     
    160160        pmSource *source = sources->data[i];
    161161
     162        // do not redo sources already guessed
     163        if (source->tmpFlags & PM_SOURCE_TMPF_MODEL_GUESS) continue;
     164
    162165        // this is used to mark sources for which the model is measured. We check later that
    163166        // all are used.
  • branches/eam_branches/ipp-20111122/psphot/src/psphotReadout.c

    r32695 r32924  
    127127    // psphotLoadExtSources (config, view, filerule); // pass 1
    128128
    129     // construct an initial model for each object, set the radius to fitRadius, set circular
    130     // fit mask (detections->newSources)
    131     psphotGuessModels (config, view, filerule); // pass 1
    132 
    133129    // merge the newly selected sources into the existing list
    134130    // NOTE: merge OLD and NEW
    135131    psphotMergeSources (config, view, filerule);
     132
     133    // Construct an initial model for each object, set the radius to fitRadius, set circular
     134    // fit mask.  NOTE: only applied to sources without guess models
     135    psphotGuessModels (config, view, filerule); // pass 1
    136136
    137137    // linear PSF fit to source peaks, subtract the models from the image (in PSF mask)
     
    193193        }
    194194
    195         // create full input models, set the radius to fitRadius, set circular fit mask
    196         // NOTE: apply only to detections->newSources
    197         psphotGuessModels (config, view, filerule); // pass 2 (detections->newSources)
    198 
    199195        // replace all sources so fit below applies to all at once
    200196        // NOTE: apply only to OLD sources (which have been subtracted)
     
    205201        // XXX check on free of sources...
    206202        psphotMergeSources (config, view, filerule); // (detections->newSources + detections->allSources -> detections->allSources)
     203
     204        // Construct an initial model for each object, set the radius to fitRadius, set circular
     205        // fit mask.  NOTE: only applied to sources without guess models
     206        psphotGuessModels (config, view, filerule); // pass 1
    207207
    208208        // NOTE: apply to ALL sources
     
    234234        }
    235235
    236         // create full input models, set the radius to fitRadius, set circular fit mask
    237         // NOTE: apply only to detections->newSources
    238         psphotGuessModels (config, view, filerule); // pass 2 (detections->newSources)
    239 
    240236        // replace all sources so fit below applies to all at once
    241237        // NOTE: apply only to OLD sources (which have been subtracted)
     
    247243        psphotMergeSources (config, view, filerule); // (detections->newSources + detections->allSources -> detections->allSources)
    248244
     245        // Construct an initial model for each object, set the radius to fitRadius, set circular
     246        // fit mask.  NOTE: only applied to sources without guess models
     247        psphotGuessModels (config, view, filerule); // pass 1
     248
    249249        // NOTE: apply to ALL sources
    250250        psphotFitSourcesLinear (config, view, filerule, true); // pass 3 (detections->allSources)
  • branches/eam_branches/ipp-20111122/psphot/src/psphotReadoutFindPSF.c

    r30624 r32924  
    5454    }
    5555
     56    // merge the newly selected sources into the existing list
     57    // NOTE: merge OLD and NEW
     58    psphotMergeSources (config, view, filerule);
     59
    5660# if 0
    5761    // XXX if we want to determine the aperture residual correction here, we either
     
    6165    psphotGuessModels (config, view, filerule);
    6266# endif
    63 
    64     // merge the newly selected sources into the existing list
    65     // NOTE: merge OLD and NEW
    66     psphotMergeSources (config, view, filerule);
    6767
    6868# if 0
  • branches/eam_branches/ipp-20111122/psphot/src/psphotReadoutForcedKnownSources.c

    r29936 r32924  
    3636    }
    3737
    38     // construct an initial model for each object
    39     psphotGuessModels (config, view, filerule);
    40 
    4138    // merge the newly selected sources into the existing list
    4239    // NOTE: merge OLD and NEW
    4340    psphotMergeSources (config, view, filerule);
     41
     42    // Construct an initial model for each object, set the radius to fitRadius, set circular
     43    // fit mask.  NOTE: only applied to sources without guess models
     44    psphotGuessModels (config, view, filerule);
    4445
    4546    // linear PSF fit to source peaks
  • branches/eam_branches/ipp-20111122/psphot/src/psphotReadoutKnownSources.c

    r30624 r32924  
    4848    }
    4949
    50     // construct an initial model for each object
    51     psphotGuessModels (config, view, filerule);
    52 
    5350    // merge the newly selected sources into the existing list
    5451    // NOTE: merge OLD and NEW
    5552    psphotMergeSources (config, view, filerule);
     53
     54    // Construct an initial model for each object, set the radius to fitRadius, set circular
     55    // fit mask.  NOTE: only applied to sources without guess models
     56    psphotGuessModels (config, view, filerule);
    5657
    5758    // linear PSF fit to source peaks
  • branches/eam_branches/ipp-20111122/psphot/src/psphotReadoutMinimal.c

    r29936 r32924  
    5959    }
    6060
    61     // construct an initial model for each object
    62     psphotGuessModels (config, view, filerule);
    63 
    6461    // merge the newly selected sources into the existing list
    6562    psphotMergeSources (config, view, filerule);
     63
     64    // Construct an initial model for each object, set the radius to fitRadius, set circular
     65    // fit mask.  NOTE: only applied to sources without guess models
     66    psphotGuessModels (config, view, filerule);
    6667
    6768    // linear PSF fit to source peaks
  • branches/eam_branches/ipp-20111122/psphot/src/psphotSourceMatch.c

    r32666 r32924  
    261261            source->imageID = index;
    262262            source->mode2 |= PM_SOURCE_MODE2_MATCHED; // source is generated based on another image
     263            source->type = PM_SOURCE_TYPE_STAR; // until we know more, assume a PSF fit
    263264
    264265            // add the peak
  • branches/eam_branches/ipp-20111122/psphot/src/psphotStackMatchPSFsNext.c

    r32348 r32924  
    5151
    5252    bool status = false;
     53
     54    psTimerStart ("psphot.smooth");
    5355
    5456    // find the currently selected readout
  • branches/eam_branches/ipp-20111122/psphot/src/psphotStackReadout.c

    r32695 r32924  
    160160    }
    161161
    162     // construct an initial model for each object, set the radius to fitRadius, set circular fit mask
    163     psphotGuessModels (config, view, STACK_SRC);
    164 
    165162    // merge the newly selected sources into the existing list
    166163    // NOTE: merge OLD and NEW
    167164    psphotMergeSources (config, view, STACK_SRC);
     165
     166    // Construct an initial model for each object, set the radius to fitRadius, set circular
     167    // fit mask.  NOTE: only applied to sources without guess models
     168    psphotGuessModels (config, view, STACK_SRC);
    168169
    169170    // linear PSF fit to source peaks, subtract the models from the image (in PSF mask)
     
    248249        }
    249250
    250         // create full input models, set the radius to fitRadius, set circular fit mask
    251         // NOTE: apply only to detections->newSources
    252         psphotGuessModels (config, view, STACK_SRC); // pass 2 (detections->newSources)
    253 
    254251        // replace all sources so fit below applies to all at once
    255252        // NOTE: apply only to OLD sources (which have been subtracted)
     
    260257        // XXX check on free of sources...
    261258        psphotMergeSources (config, view, STACK_SRC); // (detections->newSources + detections->allSources -> detections->allSources)
     259
     260        // Construct an initial model for each object, set the radius to fitRadius, set circular
     261        // fit mask.  NOTE: only applied to sources without guess models
     262        psphotGuessModels (config, view, STACK_SRC);
    262263    }
    263264
     
    269270    objects = psphotMatchSources (config, view, STACK_SRC);
    270271    psMemDump("matchsources");
     272
     273    // Construct an initial model for each object, set the radius to fitRadius, set circular
     274    // fit mask.  NOTE: only applied to sources without guess models
     275    psphotGuessModels (config, view, STACK_SRC);
    271276
    272277    psphotStackObjectsUnifyPosition (objects);
Note: See TracChangeset for help on using the changeset viewer.