IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 23, 2010, 7:02:45 AM (16 years ago)
Author:
eugene
Message:

replace pmSubtractionMaskInvalid with pmReadoutMaskInvalid (takes test and set masks); change stack mask to propagate good (or suspect) and bad pixel masks; replace test blocks with CHECKPIX test macro; replace robust median for window with sample median (less prone to fail)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100823/psModules/src/imcombine/pmSubtractionStamps.c

    r29170 r29215  
    106106
    107107    if (xMax < xMin) {
    108       fprintf (stderr, "%f,%f : x-border\n", xRaw, yRaw);
    109       return false;
     108        // fprintf (stderr, "%f,%f : x-border\n", xRaw, yRaw);
     109        return false;
    110110    }
    111111    if (yMax < yMin) {
    112       fprintf (stderr, "%f,%f : y-border\n", xRaw, yRaw);
    113       return false;
     112        // fprintf (stderr, "%f,%f : y-border\n", xRaw, yRaw);
     113        return false;
    114114    }
    115115
     
    458458                // Take stamps off the top of the (sorted) list
    459459                for (int j = xList->n - 1; j >= 0 && !goodStamp; j--) {
    460                   fprintf (stderr, "%d : xList: %ld elements\n", i, xList->n);
     460                    // fprintf (stderr, "%d : xList: %ld elements\n", i, xList->n);
    461461                    // Chop off the top of the list
    462462                    xList->n = j;
     
    706706
    707707    // storage vector for flux data
    708     psStats *stats = psStatsAlloc (PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV);
     708    psStats *stats = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN);
    709709    psVector *flux1 = psVectorAllocEmpty(2*stamps->num, PS_TYPE_F32);
    710710    psVector *flux2 = psVectorAllocEmpty(2*stamps->num, PS_TYPE_F32);
     
    734734                psAbort ("failed to generate stats");
    735735            }
    736             float f1 = stats->robustMedian;
     736            float f1 = stats->sampleMedian;
    737737
    738738            psStatsInit (stats);
     
    740740                psAbort ("failed to generate stats");
    741741            }
    742             float f2 = stats->robustMedian;
     742            float f2 = stats->sampleMedian;
    743743
    744744            stamps->window1->kernel[y][x] = f1;
     
    755755        }
    756756    }
     757
     758#if 0
     759    {
     760        psFits *fits = NULL;
     761        fits = psFitsOpen ("window1.fits", "w");
     762        psFitsWriteImage (fits, NULL, stamps->window1->image, 0, NULL);
     763        psFitsClose (fits);
     764        fits = psFitsOpen ("window2.fits", "w");
     765        psFitsWriteImage (fits, NULL, stamps->window2->image, 0, NULL);
     766        psFitsClose (fits);
     767    }
     768#endif
    757769
    758770    psTrace("psModules.imcombine", 3, "Window total (1): %f, threshold: %f\n", sum1, (1.0 - stamps->normFrac) * sum1);
Note: See TracChangeset for help on using the changeset viewer.