IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5617


Ignore:
Timestamp:
Nov 28, 2005, 10:35:43 AM (21 years ago)
Author:
eugene
Message:

adding optional output dumps

Location:
trunk/psphot/src
Files:
4 edited

Legend:

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

    r5593 r5617  
    3131    psFree (smooth);
    3232
    33     // make this optional
    34     // DumpPeaks (peaks, "peaks.dat");
    35 
     33    // optional dump of all peak data
     34    char *output = psMetadataLookupPtr (&status, config, "PEAKS_OUTPUT_FILE");
     35    if (status && (output != NULL) && (output[0])) {
     36        pmPeaksWriteText (peaks, output);
     37        psFree (output);
     38    }
     39     
    3640    psLogMsg ("psphot", 3, "%d peaks: %f sec\n", peaks->n, psTimerMark ("psphot"));
    37 
    3841    return (peaks);
    3942}
  • trunk/psphot/src/psphot.c

    r5086 r5617  
    3030    // XXX - this has 1 leak
    3131    psfClump = pmSourcePSFClump (sources, config);
     32    // psLogMsg ("psphot", 4, "clump  X,  Y: %f, %f\n", psfClump.X, psfClump.Y);
     33    // psLogMsg ("psphot", 4, "clump DX, DY: %f, %f\n", psfClump.dX, psfClump.dY);
    3234
    3335    // group into STAR, COSMIC, GALAXY, SATURATED
    3436    pmSourceRoughClass (sources, config, psfClump);
     37
     38    // optional dump of all rough source data
     39    {
     40      bool status;
     41      char *output = psMetadataLookupPtr (&status, config, "MOMENTS_OUTPUT_FILE");
     42      if (status && (output != NULL) && (output[0])) {
     43        pmMomentsWriteText (sources, output);
     44        psFree (output);
     45      }
     46    }
    3547
    3648    // source analysis is done in S/N order (brightest first)
  • trunk/psphot/src/psphotOutput.c

    r5350 r5617  
    348348
    349349// write the peaks to an output file
    350 bool pmPeaksWriteText (psArray *sources, char *filename) {
     350bool pmPeaksWriteText (psArray *peaks, char *filename) {
    351351
    352352    int i;
    353353    FILE *f;
    354     pmPeak *peak;
    355354       
    356355    f = fopen (filename, "w");
     
    360359    }
    361360
    362     for (i = 0; i < sources->n; i++) {
    363         peak = (pmPeak *) sources->data[i];
     361    for (i = 0; i < peaks->n; i++) {
     362        pmPeak *peak = peaks->data[i];
    364363        if (peak == NULL) continue;
    365364        fprintf (f, "%5d %5d  %7.1f\n",
  • trunk/psphot/src/psphotSourceStats.c

    r5058 r5617  
    4646        psFree (source);
    4747    }
    48 
     48     
    4949    psLogMsg ("psphot", 3, "%d moments: %f sec\n", sources->n, psTimerMark ("psphot"));
    5050    return (sources);
Note: See TracChangeset for help on using the changeset viewer.