Changeset 38058
- Timestamp:
- Mar 29, 2015, 6:08:31 AM (11 years ago)
- Location:
- branches/eam_branches/ipp-20150112/psModules/src
- Files:
-
- 17 edited
-
config (modified) (1 prop)
-
config/Makefile.am (modified) (1 diff)
-
config/pmConfigRecipes.c (modified) (1 diff)
-
detrend/pmDetrendDB.c (modified) (1 diff)
-
objects (modified) (2 props)
-
objects/Makefile.am (modified) (3 diffs)
-
objects/mksource.pl (modified) (1 diff)
-
objects/pmFootprintAssignPeaks.c (modified) (1 diff)
-
objects/pmModelFuncs.h (modified) (1 diff)
-
objects/pmSourceIO.c (modified) (6 diffs)
-
objects/pmSourceIO.h (modified) (1 diff)
-
objects/pmSourceIO_CMF.c.in (modified) (8 diffs, 1 prop)
-
objects/pmSourceIO_PS1_CAL_0.c (modified) (1 diff)
-
objects/pmSourceIO_PS1_DEV_1.c (modified) (1 diff)
-
objects/pmSourceLensing.c (modified) (2 diffs)
-
objects/pmSourceLensing.h (modified) (1 diff)
-
objects/pmSourceOutputs.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150112/psModules/src/config
- Property svn:ignore
-
old new 8 8 pmErrorCodes.h 9 9 pmVersionDefinitions.h 10 pmVersionDefinitions.h.tmp
-
- Property svn:ignore
-
branches/eam_branches/ipp-20150112/psModules/src/config/Makefile.am
r26682 r38058 1 1 noinst_LTLIBRARIES = libpsmodulesconfig.la 2 3 if HAVE_SVNVERSION4 PSMODULES_VERSION=`$(SVNVERSION) ../..`5 else6 PSMODULES_VERSION="UNKNOWN"7 endif8 9 if HAVE_SVN10 PSMODULES_BRANCH=`$(SVN) info ../.. | $(SED) -n -e '/URL:/ h' -e '/Repository Root:/ { x; H; x; s|Repository Root: \(.*\)\nURL: \1\(.*\)|\2| ; s|^/|| ; s|/[a-zA-Z]*/src.*|| ; p }'`11 PSMODULES_SOURCE=`$(SVN) info | $(SED) -n -e 's/Repository UUID: // p'`12 else13 PSMODULES_BRANCH="UNKNOWN"14 PSMODULES_SOURCE="UNKNOWN"15 endif16 2 17 3 # Force recompilation of pmVersion.c, since it gets the version information 18 4 pmVersion.c: pmVersionDefinitions.h 19 5 pmVersionDefinitions.h: pmVersionDefinitions.h.in FORCE 20 -$(RM) pmVersionDefinitions.h 21 $(SED) -e "s|@PSMODULES_VERSION@|\"$(PSMODULES_VERSION)\"|" -e "s|@PSMODULES_BRANCH@|\"$(PSMODULES_BRANCH)\"|" -e "s|@PSMODULES_SOURCE@|\"$(PSMODULES_SOURCE)\"|" pmVersionDefinitions.h.in > pmVersionDefinitions.h 6 pslib-setsvnversion.pl PSMODULES pmVersionDefinitions.h.in pmVersionDefinitions.h 22 7 FORCE: ; 23 8 -
branches/eam_branches/ipp-20150112/psModules/src/config/pmConfigRecipes.c
r23688 r38058 228 228 } 229 229 psFree (words); 230 assert (valid); // flag may be: -D, -Df, -Di, -Db230 psAssert (valid, "invalid flag: may be: -D, -Df, -Di, -Db\n"); 231 231 232 232 psArgumentRemove (argNum, argc, argv); -
branches/eam_branches/ipp-20150112/psModules/src/detrend/pmDetrendDB.c
r37837 r38058 356 356 psTrace("psModules.detrend", 5, "detrend file: %s\n", result); 357 357 358 // XXX: A somewhat hacked bit of code to force the analysis to use a specific version of the detrend file 358 359 char *is_nebulous = strstr(result,"neb://"); 359 360 if (is_nebulous) { // This file matches the nebulous string 360 361 psString truncated = psStringCopy(is_nebulous + 6); 361 362 // printf("A: %s %s\n",result,truncated); 363 362 364 psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes,"PPIMAGE"); 363 psMetadata *detloc = psMetadataLookupMetadata(NULL, recipe, "DETREND.LOCATIONS"); 365 psMetadata *detloc = psMetadataLookupMetadata(&status, recipe, "DETREND.LOCATIONS"); 366 364 367 if (detloc) { // This exists, so we have the information. 365 psString location = psMetadataLookupStr( NULL, detloc,classID);368 psString location = psMetadataLookupStr(&status, detloc, classID); 366 369 // printf("B: %s %s\n", classID,location); 367 370 if (location) { // Found a location -
branches/eam_branches/ipp-20150112/psModules/src/objects
- Property svn:ignore
-
old new 21 21 pmSourceIO_CMF_PS1_DV3.c 22 22 pmSourceIO_CMF_PS1_DV4.c 23 23 pmSourceIO_CMF_PS1_DV5.c
-
- Property svn:mergeinfo set to
- Property svn:ignore
-
branches/eam_branches/ipp-20150112/psModules/src/objects/Makefile.am
r37325 r38058 58 58 pmSourceIO_CMF_PS1_DV3.c \ 59 59 pmSourceIO_CMF_PS1_DV4.c \ 60 pmSourceIO_CMF_PS1_DV5.c \ 60 61 pmSourceIO_MatchedRefs.c \ 61 62 pmSourcePlots.c \ … … 156 157 pmSourceIO_CMF_PS1_DV3.c \ 157 158 pmSourceIO_CMF_PS1_DV4.c \ 159 pmSourceIO_CMF_PS1_DV5.c \ 158 160 pmSourceIO_CMF_PS1_SV1.c \ 159 161 pmSourceIO_CMF_PS1_SV2.c \ … … 188 190 mksource.pl pmSourceIO_CMF.c.in PS1_DV4 pmSourceIO_CMF_PS1_DV4.c 189 191 192 pmSourceIO_CMF_PS1_DV5.c : pmSourceIO_CMF.c.in mksource.pl 193 mksource.pl pmSourceIO_CMF.c.in PS1_DV5 pmSourceIO_CMF_PS1_DV5.c 194 190 195 pmSourceIO_CMF_PS1_SV1.c : pmSourceIO_CMF.c.in mksource.pl 191 196 mksource.pl pmSourceIO_CMF.c.in PS1_SV1 pmSourceIO_CMF_PS1_SV1.c -
branches/eam_branches/ipp-20150112/psModules/src/objects/mksource.pl
r37325 r38058 25 25 "PS1_DV3", 3, 26 26 "PS1_DV4", 4, 27 "PS1_DV5", 5, 27 28 ); 28 29 %cmfmodes_sv = ("PS1_SV1", 1, -
branches/eam_branches/ipp-20150112/psModules/src/objects/pmFootprintAssignPeaks.c
r31332 r38058 56 56 const int y = peak->y - row0; 57 57 58 if (ids) { assert (x >= 0 && x < numCols && y >= 0 && y < numRows);}58 if (ids) { psAssert (x >= 0 && x < numCols && y >= 0 && y < numRows, "out of range");} 59 59 int id = ids ? ids->data.S32[y][x] : 0; 60 60 -
branches/eam_branches/ipp-20150112/psModules/src/objects/pmModelFuncs.h
r36860 r38058 36 36 37 37 typedef enum { 38 PM_MODEL_STATUS_NONE = 0x000, ///< model fit not yet attempted, no other info 39 PM_MODEL_STATUS_FITTED = 0x001, ///< model fit completed 40 PM_MODEL_STATUS_NONCONVERGE = 0x002, ///< model fit did not converge 41 PM_MODEL_STATUS_OFFIMAGE = 0x004, ///< model fit drove out of range 42 PM_MODEL_STATUS_BADARGS = 0x008, ///< model fit called with invalid args 43 PM_MODEL_STATUS_LIMITS = 0x010, ///< model parameters hit limits 44 PM_MODEL_STATUS_WEAK_FIT = 0x020, ///< model fit met loose tolerance, but not tight tolerance 45 PM_MODEL_STATUS_NAN_CHISQ = 0x040, ///< model fit failed with a NAN chisq 46 PM_MODEL_SERSIC_PCM_FAIL_GUESS = 0x080, ///< sersic model fit failed on the initial moments-based guess 47 PM_MODEL_SERSIC_PCM_FAIL_GRID = 0x100, ///< sersic model fit failed on the grid search 48 PM_MODEL_PCM_FAIL_GUESS = 0x200, ///< non-sersic model fit failed on the initial moments-based guess 49 PM_MODEL_BEST_FIT = 0x400, ///< this model was the best fit and was subtracted 38 PM_MODEL_STATUS_NONE = 0x0000, ///< model fit not yet attempted, no other info 39 PM_MODEL_STATUS_FITTED = 0x0001, ///< model fit completed 40 PM_MODEL_STATUS_NONCONVERGE = 0x0002, ///< model fit did not converge 41 PM_MODEL_STATUS_OFFIMAGE = 0x0004, ///< model fit drove out of range 42 PM_MODEL_STATUS_BADARGS = 0x0008, ///< model fit called with invalid args 43 PM_MODEL_STATUS_LIMITS = 0x0010, ///< model parameters hit limits 44 PM_MODEL_STATUS_WEAK_FIT = 0x0020, ///< model fit met loose tolerance, but not tight tolerance 45 PM_MODEL_STATUS_NAN_CHISQ = 0x0040, ///< model fit failed with a NAN chisq 46 PM_MODEL_SERSIC_PCM_FAIL_GUESS = 0x0080, ///< sersic model fit failed on the initial moments-based guess 47 PM_MODEL_SERSIC_PCM_FAIL_GRID = 0x0100, ///< sersic model fit failed on the grid search 48 PM_MODEL_PCM_FAIL_GUESS = 0x0200, ///< non-sersic model fit failed on the initial moments-based guess 49 PM_MODEL_BEST_FIT = 0x0400, ///< this model was the best fit and was subtracted 50 PM_MODEL_STATUS_NAN_SHAPE = 0x0800, ///< model ellipse parameters do not transform to valid ellipse 51 PM_MODEL_STATUS_NAN_SHAPE_ERR = 0x1000, ///< model ellipse parameters errors do not transform to valid ellipse 52 PM_MODEL_STATUS_FAIL_SHAPE_ERR = 0x2000, ///< could not find an MC solution for ellipse parameter errors 50 53 } pmModelStatus; 51 54 -
branches/eam_branches/ipp-20150112/psModules/src/objects/pmSourceIO.c
r37325 r38058 607 607 PM_SOURCES_WRITE("PS1_DV3", CMF_PS1_DV3); 608 608 PM_SOURCES_WRITE("PS1_DV4", CMF_PS1_DV4); 609 PM_SOURCES_WRITE("PS1_DV5", CMF_PS1_DV5); 609 610 610 611 psFree (outhead); … … 1130 1131 PM_SOURCES_READ_PSF("PS1_DV3", CMF_PS1_DV3); 1131 1132 PM_SOURCES_READ_PSF("PS1_DV4", CMF_PS1_DV4); 1133 PM_SOURCES_READ_PSF("PS1_DV5", CMF_PS1_DV5); 1132 1134 1133 1135 if (!sources) { … … 1419 1421 PM_SOURCES_READ_XSRC("PS1_DV3", CMF_PS1_DV3); 1420 1422 PM_SOURCES_READ_XSRC("PS1_DV4", CMF_PS1_DV4); 1423 PM_SOURCES_READ_XSRC("PS1_DV5", CMF_PS1_DV5); 1421 1424 } 1422 1425 psFree(tableHeader); … … 1462 1465 PM_SOURCES_READ_XFIT("PS1_DV3", CMF_PS1_DV3); 1463 1466 PM_SOURCES_READ_XFIT("PS1_DV4", CMF_PS1_DV4); 1467 PM_SOURCES_READ_XFIT("PS1_DV5", CMF_PS1_DV5); 1464 1468 } 1465 1469 psFree(tableHeader); … … 1504 1508 PM_SOURCES_READ_XRAD("PS1_DV3", CMF_PS1_DV3); 1505 1509 PM_SOURCES_READ_XRAD("PS1_DV4", CMF_PS1_DV4); 1510 PM_SOURCES_READ_XRAD("PS1_DV5", CMF_PS1_DV5); 1506 1511 } 1507 1512 psFree(tableHeader); … … 1546 1551 PM_SOURCES_READ_XGAL("PS1_DV3", CMF_PS1_DV3); 1547 1552 PM_SOURCES_READ_XGAL("PS1_DV4", CMF_PS1_DV4); 1553 PM_SOURCES_READ_XGAL("PS1_DV5", CMF_PS1_DV5); 1548 1554 } 1549 1555 psFree(tableHeader); -
branches/eam_branches/ipp-20150112/psModules/src/objects/pmSourceIO.h
r37325 r38058 46 46 MK_PROTO(CMF_PS1_DV3); 47 47 MK_PROTO(CMF_PS1_DV4); 48 MK_PROTO(CMF_PS1_DV5); 48 49 49 50 int pmSourceGetDophotType (pmSource *source); -
branches/eam_branches/ipp-20150112/psModules/src/objects/pmSourceIO_CMF.c.in
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20150326/psModules/src/objects/pmSourceIO_CMF.c.in (added) merged: 38018,38031 /trunk/psModules/src/objects/pmSourceIO_CMF.c.in merged: 37904,37928,37964,38038
r37837 r38058 197 197 @>PS1_V4@ psMetadataAdd (row, PS_LIST_TAIL, "LENS_E2_SM_OBJ", PS_DATA_F32, "smear polarizability element (objects)", source->lensingOBJ->smear->e2); 198 198 } 199 200 199 if (source->lensingOBJ && source->lensingOBJ->shear) { 201 200 @>PS1_V4@ psMetadataAdd (row, PS_LIST_TAIL, "LENS_X11_SH_OBJ", PS_DATA_F32, "shear polarizability element (objects)", source->lensingOBJ->shear->X11); … … 205 204 @>PS1_V4@ psMetadataAdd (row, PS_LIST_TAIL, "LENS_E2_SH_OBJ", PS_DATA_F32, "shear polarizability element (objects)", source->lensingOBJ->shear->e2); 206 205 } 206 if (false && source->lensingOBJ) { 207 // do not bother to save these as they are equivalent to Mxx,Mxy,Myy above 208 @>PS1_V4@ psMetadataAdd (row, PS_LIST_TAIL, "LENS_E1_PSF", PS_DATA_F32, "shear polarizability element (objects)", source->lensingOBJ->e1); 209 @>PS1_V4@ psMetadataAdd (row, PS_LIST_TAIL, "LENS_E2_PSF", PS_DATA_F32, "shear polarizability element (objects)", source->lensingOBJ->e2); 210 } 207 211 208 212 if (source->lensingPSF && source->lensingPSF->smear) { … … 213 217 @>PS1_V4@ psMetadataAdd (row, PS_LIST_TAIL, "LENS_E2_SM_PSF", PS_DATA_F32, "smear polarizability element (objects)", source->lensingPSF->smear->e2); 214 218 } 215 216 219 if (source->lensingPSF && source->lensingPSF->shear) { 217 220 @>PS1_V4@ psMetadataAdd (row, PS_LIST_TAIL, "LENS_X11_SH_PSF", PS_DATA_F32, "shear polarizability element (objects)", source->lensingPSF->shear->X11); … … 221 224 @>PS1_V4@ psMetadataAdd (row, PS_LIST_TAIL, "LENS_E2_SH_PSF", PS_DATA_F32, "shear polarizability element (objects)", source->lensingPSF->shear->e2); 222 225 } 226 if (source->lensingPSF) { 227 @>PS1_V4@ psMetadataAdd (row, PS_LIST_TAIL, "LENS_E1_PSF", PS_DATA_F32, "shear polarizability element (objects)", source->lensingPSF->e1); 228 @>PS1_V4@ psMetadataAdd (row, PS_LIST_TAIL, "LENS_E2_PSF", PS_DATA_F32, "shear polarizability element (objects)", source->lensingPSF->e2); 229 } 223 230 224 231 // if lensing params exist also include the backmapped chipID and chip coordinates … … 240 247 @>PS1_V3@ psMetadataAdd (row, PS_LIST_TAIL, "SKY_LIMIT_FLUX", PS_DATA_F32, "Flux / pix where object hits sky", source->skyFlux); 241 248 @>PS1_V3@ psMetadataAdd (row, PS_LIST_TAIL, "SKY_LIMIT_SLOPE", PS_DATA_F32, "d(Flux/pix)/dRadius where object hits sky", source->skySlope); 249 250 @>PS1_DV4@ psMetadataAdd (row, PS_LIST_TAIL, "SRC_CHIP_NUM", PS_DATA_S16, "id of warp input chip", source->chipNum); 251 @>PS1_DV4@ psMetadataAdd (row, PS_LIST_TAIL, "SRC_CHIP_X", PS_DATA_S16, "x coord in warp input chip", source->chipX); 252 @>PS1_DV4@ psMetadataAdd (row, PS_LIST_TAIL, "SRC_CHIP_Y", PS_DATA_S16, "y coord in warp input chip", source->chipY); 253 @>PS1_DV4@ psMetadataAdd (row, PS_LIST_TAIL, "PADDING3", PS_DATA_S16, "more padding", 0); 242 254 243 255 @PS1_DV?@ psMetadataAdd (row, PS_LIST_TAIL, "DIFF_NPOS", PS_DATA_S32, "nPos (n pix > 3 sigma)", diffStats.nGood); … … 481 493 @>PS1_V4@ source->lensingPSF->shear->e1 = psMetadataLookupF32 (&status, row, "LENS_E1_SH_PSF"); 482 494 @>PS1_V4@ source->lensingPSF->shear->e2 = psMetadataLookupF32 (&status, row, "LENS_E2_SH_PSF"); 495 @>PS1_V4@ source->lensingPSF->e1 = psMetadataLookupF32 (&status, row, "LENS_E1_PSF"); 496 @>PS1_V4@ source->lensingPSF->e2 = psMetadataLookupF32 (&status, row, "LENS_E2_PSF"); 483 497 } 484 498 … … 1238 1252 } 1239 1253 1240 // XXX : make this depend on what is in the cmf1241 if ( 0) {1254 // NOTE: we no longer write out the covariance matrix 1255 if (false) { 1242 1256 // read the covariance matrix 1243 1257 int nparams = model->params->n; … … 1252 1266 model->covar = covar; 1253 1267 } 1268 1269 // we are only saving the values stored in dPAR[SXX,etc] 1270 dPAR[PM_PAR_SXX] = psMetadataLookupF32(&status, row, "EXT_WIDTH_MAJ_ERR"); 1271 dPAR[PM_PAR_SYY] = psMetadataLookupF32(&status, row, "EXT_WIDTH_MIN_ERR"); 1272 dPAR[PM_PAR_SXY] = psMetadataLookupF32(&status, row, "EXT_THETA_ERR"); 1273 1274 // other parameters that we need to read 1275 PAR[PM_PAR_SKY] = psMetadataLookupF32(&status, row, "SKY_EXT"); 1254 1276 1255 1277 if (modelType == extModelType) { - Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20150112/psModules/src/objects/pmSourceIO_PS1_CAL_0.c
r36866 r38058 376 376 psVector *radialBinsLower = psMetadataLookupPtr (&status, recipe, "RADIAL.ANNULAR.BINS.LOWER"); 377 377 psVector *radialBinsUpper = psMetadataLookupPtr (&status, recipe, "RADIAL.ANNULAR.BINS.UPPER"); 378 assert (radialBinsLower->n == radialBinsUpper->n);378 psAssert (radialBinsLower->n == radialBinsUpper->n, "upper and lower bins must match"); 379 379 380 380 // we write out all sources, regardless of quality. the source flags tell us the state -
branches/eam_branches/ipp-20150112/psModules/src/objects/pmSourceIO_PS1_DEV_1.c
r36866 r38058 322 322 psVector *radialBinsLower = psMetadataLookupPtr (&status, recipe, "RADIAL.ANNULAR.BINS.LOWER"); 323 323 psVector *radialBinsUpper = psMetadataLookupPtr (&status, recipe, "RADIAL.ANNULAR.BINS.UPPER"); 324 assert (radialBinsLower->n == radialBinsUpper->n);324 psAssert (radialBinsLower->n == radialBinsUpper->n, "upper and lower bins must match"); 325 325 326 326 // we write out all sources, regardless of quality. the source flags tell us the state -
branches/eam_branches/ipp-20150112/psModules/src/objects/pmSourceLensing.c
r36623 r38058 55 55 tmp->smear = NULL; 56 56 tmp->shear = NULL; 57 tmp->e1 = NAN; 58 tmp->e2 = NAN; 57 59 58 60 return tmp; … … 105 107 smear->X12 = R*0.5*s4*(moments->Mxxxy - moments->Mxyyy); 106 108 107 smear->e1 = R*(s2*(moments->Myy - moments->Mxx) + 0.25*s4 * (moments->M yyyy - moments->Mxxxx));109 smear->e1 = R*(s2*(moments->Myy - moments->Mxx) + 0.25*s4 * (moments->Mxxxx - moments->Myyyy)); 108 110 109 111 smear->e2 = R*(0.5*s4*(moments->Mxxxy + moments->Mxyyy) - 2.0*s2*moments->Mxy); -
branches/eam_branches/ipp-20150112/psModules/src/objects/pmSourceLensing.h
r36623 r38058 25 25 pmLensingPars *smear; 26 26 pmLensingPars *shear; 27 float e1; 28 float e2; 27 29 } pmSourceLensing; 28 30 -
branches/eam_branches/ipp-20150112/psModules/src/objects/pmSourceOutputs.c
r36860 r38058 60 60 // we need a measure of the image quality (FWHM) for this image, in order to get the positional errors 61 61 *fwhmMajor = psMetadataLookupF32(&status1, readout->analysis, "FWHM_MAJ"); 62 if (!status1) { 63 *fwhmMajor = psMetadataLookupF32(&status1, readout->analysis, "IQ_FW1"); 64 if (!status1) { 65 *fwhmMajor = 5.0; // XXX just a guess! 66 } 67 } 62 if (status1) goto got_major; 63 64 *fwhmMajor = psMetadataLookupF32(&status1, header, "FWHM_MAJ"); 65 if (status1) goto got_major; 66 67 *fwhmMajor = psMetadataLookupF32(&status1, readout->analysis, "IQ_FW1"); 68 if (status1) goto got_major; 69 70 *fwhmMajor = psMetadataLookupF32(&status1, header, "IQ_FW1"); 71 if (status1) goto got_major; 72 73 *fwhmMajor = 5.0; // XXX just a guess! 74 75 got_major: 76 68 77 *fwhmMinor = psMetadataLookupF32(&status1, readout->analysis, "FWHM_MIN"); 69 if (!status1) { 70 *fwhmMinor = psMetadataLookupF32(&status1, readout->analysis, "IQ_FW2"); 71 if (!status1) { 72 *fwhmMinor = 5.0; // XXX just a guess! 73 } 74 } 75 78 if (status1) goto got_minor; 79 *fwhmMinor = psMetadataLookupF32(&status1, header, "FWHM_MIN"); 80 if (status1) goto got_minor; 81 82 *fwhmMinor = psMetadataLookupF32(&status1, readout->analysis, "IQ_FW2"); 83 if (status1) goto got_minor; 84 *fwhmMinor = psMetadataLookupF32(&status1, header, "IQ_FW2"); 85 if (status1) goto got_minor; 86 87 *fwhmMinor = 5.0; // XXX just a guess! 88 89 got_minor: 76 90 return true; 77 91
Note:
See TracChangeset
for help on using the changeset viewer.
