IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27165


Ignore:
Timestamp:
Mar 3, 2010, 2:57:32 PM (16 years ago)
Author:
Paul Price
Message:

Catch images with no sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSourceMatch.c

    r27162 r27165  
    181181    for (int i = 0; i < numImages; i++) {
    182182        psArray *sources = sourceArrays->data[i]; // Sources in image
    183         if (!sources) {
     183        if (!sources || sources->n == 0) {
    184184            continue;
    185185        }
     
    615615    {
    616616        psVector *num = psVectorAlloc(numImages, PS_TYPE_S32); // Number of stars per image
     617        psVectorInit(num, 0);
    617618        for (int i = 0; i < numStars; i++) {
    618619            pmSourceMatch *match = matches->data[i]; // Matched stars
    619620            for (int j = 0; j < match->num; j++) {
    620                 if (match->mask->data.PS_TYPE_VECTOR_MASK_DATA[j] & PM_SOURCE_MATCH_MASK_PHOT) {
    621                     continue;
    622                 }
    623621                int index = match->image->data.U32[j]; // Image index
     622                psAssert(index >= 0 && index < numImages, "Bad index: %d", index);
    624623                num->data.S32[index]++;
    625624            }
Note: See TracChangeset for help on using the changeset viewer.