IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 27, 2006, 4:31:17 PM (20 years ago)
Author:
eugene
Message:

substantial work on the pmFPAfile,view concepts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotEvalPSF.c

    r5993 r6715  
    5454    // do we actually have a valid PSF model?
    5555    if (model == NULL) {
    56         source->mode &= ~PM_SOURCE_FITTED;
     56        source->mode &= ~PM_SOURCE_MODE_FITTED;
    5757        return false;
    5858    }
     
    6363        break;
    6464      case PM_MODEL_UNTRIED:
    65         source->mode &= ~PM_SOURCE_FITTED;
     65        source->mode &= ~PM_SOURCE_MODE_FITTED;
    6666        return false;
    6767      case PM_MODEL_BADARGS:
     
    6969      case PM_MODEL_OFFIMAGE:
    7070      default:
    71         source->mode |= PM_SOURCE_FAIL;
     71        source->mode |= PM_SOURCE_MODE_FAIL;
    7272        return false;
    7373    }
    7474
    7575    // unless we prove otherwise, this object is a star.
    76     source->type = PM_SOURCE_STAR;
     76    source->type = PM_SOURCE_TYPE_STAR;
    7777
    7878    // the following source->mode information pertains to modelPSF:
    79     source->mode |= PM_SOURCE_PSFMODEL;
     79    source->mode |= PM_SOURCE_MODE_PSFMODEL;
    8080
    8181    // if the object has fitted peak above saturation, label as SATSTAR
     
    8484    // XXX no extended object can saturate and stay extended...
    8585    if (model->params->data.F32[1] >= SATURATION) {
    86         if (source->mode & PM_SOURCE_PSFSTAR) {
     86        if (source->mode & PM_SOURCE_MODE_PSFSTAR) {
    8787            psLogMsg ("psphot", 5, "PSFSTAR marked SATSTAR\n");
    8888        }
    89         source->mode |=  PM_SOURCE_SATSTAR;
     89        source->mode |=  PM_SOURCE_MODE_SATSTAR;
    9090        return true;
    9191    }
     
    9393    // if the object has a fitted peak below 0, the fit did not converge cleanly
    9494    if (model->params->data.F32[1] <= 0) {
    95         source->mode |= PM_SOURCE_FAIL;
     95        source->mode |= PM_SOURCE_MODE_FAIL;
    9696        return false;
    9797    }
     
    9999    // if the source was predicted to be a SATSTAR, but it fitted below saturation,
    100100    // make a note to the user
    101     if (source->mode & PM_SOURCE_SATSTAR) {
     101    if (source->mode & PM_SOURCE_MODE_SATSTAR) {
    102102        psLogMsg ("psphot", 5, "SATSTAR marked normal (fitted peak below saturation)\n");
    103         source->mode &= ~PM_SOURCE_SATSTAR;
     103        source->mode &= ~PM_SOURCE_MODE_SATSTAR;
    104104    }
    105105
     
    115115    nSy = dSY / hypot (MIN_DS, 1 / (SY * SN));
    116116
    117     // assign PM_SOURCE_GOODSTAR to bright objects within PSF region of dparams[]
     117    // assign PM_SOURCE_MODE_GOODSTAR to bright objects within PSF region of dparams[]
    118118    keep = TRUE;
    119119    keep &= (fabs(nSx) < PSF_SHAPE_NSIGMA);
     
    124124
    125125    // this source is not a star, warn if it was a PSFSTAR
    126     if (source->mode & PM_SOURCE_PSFSTAR) {
     126    if (source->mode & PM_SOURCE_MODE_PSFSTAR) {
    127127        psLogMsg ("psphot", 5, "PSFSTAR demoted based on fit quality   (%f, %f  :  %f %f %f %f)\n",
    128128                  model->params->data.F32[2], model->params->data.F32[3], nSx, nSy, SN, Chi);
     
    134134    // object appears to be small, suspected defect
    135135    if ((nSx <= -PSF_SHAPE_NSIGMA) || (nSy <= -PSF_SHAPE_NSIGMA)) {
    136         source->type = PM_SOURCE_DEFECT;
     136        source->type = PM_SOURCE_TYPE_DEFECT;
    137137        return false;
    138138    }
     
    140140    // object appears to be large, suspected extended source
    141141    if ((nSx >= PSF_SHAPE_NSIGMA) || (nSy >= PSF_SHAPE_NSIGMA)) {
    142         source->type = PM_SOURCE_EXTENDED;
     142        source->type = PM_SOURCE_TYPE_EXTENDED;
    143143        return false;
    144144    }
    145145
    146146    // poor-quality fit; only keep if nothing else works...
    147     source->mode |= PM_SOURCE_POOR;
     147    source->mode |= PM_SOURCE_MODE_POOR;
    148148    return false;
    149149}       
     
    155155    // do we actually have a valid PSF model?
    156156    if (model == NULL) {
    157         source->mode &= ~PM_SOURCE_FITTED;
     157        source->mode &= ~PM_SOURCE_MODE_FITTED;
    158158        return false;
    159159    }
     
    164164        break;
    165165      case PM_MODEL_UNTRIED:
    166         source->mode &= ~PM_SOURCE_FITTED;
     166        source->mode &= ~PM_SOURCE_MODE_FITTED;
    167167        return false;
    168168      case PM_MODEL_BADARGS:
     
    170170      case PM_MODEL_OFFIMAGE:
    171171      default:
    172         source->mode |= PM_SOURCE_FAIL;
     172        source->mode |= PM_SOURCE_MODE_FAIL;
    173173        return false;
    174174    }
    175175
    176176    // unless we prove otherwise, this object is a star.
    177     source->type = PM_SOURCE_STAR;
     177    source->type = PM_SOURCE_TYPE_STAR;
    178178
    179179    // the following source->mode information pertains to modelPSF:
    180     source->mode |= PM_SOURCE_PSFMODEL;
     180    source->mode |= PM_SOURCE_MODE_PSFMODEL;
    181181
    182182    // if the object has fitted peak above saturation, label as SATSTAR
     
    185185    // XXX no extended object can saturate and stay extended...
    186186    if (model->params->data.F32[1] >= SATURATION) {
    187         if (source->mode & PM_SOURCE_PSFSTAR) {
     187        if (source->mode & PM_SOURCE_MODE_PSFSTAR) {
    188188            psLogMsg ("psphot", 5, "PSFSTAR marked SATSTAR\n");
    189189        }
    190         source->mode |=  PM_SOURCE_SATSTAR;
     190        source->mode |=  PM_SOURCE_MODE_SATSTAR;
    191191        return true;
    192192    }
     
    194194    // if the object has a fitted peak below 0, the fit did not converge cleanly
    195195    if (model->params->data.F32[1] <= 0) {
    196         source->mode |= PM_SOURCE_FAIL;
     196        source->mode |= PM_SOURCE_MODE_FAIL;
    197197        return false;
    198198    }
     
    200200    // if the source was predicted to be a SATSTAR, but it fitted below saturation,
    201201    // make a note to the user
    202     if (source->mode & PM_SOURCE_SATSTAR) {
     202    if (source->mode & PM_SOURCE_MODE_SATSTAR) {
    203203        psLogMsg ("psphot", 5, "SATSTAR marked normal (fitted peak below saturation)\n");
    204         source->mode &= ~PM_SOURCE_SATSTAR;
     204        source->mode &= ~PM_SOURCE_MODE_SATSTAR;
    205205    }
    206206    return true;
Note: See TracChangeset for help on using the changeset viewer.