Changeset 23594 for branches/cnb_branches/cnb_branch_20090301/psphot/src
- Timestamp:
- Mar 29, 2009, 6:15:31 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090301
- Files:
-
- 12 edited
-
. (modified) (1 prop)
-
psphot (modified) (1 prop)
-
psphot/src/psphot.h (modified) (5 diffs)
-
psphot/src/psphotCleanup.c (modified) (1 diff)
-
psphot/src/psphotDetect.h (modified) (1 diff)
-
psphot/src/psphotFitSourcesLinear.c (modified) (5 diffs)
-
psphot/src/psphotMaskReadout.c (modified) (1 diff)
-
psphot/src/psphotReadout.c (modified) (1 diff)
-
psphot/src/psphotReadoutFindPSF.c (modified) (1 diff)
-
psphot/src/psphotReadoutKnownSources.c (modified) (1 diff)
-
psphot/src/psphotReadoutMinimal.c (modified) (1 diff)
-
psphot/src/psphotStandAlone.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090301
-
branches/cnb_branches/cnb_branch_20090301/psphot
- Property svn:mergeinfo changed
/trunk/psphot merged: 23442,23445,23486-23487,23492,23535
- Property svn:mergeinfo changed
-
branches/cnb_branches/cnb_branch_20090301/psphot/src/psphot.h
r23352 r23594 23 23 24 24 bool psphotModelTest (pmConfig *config, const pmFPAview *view, psMetadata *recipe); 25 bool psphotInit ( );25 bool psphotInit (void); 26 26 bool psphotReadout (pmConfig *config, const pmFPAview *view); 27 27 bool psphotReadoutFindPSF(pmConfig *config, const pmFPAview *view, psArray *inSources); … … 35 35 36 36 // XXX test functions 37 psArray *psphotFakeSources ( );37 psArray *psphotFakeSources (void); 38 38 39 39 // psphotReadout functions … … 76 76 77 77 // thread-related: 78 bool psphotSetThreads ( );78 bool psphotSetThreads (void); 79 79 bool psphotChooseCellSizes (int *Cx, int *Cy, pmReadout *readout, int nThreads); 80 80 bool psphotCoordToCell (int *group, int *cell, float x, float y, int Cx, int Cy); … … 136 136 bool psphotPlotMoments (pmConfig *config, pmFPAview *view, psArray *sources); 137 137 bool psphotPlotPSFModel (pmConfig *config, pmFPAview *view, psArray *sources); 138 bool psphotFitInit ( );139 bool psphotFitSummary ( );138 bool psphotFitInit (int nThreads); 139 bool psphotFitSummary (void); 140 140 141 141 bool psphotMergeSources (psArray *oldSources, psArray *newSources); … … 230 230 psImage *pmPCMDataSaveImage (pmPCMData *pcm); 231 231 232 int psphotKapaOpen ( );233 bool psphotKapaClose ( );232 int psphotKapaOpen (void); 233 bool psphotKapaClose (void); 234 234 bool psphotImageBackgroundCellHistogram (psVector *values, float mean, float sigma, int ix, int iy); 235 235 bool psphotDiagnosticPlots (const pmConfig *config, const char *name, ...); -
branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotCleanup.c
r21341 r23594 18 18 } 19 19 20 psExit psphotGetExitStatus ( ) {20 psExit psphotGetExitStatus (void) { 21 21 22 22 psErrorCode err = psErrorCodeLast (); 23 23 switch (err) { 24 24 case PS_ERR_NONE: 25 return PS_EXIT_SUCCESS;25 return PS_EXIT_SUCCESS; 26 26 case PSPHOT_ERR_SYS: 27 27 return PS_EXIT_SYS_ERROR; -
branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotDetect.h
r21392 r23594 19 19 bool psphotMosaicChip(pmConfig *config, const pmFPAview *view, char *outFile, char *inFile); 20 20 void psphotCleanup (pmConfig *config); 21 psExit psphotGetExitStatus ( );21 psExit psphotGetExitStatus (void); 22 22 23 23 #endif -
branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotFitSourcesLinear.c
r21519 r23594 63 63 pmSource *source = sources->data[i]; 64 64 65 // turn this bit off and turn it on again if we pass this test66 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; 67 67 68 68 // skip non-astronomical objects (very likely defects) … … 70 70 if (source->type == PM_SOURCE_TYPE_SATURATED) continue; 71 71 72 // do not include CRs in the full ensemble fit72 // do not include CRs in the full ensemble fit 73 73 if (source->mode & PM_SOURCE_MODE_CR_LIMIT) continue; 74 74 … … 94 94 if (y > AnalysisRegion.y1) continue; 95 95 96 source->mode |= PM_SOURCE_MODE_LINEAR_FIT;96 source->mode |= PM_SOURCE_MODE_LINEAR_FIT; 97 97 psArrayAdd (fitSources, 100, source); 98 98 } 99 99 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 } 100 104 101 105 // vectors to store stats for each object … … 189 193 psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "solve matrix: %f sec (%d elements)\n", psTimerMark ("psphot.linear"), sparse->Nelem); 190 194 191 // XXXX **** philosophical question: 195 // XXXX **** philosophical question: 192 196 // 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 195 199 // extended sources, the shape errors 196 200 … … 218 222 for (int i = 0; final && (i < fitSources->n); i++) { 219 223 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; 221 225 pmModel *model = pmSourceGetModel (NULL, source); 222 226 pmSourceChisq (model, source->pixels, source->maskObj, source->variance, maskVal); -
branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotMaskReadout.c
r23352 r23594 12 12 psMetadataAddImageMask (recipe, PS_LIST_TAIL, "MASK.SAT", PS_META_REPLACE, "user-defined mask", maskSat); 13 13 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 } 15 19 psMetadataAddImageMask (recipe, PS_LIST_TAIL, "MASK.BAD", PS_META_REPLACE, "user-defined mask", maskBad); 16 20 -
branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotReadout.c
r21366 r23594 2 2 3 3 // this should be called by every program that links against libpsphot 4 bool psphotInit ( ) {4 bool psphotInit (void) { 5 5 6 6 psphotErrorRegister(); // register our error codes/messages -
branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotReadoutFindPSF.c
r21366 r23594 11 11 if (!recipe) { 12 12 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"); 13 19 return false; 14 20 } -
branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotReadoutKnownSources.c
r21366 r23594 11 11 if (!recipe) { 12 12 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"); 13 19 return false; 14 20 } -
branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotReadoutMinimal.c
r21366 r23594 19 19 if (!recipe) { 20 20 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"); 21 27 return false; 22 28 } -
branches/cnb_branches/cnb_branch_20090301/psphot/src/psphotStandAlone.h
r12805 r23594 17 17 bool psphotMosaicChip(pmConfig *config, const pmFPAview *view, char *outFile, char *inFile); 18 18 void psphotCleanup (pmConfig *config); 19 psExit psphotGetExitStatus ( );19 psExit psphotGetExitStatus (void); 20 20 21 21 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
