Changeset 6495
- Timestamp:
- Feb 24, 2006, 6:32:38 PM (20 years ago)
- Location:
- trunk/psphot
- Files:
-
- 8 edited
-
configure.ac (modified) (1 diff)
-
src/pmModelFitSet.c (modified) (1 diff)
-
src/psphotApResid.c (modified) (2 diffs)
-
src/psphotBlendFit.c (modified) (3 diffs)
-
src/psphotFindPeaks.c (modified) (1 diff)
-
src/psphotMagnitudes.c (modified) (2 diffs)
-
src/psphotOutput.c (modified) (1 diff)
-
src/psphotSourceStats.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/configure.ac
r6310 r6495 24 24 ) 25 25 26 dnl handle profiler building 27 AC_ARG_ENABLE(profile, 28 [AS_HELP_STRING(--enable-profile,enable compiler profiler information inclusion)], 29 [AC_MSG_RESULT(compile optimization enabled) 30 CFLAGS="${CFLAGS=} -pg"] 31 ) 32 26 33 AC_CHECK_LIB(jpeg,jpeg_CreateCompress,[],[AC_MSG_ERROR([jpeg library not found.])]) 27 34 PKG_CHECK_MODULES(PSLIB, pslib >= 0.9.0) -
trunk/psphot/src/pmModelFitSet.c
r6481 r6495 38 38 psF32 *dPAR = oneDeriv->data.F32; 39 39 40 psF32 *pars = params->data.F32; 41 psF32 *dpars = (deriv == NULL) ? NULL : deriv->data.F32; 42 40 43 int nSrc = (params->n - 1) / (nPar - 1); 41 44 42 model = params->data.F32[0]; 43 44 PAR[0] = params->data.F32[0]; 45 PAR[0] = model = pars[0]; 45 46 for (int i = 0; i < nSrc; i++) { 47 int nOff = i*nPar - i; 46 48 for (int n = 1; n < nPar; n++) { 47 PAR[n] = par ams->data.F32[i*nPar - i+ n];49 PAR[n] = pars[nOff + n]; 48 50 } 49 value = mFunc (oneDeriv, onePar, x); 51 if (deriv == NULL) { 52 value = mFunc (NULL, onePar, x); 53 } else { 54 value = mFunc (oneDeriv, onePar, x); 55 for (int n = 1; n < nPar; n++) { 56 dpars[nOff + n] = dPAR[n]; 57 } 58 } 50 59 model += value; 51 for (int n = 1; n < nPar; n++) {52 deriv->data.F32[i*nPar - i + n] = dPAR[n];53 }54 60 } 55 deriv->data.F32[0] = dPAR[0]*2.0; 61 if (deriv != NULL) { 62 dpars[0] = dPAR[0]*2.0; 63 } 56 64 return (model); 57 65 } -
trunk/psphot/src/psphotApResid.c
r6379 r6495 11 11 12 12 psTimerStart ("psphot"); 13 14 // S/N limit to perform full non-linear fits 15 float FIT_SN_LIM = psMetadataLookupF32 (&status, config, "FULL_FIT_SN_LIM"); 13 16 14 17 // measure the aperture loss as a function of radius for PSF … … 37 40 if (source->mode & PM_SOURCE_POOR) continue; 38 41 42 // XXX tune independently? 43 if (source->moments->SN < 2*FIT_SN_LIM) continue; 44 39 45 // get uncorrected magnitudes in scaled apertures 40 46 model = pmSourceMagnitudes (source, NULL, 0); -
trunk/psphot/src/psphotBlendFit.c
r6481 r6495 4 4 bool psphotBlendFit (pmReadout *readout, psMetadata *config, psArray *sources, pmPSF *psf) { 5 5 6 int Nfit = 0; 6 7 bool status; 7 8 … … 45 46 // replace object in image 46 47 pmSourceAddModel (source->pixels, source->mask, source->modelPSF, false, false); 48 Nfit ++; 47 49 48 50 psTrace ("psphot.blend", 5, "trying source at %f, %f\n", source->moments->x, source->moments->y); … … 60 62 } 61 63 62 psLogMsg ("psphot", 3, "fit PSF models: %f sec for %d objects \n", psTimerMark ("psphot"), sources->n);64 psLogMsg ("psphot", 3, "fit PSF models: %f sec for %d objects (%d total)\n", psTimerMark ("psphot"), Nfit, sources->n); 63 65 return (true); 64 66 } -
trunk/psphot/src/psphotFindPeaks.c
r6481 r6495 22 22 psImageSmooth (smooth_wt, SIGMA, NSIGMA); 23 23 psLogMsg ("psphot", 4, "smooth weight: %f sec\n", psTimerMark ("psphot")); 24 25 // psphotSaveImage (NULL, smooth_im, "smooth.fits"); 24 26 25 27 psTimerStart ("psphot"); -
trunk/psphot/src/psphotMagnitudes.c
r6117 r6495 76 76 bool status; 77 77 78 psTimerStart ("psphot"); 79 78 80 float RADIUS = psMetadataLookupF32 (&status, config, "AP_RADIUS"); 79 81 for (int i = 0; i < sources->n; i++) { … … 81 83 pmSourceMagnitudes (source, psf, RADIUS); 82 84 } 85 86 psLogMsg ("psphot.magnitudes", 4, "measure magnitudes : %f sec for %d objects\n", psTimerMark ("psphot"), sources->n); 83 87 return true; 84 88 } -
trunk/psphot/src/psphotOutput.c
r6481 r6495 175 175 176 176 bool status; 177 char *outputFile ;177 char *outputFile = NULL; 178 178 179 179 psMetadata *header = pmReadoutGetHeader (readout); -
trunk/psphot/src/psphotSourceStats.c
r6427 r6495 26 26 // allocate image, weight, mask arrays for each peak (square of radius OUTER) 27 27 psphotDefinePixels (source, readout, source->peak->x, source->peak->y, OUTER); 28 29 // XXX skip faint sources? 28 30 29 31 // measure a local sky value
Note:
See TracChangeset
for help on using the changeset viewer.
