Changeset 26237 for branches/eam_branches/20091113
- Timestamp:
- Nov 20, 2009, 4:15:17 PM (17 years ago)
- Location:
- branches/eam_branches/20091113
- Files:
-
- 14 edited
- 3 copied
-
. (modified) (1 prop)
-
ippconfig/gpc1/psastro.config (modified) (1 diff)
-
ippconfig/recipes/psastro.config (modified) (2 diffs)
-
ppStack/src/ppStackCleanup.c (modified) (3 diffs)
-
ppStack/src/ppStackCombineFinal.c (modified) (2 diffs)
-
ppStack/src/ppStackConvolve.c (modified) (2 diffs)
-
psModules/src/imcombine/pmSubtractionKernels.c (modified) (1 diff)
-
psModules/src/imcombine/pmSubtractionKernels.h (modified) (1 diff)
-
psModules/src/objects/Makefile.am (modified) (2 diffs)
-
psModules/src/objects/pmSourceGroups.c (copied) (copied from trunk/psModules/src/objects/pmSourceGroups.c )
-
psModules/src/objects/pmSourceGroups.h (copied) (copied from trunk/psModules/src/objects/pmSourceGroups.h )
-
psastro/src/Makefile.am (modified) (1 diff)
-
psastro/src/psastro.h (modified) (1 diff)
-
psastro/src/psastroLoadCrosstalk.c (copied) (copied from trunk/psastro/src/psastroLoadCrosstalk.c )
-
psastro/src/psastroMaskUpdates.c (modified) (5 diffs)
-
psphot/doc/efficiency.txt (modified) (1 prop)
-
psphot/src/psphotFake.c (modified) (1 prop)
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/ippconfig/gpc1/psastro.config
r26233 r26237 233 233 END 234 234 235 REFSTAR_MASK_CROSSTALK_MAG_SLOPE F32 3.44 236 REFSTAR_MASK_CROSSTALK_MAG_MAX F32 -14.47 237 CROSSTALK_MAX_MAG F32 20.0 238 CROSSTALK_MASK BOOL TRUE -
branches/eam_branches/20091113/ippconfig/recipes/psastro.config
r26232 r26237 154 154 END 155 155 156 REFSTAR_MASK_CROSSTALK_MAG_SLOPE F32 3.44 157 REFSTAR_MASK_CROSSTALK_MAG_MAX F32 -14.47 158 CROSSTALK_MAX_MAG F32 20.0 159 CROSSTALK_MASK BOOL FALSE 160 156 161 EXTRACT_MAX_MAG F32 -15.0 157 162 … … 217 222 PR_RECIPE METADATA 218 223 END 224 -
branches/eam_branches/20091113/ppStack/src/ppStackCleanup.c
r26117 r26237 9 9 #include "ppStack.h" 10 10 #include "ppStackLoop.h" 11 12 #define WCS_TOLERANCE 0.001 // Tolerance for WCS13 11 14 12 … … 34 32 35 33 // Close up 36 bool wcsDone = false; // Have we done the WCS?37 for (int i = 0; i < options->num; i++) {38 if (options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[i]) {39 continue;40 }41 42 ppStackThread *thread = stack->threads->data[0]; // Representative stack43 pmReadout *inRO = thread->readouts->data[i]; // Template readout44 if (inRO && !wcsDone) {45 // Copy astrometry over46 wcsDone = true;47 pmHDU *inHDU = pmHDUFromCell(inRO->parent); // Template HDU48 pmHDU *outHDU = pmHDUFromCell(options->outRO->parent); // Output HDU49 pmChip *outChip = options->outRO->parent->parent; // Output chip50 pmFPA *outFPA = outChip->parent; // Output FPA51 if (!outHDU || !inHDU) {52 psWarning("Unable to find HDU at FPA level to copy astrometry.");53 } else {54 if (!pmAstromReadWCS(outFPA, outChip, inHDU->header, 1.0)) {55 psErrorClear();56 psWarning("Unable to read WCS astrometry from input FPA.");57 wcsDone = false;58 } else {59 if (!outHDU->header) {60 outHDU->header = psMetadataAlloc();61 }62 if (!pmAstromWriteWCS(outHDU->header, outFPA, outChip, WCS_TOLERANCE)) {63 psErrorClear();64 psWarning("Unable to write WCS astrometry to output FPA.");65 wcsDone = false;66 }67 }68 }69 }70 }71 34 72 35 ppStackMemDump("cleanup"); … … 96 59 } 97 60 98 // Put version information into the header99 pmHDU *hdu = pmHDUFromCell(options->outRO->parent);100 if (!hdu) {101 psError(PS_ERR_UNKNOWN, false, "Unable to find HDU for output.");102 return false;103 }104 if (!hdu->header) {105 hdu->header = psMetadataAlloc();106 }107 ppStackVersionHeader(hdu->header);108 109 61 return true; 110 62 } -
branches/eam_branches/20091113/ppStack/src/ppStackCombineFinal.c
r26076 r26237 9 9 #include "ppStack.h" 10 10 #include "ppStackLoop.h" 11 12 #define WCS_TOLERANCE 0.001 // Tolerance for WCS 11 13 12 14 //#define TESTING // Enable test output … … 84 86 } 85 87 88 // Propagate WCS 89 bool wcsDone = false; // Have we done the WCS? 90 for (int i = 0; i < options->num && !wcsDone; i++) { 91 if (options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[i]) { 92 continue; 93 } 94 95 ppStackThread *thread = stack->threads->data[0]; // Representative stack 96 pmReadout *inRO = thread->readouts->data[i]; // Template readout 97 if (inRO && !wcsDone) { 98 // Copy astrometry over 99 wcsDone = true; 100 pmHDU *inHDU = pmHDUFromCell(inRO->parent); // Template HDU 101 pmHDU *outHDU = pmHDUFromCell(target->parent); // Output HDU 102 pmChip *outChip = target->parent->parent; // Output chip 103 pmFPA *outFPA = outChip->parent; // Output FPA 104 if (!outHDU || !inHDU) { 105 psWarning("Unable to find HDU at FPA level to copy astrometry."); 106 } else { 107 if (!pmAstromReadWCS(outFPA, outChip, inHDU->header, 1.0)) { 108 psErrorClear(); 109 psWarning("Unable to read WCS astrometry from input FPA."); 110 wcsDone = false; 111 } else { 112 if (!outHDU->header) { 113 outHDU->header = psMetadataAlloc(); 114 } 115 if (!pmAstromWriteWCS(outHDU->header, outFPA, outChip, WCS_TOLERANCE)) { 116 psErrorClear(); 117 psWarning("Unable to write WCS astrometry to output FPA."); 118 wcsDone = false; 119 } 120 } 121 } 122 } 123 } 124 125 // Put version information into the header 126 pmHDU *hdu = pmHDUFromCell(target->parent); 127 if (!hdu) { 128 psError(PS_ERR_UNKNOWN, false, "Unable to find HDU for output."); 129 return false; 130 } 131 if (!hdu->header) { 132 hdu->header = psMetadataAlloc(); 133 } 134 ppStackVersionHeader(hdu->header); 135 136 86 137 #ifdef TESTING 87 138 static int pass = 0; // Pass through -
branches/eam_branches/20091113/ppStack/src/ppStackConvolve.c
r26104 r26237 213 213 pmFPAview view; // View for output 214 214 view.chip = view.cell = view.readout = 0; 215 215 216 pmCell *outCell = pmFPAfileThisCell(config->files, &view, "PPSTACK.OUTPUT"); // Output cell 216 217 pmFPA *outFPA = outCell->parent->parent; // Output FPA 218 219 pmCell *unconvCell = pmFPAfileThisCell(config->files, &view, "PPSTACK.UNCONV"); // Unconvolved cell 220 pmFPA *unconvFPA = unconvCell->parent->parent; // Unconvolved FPA 221 217 222 pmConceptsAverageFPAs(outFPA, fpaList); 218 223 pmConceptsAverageCells(outCell, cellList, NULL, NULL, true); 224 225 pmConceptsAverageFPAs(unconvFPA, fpaList); 226 pmConceptsAverageCells(unconvCell, cellList, NULL, NULL, true); 227 219 228 psFree(fpaList); 220 229 psFree(cellList); … … 223 232 UPDATE_CONCEPT(outCell, "CELL.EXPOSURE", options->sumExposure); 224 233 UPDATE_CONCEPT(outCell, "CELL.DARKTIME", NAN); 234 235 UPDATE_CONCEPT(unconvFPA, "FPA.EXPOSURE", options->sumExposure); 236 UPDATE_CONCEPT(unconvCell, "CELL.EXPOSURE", options->sumExposure); 237 UPDATE_CONCEPT(unconvCell, "CELL.DARKTIME", NAN); 225 238 } 226 239 -
branches/eam_branches/20091113/psModules/src/imcombine/pmSubtractionKernels.c
r25999 r26237 250 250 int num = PS_SQR(2 * size + 1) - 1; // Number of basis functions 251 251 252 pmSubtractionKernels *kernels = pmSubtractionKernelsAlloc( num, PM_SUBTRACTION_KERNEL_POIS, size,252 pmSubtractionKernels *kernels = pmSubtractionKernelsAlloc(0, PM_SUBTRACTION_KERNEL_POIS, size, 253 253 spatialOrder, penalty, mode); // The kernels 254 254 psStringAppend(&kernels->description, "POIS(%d,%d,%.2e)", size, spatialOrder, penalty); -
branches/eam_branches/20091113/psModules/src/imcombine/pmSubtractionKernels.h
r25101 r26237 52 52 PS_ASSERT_PTR_NON_NULL(KERNELS, RETURNVALUE); \ 53 53 PS_ASSERT_STRING_NON_EMPTY((KERNELS)->description, RETURNVALUE); \ 54 PS_ASSERT_INT_ POSITIVE((KERNELS)->num, RETURNVALUE); \54 PS_ASSERT_INT_NONNEGATIVE((KERNELS)->num, RETURNVALUE); \ 55 55 PS_ASSERT_VECTOR_NON_NULL((KERNELS)->u, RETURNVALUE); \ 56 56 PS_ASSERT_VECTOR_NON_NULL((KERNELS)->v, RETURNVALUE); \ -
branches/eam_branches/20091113/psModules/src/objects/Makefile.am
r25754 r26237 60 60 pmSourceMatch.c \ 61 61 pmDetEff.c \ 62 pmSourceGroups.c \ 62 63 models/pmModel_GAUSS.c \ 63 64 models/pmModel_PGAUSS.c \ … … 96 97 pmSourceMatch.h \ 97 98 pmDetEff.h \ 99 pmSourceGroups.h \ 98 100 models/pmModel_GAUSS.h \ 99 101 models/pmModel_PGAUSS.h \ -
branches/eam_branches/20091113/psastro/src/Makefile.am
r24645 r26237 90 90 psastroMaskUtils.c \ 91 91 psastroChooseGlintStars.c \ 92 psastroLoadCrosstalk.c \ 92 93 psastroLoadGlints.c \ 93 94 psastroLoadGhosts.c \ -
branches/eam_branches/20091113/psastro/src/psastro.h
r26223 r26237 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); -
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 { -
branches/eam_branches/20091113/psphot/doc/efficiency.txt
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/20091113/psphot/src/psphotFake.c
- Property svn:mergeinfo changed (with no actual effect on merging)
Note:
See TracChangeset
for help on using the changeset viewer.
