- Timestamp:
- Nov 12, 2015, 10:03:20 AM (11 years ago)
- Location:
- trunk/Ohana/src/dvopsps
- Files:
-
- 3 edited
-
include/dvopsps.h (modified) (1 diff)
-
src/insert_FGshape_dvopsps_catalog.c (modified) (1 diff)
-
src/insert_detections_dvopsps_catalog.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/dvopsps/include/dvopsps.h
r39019 r39112 33 33 34 34 unsigned int flags; 35 unsigned int objflags; 35 36 } Detections; 36 37 -
trunk/Ohana/src/dvopsps/src/insert_FGshape_dvopsps_catalog.c
r39074 r39112 226 226 PrintIOBuffer (gal_buffer, "%hd, ", galphot->modelType); 227 227 228 PRINT_FLOAT(gal_buffer, galphot->mag, "%.6e, "); 229 PRINT_FLOAT(gal_buffer, galphot->magErr, "%.6e, "); 230 PRINT_FLOAT(gal_buffer, galphot->majorAxis, "%.6e, "); 231 PRINT_FLOAT(gal_buffer, galphot->minorAxis, "%.6e, "); 232 PRINT_FLOAT(gal_buffer, galphot->majorAxisErr, "%.6e, "); 233 PRINT_FLOAT(gal_buffer, galphot->minorAxisErr, "%.6e, "); 234 PRINT_FLOAT(gal_buffer, galphot->theta, "%.6e, "); 235 PRINT_FLOAT(gal_buffer, galphot->thetaErr, "%.6e, "); 236 PRINT_FLOAT(gal_buffer, galphot->index, "%.6e, "); 237 PRINT_FLOAT(gal_buffer, galphot->chisq, "%.6e, "); 228 float sersic_index = galphot->index; 229 if (galphot->modelType == 6) sersic_index = 1.0; 230 if (galphot->modelType == 7) sersic_index = 4.0; 231 232 PRINT_FLOAT(gal_buffer, galphot->mag, "%.6e, "); 233 PRINT_FLOAT(gal_buffer, galphot->magErr, "%.6e, "); 234 PRINT_FLOAT(gal_buffer, galphot->majorAxis, "%.6e, "); 235 PRINT_FLOAT(gal_buffer, galphot->minorAxis, "%.6e, "); 236 PRINT_FLOAT(gal_buffer, galphot->majorAxisErr, "%.6e, "); 237 PRINT_FLOAT(gal_buffer, galphot->minorAxisErr, "%.6e, "); 238 PRINT_FLOAT(gal_buffer, DEG_RAD*galphot->theta, "%.6e, "); 239 PRINT_FLOAT(gal_buffer, DEG_RAD*galphot->thetaErr, "%.6e, "); 240 PRINT_FLOAT(gal_buffer, sersic_index, "%.6e, "); 241 PRINT_FLOAT(gal_buffer, galphot->chisq, "%.6e, "); 238 242 239 243 PrintIOBuffer (gal_buffer, "%d ", (int) galphot->Npix); // NOTE: PRINT_FLOAT always adds a trailing comma -- need to use a different method on the last entry -
trunk/Ohana/src/dvopsps/src/insert_detections_dvopsps_catalog.c
r38986 r39112 184 184 PrintIOBuffer (buffer, "INSERT INTO dvoDetectionFull (objID, detectID, ippObjID, ippDetectID, imageID, catID, "); 185 185 PrintIOBuffer (buffer, "ra, dec_, raErr, decErr, zp, zpFactor, telluricExt, airmass, expTime, "); 186 PrintIOBuffer (buffer, "Mpsf, dMpsf, Mkron, dMkron, Map, dMap, flags ) VALUES \n");186 PrintIOBuffer (buffer, "Mpsf, dMpsf, Mkron, dMkron, Map, dMap, flags, objflags) VALUES \n"); 187 187 188 188 return TRUE; … … 234 234 int insert_detections_mysql_detvalue (IOBuffer *buffer, Detections *detection) { 235 235 236 # if (0) 236 237 if (detection->detectID == 164458937060000101) { 237 238 fprintf (stderr, "isfinite: %d\n", isfinite(detection->dMpsf)); … … 239 240 fprintf (stderr, "isinf: %d\n", isinf(detection->dMpsf)); 240 241 } 242 # endif 241 243 242 244 // XXX I needed OFF_T_FMT on my 32bit ubuntu laptop; ok on 64bit? … … 265 267 PRINT_FLOAT(buffer, detection->dMap, "%.6f, "); 266 268 267 PrintIOBuffer (buffer, "%u),\n", detection->flags); // flags 269 PrintIOBuffer (buffer, "%u, ", detection->flags); // measure.flags 270 PrintIOBuffer (buffer, "%u),\n", detection->objflags); // average.flags 268 271 return TRUE; 269 272 } … … 341 344 detection->dMap = getdMagFromValueOrFlux (measure->FluxAp, measure->dFluxAp, measure->dMap); 342 345 343 detection->flags = measure->dbFlags; // flags 344 345 return TRUE; 346 } 347 346 detection->flags = measure->dbFlags; // flags 347 detection->objflags = average->flags; // flags 348 349 return TRUE; 350 } 351
Note:
See TracChangeset
for help on using the changeset viewer.
