IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 3, 2008, 10:59:38 AM (18 years ago)
Author:
eugene
Message:

adding additional plots

File:
1 edited

Legend:

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

    r19869 r19880  
    6969    }
    7070 
    71     // display the backsub and backgnd images
     71    // display the peaks and footprints
    7272    psphotVisualShowPeaks (config, view, detections);
    7373    psphotVisualShowFootprints (config, view, detections);
    74 
    75     // XXX test write out the footprint image
    76     if (0) {
    77         psImage *footprintImage = pmSetFootprintArrayIDs (detections->footprints, true);
    78         psphotSaveImage (NULL, footprintImage, "footprints.1.fits");
    79         psFree (footprintImage);
    80     }
    8174
    8275    // construct sources and measure basic stats
     
    109102
    110103    psphotVisualShowRoughClass (config, view, sources);
     104    psphotVisualShowFlags (config, view, sources);
    111105
    112106    // if we were not supplied a PSF, choose one here
     
    173167    psphotVisualShowPSFStars (config, view, psf, sources);
    174168    psphotVisualShowSatStars (config, view, psf, sources);
    175     psphotVisualShowLinearFit (config, readout);
    176 
    177     if (0) {
    178         FILE *out = fopen ("out.pass1.dat", "w");
    179 
    180         for (int i = 0; i < sources->n; i++) {
    181             pmSource *source = sources->data[i];
    182             if (!source) continue;
    183             pmPeak *peak = source->peak;
    184             if (!peak) continue;
    185             pmModel *model = source->modelPSF;
    186             if (!model) continue;
    187             if (!model->params) continue;
    188 
    189             fprintf (out, "%d %f %f  %f %f  %f %f\n",
    190                      i, peak->xf, peak->yf, peak->flux, peak->SN,
    191                      model->params->data.F32[PM_PAR_I0],
    192                      model->dparams->data.F32[PM_PAR_I0]);
    193         }
    194         fclose (out);
    195     }
     169    psphotVisualShowResidualImage (config, readout);
     170    psphotVisualShowFlags (config, view, sources);
    196171
    197172    // identify CRs and extended sources
     
    201176    }
    202177
    203     // XXX psphotVisualShowSourceSize (config, view, sources);
     178    psphotVisualShowSourceSize (config, view, sources);
    204179
    205180    // non-linear PSF and EXT fit to brighter sources
    206181    psphotBlendFit (readout, sources, recipe, psf);
    207182
    208     // XXX psphotVisualShowNonLinearFit (config, view, sources);
     183    psphotVisualShowResidualImage (config, readout);
     184    psphotVisualShowFlags (config, view, sources);
    209185
    210186    // replace all sources
     
    213189    // linear fit to include all sources
    214190    psphotFitSourcesLinear (readout, sources, recipe, psf, TRUE);
     191
     192    psphotVisualShowResidualImage (config, readout);
     193    psphotVisualShowFlags (config, view, sources);
    215194
    216195    // if we only do one pass, skip to extended source analysis
     
    231210    detections = psphotFindDetections (detections, readout, recipe);
    232211
    233     // XXX test write out the footprint image
    234     if (0) {
    235         psImage *footprintImage = pmSetFootprintArrayIDs (detections->footprints, true);
    236         psphotSaveImage (NULL, footprintImage, "footprints.2.fits");
    237         psFree (footprintImage);
    238     }
    239212    // remove noise for subtracted objects (ie, return to normal noise level)
    240213    psphotSubNoise (readout, sources, recipe);
     214
     215    // display the new peaks and footprints
     216    psphotVisualShowPeaks (config, view, detections);
     217    psphotVisualShowFootprints (config, view, detections);
    241218
    242219    // define new sources based on only the new peaks
     
    249226    }
    250227
     228    psphotVisualShowRoughClass (config, view, sources);
     229    psphotVisualShowFlags (config, view, sources);
     230
    251231    // create full input models
    252232    psphotGuessModels (readout, newSources, recipe, psf);
     
    262242    psphotFitSourcesLinear (readout, sources, recipe, psf, TRUE);
    263243
    264     if (0) {
    265         FILE *out = fopen ("out.pass2.dat", "w");
    266 
    267         for (int i = 0; i < sources->n; i++) {
    268             pmSource *source = sources->data[i];
    269             if (!source) continue;
    270             pmPeak *peak = source->peak;
    271             if (!peak) continue;
    272             pmModel *model = source->modelPSF;
    273             if (!model) continue;
    274             if (!model->params) continue;
    275 
    276             fprintf (out, "%d %f %f  %f %f  %f %f\n",
    277                      i, peak->xf, peak->yf, peak->flux, peak->SN,
    278                      model->params->data.F32[PM_PAR_I0],
    279                      model->dparams->data.F32[PM_PAR_I0]);
    280         }
    281         fclose (out);
    282     }
     244    psphotVisualShowResidualImage (config, readout);
     245    psphotVisualShowFlags (config, view, sources);
    283246
    284247pass1finish:
     
    286249    // measure source size for the remaining sources
    287250    psphotSourceSize (config, readout, sources, recipe, 0);
    288     if (0) {
    289         psphotSaveImage (NULL, readout->mask, "mask.fits");
    290     }
    291        
     251    psphotVisualShowSourceSize (config, view, sources);
     252
    292253    psphotExtendedSourceAnalysis (readout, sources, recipe);
    293254
     
    305266    }
    306267
     268    psphotVisualPlotApResid (config, sources);
     269
    307270    // calculate source magnitudes
    308271    pmReadout *background = psphotSelectBackground (config, view, false);
Note: See TracChangeset for help on using the changeset viewer.