IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32334


Ignore:
Timestamp:
Sep 6, 2011, 10:54:23 AM (15 years ago)
Author:
eugene
Message:

skip the unsuccessful saddle-point concept; limit kron window to have S.B. no less than 1/2.25 of a 5sigma PSF

Location:
branches/eam_branches/ipp-20110710/psphot/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110710/psphot/src/psphotFindFootprints.c

    r32238 r32334  
    5959    detections->peaks = pmFootprintArrayToPeaks(detections->footprints);
    6060
    61     psphotFootprintSaddles (readout, detections->footprints);
    62 
    63     int nSaddle = 0;
    64     for (int i = 0; i < detections->peaks->n; i++) {
    65         pmPeak *peak = detections->peaks->data[i];
    66        
    67         if (peak->saddlePoints) nSaddle += peak->saddlePoints->n;
    68     }
     61    // psphotFootprintSaddles (readout, detections->footprints);
     62    //
     63    // int nSaddle = 0;
     64    // for (int i = 0; i < detections->peaks->n; i++) {
     65    // pmPeak *peak = detections->peaks->data[i];
     66    //
     67    // if (peak->saddlePoints) nSaddle += peak->saddlePoints->n;
     68    // }
    6969    // fprintf (stderr, "%d saddle points for %ld peaks\n", nSaddle, detections->peaks->n);
    7070
  • branches/eam_branches/ipp-20110710/psphot/src/psphotKronIterate.c

    r32307 r32334  
    8484        MIN_KRON_RADIUS = 0.25*RADIUS;
    8585    }
    86 
    87     float EXT_FIT_MAX_RADIUS = psMetadataLookupF32 (&status, recipe, "EXT_FIT_MAX_RADIUS");
    8886
    8987    // bit-masks to test for good/bad pixels
     
    145143            PS_ARRAY_ADD_SCALAR(job->args, RADIUS,             PS_TYPE_F32);
    146144            PS_ARRAY_ADD_SCALAR(job->args, MIN_KRON_RADIUS,    PS_TYPE_F32);
    147             PS_ARRAY_ADD_SCALAR(job->args, EXT_FIT_MAX_RADIUS, PS_TYPE_F32);
    148145
    149146// set this to 0 to run without threading
     
    194191    float RADIUS                    = PS_SCALAR_VALUE(job->args->data[5],F32);
    195192    float MIN_KRON_RADIUS           = PS_SCALAR_VALUE(job->args->data[6],F32);
    196     float EXT_FIT_MAX_RADIUS        = PS_SCALAR_VALUE(job->args->data[7],F32);
    197193
    198194    for (int j = 0; j < 5; j++) {
     
    212208            }
    213209
     210            // use S/N to control max window size
     211            float kronSN = source->moments->KronFlux / source->moments->KronFluxErr;
     212
     213            // maxWindow -> 1.5*RADIUS for kronSN = 5.0, keeping S.B. constant (kronSN ~ flux)
     214            // (kronSN / maxWindow^2) = (5.0 / (1.5 RADIUS)^2)
     215            // maxWindow = 1.5 * RADIUS * sqrt(kronSN / 5.0)
     216            float maxWindow = (isfinite(kronSN) && (kronSN > 5.0)) ? 1.5 * RADIUS * sqrt(kronSN / 5.0) : 1.5*RADIUS;
     217
    214218            // iterate to the window radius
    215             float windowRadius = PS_MIN(PS_MAX(RADIUS, 4.0*source->moments->Mrf), EXT_FIT_MAX_RADIUS);
     219            float windowRadius = PS_MIN(PS_MAX(RADIUS, 4.0*source->moments->Mrf), maxWindow);
    216220
    217221            // re-allocate image, weight, mask arrays for each peak with box big enough to fit BIG_RADIUS
    218222            pmSourceRedefinePixels (source, readout, source->peak->x, source->peak->y, windowRadius + 2);
     223            psAssert (source->pixels, "WTF?");
    219224
    220225            // clear the window function for this source based on the moments
  • branches/eam_branches/ipp-20110710/psphot/src/psphotSetThreads.c

    r32322 r32334  
    3030    psFree(task);
    3131
    32     task = psThreadTaskAlloc("PSPHOT_KRON_ITERATE", 8);
     32    task = psThreadTaskAlloc("PSPHOT_KRON_ITERATE", 7);
    3333    task->function = &psphotKronIterate_Threaded;
    3434    psThreadTaskAdd(task);
Note: See TracChangeset for help on using the changeset viewer.