- Timestamp:
- Nov 17, 2009, 2:19:04 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
-
ippconfig/gpc1/psastro.config (modified) (1 diff)
-
ippconfig/recipes/psastro.config (modified) (2 diffs)
-
psastro/src/Makefile.am (modified) (1 diff)
-
psastro/src/psastro.h (modified) (1 diff)
-
psastro/src/psastroLoadCrosstalk.c (added)
-
psastro/src/psastroMaskUpdates.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippconfig/gpc1/psastro.config
r24655 r26173 227 227 END 228 228 229 REFSTAR_MASK_CROSSTALK_MAG_SLOPE F32 3.44 230 REFSTAR_MASK_CROSSTALK_MAG_MAX F32 -14.47 231 CROSSTALK_MAX_MAG F32 20.0 232 CROSSTALK_MASK BOOL TRUE -
trunk/ippconfig/recipes/psastro.config
r26070 r26173 144 144 END 145 145 146 REFSTAR_MASK_CROSSTALK_MAG_SLOPE F32 3.44 147 REFSTAR_MASK_CROSSTALK_MAG_MAX F32 -14.47 148 CROSSTALK_MAX_MAG F32 20.0 149 CROSSTALK_MASK BOOL FALSE 150 146 151 EXTRACT_MAX_MAG F32 -15.0 147 152 … … 206 211 PR_RECIPE METADATA 207 212 END 213 -
trunk/psastro/src/Makefile.am
r24645 r26173 90 90 psastroMaskUtils.c \ 91 91 psastroChooseGlintStars.c \ 92 psastroLoadCrosstalk.c \ 92 93 psastroLoadGlints.c \ 93 94 psastroLoadGhosts.c \ -
trunk/psastro/src/psastro.h
r25906 r26173 75 75 bool psastroLoadGlints (pmConfig *config); 76 76 bool psastroChooseGlintStars (pmConfig *config, psArray *refs, const char *source); 77 78 bool psastroLoadCrosstalk (pmConfig *config); 77 79 78 80 psArray *psastroLoadRefstars (pmConfig *config, const char *source); -
trunk/psastro/src/psastroMaskUpdates.c
r24701 r26173 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"); … … 201 212 202 213 if (ref->Mag > REFSTAR_MASK_MAX_MAG) continue; 214 203 215 204 216 // the reference magnitudes have been converted from the instrumental … … 282 294 } 283 295 296 // Select the crosstalk artifact regions for this readout, and mask a circular region 297 // corresponding to the source star 298 299 psArray *crosstalks = psMetadataLookupPtr (&status, readout->analysis, "PSASTRO.CROSSTALKS"); 300 if (crosstalks) { 301 for (int i = 0; i < crosstalks->n; i++) { 302 pmAstromObj *ref = crosstalks->data[i]; 303 float radius = REFSTAR_MASK_CROSSTALK_MAG_SLOPE * (REFSTAR_MASK_CROSSTALK_MAG_MAX - ref->Mag); 304 psTrace("psastro.crosstalk",2,"Masking star on Chip %s @ (%f,%f) Magnitude: %f Radius %f\n", 305 psMetadataLookupStr(&status,readout->parent->parent->concepts,"CHIP.NAME"), 306 ref->chip->x,ref->chip->y,ref->Mag,radius); 307 // XXX for now, assume cell binning is 1x1 relative to chip 308 psastroMaskCircle (readoutMask->mask, crosstalkMaskValue, ref->chip->x, ref->chip->y, radius, radius); 309 } 310 } 311 284 312 // this probably should move into a function of its own: 285 313 {
Note:
See TracChangeset
for help on using the changeset viewer.
