Changeset 34052 for branches/eam_branches/ipp-20120601
- Timestamp:
- Jun 22, 2012, 6:52:56 AM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120601
- Files:
-
- 21 edited
-
Nebulous/nebclient/tests/tap/src/tap.c (modified) (3 diffs)
-
ippTools/src/pstamptool.c (modified) (5 diffs)
-
ppBackground/src/ppBackgroundExit.c (modified) (1 diff)
-
ppStack/src/ppStackConvolve.c (modified) (2 diffs)
-
ppStack/src/ppStackFinish.c (modified) (1 diff)
-
ppStack/src/ppStackTarget.c (modified) (1 diff)
-
ppSub/src/ppSubExit.c (modified) (1 diff)
-
ppSub/src/ppSubMatchPSFs.c (modified) (2 diffs)
-
psLib/src/imageops/psImageInterpolate.c (modified) (2 diffs)
-
psLib/src/imageops/psImageStructManip.c (modified) (1 diff)
-
psLib/test/tap/src/tap.c (modified) (3 diffs)
-
psModules/src/detrend/pmFringeStats.c (modified) (1 diff)
-
psModules/src/detrend/pmNonLinear.c (modified) (2 diffs)
-
psModules/src/extras/psPipe.c (modified) (1 diff)
-
psModules/src/objects/models/pmModel_PGAUSS.c (modified) (2 diffs)
-
psModules/src/objects/models/pmModel_PS1_V1.c (modified) (2 diffs)
-
psModules/src/objects/models/pmModel_QGAUSS.c (modified) (2 diffs)
-
psModules/src/objects/models/pmModel_RGAUSS.c (modified) (2 diffs)
-
psModules/src/objects/pmSourceIO_CMP.c (modified) (1 diff)
-
psModules/test/tap/src/tap.c (modified) (3 diffs)
-
pswarp/src/pswarpExit.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120601/Nebulous/nebclient/tests/tap/src/tap.c
r12605 r34052 87 87 if(test_name != NULL) { 88 88 va_start(ap, test_name); 89 vasprintf(&local_test_name, test_name, ap); 89 int status = vasprintf(&local_test_name, test_name, ap); 90 if (status) {/* warning? */} 90 91 va_end(ap); 91 92 … … 303 304 304 305 va_start(ap, fmt); 305 asprintf(&skip_msg, fmt, ap); 306 int status = asprintf(&skip_msg, fmt, ap); 307 if (status) {/* warning? */} 306 308 va_end(ap); 307 309 … … 328 330 329 331 va_start(ap, fmt); 330 vasprintf(&todo_msg, fmt, ap); 332 int status = vasprintf(&todo_msg, fmt, ap); 333 if (status) {/* warning? */} 331 334 va_end(ap); 332 335 -
branches/eam_branches/ipp-20120601/ippTools/src/pstamptool.c
r34051 r34052 1046 1046 // it's an allowed arg because add_poll_args adds it 1047 1047 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 1048 if (limit) { /* do something?? */ 1048 if (limit) { /* do something?? */ } 1049 1049 1050 1050 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); … … 1055 1055 psString faultClause = psStringCopy(""); 1056 1056 if (!fault) { 1057 psStringAppend(&faultClause, " \nAND (pstampJob.fault < %d)", PSTAMP_FIRST_ERROR_CODE);1057 psStringAppend(&faultClause, " \nAND (pstampJob.fault < %d)", PSTAMP_FIRST_ERROR_CODE); 1058 1058 } 1059 1059 1060 1060 psString query = pxDataGet("pstamptool_revertjob.sql"); 1061 1061 if (!psListLength(where->list) && !all) { 1062 psFree(where);1063 psError(PXTOOLS_ERR_CONFIG, false, "search parameters or -all are required");1064 return false;1062 psFree(where); 1063 psError(PXTOOLS_ERR_CONFIG, false, "search parameters or -all are required"); 1064 return false; 1065 1065 } 1066 1066 if (psListLength(where->list)) { 1067 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);1068 psStringAppend(&query, " AND %s", whereClause);1069 psFree(whereClause);1067 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 1068 psStringAppend(&query, " AND %s", whereClause); 1069 psFree(whereClause); 1070 1070 } 1071 1071 psFree(where); … … 1075 1075 psString faultCountClause = NULL; 1076 1076 if (clear_fault_count) { 1077 psStringAppend(&faultCountClause, "\n, pstampJob.fault_count = 0");1077 psStringAppend(&faultCountClause, "\n, pstampJob.fault_count = 0"); 1078 1078 } else { 1079 psStringAppend(&query, " AND pstampJob.fault_count < %d", PSTAMP_MAX_JOB_FAULTS);1079 psStringAppend(&query, " AND pstampJob.fault_count < %d", PSTAMP_MAX_JOB_FAULTS); 1080 1080 } 1081 1081 1082 1082 if (!p_psDBRunQueryF(config->dbh, query, faultCountClause, faultClause)) { 1083 psFree(faultCountClause);1084 psFree(faultClause);1085 psFree(query);1086 psError(PS_ERR_UNKNOWN, false, "database error");1087 return false;1083 psFree(faultCountClause); 1084 psFree(faultClause); 1085 psFree(query); 1086 psError(PS_ERR_UNKNOWN, false, "database error"); 1087 return false; 1088 1088 } 1089 1089 … … 1094 1094 return true; 1095 1095 } 1096 1096 1097 static bool addprojectMode(pxConfig *config) 1097 1098 { … … 1107 1108 1108 1109 if (!pstampProjectInsert(config->dbh, 1109 0,1110 name,1111 state,1112 imagedb,1113 dvodb,1114 camera,1115 telescope,1116 need_magic1117 )) {1110 0, 1111 name, 1112 state, 1113 imagedb, 1114 dvodb, 1115 camera, 1116 telescope, 1117 need_magic 1118 )) { 1118 1119 psError(PS_ERR_UNKNOWN, false, "database error"); 1119 1120 return false; -
branches/eam_branches/ipp-20120601/ppBackground/src/ppBackgroundExit.c
r28288 r34052 10 10 } 11 11 12 psErrorCode errorCode = psErrorCodeLast(); // Error code 12 // gcc -Wswitch complains here if err is declared as type psErrorCode 13 // the collection of ps*ErrorCode values are enums defined separately for 14 // each module (psphot, pswarp, etc). the lowest type, psErrorCode is only the base set and does 15 // not include the possible psphot values 16 17 // for now, to get around this, we just use an int for the switch 18 19 // psErrorCode errorCode = psErrorCodeLast(); // Error code 20 int errorCode = psErrorCodeLast(); // Error code 21 13 22 if (errorCode != PS_ERR_NONE) { 14 23 pmFPAfileFreeSetStrict(false); -
branches/eam_branches/ipp-20120601/ppStack/src/ppStackConvolve.c
r32170 r34052 7 7 psMetadataItem *item = psMetadataLookup(SOURCE->concepts, NAME); \ 8 8 psAssert(item, "Concept should be present"); \ 9 psAssert(item->type == PS_ TYPE_F32, "Concept should be F32"); \9 psAssert(item->type == PS_DATA_F32, "Concept should be F32"); \ 10 10 item->data.F32 = VALUE; \ 11 11 } … … 101 101 if (!ppStackMatch(readout, target, options, i, config)) { 102 102 // XXX many things can cause a failure of ppStackMatch -- should some be handled differently? 103 psErrorCode error = psErrorCodeLast(); // Error code 103 104 // gcc -Wswitch complains here if err is declared as type psErrorCode 105 // the collection of ps*ErrorCode values are enums defined separately for 106 // each module (psphot, pswarp, etc). the lowest type, psErrorCode is only the base set and does 107 // not include the possible psphot values 108 109 // for now, to get around this, we just use an int for the switch 110 111 // psErrorCode error = psErrorCodeLast(); // Error code 112 int error = psErrorCodeLast(); // Error code 104 113 switch (error) { 105 114 // Fatal errors -
branches/eam_branches/ipp-20120601/ppStack/src/ppStackFinish.c
r30620 r34052 45 45 } 46 46 47 psErrorCode errorCode = psErrorCodeLast(); // Error code 47 // gcc -Wswitch complains here if err is declared as type psErrorCode 48 // the collection of ps*ErrorCode values are enums defined separately for 49 // each module (psphot, pswarp, etc). the lowest type, psErrorCode is only the base set and does 50 // not include the possible psphot values 51 52 // for now, to get around this, we just use an int for the switch 53 54 // psErrorCode errorCode = psErrorCodeLast(); // Error code 55 int errorCode = psErrorCodeLast(); // Error code 48 56 if (errorCode == PS_ERR_NONE) { 49 57 return exitValue; -
branches/eam_branches/ipp-20120601/ppStack/src/ppStackTarget.c
r30620 r34052 191 191 192 192 float norm = powf(10.0, -0.4 * options->norm->data.F32[i]); // Normalisation from stars 193 float meanVariance = bg->robustMedian * PS_SQR(norm); // Mean variance in normalised image193 float meanVariance = mean * PS_SQR(norm); // Mean variance in normalised image 194 194 195 195 if (meanVariance < minVariance) { -
branches/eam_branches/ipp-20120601/ppSub/src/ppSubExit.c
r27719 r34052 11 11 } 12 12 13 psErrorCode errorCode = psErrorCodeLast(); // Error code 13 // gcc -Wswitch complains here if err is declared as type psErrorCode 14 // the collection of ps*ErrorCode values are enums defined separately for 15 // each module (psphot, pswarp, etc). the lowest type, psErrorCode is only the base set and does 16 // not include the possible psphot values 17 18 // for now, to get around this, we just use an int for the switch 19 20 // psErrorCode errorCode = psErrorCodeLast(); // Error code 21 int errorCode = psErrorCodeLast(); // Error code 14 22 if (errorCode != PS_ERR_NONE) { 15 23 pmFPAfileFreeSetStrict(false); -
branches/eam_branches/ipp-20120601/ppSub/src/ppSubMatchPSFs.c
r32676 r34052 266 266 if (!detections->allSources) { 267 267 psFree(detections); 268 psErrorCodeerror = psErrorCodeLast(); // Error code268 int error = psErrorCodeLast(); // Error code 269 269 if (error == PM_ERR_OBJECTS) { 270 270 psErrorStackPrint(stderr, "Unable to match source lists"); … … 439 439 440 440 if (!success) { 441 psErrorCodeerror = psErrorCodeLast(); // Error code441 int error = psErrorCodeLast(); // Error code 442 442 if (error == PM_ERR_STAMPS) { 443 443 psErrorStackPrint(stderr, "Unable to find stamps"); -
branches/eam_branches/ipp-20120601/psLib/src/imageops/psImageInterpolate.c
r34045 r34052 997 997 INTERPOLATE_SETUP(x, y); 998 998 xExact = yExact = false; 999 if (xExact && yExact) { /* possible alternative */ } 999 1000 1000 1001 psF32 xKernel[size], yKernel[size]; // Interpolation kernels … … 1046 1047 INTERPOLATE_SETUP(x, y); 1047 1048 xExact = yExact = false; 1049 if (xExact && yExact) { /* possible alternative */ } 1048 1050 1049 1051 psF32 xKernel[size], yKernel[size]; // Interpolation kernels -
branches/eam_branches/ipp-20120601/psLib/src/imageops/psImageStructManip.c
r21347 r34052 212 212 elementSize = PSELEMTYPE_SIZEOF(inDatatype); 213 213 214 if (0) { fprintf (stderr, "%d elements, %d total memory\n", elements, elements * elementsSize); } 215 214 216 output = p_psImageRecycle(file, lineno, func, output, numCols, numRows, type); 215 217 P_PSIMAGE_SET_COL0(output, input->col0); -
branches/eam_branches/ipp-20120601/psLib/test/tap/src/tap.c
r8958 r34052 87 87 if(test_name != NULL) { 88 88 va_start(ap, test_name); 89 vasprintf(&local_test_name, test_name, ap); 89 int status = vasprintf(&local_test_name, test_name, ap); 90 if (status) {/* warning? */} 90 91 va_end(ap); 91 92 … … 303 304 304 305 va_start(ap, fmt); 305 asprintf(&skip_msg, fmt, ap); 306 int status = asprintf(&skip_msg, fmt, ap); 307 if (status) {/* warning? */} 306 308 va_end(ap); 307 309 … … 328 330 329 331 va_start(ap, fmt); 330 vasprintf(&todo_msg, fmt, ap); 332 int status = vasprintf(&todo_msg, fmt, ap); 333 if (status) {/* warning? */} 331 334 va_end(ap); 332 335 -
branches/eam_branches/ipp-20120601/psModules/src/detrend/pmFringeStats.c
r31069 r34052 662 662 if (item->type == PS_DATA_VECTOR) { \ 663 663 ARRAY->data[i] = psMemIncrRefCounter(item->data.V); \ 664 } else if (item->type == PS_ TYPE_##TYPE) { \664 } else if (item->type == PS_DATA_##TYPE) { \ 665 665 psVector *vector = psVectorAlloc(1, PS_TYPE_##TYPE); \ 666 666 vector->data.TYPE[0] = item->data.TYPE; \ -
branches/eam_branches/ipp-20120601/psModules/src/detrend/pmNonLinear.c
r34044 r34052 329 329 330 330 bin = correction_fluxes->n - 1; 331 psTrace("psModules.nonlin",6,"NLMN: %f %d %f %f\n",flux,bin,correction_fluxes->data.F32[0],correction_fluxes->data.F32[bin]); 332 if (bin < 0) { /* warn? */ } 331 333 if (flux < correction_fluxes->data.F32[0]) { 332 334 return(0.0); … … 357 359 bin = correction_fluxes->n - 1; 358 360 psTrace("psModules.nonlin",6,"NLMN: %f %d %f %f\n",flux,bin,correction_fluxes->data.F32[0],correction_fluxes->data.F32[bin]); 361 if (bin < 0) { /* warn? */ } 359 362 if (flux < correction_fluxes->data.F32[0]) { 360 363 return(0.0); -
branches/eam_branches/ipp-20120601/psModules/src/extras/psPipe.c
r34051 r34052 105 105 106 106 status = execvp (argv[0], argv); 107 psWarning ("error running exec for child process");107 if (status < 0) { psWarning ("error running exec for child process"); } 108 108 exit (1); // this statement exits the child, not the parent, process 109 109 } -
branches/eam_branches/ipp-20120601/psModules/src/objects/models/pmModel_PGAUSS.c
r32347 r34052 261 261 { 262 262 psF64 z; 263 int Nstep = 0;264 263 psEllipseShape shape; 265 264 … … 285 284 // use the fact that f is monotonically decreasing 286 285 z = 0; 287 Nstep = 0;288 286 289 287 // choose a z value guaranteed to be beyond our limit -
branches/eam_branches/ipp-20120601/psModules/src/objects/models/pmModel_PS1_V1.c
r32347 r34052 283 283 { 284 284 psF64 z; 285 int Nstep = 0;286 285 psEllipseShape shape; 287 286 … … 308 307 // use the fact that f is monotonically decreasing 309 308 z = 0; 310 Nstep = 0;311 309 312 310 // choose a z value guaranteed to be beyond our limit -
branches/eam_branches/ipp-20120601/psModules/src/objects/models/pmModel_QGAUSS.c
r33417 r34052 284 284 { 285 285 psF64 z; 286 int Nstep = 0;287 286 psEllipseShape shape; 288 287 … … 312 311 // use the fact that f is monotonically decreasing 313 312 z = 0; 314 Nstep = 0;315 313 316 314 // choose a z value guaranteed to be beyond our limit -
branches/eam_branches/ipp-20120601/psModules/src/objects/models/pmModel_RGAUSS.c
r32347 r34052 273 273 { 274 274 psF64 z; 275 int Nstep = 0;276 275 psEllipseShape shape; 277 276 … … 296 295 // use the fact that f is monotonically decreasing 297 296 z = 0; 298 Nstep = 0;299 297 300 298 // choose a z value guaranteed to be beyond our limit -
branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_CMP.c
r34044 r34052 184 184 } 185 185 186 // find config information for output header187 float ZERO_POINT = psMetadataLookupF32 (&status, header, "ZERO_PT");188 if (!status)189 ZERO_POINT = 25.0;186 // XXX unused // find config information for output header 187 // XXX unused float ZERO_POINT = psMetadataLookupF32 (&status, header, "ZERO_PT"); 188 // XXX unused if (!status) 189 // XXX unused ZERO_POINT = 25.0; 190 190 191 191 // how many lines in the header? -
branches/eam_branches/ipp-20120601/psModules/test/tap/src/tap.c
r11550 r34052 87 87 if(test_name != NULL) { 88 88 va_start(ap, test_name); 89 vasprintf(&local_test_name, test_name, ap); 89 int status = vasprintf(&local_test_name, test_name, ap); 90 if (status) {/* warning? */} 90 91 va_end(ap); 91 92 … … 303 304 304 305 va_start(ap, fmt); 305 asprintf(&skip_msg, fmt, ap); 306 int status = asprintf(&skip_msg, fmt, ap); 307 if (status) {/* warning? */} 306 308 va_end(ap); 307 309 … … 328 330 329 331 va_start(ap, fmt); 330 vasprintf(&todo_msg, fmt, ap); 332 int status = vasprintf(&todo_msg, fmt, ap); 333 if (status) {/* warning? */} 331 334 va_end(ap); 332 335 -
branches/eam_branches/ipp-20120601/pswarp/src/pswarpExit.c
r34051 r34052 19 19 return exitValue; 20 20 } 21 22 21 23 22 // gcc -Wswitch complains here if err is declared as type psErrorCode
Note:
See TracChangeset
for help on using the changeset viewer.
