- Timestamp:
- Nov 20, 2009, 4:15:17 PM (17 years ago)
- Location:
- branches/eam_branches/20091113
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
psastro/src/psastroMaskUpdates.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091113
- Property svn:mergeinfo changed
/trunk (added) merged: 26138-26162,26169-26194,26201-26218
- Property svn:mergeinfo changed
-
branches/eam_branches/20091113/psastro/src/psastroMaskUpdates.c
r26167 r26237 34 34 psImageMaskType spikeMaskValue = pmConfigMaskGet("SPIKE", config); // Mask value for ghost pixels 35 35 psImageMaskType starMaskValue = pmConfigMaskGet("STARCORE", config); // Mask value for ghost pixels 36 36 psImageMaskType crosstalkMaskValue = pmConfigMaskGet("GHOST", config); // Mask value for crosstalk ghosts 37 37 38 // psImageMaskType maskBlank = pmConfigMaskGet("BLANK", config); // Mask value for blank pixels 38 39 … … 48 49 if (!REFSTAR_MASK) return true; 49 50 51 // convert star positions to crosstalk artifact positions and add to the readout->analysis data 52 bool CROSSTALK_MASK = psMetadataLookupBool (&status, recipe, "CROSSTALK_MASK"); 53 if (CROSSTALK_MASK && !psastroLoadCrosstalk (config)) { 54 psError(PSASTRO_ERR_CONFIG, false, "Error loading crosstalk data"); 55 return(false); 56 } 57 50 58 // convert star positions to ghost positions and add to the readout->analysis data 51 59 if (!psastroLoadGhosts (config)) { … … 76 84 double REFSTAR_MASK_BLEED_MAG_SLOPE = psMetadataLookupF32 (&status, recipe, "REFSTAR_MASK_BLEED_MAG_SLOPE"); 77 85 86 double REFSTAR_MASK_CROSSTALK_MAG_MAX = psMetadataLookupF32 (&status, recipe, "REFSTAR_MASK_CROSSTALK_MAG_MAX"); 87 double REFSTAR_MASK_CROSSTALK_MAG_SLOPE= psMetadataLookupF32 (&status, recipe, "REFSTAR_MASK_CROSSTALK_MAG_SLOPE"); 88 78 89 // select the input data sources 79 90 pmFPAfile *input = psMetadataLookupPtr (NULL, config->files, "PSASTRO.INPUT"); … … 204 215 205 216 if (ref->Mag > REFSTAR_MASK_MAX_MAG) continue; 217 206 218 207 219 // the reference magnitudes have been converted from the instrumental … … 285 297 } 286 298 299 // Select the crosstalk artifact regions for this readout, and mask a circular region 300 // corresponding to the source star 301 302 psArray *crosstalks = psMetadataLookupPtr (&status, readout->analysis, "PSASTRO.CROSSTALKS"); 303 if (crosstalks) { 304 for (int i = 0; i < crosstalks->n; i++) { 305 pmAstromObj *ref = crosstalks->data[i]; 306 float radius = REFSTAR_MASK_CROSSTALK_MAG_SLOPE * (REFSTAR_MASK_CROSSTALK_MAG_MAX - ref->Mag); 307 psTrace("psastro.crosstalk",2,"Masking star on Chip %s @ (%f,%f) Magnitude: %f Radius %f\n", 308 psMetadataLookupStr(&status,readout->parent->parent->concepts,"CHIP.NAME"), 309 ref->chip->x,ref->chip->y,ref->Mag,radius); 310 // XXX for now, assume cell binning is 1x1 relative to chip 311 psastroMaskCircle (readoutMask->mask, crosstalkMaskValue, ref->chip->x, ref->chip->y, radius, radius); 312 } 313 } 314 287 315 // this probably should move into a function of its own: 288 316 {
Note:
See TracChangeset
for help on using the changeset viewer.
