IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28119


Ignore:
Timestamp:
May 26, 2010, 3:34:01 PM (16 years ago)
Author:
Paul Price
Message:

Make inability to match source lists a data quality issue --- it means there were no sources in either list.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubMatchPSFs.c

    r27692 r28119  
    243243        psFree(lists);
    244244        if (!detections->allSources) {
    245             psError(PPSUB_ERR_DATA, false, "Unable to merge source lists");
    246245            psFree(detections);
    247             return false;
     246            psErrorCode error = psErrorCodeLast(); // Error code
     247            if (error == PM_ERR_OBJECTS) {
     248                psErrorStackPrint(stderr, "Unable to match source lists");
     249                psWarning("Unable to match source lists --- suspect bad data quality.");
     250                ppSubDataQuality(data, error, PPSUB_FILES_ALL);
     251                return true;
     252            } else {
     253                psError(error, false, "Unable to merge source lists");
     254                return false;
     255            }
    248256        }
    249257    }
  • trunk/psModules/src/objects/pmSourceMatch.c

    r27333 r28119  
    280280    psFree(boundsMaster);
    281281
     282    if (!matches) {
     283        psError(PM_ERR_OBJECTS, true, "No matches made.");
     284        return NULL;
     285    }
     286
    282287    if (cullSingles) {
    283288        // Now cull the matches that contain only a single star
     
    300305    }
    301306
     307    if (matches->n == 0) {
     308        psError(PM_ERR_OBJECTS, true, "No matches made.");
     309        psFree(matches);
     310        return NULL;
     311    }
     312
    302313    return matches;
    303314}
     
    311322    psArray *matches = pmSourceMatchSources(sourceArrays, radius, false); // Source matches
    312323    if (!matches) {
    313         psError(PS_ERR_UNKNOWN, false, "Unable to match source lists.");
     324        psError(psErrorCodeLast(), false, "Unable to match source lists.");
    314325        return NULL;
    315326    }
Note: See TracChangeset for help on using the changeset viewer.