IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11702


Ignore:
Timestamp:
Feb 7, 2007, 5:52:32 PM (19 years ago)
Author:
jhoblitt
Message:

update psAbort() API

Location:
trunk
Files:
35 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/camtool.c

    r11572 r11702  
    5959        MODECASE(P3TOOL_MODE_UNBLOCK,           unblockMode);
    6060        default:
    61             psAbort(argv[0], "invalid option (this should not happen)");
     61            psAbort("invalid option (this should not happen)");
    6262    }
    6363
  • trunk/ippTools/src/camtoolConfig.c

    r11089 r11702  
    188188        while ((item = psMetadataGetAndIncrement(iter))) {
    189189            if (!item->type == PS_DATA_METADATA) {
    190                 psAbort(argv[0], "all options must be specified as a metadata");            }
     190                psAbort("all options must be specified as a metadata");            }
    191191
    192192            fprintf(stdout, "%s ", item->name);
  • trunk/ippTools/src/chiptool.c

    r11562 r11702  
    6565        MODECASE(P2TOOL_MODE_UNBLOCK,               unblockMode);
    6666        default:
    67             psAbort(argv[0], "invalid option (this should not happen)");
     67            psAbort("invalid option (this should not happen)");
    6868    }
    6969
  • trunk/ippTools/src/chiptoolConfig.c

    r11562 r11702  
    225225        while ((item = psMetadataGetAndIncrement(iter))) {
    226226            if (!item->type == PS_DATA_METADATA) {
    227                 psAbort(argv[0], "all options must be specified as a metadata");            }
     227                psAbort("all options must be specified as a metadata");            }
    228228
    229229            fprintf(stdout, "%s ", item->name);
  • trunk/ippTools/src/detselect.c

    r11427 r11702  
    4747        MODECASE(DETSELECT_MODE_SELECT,        selectMode);
    4848        default:
    49             psAbort(argv[0], "invalid option (this should not happen)");
     49            psAbort("invalid option (this should not happen)");
    5050    }
    5151
  • trunk/ippTools/src/detselectConfig.c

    r11418 r11702  
    118118        while ((item = psMetadataGetAndIncrement(iter))) {
    119119            if (!item->type == PS_DATA_METADATA) {
    120                 psAbort(argv[0], "all options must be specified as a metadata");            }
     120                psAbort("all options must be specified as a metadata");            }
    121121
    122122            fprintf(stdout, "%s ", item->name);
  • trunk/ippTools/src/dettool.c

    r11480 r11702  
    136136        MODECASE(DETTOOL_MODE_REGISTER_DETREND_IMFILE, register_detrend_imfileMode);
    137137        default:
    138             psAbort(argv[0], "invalid option (this should not happen)");
     138            psAbort("invalid option (this should not happen)");
    139139    }
    140140
     
    457457        psFree(iter);
    458458    } else {
    459         psAbort(config->argv[0],
    460                 "-exp_tag was not parsed correctly (this should not happen");
     459        psAbort(                "-exp_tag was not parsed correctly (this should not happen");
    461460    }
    462461
     
    476475    // we should have one rawExp row per exp_tag specified
    477476    if (psListLength(item->data.list) != psArrayLength(detrendExps)) {
    478         psAbort(config->argv[0],
    479     "an -exp_tag matched more then one rawExp (this should not happen");
     477        psAbort(    "an -exp_tag matched more then one rawExp (this should not happen");
    480478
    481479    }
     
    579577    // sanity check results
    580578    if (psArrayLength(detRuns) != 1) {
    581         psAbort(config->argv[0], "found more then one detRun matching det_id %ld(this should not happen)", det_id);
     579        psAbort("found more then one detRun matching det_id %ld(this should not happen)", det_id);
    582580        return false;
    583581    }
     
    12131211    // sanity check results
    12141212    if (psArrayLength(detRuns) != 1) {
    1215         psAbort(config->argv[0], "found more then one detRun matching det_id %ld(this should not happen)", det_id);
     1213        psAbort("found more then one detRun matching det_id %ld(this should not happen)", det_id);
    12161214        return false;
    12171215    }
     
    12661264    // sanity check the result... we should have only found one det_id
    12671265    if (psArrayLength(detRuns) != 1) {
    1268         psAbort(config->argv[0], "found more then one detRun matching det_id %d(this should not happen)", (psS32)atoi(det_id));
     1266        psAbort("found more then one detRun matching det_id %d(this should not happen)", (psS32)atoi(det_id));
    12691267        return false;                   // unreachable
    12701268    }
     
    16271625    // sanity check the result... we should have only found one det_id
    16281626    if (psArrayLength(newDetRuns) != 1) {
    1629         psAbort(config->argv[0], "found more then one detRun matching det_id %ld(this should not happen)", newDet_id);
     1627        psAbort("found more then one detRun matching det_id %ld(this should not happen)", newDet_id);
    16301628        return false;                   // unreachable
    16311629    }
     
    59625960        psFree(iter);
    59635961    } else {
    5964         psAbort(config->argv[0],
    5965                 "-exp_tag was not parsed correctly (this should not happen");
     5962        psAbort(                "-exp_tag was not parsed correctly (this should not happen");
    59665963    }
    59675964
     
    64626459    if (psArrayLength(detRuns) != 1) {
    64636460        // this should no happen
    6464         psAbort(config->argv[0],
    6465                 "database query return too many rows (this should not happen");
     6461        psAbort(                "database query return too many rows (this should not happen");
    64666462    }
    64676463
  • trunk/ippTools/src/dettoolConfig.c

    r11480 r11702  
    863863        while ((item = psMetadataGetAndIncrement(iter))) {
    864864            if (!item->type == PS_DATA_METADATA) {
    865                 psAbort(argv[0], "all options must be specified as a metadata");
     865                psAbort("all options must be specified as a metadata");
    866866            }
    867867
  • trunk/ippTools/src/guidetool.c

    r9392 r11702  
    4747            break;
    4848        default:
    49             psAbort(argv[0], "invalid option (this should not happen)");
     49            psAbort("invalid option (this should not happen)");
    5050    }
    5151
  • trunk/ippTools/src/pxadmin.c

    r10046 r11702  
    5050            break;
    5151        default:
    52             psAbort(argv[0], "invalid option (this should not happen)");
     52            psAbort("invalid option (this should not happen)");
    5353    }
    5454
  • trunk/ippTools/src/pxadminConfig.c

    r11089 r11702  
    4949        psArgumentRemove(N, &argc, argv);
    5050        if (config->mode) {
    51             psAbort(argv[0], "only one mode selection is allowed");
     51            psAbort("only one mode selection is allowed");
    5252        }
    5353        config->mode = PXADMIN_MODE_CREATE;
     
    5656        psArgumentRemove(N, &argc, argv);
    5757        if (config->mode) {
    58             psAbort(argv[0], "only one mode selection is allowed");
     58            psAbort("only one mode selection is allowed");
    5959        }
    6060        config->mode = PXADMIN_MODE_DELETE;
     
    6363        psArgumentRemove(N, &argc, argv);
    6464        if (config->mode) {
    65             psAbort(argv[0], "only one mode selection is allowed");
     65            psAbort("only one mode selection is allowed");
    6666        }
    6767        config->mode = PXADMIN_MODE_RECREATE;
  • trunk/ippTools/src/pxinject.c

    r11142 r11702  
    4949        MODECASE(PXINJECT_MODE_NEWIMFILE, newImfileMode);
    5050        default:
    51             psAbort(argv[0], "invalid option (this should not happen)");
     51            psAbort("invalid option (this should not happen)");
    5252    }
    5353
  • trunk/ippTools/src/pztool.c

    r10971 r11702  
    5555        MODECASE(PZTOOL_MODE_COPYDONE, copydoneMode);
    5656        default:
    57             psAbort(argv[0], "invalid option (this should not happen)");
     57            psAbort("invalid option (this should not happen)");
    5858    }
    5959
  • trunk/ippTools/src/pztoolConfig.c

    r11089 r11702  
    139139        while ((item = psMetadataGetAndIncrement(iter))) {
    140140            if (!item->type == PS_DATA_METADATA) {
    141                 psAbort(argv[0], "all options must be specified as a metadata");
     141                psAbort("all options must be specified as a metadata");
    142142            }
    143143
  • trunk/ippTools/src/regtool.c

    r11329 r11702  
    7272        MODECASE(P0TOOL_MODE_UPDATEPROCESSEDEXP,    updateprocessedexpMode);
    7373        default:
    74             psAbort(argv[0], "invalid option (this should not happen)");
     74            psAbort("invalid option (this should not happen)");
    7575    }
    7676
  • trunk/ippTools/src/regtoolConfig.c

    r11561 r11702  
    259259        while ((item = psMetadataGetAndIncrement(iter))) {
    260260            if (!item->type == PS_DATA_METADATA) {
    261                 psAbort(argv[0], "all options must be specified as a metadata");            }
     261                psAbort("all options must be specified as a metadata");            }
    262262
    263263            fprintf(stdout, "%s ", item->name);
  • trunk/ippTools/src/warptool.c

    r11138 r11702  
    6969        MODECASE(P4TOOL_MODE_DIFFIMFILE,        diffimfileMode);
    7070        default:
    71             psAbort(argv[0], "invalid option (this should not happen)");
     71            psAbort("invalid option (this should not happen)");
    7272    }
    7373
  • trunk/ippTools/src/warptoolConfig.c

    r11138 r11702  
    229229        while ((item = psMetadataGetAndIncrement(iter))) {
    230230            if (!item->type == PS_DATA_METADATA) {
    231                 psAbort(argv[0], "all options must be specified as a metadata");
     231                psAbort("all options must be specified as a metadata");
    232232            }
    233233
  • trunk/ppImage/src/ppFocusParseCamera.c

    r10439 r11702  
    2929        pmFPAfileDefineFromConf  (&status, config, "PPIMAGE.BIAS");
    3030        pmFPAfileDefineFromDetDB (&status, config, "PPIMAGE.BIAS", input->fpa, PM_DETREND_TYPE_BIAS);
    31         if (!status) psAbort ("ppImageParseDetrend", "can't find a bias image source");
     31        if (!status) psAbort("can't find a bias image source");
    3232    }
    3333    if (options->doDark) {
     
    3636        pmFPAfileDefineFromConf  (&status, config, "PPIMAGE.DARK");
    3737        pmFPAfileDefineFromDetDB (&status, config, "PPIMAGE.DARK", input->fpa, PM_DETREND_TYPE_DARK);
    38         if (!status) psAbort ("ppImageParseDetrend", "can't find a dark image source");
     38        if (!status) psAbort("can't find a dark image source");
    3939    }
    4040    if (options->doMask) {
     
    4343        pmFPAfileDefineFromConf  (&status, config, "PPIMAGE.MASK");
    4444        pmFPAfileDefineFromDetDB (&status, config, "PPIMAGE.MASK", input->fpa, PM_DETREND_TYPE_MASK);
    45         if (!status) psAbort ("ppImageParseDetrend", "can't find a mask image source");
     45        if (!status) psAbort("can't find a mask image source");
    4646    }
    4747    if (options->doFlat) {
     
    5050        pmFPAfileDefineFromConf  (&status, config, "PPIMAGE.FLAT");
    5151        pmFPAfileDefineFromDetDB (&status, config, "PPIMAGE.FLAT", input->fpa, PM_DETREND_TYPE_FLAT);
    52         if (!status) psAbort ("ppImageParseDetrend", "can't find a flat image source");
     52        if (!status) psAbort("can't find a flat image source");
    5353    }
    5454
  • trunk/ppImage/src/ppImageDetrendNonLinear.c

    r8751 r11702  
    108108        }
    109109      default:
    110         psAbort("phase2", "Invalid options->nonLinearType");
     110        psAbort("Invalid options->nonLinearType");
    111111    }
    112112    return true;
  • trunk/ppImage/src/ppImageParseCamera.c

    r11199 r11702  
    126126            filters = psMemIncrRefCounter(mdi->data.list);
    127127        } else {
    128             psAbort ("ppImage", "invalid type for FRINGE.FILTERS");
     128            psAbort("invalid type for FRINGE.FILTERS");
    129129        }
    130130
  • trunk/psastro/src/psastroLuminosityFunction.c

    r11269 r11702  
    5151    if (!isfinite(star->Mag)) continue;
    5252    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);
     53    if (bin < 0) psAbort("bin cannot be negative!");
     54    if (bin >= nBin) psAbort("bin cannot be > %d!", nBin);
    5555    nMags->data.F32[bin] += 1.0;
    5656  }
  • trunk/psastro/src/psastroWCS.c

    r10613 r11702  
    142142            fpa->toSky = toSky;
    143143        } else {
    144             if (fpa->toTPA == NULL) psAbort ("wcs", "projection defined, tangent-plane not defined");
    145             if (fpa->fromTPA == NULL) psAbort ("wcs", "projection defined, tangent-plane not defined");
     144            if (fpa->toTPA == NULL) psAbort("projection defined, tangent-plane not defined");
     145            if (fpa->fromTPA == NULL) psAbort("projection defined, tangent-plane not defined");
    146146
    147147            // adjust for common toSky for mosaic:
     
    212212
    213213    // techinically, we can have a plate scale here (toTPA:dx,dy != 1)
    214     if (!psPlaneDistortIsIdentity (toTPA)) psAbort ("psastro", "invalid TPA transformation");
     214    if (!psPlaneDistortIsIdentity (toTPA)) psAbort("invalid TPA transformation");
    215215   
    216216    // XXX require toFPA->x->nX == toFPA->x->nY
     
    395395    psMetadataAddF32 (header, PS_LIST_TAIL, "CDELT2",   PS_META_REPLACE, "", 1.0);
    396396
    397     if (toFPA->x->nX != toFPA->x->nY) psAbort ("psastro", "mis-matched tangent plane orders (1)");
    398     if (toFPA->x->nX != toFPA->y->nX) psAbort ("psastro", "mis-matched tangent plane orders (2)");
    399     if (toFPA->x->nX != toFPA->y->nY) psAbort ("psastro", "mis-matched tangent plane orders (3)");
     397    if (toFPA->x->nX != toFPA->x->nY) psAbort("mis-matched tangent plane orders (1)");
     398    if (toFPA->x->nX != toFPA->y->nX) psAbort("mis-matched tangent plane orders (2)");
     399    if (toFPA->x->nX != toFPA->y->nY) psAbort("mis-matched tangent plane orders (3)");
    400400
    401401    switch (toFPA->x->nX) {
     
    428428
    429429      case 0:
    430         psAbort ("psastro", "invalid tangent plane order");
     430        psAbort("invalid tangent plane order");
    431431    }
    432432    return true;
     
    450450    psMetadataAddF32 (header, PS_LIST_TAIL, "CDELT2",   PS_META_REPLACE, "", toSky->Ys*DEG_RAD*plateScale);
    451451
    452     if (toTP->x->nX != toTP->x->nY) psAbort ("psastro", "mis-matched tangent plane orders (1)");
    453     if (toTP->x->nX != toTP->y->nX) psAbort ("psastro", "mis-matched tangent plane orders (2)");
    454     if (toTP->x->nX != toTP->y->nY) psAbort ("psastro", "mis-matched tangent plane orders (3)");
     452    if (toTP->x->nX != toTP->x->nY) psAbort("mis-matched tangent plane orders (1)");
     453    if (toTP->x->nX != toTP->y->nX) psAbort("mis-matched tangent plane orders (2)");
     454    if (toTP->x->nX != toTP->y->nY) psAbort("mis-matched tangent plane orders (3)");
    455455
    456456    switch (toTP->x->nX) {
     
    483483
    484484      case 0:
    485         psAbort ("psastro", "invalid tangent plane order");
     485        psAbort("invalid tangent plane order");
    486486    }
    487487    return header;
     
    493493    psPlaneDistort *distort;
    494494
    495     if (order < 1) psAbort ("psastro", "invalid order");
    496     if (order > 3) psAbort ("psastro", "invalid order");
     495    if (order < 1) psAbort("invalid order");
     496    if (order > 3) psAbort("invalid order");
    497497   
    498498    // all coeffs and masks initially set to 0
  • trunk/psphot/src/models/pmModel_STRAIL.c

    r10414 r11702  
    333333
    334334          default:
    335             psAbort ("psModules.pmModel_GAUSS", "invalid parameter %d for beta test", nParam);
     335            psAbort("invalid parameter %d for beta test", nParam);
    336336        }
    337337        if (fabs(beta[nParam]) > fabs(beta_lim)) {
     
    353353
    354354          default:
    355             psAbort ("psModules.pmModel_GAUSS", "invalid parameter %d for param min test", nParam);
     355            psAbort("invalid parameter %d for param min test", nParam);
    356356        }
    357357        if (params[nParam] < params_min) {
     
    372372          case 8:           params_max =  M_PI; break;
    373373          default:
    374             psAbort ("psModules.pmModel_GAUSS", "invalid parameter %d for param max test", nParam);
     374            psAbort("invalid parameter %d for param max test", nParam);
    375375        }
    376376        if (params[nParam] > params_max) {
     
    380380        return true;
    381381      default:
    382         psAbort ("psModules.pmModel_GAUSS", "invalid choice for limits");
     382        psAbort("invalid choice for limits");
    383383    }
    384     psAbort ("psModules.pmModel_GAUSS", "should not reach here");
     384    psAbort("should not reach here");
    385385    return false;
    386386}
  • trunk/psphot/src/models/pmModel_TEST1.c

    r10426 r11702  
    7676          case PM_PAR_SXY:  beta_lim = 0.5;   break;
    7777          default:
    78             psAbort ("psModules.pmModel_GAUSS", "invalid parameter %d for beta test", nParam);
     78            psAbort("invalid parameter %d for beta test", nParam);
    7979        }
    8080        if (fabs(beta[nParam]) > fabs(beta_lim)) {
     
    9393          case PM_PAR_SXY:  params_min =  -5.0; break;
    9494          default:
    95             psAbort ("psModules.pmModel_GAUSS", "invalid parameter %d for param min test", nParam);
     95            psAbort("invalid parameter %d for param min test", nParam);
    9696        }
    9797        if (params[nParam] < params_min) {
     
    110110          case PM_PAR_SXY:  params_max =  +5.0; break;
    111111          default:
    112             psAbort ("psModules.pmModel_GAUSS", "invalid parameter %d for param max test", nParam);
     112            psAbort("invalid parameter %d for param max test", nParam);
    113113        }
    114114        if (params[nParam] > params_max) {
     
    118118        return true;
    119119      default:
    120         psAbort ("psModules.pmModel_GAUSS", "invalid choice for limits");
    121     }
    122     psAbort ("psModules.pmModel_GAUSS", "should not reach here");
     120        psAbort("invalid choice for limits");
     121    }
     122    psAbort("should not reach here");
    123123    return false;
    124124}
     
    201201    psF64 radius = axes.major * sqrt (2.0 * log(params->data.F32[PM_PAR_I0] / flux));
    202202
    203     if (isnan(radius)) psAbort ("psphot.model", "error in code: never return invalid radius");
    204     if (radius < 0) psAbort ("psphot.model", "error in code: never return invalid radius");
     203    if (isnan(radius)) psAbort("error in code: never return invalid radius");
     204    if (radius < 0) psAbort("error in code: never return invalid radius");
    205205
    206206    return (radius);
  • trunk/psphot/src/psphotBlendFit.c

    r11381 r11702  
    2727    char *region = psMetadataLookupStr (&status, recipe, "ANALYSIS_REGION");
    2828    psRegion AnalysisRegion = psRegionForImage (readout->image, psRegionFromString (region));
    29     if (psRegionIsNaN (AnalysisRegion)) psAbort ("psphot", "analysis region mis-defined");
     29    if (psRegionIsNaN (AnalysisRegion)) psAbort("analysis region mis-defined");
    3030
    3131    for (int i = 0; i < sources->n; i++) {
  • trunk/psphot/src/psphotChoosePSF.c

    r11306 r11702  
    1515    psf = psMetadataLookupPtr (NULL, readout->analysis, "PSPHOT.PSF");
    1616    if (psf != NULL) {
    17         if (!psphotPSFstats (readout, recipe, psf)) psAbort ("psphotChoosePSF", "cannot measure PSF shape terms");
     17        if (!psphotPSFstats (readout, recipe, psf)) psAbort("cannot measure PSF shape terms");
    1818        return psf;
    1919    }
     
    9696    psList *list = NULL;
    9797    psMetadataItem *mdi = psMetadataLookup (recipe, "PSF_MODEL");
    98     if (mdi == NULL) psAbort ("psphotChoosePSF", "missing PSF_MODEL selection");
     98    if (mdi == NULL) psAbort("missing PSF_MODEL selection");
    9999
    100100    if (mdi->type == PS_DATA_STRING) {
     
    102102        psListAdd (list, PS_LIST_HEAD, mdi);
    103103    } else {
    104         if (mdi->type != PS_DATA_METADATA_MULTI) psAbort ("psphotChoosePSF", "missing PSF_MODEL selection");
     104        if (mdi->type != PS_DATA_METADATA_MULTI) psAbort("missing PSF_MODEL selection");
    105105        list = psMemIncrRefCounter(mdi->data.list);
    106106    }
     
    247247    psFree (models);
    248248
    249     if (!psphotPSFstats (readout, recipe, psf)) psAbort ("psphotChoosePSF", "cannot measure PSF shape terms");
     249    if (!psphotPSFstats (readout, recipe, psf)) psAbort("cannot measure PSF shape terms");
    250250
    251251    modelName = pmModelGetType (psf->type);
  • trunk/psphot/src/psphotEnsemblePSF.c

    r11166 r11702  
    3434    psRegion AnalysisRegion = psRegionFromString (region);
    3535    AnalysisRegion = psRegionForImage (readout->image, AnalysisRegion);
    36     if (psRegionIsNaN (AnalysisRegion)) psAbort ("psphot", "analysis region mis-defined");
     36    if (psRegionIsNaN (AnalysisRegion)) psAbort("analysis region mis-defined");
    3737
    3838    bool CONSTANT_PHOTOMETRIC_WEIGHTS =
    3939        psMetadataLookupBool(&status, recipe, "CONSTANT_PHOTOMETRIC_WEIGHTS");
    4040    if (!status) {
    41         psAbort(PS_FILE_LINE, "You must provide a value for the BOOL recipe CONSTANT_PHOTOMETRIC_WEIGHTS");
     41        psAbort("You must provide a value for the BOOL recipe CONSTANT_PHOTOMETRIC_WEIGHTS");
    4242    }
    4343    int SKY_FIT_ORDER = psMetadataLookupS32(&status, recipe, "SKY_FIT_ORDER");
     
    161161
    162162          default:
    163             psAbort(PS_FILE_LINE, "Invalid SKY_FIT_ORDER %d\n", SKY_FIT_ORDER);
     163            psAbort("Invalid SKY_FIT_ORDER %d\n", SKY_FIT_ORDER);
    164164            break;
    165165        }
     
    211211        // assign linearly-fitted normalization
    212212        if (isnan(norm->data.F32[i])) {
    213             psAbort ("psphot", "ensemble source is nan");
     213            psAbort("ensemble source is nan");
    214214        }
    215215        model->params->data.F32[PM_PAR_I0] = norm->data.F32[i];
  • trunk/psphot/src/psphotModelTest.c

    r11172 r11702  
    3333    if (fitMode == PM_SOURCE_FIT_PSF) {
    3434        char *psfFile = psMetadataLookupStr (&status, recipe, "PSF_INPUT_FILE");
    35         if (!status) psAbort ("psphotModelTest", "PSF_INPUT_FILE not supplied");
     35        if (!status) psAbort("PSF_INPUT_FILE not supplied");
    3636        psMetadata *psfData = psMetadataConfigRead(NULL, &Nfail, psfFile, FALSE);
    3737        psf = pmPSFfromMetadata (psfData);
     
    4545            psList *list = NULL;
    4646            psMetadataItem *mdi = psMetadataLookup (recipe, "PSF_MODEL");
    47             if (mdi == NULL) psAbort ("psphotModelTest", "missing PSF_MODEL selection");
     47            if (mdi == NULL) psAbort("missing PSF_MODEL selection");
    4848            if (mdi->type == PS_DATA_STRING) {
    4949                list = psListAlloc(NULL);
    5050                psListAdd (list, PS_LIST_HEAD, mdi);
    5151            } else {
    52                 if (mdi->type != PS_DATA_METADATA_MULTI) psAbort ("psphotChoosePSF", "missing PSF_MODEL selection");
     52                if (mdi->type != PS_DATA_METADATA_MULTI) psAbort("missing PSF_MODEL selection");
    5353                list = psMemIncrRefCounter(mdi->data.list);
    5454            }
     
    5959        }
    6060        modelType = pmModelSetType (modelName);
    61         if (modelType < 0) psAbort ("fitsource", "unknown model %s", modelName);
     61        if (modelType < 0) psAbort("unknown model %s", modelName);
    6262    }
    6363
     
    9494    // find the local sky
    9595    status = pmSourceLocalSky (source, PS_STAT_SAMPLE_MEDIAN, INNER);
    96     if (!status) psAbort ("fitsource", "pmSourceLocalSky error");
     96    if (!status) psAbort("pmSourceLocalSky error");
    9797
    9898    // get the source moments
    9999    status = pmSourceMoments (source, mRADIUS);
    100     if (!status) psAbort ("fitsource", "pmSourceLocalSky error");
     100    if (!status) psAbort("pmSourceLocalSky error");
    101101    source->peak->value = source->moments->Peak;
    102102
  • trunk/psphot/src/psphotOutput.c

    r11583 r11702  
    5151
    5252    FILE *f = fopen (name, "w");
    53     if (f == NULL) psAbort ("psphot", "can't open file");
     53    if (f == NULL) psAbort("can't open file");
    5454
    5555    for (int i = 0; i < source->pixels->numRows; i++) {
  • trunk/psphot/src/psphotRadiusChecks.c

    r11174 r11702  
    4040    model->radiusFit = (RADIUS_TYPE)(radiusFit + PSF_FIT_PADDING);
    4141
    42     if (isnan(model->radiusFit)) psAbort ("apply_psf_model", "error in radius");
     42    if (isnan(model->radiusFit)) psAbort("error in radius");
    4343       
    4444    if (source->mode & PM_SOURCE_MODE_SATSTAR) {
     
    5757    // set the fit radius based on the object flux limit and the model
    5858    model->radiusFit = (RADIUS_TYPE) (modelRadiusPSF (model->params, PSF_FIT_NSIGMA*moments->dSky) + dR + PSF_FIT_PADDING);
    59     if (isnan(model->radiusFit)) psAbort ("apply_psf_model", "error in radius");
     59    if (isnan(model->radiusFit)) psAbort("error in radius");
    6060       
    6161    if (source->mode &  PM_SOURCE_MODE_SATSTAR) {
     
    9191    // set the fit radius based on the object flux limit and the model
    9292    model->radiusFit = (RADIUS_TYPE) (modelRadiusEXT (model->params, EXT_FIT_NSIGMA*moments->dSky) + EXT_FIT_PADDING);
    93     if (isnan(model->radiusFit)) psAbort (__func__, "error in radius");
     93    if (isnan(model->radiusFit)) psAbort("error in radius");
    9494
    9595    // redefine the pixels if needed
  • trunk/psphot/src/psphotSkyReplace.c

    r10801 r11702  
    99    // find the currently selected readout
    1010    pmReadout *readout = pmFPAfileThisReadout (config->files, view, "PSPHOT.INPUT");
    11     if (readout == NULL) psAbort ("psphot", "input not defined");
     11    if (readout == NULL) psAbort("input not defined");
    1212
    1313    // select background pixels, from output background file, or create
    1414    pmReadout *background = pmFPAfileThisReadout (config->files, view, "PSPHOT.BACKGND");
    15     if (background == NULL) psAbort ("psphot", "background not defined");
     15    if (background == NULL) psAbort("background not defined");
    1616
    1717    // select the corresponding images
  • trunk/psphot/src/psphotSourceFits.c

    r11381 r11702  
    3434    pmModel *PSF = pmModelCopy (source->modelPSF);
    3535
    36     if (isnan(PSF->params->data.F32[PM_PAR_I0])) psAbort ("psphot", "nan in blend fit primary");
     36    if (isnan(PSF->params->data.F32[PM_PAR_I0])) psAbort("nan in blend fit primary");
    3737
    3838    x = PSF->params->data.F32[PM_PAR_XPOS];
     
    6767        // these should never be invalid values
    6868        // XXX drop these tests eventually
    69         if (isnan(model->params->data.F32[PM_PAR_I0])) psAbort ("psphot", "nan in blend fit");
    70         if (isnan(model->params->data.F32[PM_PAR_XPOS])) psAbort ("psphot", "nan in blend fit");
    71         if (isnan(model->params->data.F32[PM_PAR_YPOS])) psAbort ("psphot", "nan in blend fit");
     69        if (isnan(model->params->data.F32[PM_PAR_I0])) psAbort("nan in blend fit");
     70        if (isnan(model->params->data.F32[PM_PAR_XPOS])) psAbort("nan in blend fit");
     71        if (isnan(model->params->data.F32[PM_PAR_YPOS])) psAbort("nan in blend fit");
    7272
    7373        // add this blend to the list
     
    145145    // save the PSF model from the Ensemble fit
    146146    pmModel *PSF = pmModelCopy (source->modelPSF);
    147     if (isnan(PSF->params->data.F32[1])) psAbort ("psphot", "nan in psf fit");
     147    if (isnan(PSF->params->data.F32[1])) psAbort("nan in psf fit");
    148148
    149149    // extend source radius as needed
     
    328328    PSF = source->modelPSF;
    329329    psphotCheckRadiusPSFBlend (readout, source, PSF, 8.0);
    330     if (isnan(PSF->params->data.F32[1])) psAbort ("psphot", "nan in dbl fit");
     330    if (isnan(PSF->params->data.F32[1])) psAbort("nan in dbl fit");
    331331
    332332    modelSet = psArrayAlloc (2);
     
    365365    assert (EXT != NULL);
    366366       
    367     // if (isnan(EXT->params->data.F32[1])) psAbort ("psphot", "nan in ext fit");
     367    // if (isnan(EXT->params->data.F32[1])) psAbort("nan in ext fit");
    368368
    369369    psphotCheckRadiusEXT (readout, source, EXT);
  • trunk/psphot/src/psphotTestPSF.c

    r10096 r11702  
    7474    // for this test, require a single model
    7575    psMetadataItem *mdi = psMetadataLookup (recipe, "PSF_MODEL");
    76     if (mdi == NULL) psAbort ("psphotChoosePSF", "missing PSF_MODEL selection");
    77     if (mdi->type != PS_DATA_STRING) psAbort ("psphotChoosePSF", "choose a single PSF_MODEL");
     76    if (mdi == NULL) psAbort("missing PSF_MODEL selection");
     77    if (mdi->type != PS_DATA_STRING) psAbort("choose a single PSF_MODEL");
    7878    modelName = mdi->data.V;
    7979
     
    9595    pmModelType type = pmModelSetType (modelName);
    9696    pmPSF *psf = pmPSFAlloc (type, poissonErrors, psfTrendMask);
    97     if (psf == NULL) psAbort ("psphotTestPSF", "unknown model");
     97    if (psf == NULL) psAbort("unknown model");
    9898
    9999    FILE *f = fopen ("params.dat", "w");
  • trunk/psphot/src/psphotWeightBias.c

    r11200 r11702  
    3434    char *region = psMetadataLookupStr (&status, recipe, "ANALYSIS_REGION");
    3535    psRegion AnalysisRegion = psRegionForImage (readout->image, psRegionFromString (region));
    36     if (psRegionIsNaN (AnalysisRegion)) psAbort ("psphot", "analysis region mis-defined");
     36    if (psRegionIsNaN (AnalysisRegion)) psAbort("analysis region mis-defined");
    3737
    3838    FILE *f = fopen ("bias.dat", "w");
    39     if (f == NULL) psAbort ("psphot", "can't open output file");
     39    if (f == NULL) psAbort("can't open output file");
    4040
    4141    for (int i = 0; i < sources->n; i++) {
Note: See TracChangeset for help on using the changeset viewer.