Changeset 27838 for branches/tap_branches/psphot/src/psphotMaskReadout.c
- Timestamp:
- May 3, 2010, 8:41:49 AM (16 years ago)
- Location:
- branches/tap_branches
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
psphot (modified) (1 prop)
-
psphot/src (modified) (1 prop)
-
psphot/src/psphotMaskReadout.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/tap_branches
- Property svn:mergeinfo changed
-
branches/tap_branches/psphot
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk/psphot merged eligible /branches/eam_branches/stackphot.20100406/psphot 27622-27655 /branches/pap_delete/psphot 27530-27595
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/tap_branches/psphot/src
- Property svn:ignore
-
old new 19 19 psphotMomentsStudy 20 20 psphotPetrosianStudy 21 psphotForced 22 psphotMakePSF 23 psphotStack
-
- Property svn:ignore
-
branches/tap_branches/psphot/src/psphotMaskReadout.c
r25755 r27838 1 1 # include "psphotInternal.h" 2 2 3 bool psphotSetMaskAndVariance (pmConfig *config, const pmFPAview *view) { 4 5 bool status = false; 6 7 // select the appropriate recipe information 8 psMetadata *recipe = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE); 9 psAssert (recipe, "missing recipe?"); 10 11 int num = psMetadataLookupS32 (&status, config->arguments, "PSPHOT.INPUT.NUM"); 12 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); 13 14 // loop over the available readouts 15 for (int i = 0; i < num; i++) { 16 17 // Generate the mask and weight images, including the user-defined analysis region of interest 18 if (!psphotSetMaskAndVarianceReadout (config, view, "PSPHOT.INPUT", i, recipe)) { 19 psError (PSPHOT_ERR_CONFIG, false, "failed to generate mask for PSPHOT.INPUT entry %d", i); 20 return false; 21 } 22 } 23 return true; 24 } 25 3 26 // generate mask and variance if not defined, additional mask for restricted subregion 4 bool psphotSetMaskAndVariance (pmConfig *config, pmReadout *readout, psMetadata *recipe) {27 bool psphotSetMaskAndVarianceReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index, psMetadata *recipe) { 5 28 6 29 bool status; 7 30 8 // ** Interpret the mask values: 9 // XXX drop the write to recipe and move config into psphotRoughClass? 10 // XXX alternatively, define a function to set the psphot recipe masks 31 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PSPHOT.INPUT", index); // File of interest 32 psAssert (file, "missing file?"); 33 34 // find the currently selected readout 35 pmReadout *readout = pmFPAviewThisReadout (view, file->fpa); 36 psAssert (readout, "missing readout?"); 37 38 // save maskSat and maskBad on the psphot recipe (mostly for psphotRoughClass) 11 39 psImageMaskType maskSat = pmConfigMaskGet("SAT", config); // Mask value for saturated pixels 12 40 psMetadataAddImageMask (recipe, PS_LIST_TAIL, "MASK.SAT", PS_META_REPLACE, "user-defined mask", maskSat); … … 14 42 psImageMaskType maskBad = pmConfigMaskGet("LOW", config); // Mask value for low pixels 15 43 if (!maskBad) { 16 // XXX:for backward compatability look up old name44 // for backward compatability look up old name 17 45 maskBad = pmConfigMaskGet("BAD", config); 18 46 } … … 73 101 } 74 102 103 // display the image, weight, mask (ch 1,2,3) 104 psphotVisualShowImage (readout); 105 75 106 return true; 76 107 }
Note:
See TracChangeset
for help on using the changeset viewer.
