Changeset 31154 for trunk/psphot/src/psphotRoughClass.c
- Timestamp:
- Apr 4, 2011, 1:12:39 PM (15 years ago)
- Location:
- trunk/psphot
- Files:
-
- 2 edited
-
. (modified) (2 props)
-
src/psphotRoughClass.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot
- Property svn:ignore
-
old new 19 19 psphot-config 20 20 Doxyfile 21 a.out.dSYM
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
trunk/psphot/src/psphotRoughClass.c
r29936 r31154 63 63 } 64 64 65 int NstarsInClump = psMetadataLookupS32 (&status, readout->analysis, "PSF_CLUMP_NSTARS"); 66 // if NstarsInClump is not defined, use the user-selected option: 67 if (!status) { 68 NstarsInClump = 1000; 69 } 70 71 int ScaleForClump = 1; 72 if (NstarsInClump >= 12) ScaleForClump = 2; // 4 cells 73 if (NstarsInClump >= 27) ScaleForClump = 3; // 9 cells 74 if (NstarsInClump >= 48) ScaleForClump = 4; // 16 cells 75 if (NstarsInClump > 75) ScaleForClump = 5; // 25 cells 76 65 77 // we make this measurement on a NxM grid of regions across the readout 66 78 int NX = psMetadataLookupS32 (&status, recipe, "PSF_CLUMP_NX"); CHECK_STATUS (status, "PSF_CLUMP_NX"); 67 79 int NY = psMetadataLookupS32 (&status, recipe, "PSF_CLUMP_NY"); CHECK_STATUS (status, "PSF_CLUMP_NY"); 68 int dX = readout->image->numCols / NX; 69 int dY = readout->image->numRows / NY; 80 81 int NXuse, NYuse; 82 83 ScaleForClump = PS_MIN(ScaleForClump, PS_MAX(NX, NY)); 84 if (NX > NY) { 85 NXuse = ScaleForClump; 86 NYuse = (int) (ScaleForClump * (NY / NX) + 0.5); 87 } else { 88 NYuse = ScaleForClump; 89 NXuse = (int) (ScaleForClump * (NY / NX) + 0.5); 90 } 91 92 psLogMsg ("psphot", 4, "With %d stars, using %d x %d grid for PSF clump\n", NstarsInClump, NXuse, NYuse); 93 94 int dX = readout->image->numCols / NXuse; 95 int dY = readout->image->numRows / NYuse; 70 96 71 97 int nRegion = 0; 72 for (int ix = 0; ix < NX ; ix ++) {73 for (int iy = 0; iy < NY ; iy ++) {98 for (int ix = 0; ix < NXuse; ix ++) { 99 for (int iy = 0; iy < NYuse; iy ++) { 74 100 75 101 psRegion *region = psRegionAlloc (ix*dX, (ix + 1)*dX, iy*dY, (iy + 1)*dY); … … 181 207 return false; 182 208 } 183 psLogMsg ("psphot", 3, "psf clump X, Y: %f, %f\n", psfClump.X, psfClump.Y); 184 psLogMsg ("psphot", 3, "psf clump DX, DY: %f, %f\n", psfClump.dX, psfClump.dY); 209 psLogMsg ("psphot", 3, "psf clump X, Y: %f, %f : DX, DY: %f, %f : nStars %d of %d\n", psfClump.X, psfClump.Y, psfClump.dX, psfClump.dY, psfClump.nStars, psfClump.nTotal); 185 210 186 211 // get basic parameters, or set defaults
Note:
See TracChangeset
for help on using the changeset viewer.
