IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34246


Ignore:
Timestamp:
Jul 31, 2012, 11:47:07 AM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20120627/psModules
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120627/psModules

  • branches/eam_branches/ipp-20120627/psModules/src/config/pmConfig.c

    r30636 r34246  
    685685            } else {
    686686                char *end = NULL;       // Pointer to end of consumed string
    687                 seed = strtoll(argv[argNum], &end, 0);
     687                seed = strtoull(argv[argNum], &end, 0);
    688688                if (strlen(end) > 0) {
    689689                    psError(PM_ERR_CONFIG, true, "Unable to read random number generator seed: %s",
  • branches/eam_branches/ipp-20120627/psModules/src/imcombine/pmStack.c

    r31721 r34246  
    357357        sumWeight += weights->data.F32[i];
    358358        if (variances) {
    359             sumVarianceWeight += variances->data.F32[i] * PS_SQR(weights->data.F32[i]);
     359          //            sumVarianceWeight += variances->data.F32[i] * PS_SQR(weights->data.F32[i]);
     360          sumVarianceWeight += 1 / variances->data.F32[i];
    360361        }
    361362        if (exps) {
     
    372373    *mean = sumValueWeight / sumWeight;
    373374    if (var) {
    374         *var = sumVarianceWeight / PS_SQR(sumWeight);
     375      //*var = sumVarianceWeight / PS_SQR(sumWeight);
     376      *var = 1 / sumVarianceWeight;
    375377    }
    376378    if (exp) {
  • branches/eam_branches/ipp-20120627/psModules/src/objects/pmFootprintCullPeaks.c

    r33578 r34246  
    118118            threshbounds->data.F32[i] = 0.25*beta2*PS_SQR(i) + min_threshold;       
    119119        }
     120#if (0)
    120121        if (threshbounds->data.F32[threshbounds->n-1] > maxFlux) {
    121122            psWarning ("upper limit: %f does not include max flux: %f",
    122123                    threshbounds->data.F32[threshbounds->n-1], maxFlux);
    123124        }
     125#endif
    124126        psHistogram *threshist = psHistogramAllocGeneric(threshbounds);
    125127
     
    195197            psImageInit(idImg, 0);
    196198            pmSetFootprintArrayIDsForImage(idImg, myFP, true);
    197        
     199
    198200            // check which footprints contain already-accepted (brighter) peaks
    199201            // (we can give up if/when we found a peak for all footprints)
  • branches/eam_branches/ipp-20120627/psModules/src/objects/pmFootprintFind.c

    r29004 r34246  
    2424
    2525// XXX EAM : why use WSPAN in here rather than pmSpan?
     26// XXX WES : can't use pmSpan because does not have an id
    2627typedef struct {                        /* run-length code for part of object*/
    2728   int id;                              /* ID for object */
     
    114115
    115116       in_span = 0;                      /* not in a span */
     117       int id_last_connection = 0;
    116118       for (j = 0; j < numCols; j++) {
    117119           double pixVal = floatImg->data.F32[i][j]; // Value of pixel
     120           // If pixVal is less than threshold and we are working on a, span end it.
    118121           if (pixVal < threshold) {
     122               // below threshold. If in a span close it out
    119123               if (in_span) {
    120124                   if(nspan >= size_spans) {
     
    130134
    131135                   in_span = 0;
     136                   id_last_connection = 0;
    132137               }
    133138           } else {                       /* a pixel to fix */
     139               // Above theshold. There are 5 choices for the id of this pixel based on whether they are
     140               // part of a span (non-zero)
     141               // This diagram shows the priority which we check
     142               //       
     143               //                       col
     144               //                   j-1   j   j+1
     145               // row i              1    5
     146               // row i + 1          2    3    4
     147               //
     148               // In case 4 we have a pixel that is not connected to the left are connecting with
     149               // an existing span so need to identify whether it is connected
     150               // to the same footprint as the current span (if we are in one)
    134151               if(idc[j - 1] != 0) {
    135152                   id = idc[j - 1];
     
    157174                * Do we need to merge ID numbers? If so, make suitable entries in aliases[]
    158175                */
    159                if(idp[j + 1] != 0 && idp[j + 1] != id) {
    160                    aliases[resolve_alias(aliases, idp[j + 1])] =
    161                        resolve_alias(aliases, id);
    162 
    163                    idc[j] = id = idp[j + 1];
     176               if (idp[j + 1] != 0 && idp[j + 1] != id && idp[j + 1] != id_last_connection) {
     177                   int resolved_lower_right = resolve_alias(aliases, idp[j + 1]);
     178                   int resolved_current = resolve_alias(aliases, id);
     179                   aliases[resolved_lower_right] = resolved_current;
     180
     181                   // now we choose the id to continue to use to set pixels in the current span.
     182                   // We choose the higher value because future alias resolutions will be faster
     183                   // since the alias chain goes from lower ids to higher. This is about 4 times
     184                   // faster for complex footprints.
     185                   if (resolved_current <= idp[j + 1]) {
     186                       idc[j] = id = idp[j + 1];
     187                       id_last_connection = 0;
     188                   } else {
     189                       idc[j] = id = resolved_current;
     190                       id_last_connection = idp[j + 1];
     191                   }
    164192               }
    165193           }
  • branches/eam_branches/ipp-20120627/psModules/src/objects/pmPSFtryMakePSF.c

    r34085 r34246  
    138138        }
    139139        if (trend->mode == PM_TREND_MAP) {
    140             // p_psImagePrint (2, trend->map->map, "param N Before"); // XXX TEST:
    141140            psImageMapRepair (trend->map->map);
    142             // p_psImagePrint (2, trend->map->map, "param N After"); // XXX TEST:
    143141        }
    144142    }
     
    246244            return true;
    247245        }
     246        if (trend->mode == PM_TREND_MAP) {
     247            psImageMapRepair (trend->map->map);
     248        }
    248249
    249250# if (PS_TRACE_ON)
     
    268269            return true;
    269270        }
     271        if (trend->mode == PM_TREND_MAP) {
     272            psImageMapRepair (trend->map->map);
     273        }
     274
    270275# if (PS_TRACE_ON)
    271276        mean = psStatsGetValue (trend->stats, meanOption);
     
    285290            return true;
    286291        }
     292        if (trend->mode == PM_TREND_MAP) {
     293            psImageMapRepair (trend->map->map);
     294        }
     295
    287296# if (PS_TRACE_ON)
    288297        mean = psStatsGetValue (trend->stats, meanOption);
Note: See TracChangeset for help on using the changeset viewer.