IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 29, 2009, 6:15:31 PM (17 years ago)
Author:
beaumont
Message:

merged with head

Location:
branches/cnb_branches/cnb_branch_20090301
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branches/cnb_branch_20090301

  • branches/cnb_branches/cnb_branch_20090301/psphot

  • branches/cnb_branches/cnb_branch_20090301/psphot/src/psphot.h

    r23352 r23594  
    2323
    2424bool            psphotModelTest (pmConfig *config, const pmFPAview *view, psMetadata *recipe);
    25 bool            psphotInit ();
     25bool            psphotInit (void);
    2626bool            psphotReadout (pmConfig *config, const pmFPAview *view);
    2727bool            psphotReadoutFindPSF(pmConfig *config, const pmFPAview *view, psArray *inSources);
     
    3535
    3636// XXX test functions
    37 psArray        *psphotFakeSources ();
     37psArray        *psphotFakeSources (void);
    3838
    3939// psphotReadout functions
     
    7676
    7777// thread-related:
    78 bool            psphotSetThreads ();
     78bool            psphotSetThreads (void);
    7979bool            psphotChooseCellSizes (int *Cx, int *Cy, pmReadout *readout, int nThreads);
    8080bool            psphotCoordToCell (int *group, int *cell, float x, float y, int Cx, int Cy);
     
    136136bool            psphotPlotMoments (pmConfig *config, pmFPAview *view, psArray *sources);
    137137bool            psphotPlotPSFModel (pmConfig *config, pmFPAview *view, psArray *sources);
    138 bool            psphotFitInit ();
    139 bool            psphotFitSummary ();
     138bool            psphotFitInit (int nThreads);
     139bool            psphotFitSummary (void);
    140140
    141141bool            psphotMergeSources (psArray *oldSources, psArray *newSources);
     
    230230psImage *pmPCMDataSaveImage (pmPCMData *pcm);
    231231
    232 int psphotKapaOpen ();
    233 bool psphotKapaClose ();
     232int psphotKapaOpen (void);
     233bool psphotKapaClose (void);
    234234bool psphotImageBackgroundCellHistogram (psVector *values, float mean, float sigma, int ix, int iy);
    235235bool psphotDiagnosticPlots (const pmConfig *config, const char *name, ...);
  • branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotCleanup.c

    r21341 r23594  
    1818}
    1919
    20 psExit psphotGetExitStatus () {
     20psExit psphotGetExitStatus (void) {
    2121
    2222    psErrorCode err = psErrorCodeLast ();
    2323    switch (err) {
    2424      case PS_ERR_NONE:
    25         return PS_EXIT_SUCCESS;
     25        return PS_EXIT_SUCCESS;
    2626      case PSPHOT_ERR_SYS:
    2727        return PS_EXIT_SYS_ERROR;
  • branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotDetect.h

    r21392 r23594  
    1919bool        psphotMosaicChip(pmConfig *config, const pmFPAview *view, char *outFile, char *inFile);
    2020void        psphotCleanup (pmConfig *config);
    21 psExit      psphotGetExitStatus ();
     21psExit      psphotGetExitStatus (void);
    2222
    2323#endif
  • branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotFitSourcesLinear.c

    r21519 r23594  
    6363        pmSource *source = sources->data[i];
    6464
    65         // turn this bit off and turn it on again if we pass this test
    66         source->mode &= ~PM_SOURCE_MODE_LINEAR_FIT;
     65        // turn this bit off and turn it on again if we pass this test
     66        source->mode &= ~PM_SOURCE_MODE_LINEAR_FIT;
    6767
    6868        // skip non-astronomical objects (very likely defects)
     
    7070        if (source->type == PM_SOURCE_TYPE_SATURATED) continue;
    7171
    72         // do not include CRs in the full ensemble fit
     72        // do not include CRs in the full ensemble fit
    7373        if (source->mode & PM_SOURCE_MODE_CR_LIMIT) continue;
    7474
     
    9494        if (y > AnalysisRegion.y1) continue;
    9595
    96         source->mode |= PM_SOURCE_MODE_LINEAR_FIT;
     96        source->mode |= PM_SOURCE_MODE_LINEAR_FIT;
    9797        psArrayAdd (fitSources, 100, source);
    9898    }
    9999    psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "built fitSources: %f sec (%ld objects)\n", psTimerMark ("psphot.linear"), sources->n);
     100
     101    if (fitSources->n == 0) {
     102        return true;
     103    }
    100104
    101105    // vectors to store stats for each object
     
    189193    psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "solve matrix: %f sec (%d elements)\n", psTimerMark ("psphot.linear"), sparse->Nelem);
    190194
    191     // XXXX **** philosophical question: 
     195    // XXXX **** philosophical question:
    192196    // we measure bright objects in three passes: 1) linear fit; 2) non-linear fit; 3) linear fit:
    193     // should retain the chisq and errors from the intermediate non-linear fit? 
    194     // the non-linear fit provides better values for the position errors, and for 
     197    // should retain the chisq and errors from the intermediate non-linear fit?
     198    // the non-linear fit provides better values for the position errors, and for
    195199    // extended sources, the shape errors
    196200
     
    218222    for (int i = 0; final && (i < fitSources->n); i++) {
    219223        pmSource *source = fitSources->data[i];
    220         if (source->mode & PM_SOURCE_MODE_NONLINEAR_FIT) continue;
     224        if (source->mode & PM_SOURCE_MODE_NONLINEAR_FIT) continue;
    221225        pmModel *model = pmSourceGetModel (NULL, source);
    222226        pmSourceChisq (model, source->pixels, source->maskObj, source->variance, maskVal);
  • branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotMaskReadout.c

    r23352 r23594  
    1212    psMetadataAddImageMask (recipe, PS_LIST_TAIL, "MASK.SAT", PS_META_REPLACE, "user-defined mask", maskSat);
    1313
    14     psImageMaskType maskBad  = pmConfigMaskGet("BAD", config); // Mask value for bad pixels
     14    psImageMaskType maskBad  = pmConfigMaskGet("LOW", config); // Mask value for low pixels
     15    if (!maskBad) {
     16        // XXX: for backward compatability look up old name
     17        maskBad  = pmConfigMaskGet("BAD", config);
     18    }
    1519    psMetadataAddImageMask (recipe, PS_LIST_TAIL, "MASK.BAD", PS_META_REPLACE, "user-defined mask", maskBad);
    1620
  • branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotReadout.c

    r21366 r23594  
    22
    33// this should be called by every program that links against libpsphot
    4 bool psphotInit () {
     4bool psphotInit (void) {
    55
    66    psphotErrorRegister();              // register our error codes/messages
  • branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotReadoutFindPSF.c

    r21366 r23594  
    1111    if (!recipe) {
    1212        psError(PSPHOT_ERR_CONFIG, false, "missing recipe %s", PSPHOT_RECIPE);
     13        return false;
     14    }
     15
     16    // set the photcode for this image
     17    if (!psphotAddPhotcode(recipe, config, view, "PSPHOT.INPUT")) {
     18        psError(PSPHOT_ERR_CONFIG, false, "trouble defining the photcode");
    1319        return false;
    1420    }
  • branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotReadoutKnownSources.c

    r21366 r23594  
    1111    if (!recipe) {
    1212        psError(PSPHOT_ERR_CONFIG, false, "missing recipe %s", PSPHOT_RECIPE);
     13        return false;
     14    }
     15
     16    // set the photcode for this image
     17    if (!psphotAddPhotcode(recipe, config, view, "PSPHOT.INPUT")) {
     18        psError(PSPHOT_ERR_CONFIG, false, "trouble defining the photcode");
    1319        return false;
    1420    }
  • branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotReadoutMinimal.c

    r21366 r23594  
    1919    if (!recipe) {
    2020        psError(PSPHOT_ERR_CONFIG, false, "missing recipe %s", PSPHOT_RECIPE);
     21        return false;
     22    }
     23
     24    // set the photcode for this image
     25    if (!psphotAddPhotcode(recipe, config, view, "PSPHOT.INPUT")) {
     26        psError(PSPHOT_ERR_CONFIG, false, "trouble defining the photcode");
    2127        return false;
    2228    }
  • branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotStandAlone.h

    r12805 r23594  
    1717bool            psphotMosaicChip(pmConfig *config, const pmFPAview *view, char *outFile, char *inFile);
    1818void            psphotCleanup (pmConfig *config);
    19 psExit          psphotGetExitStatus ();
     19psExit          psphotGetExitStatus (void);
    2020
    2121#endif
Note: See TracChangeset for help on using the changeset viewer.