Changeset 34418 for trunk/psphot/src/psphotDeblendSatstars.c
- Timestamp:
- Sep 7, 2012, 10:51:18 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
psphot (modified) (1 prop)
-
psphot/src (modified) (1 prop)
-
psphot/src/psphotDeblendSatstars.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905 (added) merged: 34407-34409,34415-34417
- Property svn:mergeinfo changed
-
trunk/psphot
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/psphot (added) merged: 34408-34409,34415-34416
- Property svn:mergeinfo changed
-
trunk/psphot/src
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/psphot/src (added) merged: 34408-34409,34415-34416
- Property svn:mergeinfo changed
-
trunk/psphot/src/psphotDeblendSatstars.c
r34404 r34418 16 16 bool psphotDeblendSatstars (pmConfig *config, const pmFPAview *view, const char *filerule) 17 17 { 18 bool status = false; 19 18 20 int num = psphotFileruleCount(config, filerule); 21 22 // select the appropriate recipe information 23 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 24 psAssert (recipe, "missing recipe?"); 25 26 // perform full extended source non-linear fits? 27 if (!psMetadataLookupBool (&status, recipe, "SUBTRACT_SATSTAR_PROFILE")) { 28 psLogMsg ("psphot", PS_LOG_INFO, "skipping extended source fits\n"); 29 return true; 30 } 19 31 20 32 // loop over the available readouts 21 33 for (int i = 0; i < num; i++) { 22 if (!psphotDeblendSatstarsReadout (config, view, filerule, i )) {34 if (!psphotDeblendSatstarsReadout (config, view, filerule, i, recipe)) { 23 35 psError (PSPHOT_ERR_CONFIG, false, "failed on saturated star deblend analysis for %s entry %d", filerule, i); 24 36 return false; … … 40 52 4) subtract the radial profile 41 53 54 There is also support code for calculation of magnitudes and add/subtract the profile (a la pmSourceOp) 55 42 56 TBD: 43 57 44 * function to replace the radial profile for a source45 58 * recenter the profile (based on cross-correlation / convolution with 1D profile) 46 47 * raise a bit somewhere for these super saturated stars (if they were so modeled)48 * consider the subtraction bit : when to raise it?49 50 59 **/ 51 60 52 bool psphotDeblendSatstarsReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int fileIndex ) {61 bool psphotDeblendSatstarsReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int fileIndex, psMetadata *recipe) { 53 62 54 63 int N; … … 56 65 bool status; 57 66 58 // XXX disable this function for now59 return true;60 61 67 psTimerStart ("psphot.deblend.sat"); 62 68 … … 78 84 return true; 79 85 } 80 81 // select the appropriate recipe information82 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE);83 psAssert (recipe, "missing recipe?");84 86 85 87 // user-defined masks to test for good/bad pixels (build from recipe list if not yet set) … … 124 126 int BIG_SIGMA = BIG_RADIUS / 4.0; 125 127 126 int display = psphotKapaChannel (1);127 psphotVisualScaleImage (display, (psImage *) source->pixels->parent, NULL, "image", 1.0, 0);128 // int display = psphotKapaChannel (1); 129 // psphotVisualScaleImage (display, (psImage *) source->pixels->parent, NULL, "image", 1.0, 0); 128 130 129 131 // examine sources in decreasing SN order … … 185 187 } 186 188 // show the image after object have been subtracted 187 psphotVisualScaleImage (display, (psImage *) source->pixels->parent, NULL, "image", 1.0, 1);189 // psphotVisualScaleImage (display, (psImage *) source->pixels->parent, NULL, "image", 1.0, 1); 188 190 189 191 psFree (SN); … … 451 453 // XXX do something sensible here if the profile is crap 452 454 455 // replace an existing profile 456 psFree (source->satstar); 453 457 source->satstar = pmSourceSatstarAlloc(); 454 458 source->satstar->Xo = Xo;
Note:
See TracChangeset
for help on using the changeset viewer.
