Changeset 33403
- Timestamp:
- Mar 4, 2012, 1:32:12 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20111122/Ohana/src/relphot
- Files:
-
- 4 edited
-
include/relphot.h (modified) (1 diff)
-
src/args.c (modified) (2 diffs)
-
src/reload_catalogs.c (modified) (2 diffs)
-
src/relphot.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/Ohana/src/relphot/include/relphot.h
r33394 r33403 134 134 int KEEP_UBERCAL; 135 135 char *OUTROOT; 136 char *UPDATE_CATFORMAT; 136 137 int PLOTDELAY; 137 138 int UpdateAverages; -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/args.c
r33328 r33403 162 162 } 163 163 164 UPDATE_CATFORMAT = NULL; 165 if ((N = get_argument (argc, argv, "-update-catformat"))) { 166 remove_argument (N, &argc, argv); 167 UPDATE_CATFORMAT = strcreate (argv[N]); 168 remove_argument (N, &argc, argv); 169 } 170 164 171 SAVE_IMAGE_UPDATES = TRUE; 165 172 if ((N = get_argument (argc, argv, "-skip-image-updates"))) { … … 444 451 } 445 452 453 UPDATE_CATFORMAT = NULL; 454 if ((N = get_argument (argc, argv, "-update-catformat"))) { 455 remove_argument (N, &argc, argv); 456 UPDATE_CATFORMAT = strcreate (argv[N]); 457 remove_argument (N, &argc, argv); 458 } 459 446 460 AreaSelect = FALSE; 447 461 if ((N = get_argument (argc, argv, "-area"))) { -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/reload_catalogs.c
r33364 r33403 87 87 TIMESTAMP(time5); 88 88 89 // modify the output format as desired (ignore current format on disk) 90 if (UPDATE_CATFORMAT) { 91 catalog.catformat = dvo_catalog_catformat (UPDATE_CATFORMAT); 92 } 89 93 dvo_catalog_save (&catalog, VERBOSE); 90 94 dvo_catalog_unlock (&catalog); … … 152 156 153 157 char tmpline[1024]; 154 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 155 if (VERBOSE2) { snprintf (tmpline, 1024, "%s -vv", command); strcpy (command, tmpline); } 156 if (RESET) { snprintf (tmpline, 1024, "%s -reset", command); strcpy (command, tmpline); } 157 if (KEEP_UBERCAL) { snprintf (tmpline, 1024, "%s -keep-ubercal", command); strcpy (command, tmpline); } 158 if (AreaSelect) { snprintf (tmpline, 1024, "%s -area %f %f %f %f", command, AreaXmin, AreaXmax, AreaYmin, AreaYmax); strcpy (command, tmpline); } 158 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 159 if (VERBOSE2) { snprintf (tmpline, 1024, "%s -vv", command); strcpy (command, tmpline); } 160 if (RESET) { snprintf (tmpline, 1024, "%s -reset", command); strcpy (command, tmpline); } 161 if (KEEP_UBERCAL) { snprintf (tmpline, 1024, "%s -keep-ubercal", command); strcpy (command, tmpline); } 162 if (UPDATE_CATFORMAT) { snprintf (tmpline, 1024, "%s -update-catformat %s", command, UPDATE_CATFORMAT); strcpy (command, tmpline); } 163 if (AreaSelect) { snprintf (tmpline, 1024, "%s -area %f %f %f %f", command, AreaXmin, AreaXmax, AreaYmin, AreaYmax); strcpy (command, tmpline); } 159 164 if (TimeSelect) { 160 165 char *tstart = ohana_sec_to_date (TSTART); -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/relphot.c
r33394 r33403 217 217 dbX.virtual = FALSE; 218 218 219 // copy Images.dat to another structure 219 // save Images.dat using the copied structure 220 if (UPDATE_CATFORMAT) { 221 // ensure the db format is updated 222 dbX.format = dvo_catalog_catformat (UPDATE_CATFORMAT); 223 char photcodeFile[1024]; 224 sprintf (photcodeFile, "%s/Photcodes.dat", CATDIR); 225 SavePhotcodesFITS (photcodeFile); 226 } 220 227 dvo_image_save (&dbX, VERBOSE); 221 228 dvo_image_unlock (&dbX); … … 245 252 MARKTIME("-- updated all catalogs: %f sec\n", dtime); 246 253 254 if (UPDATE_CATFORMAT) { 255 // ensure the db format is updated 256 db.format = dvo_catalog_catformat (UPDATE_CATFORMAT); 257 } 247 258 dvo_image_update (&db, VERBOSE); 248 259 dvo_image_unlock (&db);
Note:
See TracChangeset
for help on using the changeset viewer.
