IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11269


Ignore:
Timestamp:
Jan 24, 2007, 12:24:44 PM (19 years ago)
Author:
eugene
Message:

fixed error handling issues

Location:
trunk/psastro/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastro.c

    r10855 r11269  
    5454
    5555    bool chipastro = psMetadataLookupBool (NULL, config->arguments, "PSASTRO.CHIP.MODE");
     56    bool mosastro  = psMetadataLookupBool (NULL, config->arguments, "PSASTRO.MOSAIC.MODE");
     57    if (!chipastro && !mosastro) {
     58        psLogMsg ("psastro", 3, "no astrometry mode selected, assuming chip mode\n");
     59        chipastro= true;
     60    }
     61
    5662    if (chipastro) {
    5763        if (!psastroChipAstrom (config, refs)) {
     
    6167    }
    6268
    63     bool mosastro = psMetadataLookupBool (NULL, config->arguments, "PSASTRO.MOSAIC.MODE");
    6469    if (mosastro) {
    6570        if (!psastroMosaicAstrom (config, refs)) {
  • trunk/psastro/src/psastroDataSave.c

    r10438 r11269  
    1919    pmFPAfile *output = psMetadataLookupPtr (NULL, config->files, "PSASTRO.OUTPUT");
    2020    if (!output) {
    21         psError(PSASTRO_ERR_CONFIG, true, "Can't find output data!\n");
     21        psError(PSASTRO_ERR_CONFIG, true, "Can't find or interpret output file rule PSASTRO.OUTPUT!\n");
    2222        return false;
    2323    }
  • trunk/psastro/src/psastroErrorCodes.dat

    r9642 r11269  
    22# This file is used to generate pmErrorClasses.h
    33#
    4 BASE = 600              First value we use; lower values belong to psLib
     4BASE = 300              First value we use; lower values belong to psLib
    55UNKNOWN                 Unknown PM error code
    66NOT_IMPLEMENTED         Desired feature is not yet implemented
  • trunk/psastro/src/psastroLuminosityFunction.c

    r10880 r11269  
    4949  for (int i = 0; i < stars->n; i++) {
    5050    star = stars->data[i];
     51    if (!isfinite(star->Mag)) continue;
    5152    int bin = (star->Mag - mMin) / dMag;
     53    if (bin < 0) psAbort ("psastro", "bin cannot be negative!");
     54    if (bin >= nBin) psAbort ("psastro", "bin cannot be > %d!", nBin);
    5255    nMags->data.F32[bin] += 1.0;
    5356  }
Note: See TracChangeset for help on using the changeset viewer.