IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36642 for trunk


Ignore:
Timestamp:
Apr 2, 2014, 3:55:33 PM (12 years ago)
Author:
watersc1
Message:

Still not perfect, as it seems to be improperly clipping bad inputs. This version does fix the exposure time scaling issue.

Location:
trunk/ppBackground/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppBackground/src/ppBackgroundStackCamera.c

    r36635 r36642  
    114114        }
    115115      }
    116 
    117 /*       psMemStats(0,&A,&P); */
    118 /*       fprintf(stderr,"fpa %ld %ld\n",A,P); */
     116     
     117      psF32 exptime = 1.0;
     118      exptime = psMetadataLookupF32(NULL, phu->header, "EXPTIME");
    119119
    120120      pmChip *chip;                       // Chip from FPA
     
    197197            decim->data.F32[v][u] = tp->y;
    198198            model->data.F32[v][u] = 0.0;
    199 
     199            image->data.F32[v][u] /= exptime;
    200200            // Check the bounds so we'll know how large of an area to model in the map
    201201            if (tp->x < data->ra_min) { data->ra_min = tp->x; }
     
    277277          }
    278278        }
    279 
    280        
    281 /*      psMemStats(0,&A,&P); */
    282 /*      fprintf(stderr,"chip2 %ld %ld\n",A,P); */
    283279      } // end chip loop
    284280
     
    290286                       "N", PS_META_REPLACE,
    291287                       "counter", i);
    292       // data->models->name->XY__->{image/ra/dec/calibrated/offset/scale}
    293       // data->models->counter->XY__->{image/ra/dec/calibrated/offset/scale}
    294 
    295      
    296288     
    297289      if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
  • trunk/ppBackground/src/ppBackgroundStackLoop.c

    r36635 r36642  
    7676      pmFPAview *view = pmFPAviewAlloc(0);
    7777
     78      //      pmHDU *phu = pmFPAviewThisPHU(view, stack->fpa);
     79      psF32 exptime = 1.0;
     80      exptime = psMetadataLookupF32(NULL, stack->fpa->hdu->header, "EXPTIME");
     81     
    7882      // PART 1:
    7983      // Determine the extent of the model map for this stack
     
    124128      psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV);
    125129      psImageBinning *binning = psImageBinningAlloc();
    126       binning->nXruff = 15; // Number of samples
    127       binning->nYruff = 15;
     130      binning->nXruff = 13; // Number of samples
     131      binning->nYruff = 13;
    128132      //    binning->nXfine = ceil(data->ra_max - data->ra_min) + 1; // This is the range we're looking at
    129133      //    binning->nYfine = ceil(data->dec_max - data->dec_min) + 1;
     
    169173
    170174      // This is where an iterative solution loop would likely start.
    171       {
     175      for (int iterator = 0; iterator < 2; iterator++) {
    172176        // Construct the offset information
    173177        printf("Model fit!\n");
     
    298302                psPlaneTransformApply(tp, stack->fpa->toTPA, pix);
    299303               
    300                 model->image->data.F32[y][x] = psImageMapEval(data->modelMap,tp->x,tp->y);
     304                model->image->data.F32[y][x] = exptime * psImageMapEval(data->modelMap,tp->x,tp->y);
    301305                corr->image->data.F32[y][x] = readout->image->data.F32[y][x] + model->image->data.F32[y][x];
    302306               
  • trunk/ppBackground/src/ppBackgroundStackMath.c

    r36635 r36642  
    103103          psVectorAppend(obs,image->data.F32[v][u]);
    104104          psVectorAppend(model, psImageMapEval(data->modelMap,ra->data.F32[v][u],dec->data.F32[v][u]));
    105           //      obs->data.F32[v * image->numCols + u] = image->data.F32[v][u];
    106           //      model->data.F32[v * image->numCols + u] = psImageMapEval(data->modelMap,ra->data.F32[v][u],dec->data.F32[v][u]);
    107105        }
    108106      }
Note: See TracChangeset for help on using the changeset viewer.