Changeset 35109 for trunk/Ohana/src/opihi
- Timestamp:
- Feb 6, 2013, 3:30:44 PM (13 years ago)
- Location:
- trunk/Ohana/src/opihi
- Files:
-
- 17 edited
- 1 copied
-
. (modified) (1 prop)
-
cmd.astro (modified) (1 prop)
-
cmd.data (modified) (1 prop)
-
cmd.data/Makefile (modified) (1 diff)
-
cmd.data/dbconnect.c (modified) (2 diffs)
-
cmd.data/dbinsert.c (copied) (copied from branches/eam_branches/ipp-20121219/Ohana/src/opihi/cmd.data/dbinsert.c )
-
cmd.data/init.c (modified) (2 diffs)
-
cmd.data/spline.c (modified) (4 diffs)
-
cmd.data/spline_commands.c (modified) (1 diff)
-
cmd.data/subset.c (modified) (1 diff)
-
cmd.data/vgauss.c (modified) (4 diffs)
-
cmd.data/vstats.c (modified) (1 diff)
-
cmd.data/write_vectors.c (modified) (4 diffs)
-
dvo/dvo_host_utils.c (modified) (1 diff)
-
dvo/gstar.c (modified) (11 diffs)
-
dvo/remote.c (modified) (2 diffs)
-
include/dvoshell.h (modified) (1 diff)
-
lib.shell/VectorIO.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20121219/Ohana/src/opihi (added) merged: 34858,34876-34877,34886-34887,34890-34891,34895,34898,34901,34903,34935,34999,35096
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/cmd.astro
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20121219/Ohana/src/opihi/cmd.astro (added) merged: 34891,34903,35096
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/cmd.data
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20121219/Ohana/src/opihi/cmd.data (added) merged: 34858,34876,34886,34890-34891,34895,34898,34903,34935,34999,35096
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/cmd.data/Makefile
r34584 r35109 42 42 $(SRC)/dbconnect.$(ARCH).o \ 43 43 $(SRC)/dbselect.$(ARCH).o \ 44 $(SRC)/dbinsert.$(ARCH).o \ 44 45 $(SRC)/erase.$(ARCH).o \ 45 46 $(SRC)/extract.$(ARCH).o \ -
trunk/Ohana/src/opihi/cmd.data/dbconnect.c
r34584 r35109 8 8 int dbconnect (int argc, char **argv) { 9 9 10 int N; 10 11 char query[256]; 11 char password[1024];12 12 MYSQL_RES *result; 13 14 char *password = NULL; 15 if ((N = get_argument (argc, argv, "-p"))) { 16 remove_argument (N, &argc, argv); 17 password = strcreate (argv[N]); 18 remove_argument (N, &argc, argv); 19 } 13 20 14 21 if (argc != 4) { … … 17 24 } 18 25 19 fprintf (stdout, "Enter password: "); 20 scan_line (stdin, password); 26 if (!password) { 27 ALLOCATE (password, char, 1024); 28 fprintf (stdout, "Enter password: "); 29 scan_line (stdin, password); 21 30 22 31 # if (0) 23 int i;24 char c;32 int i; 33 char c; 25 34 26 initscr(); 27 noecho(); 28 i = 0; 29 while (((c = getch()) != EOF) && (c != '\n')) { 30 password[i] = c; 31 i++; 35 initscr(); 36 noecho(); 37 i = 0; 38 while (((c = getch()) != EOF) && (c != '\n')) { 39 password[i] = c; 40 i++; 41 } 42 password[i] = 0; 43 # endif 32 44 } 33 password[i] = 0;34 # endif35 45 36 46 // XXX do I need to call mysql_library_init()? -
trunk/Ohana/src/opihi/cmd.data/init.c
r34584 r35109 24 24 int dbconnect PROTO((int, char **)); 25 25 int dbselect PROTO((int, char **)); 26 int dbinsert PROTO((int, char **)); 26 27 int delete PROTO((int, char **)); 27 28 int densify PROTO((int, char **)); … … 170 171 {1, "dbconnect", dbconnect, "setup mysql db connection"}, 171 172 {1, "dbselect", dbselect, "extract vectors from mysql database table"}, 173 {1, "dbinsert", dbinsert, "sql insert command"}, 172 174 {1, "delete", delete, "delete vectors or images"}, 173 175 {1, "densify", densify, "create an image histogram from a set of vectors"}, -
trunk/Ohana/src/opihi/cmd.data/spline.c
r34584 r35109 2 2 3 3 int spline_list (int argc, char **argv); 4 int spline_help (int argc, char **argv); 4 5 int spline_create (int argc, char **argv); 5 6 int spline_apply (int argc, char **argv); … … 7 8 int spline_save (int argc, char **argv); 8 9 int spline_delete (int argc, char **argv); 10 int spline_rename (int argc, char **argv); 9 11 int spline_getspline (int argc, char **argv); 10 12 11 13 static Command spline_commands[] = { 14 {1, "help", spline_help, "list spline help info"}, 12 15 {1, "list", spline_list, "list splines"}, 13 16 {1, "create", spline_create, "create a spline"}, … … 16 19 {1, "save", spline_save, "read a spline from a FITS file"}, 17 20 {1, "delete", spline_delete, "delete a spline"}, 21 {1, "rename", spline_rename, "rename a spline"}, 18 22 }; 23 24 int spline_help (int argc, char **argv) { 25 26 gprint (GP_ERR, "USAGE: spline (command)\n"); 27 gprint (GP_ERR, " spline help : this listing\n"); 28 gprint (GP_ERR, " spline list : list splines\n"); 29 gprint (GP_ERR, " spline create (spline) (Xknots) (Yknots) : create a spline\n"); 30 gprint (GP_ERR, " spline apply (spline) (Xpts) (Ypts) : apply a spline to Xpts to get Ypts\n"); 31 gprint (GP_ERR, " spline delete (spline) : delete named spline\n"); 32 gprint (GP_ERR, " spline rename (spline) (new) : change spline name to new name\n"); 33 gprint (GP_ERR, " spline load (spline) (filename) : load a spline from a FITS file\n"); 34 gprint (GP_ERR, " spline save (spline) (filename) [-append] : save a spline in FITS format\n"); 35 36 return FALSE; 37 } 19 38 20 39 int spline_command (int argc, char **argv) { … … 23 42 24 43 if (argc < 2) { 25 gprint (GP_ERR, "USAGE: spline (command)\n"); 26 gprint (GP_ERR, " spline list : list splines\n"); 27 gprint (GP_ERR, " spline create (spline) : create a spline\n"); 28 gprint (GP_ERR, " spline delete (spline) : delete a spline\n"); 44 spline_help(0,NULL); 29 45 return (FALSE); 30 46 } -
trunk/Ohana/src/opihi/cmd.data/spline_commands.c
r34584 r35109 126 126 } 127 127 128 int spline_rename (int argc, char **argv) { 129 130 Spline *spline; 131 132 if (argc != 3) { 133 gprint (GP_ERR, "USAGE: spline rename (spline) (newname)\n"); 134 return FALSE; 135 } 136 137 spline = FindSpline (argv[1]); 138 if (spline == NULL) { 139 gprint (GP_ERR, "spline %s not found\n", argv[1]); 140 return FALSE; 141 } 142 143 free (spline->name); 144 spline->name = strcreate (argv[2]); 145 return TRUE; 146 } 147 128 148 /* 129 149 int spline_listspline (int argc, char **argv) { -
trunk/Ohana/src/opihi/cmd.data/subset.c
r34461 r35109 35 35 } 36 36 if ((tvec = SelectVector (out, OLDVECTOR, TRUE)) == NULL) goto error; 37 /* check size of ivec, tvec: must match */ 37 if (ivec->Nelements != tvec->Nelements) { 38 /* check size of ivec, tvec: must match */ 39 gprint (GP_ERR, "logical expression has different length from input vector\n"); 40 goto error; 41 } 38 42 39 43 // ovec matches ivec in type -
trunk/Ohana/src/opihi/cmd.data/vgauss.c
r29938 r35109 31 31 } 32 32 33 // Guess = FALSE; 34 // if ((N = get_argument (argc, argv, "-guess"))) { 35 // Guess = TRUE; 36 // remove_argument (N, &argc, argv); 37 // } 38 33 39 if (argc != 5) { 34 40 gprint (GP_ERR, "USAGE: vgauss <x> <y> <dy> (out)\n"); 41 gprint (GP_ERR, " <dy> may be the words 'con[stant]' or 'poi[sson]', in which case the error is constructed'\n"); 35 42 gprint (GP_ERR, " uses guesses: C0 (mean), C1 (sigma), C2 (norm), C3 (sky)\n"); 36 43 return (FALSE); … … 39 46 if ((xvec = SelectVector (argv[1], OLDVECTOR, TRUE)) == NULL) return (FALSE); 40 47 if ((yvec = SelectVector (argv[2], OLDVECTOR, TRUE)) == NULL) return (FALSE); 41 if ((svec = SelectVector (argv[3], OLDVECTOR, TRUE)) == NULL) return (FALSE);42 48 if ((ovec = SelectVector (argv[4], ANYVECTOR, TRUE)) == NULL) return (FALSE); 49 50 int Nsvec = strlen(argv[3]); 51 52 if ((Nsvec >= 3) && (!strncasecmp ("poisson", argv[3], Nsvec) || !strncasecmp ("constant", argv[3], Nsvec))) { 53 svec = SelectVector ("vgauss_err", ANYVECTOR, TRUE); 54 if (svec == NULL) return (FALSE); 55 MatchVector (svec, xvec, OPIHI_FLT); 56 v1 = svec[0].elements.Flt; 57 v2 = yvec[0].elements.Flt; 58 if (!strncasecmp ("poisson", argv[3], Nsvec)) { 59 for (i = 0; i < svec[0].Nelements; i++) { 60 v1[i] = (isfinite(v2[i]) && (v2[i] > 0)) ? sqrt(v2[i]) : 1.0; 61 } 62 } else { 63 for (i = 0; i < svec[0].Nelements; i++) { 64 v1[i] = 1.0; 65 } 66 } 67 } else { 68 if ((svec = SelectVector (argv[3], OLDVECTOR, TRUE)) == NULL) return (FALSE); 69 } 43 70 44 71 CastVector (xvec, OPIHI_FLT); … … 46 73 CastVector (svec, OPIHI_FLT); 47 74 // XXX Cast is failing. 48 49 75 50 76 Npts = xvec[0].Nelements; … … 58 84 GET_VAR (par[3], "C3"); 59 85 Npar = 4; 86 60 87 61 88 // mrqmin takes the inverse variance (do not generate NANs) -
trunk/Ohana/src/opihi/cmd.data/vstats.c
r33963 r35109 123 123 124 124 ALLOCATE (Nval, int, Nbin + 2); 125 bzero (Nval, Nbin*sizeof(int));125 bzero (Nval, (Nbin + 2)*sizeof(int)); 126 126 var = 0; 127 127 if (vec[0].type == OPIHI_FLT) { -
trunk/Ohana/src/opihi/cmd.data/write_vectors.c
r34584 r35109 10 10 Vector **vec; 11 11 12 if ((N = get_argument (argc, argv, "-h"))) goto usage; 13 if ((N = get_argument (argc, argv, "--h"))) goto usage; 14 if ((N = get_argument (argc, argv, "-help"))) goto usage; 15 if ((N = get_argument (argc, argv, "--help"))) goto usage; 16 12 17 /* look for format option */ 13 18 format = (char *) NULL; … … 17 22 remove_argument (N, &argc, argv); 18 23 } 24 if ((N = get_argument (argc, argv, "-format"))) { 25 if (format) { 26 gprint (GP_ERR, "ERROR: do not mix -f and -format\n"); 27 free (format); 28 return (FALSE); 29 } 30 remove_argument (N, &argc, argv); 31 format = strcreate (argv[N]); 32 remove_argument (N, &argc, argv); 33 } 19 34 20 35 /* option generate a FITS output table */ 21 36 FITS = NULL; 22 37 if ((N = get_argument (argc, argv, "-fits"))) { 23 if (format) {24 gprint (GP_ERR, "ERROR: do not mix -fits and -format\n");25 free (format);26 return (FALSE);27 }28 38 remove_argument (N, &argc, argv); 29 39 FITS = strcreate (argv[N]); … … 61 71 62 72 if (argc < 3) { 63 gprint (GP_ERR, "USAGE: write [-append] [-f \"format\"] file vector vector ...\n"); 73 gprint (GP_ERR, "USAGE: write [options] file vector vector ...\n"); 74 gprint (GP_ERR, "OPTIONS: [-header] [-append] [-f \"format\"] [-fits NAME] [-csv] [-h,--help]\n"); 64 75 return (FALSE); 65 76 } … … 222 233 return (TRUE); 223 234 235 usage: 236 gprint (GP_ERR, "USAGE: write [options] file vector vector ...\n"); 237 gprint (GP_ERR, "OPTIONS: [-header] [-append] [-f \"format\"] [-fits NAME] [-csv] [-h,--help]\n\n"); 238 239 gprint (GP_ERR, "OPTIONS: \n"); 240 gprint (GP_ERR, " -header : add a descriptive header line to ascii or csv output\n"); 241 gprint (GP_ERR, " -append : write to the end of the existing file\n"); 242 gprint (GP_ERR, " -fits NAME : write a fits table (extention name is NAME, column names match vector names)\n"); 243 gprint (GP_ERR, " -csv : write a comma-separated values file (eg, to read in excel)\n"); 244 gprint (GP_ERR, " -f \"format\" : provide formatting codes for output:\n"); 245 gprint (GP_ERR, " ascii / csv : format consists of c-style format codes in form %NN.Md\n"); 246 gprint (GP_ERR, ", the following codes are allowed\n"); 247 gprint (GP_ERR, " %e -- double, %f -- float\n"); 248 gprint (GP_ERR, " %d -- int, %c -- char, %x -- hex int\n"); 249 gprint (GP_ERR, " FITS : format consists of the following FITS binary table format codes:\n"); 250 gprint (GP_ERR, " B : 1 byte int\n"); 251 gprint (GP_ERR, " I : 2 byte int\n"); 252 gprint (GP_ERR, " J : 4 byte int\n"); 253 gprint (GP_ERR, " K : 8 byte int\n"); 254 gprint (GP_ERR, " D : 4 byte float\n"); 255 gprint (GP_ERR, " F : 1 byte float\n"); 256 gprint (GP_ERR, " -h : this help listing\n"); 257 gprint (GP_ERR, " --h : this help listing\n"); 258 gprint (GP_ERR, " -help : this help listing\n"); 259 gprint (GP_ERR, " --help : this help listing\n"); 260 return FALSE; 224 261 } 225 262 -
trunk/Ohana/src/opihi/dvo/dvo_host_utils.c
r34749 r35109 295 295 return TRUE; 296 296 } 297 298 // re-gather the remote results files: this can be used in case one of the clients failed, 299 // and has since been re-run 300 int HostTableGetResults (char *uniquer, int VERBOSE) { 301 302 int i; 303 304 // load the list of hosts 305 SkyTable *sky = GetSkyTable(); 306 if (!sky) { 307 gprint (GP_ERR, "failed to load sky table for database\n"); 308 return FALSE; 309 } 310 311 char *CATDIR = GetCATDIR (); 312 if (!CATDIR) { 313 gprint (GP_ERR, "failed to get CATDIR for database\n"); 314 return FALSE; 315 } 316 317 HostTable *table = HostTableLoad (CATDIR, sky->hosts); 318 if (!table) { 319 gprint (GP_ERR, "ERROR: failure reading Host Table %s for database %s\n", sky->hosts, CATDIR); 320 return FALSE; 321 } 322 323 // create the result file list 324 char name[256]; 325 snprintf (name, 256, "RESULT_FILE:n"); 326 set_int_variable (name, table->Nhosts); 327 snprintf (name, 256, "RESULT_DATA:n"); 328 set_int_variable (name, table->Nhosts); 329 snprintf (name, 256, "RESULT_STATUS:n"); 330 set_int_variable (name, table->Nhosts); 331 332 char results[DVO_MAX_PATH]; 333 334 // load fields from file 335 for (i = 0; i < table->Nhosts; i++) { 336 337 // need to save the results filename with the uniquer 338 snprintf (results, DVO_MAX_PATH, "%s/dvo.results.%s.fits", table->hosts[i].pathname, uniquer); 339 340 snprintf (name, 256, "RESULT_FILE:%d", i); 341 set_str_variable (name, results); 342 343 // DATA : 0 (unread), 1 (read) 344 snprintf (name, 256, "RESULT_DATA:%d", i); 345 set_int_variable (name, 0); 346 347 // STATUS : 0 (normal exit), -1 (crash), N (failure exit status) 348 snprintf (name, 256, "RESULT_STATUS:%d", i); 349 set_int_variable (name, table->hosts[i].status); 350 } 351 352 free (table); 353 return TRUE; 354 } -
trunk/Ohana/src/opihi/dvo/gstar.c
r34844 r35109 1 1 # include "dvoshell.h" 2 3 typedef enum { 4 GSTAR_BY_SEQ, 5 GSTAR_BY_TIME, 6 GSTAR_BY_PHOTCODE, 7 } GSTAR_SORT_CODES; 2 8 3 9 typedef enum { … … 7 13 GSTAR_FILTER_NAMES, 8 14 GSTAR_SECF_FLAGS, 15 GSTAR_UCDIST, 9 16 GSTAR_AVE_AP_MAG, 10 17 GSTAR_AVE_MAG_20, … … 22 29 void printPhotcodeSequence (Average *average, SecFilt *secfilt, int entry, int type); 23 30 31 void sort_index_float (float *X, int *IDX, int N) { 32 33 # define SWAPFUNC(A,B){ float tmp; int itmp; \ 34 tmp = X[A]; X[A] = X[B]; X[B] = tmp; \ 35 itmp = IDX[A]; IDX[A] = IDX[B]; IDX[B] = itmp; \ 36 } 37 # define COMPARE(A,B)(X[A] < X[B]) 38 39 OHANA_SORT (N, COMPARE, SWAPFUNC); 40 41 # undef SWAPFUNC 42 # undef COMPARE 43 44 } 45 24 46 int gstar (int argc, char **argv) { 25 47 … … 30 52 off_t i, Nstars, *N1; 31 53 off_t j, k, m, N, Nlo, Nhi; 32 int Nsecfilt, NPTS, QUIET, FULL_OUTPUT, STACK_OUTPUT, INST ;54 int Nsecfilt, NPTS, QUIET, FULL_OUTPUT, STACK_OUTPUT, INST, SHOW_MASKS; 33 55 int found, GetMeasures; 34 56 int SaveVectors; … … 43 65 Nsecfilt = GetPhotcodeNsecfilt (); 44 66 67 GSTAR_SORT_CODES sortCode = GSTAR_BY_SEQ; 68 if ((N = get_argument (argc, argv, "-sort"))) { 69 remove_argument (N, &argc, argv); 70 if (!strcasecmp (argv[N], "time")) { 71 sortCode = GSTAR_BY_TIME; 72 } 73 if (!strcasecmp (argv[N], "photcode")) { 74 sortCode = GSTAR_BY_PHOTCODE; 75 } 76 remove_argument (N, &argc, argv); 77 } 78 45 79 QUIET = FALSE; 46 80 if ((N = get_argument (argc, argv, "-q"))) { … … 52 86 if ((N = get_argument (argc, argv, "-inst"))) { 53 87 INST = TRUE; 88 remove_argument (N, &argc, argv); 89 } 90 91 SHOW_MASKS = FALSE; 92 if ((N = get_argument (argc, argv, "-masks"))) { 93 SHOW_MASKS = TRUE; 54 94 remove_argument (N, &argc, argv); 55 95 } … … 275 315 gprint (GP_LOG, "\n"); 276 316 317 /* UCDIST */ 318 for (j = 0; j < Nsecfilt; j++) printPhotcodeSequence (&catalog.average[k], &catalog.secfilt[Nsecfilt*k], j, GSTAR_UCDIST);; 319 gprint (GP_LOG, "\n"); 320 277 321 /* secfilt flags */ 278 322 for (j = 0; j < Nsecfilt; j++) printPhotcodeSequence (&catalog.average[k], &catalog.secfilt[Nsecfilt*k], j, GSTAR_SECF_FLAGS); … … 300 344 } 301 345 if (GetMeasures || SaveVectors) { 346 347 if (catalog.average[k].Nmeasure == 0) continue; 348 302 349 m = catalog.average[k].measureOffset; 350 351 int *index = NULL; 352 float *value = NULL; 353 ALLOCATE (index, int, catalog.average[k].Nmeasure); 354 ALLOCATE (value, float, catalog.average[k].Nmeasure); 355 for (j = 0; j < catalog.average[k].Nmeasure; j++) { 356 index[j] = j + m; 357 switch (sortCode) { 358 case GSTAR_BY_SEQ: 359 value[j] = j + m; 360 break; 361 case GSTAR_BY_PHOTCODE: 362 value[j] = catalog.measure[j + m].photcode; 363 break; 364 case GSTAR_BY_TIME: 365 value[j] = catalog.measure[j + m].t; 366 break; 367 } 368 } 369 370 sort_index_float (value, index, catalog.average[k].Nmeasure); 371 303 372 for (j = 0; j < catalog.average[k].Nmeasure; j++, m++) { 304 373 305 Mcat = PhotCat (&catalog.measure[m]); 374 int Nv = index[j]; 375 376 Mcat = PhotCat (&catalog.measure[Nv]); 306 377 if (INST) { 307 Mrel = PhotInst (&catalog.measure[ m]);378 Mrel = PhotInst (&catalog.measure[Nv]); 308 379 } else { 309 Mrel = PhotRel (&catalog.measure[ m], &catalog.average[k], &catalog.secfilt[k*Nsecfilt]);380 Mrel = PhotRel (&catalog.measure[Nv], &catalog.average[k], &catalog.secfilt[k*Nsecfilt]); 310 381 } 311 382 312 383 if (GetMeasures && !QUIET) { 313 date = ohana_sec_to_date (catalog.measure[ m].t);384 date = ohana_sec_to_date (catalog.measure[Nv].t); 314 385 gprint (GP_LOG, "%6.3f ", Mcat); 315 386 gprint (GP_LOG, "%6.3f ", Mrel); 316 gprint (GP_LOG, "% 5.3f ", catalog.measure[m].dM);387 gprint (GP_LOG, "%6.3f ", catalog.measure[Nv].dM); 317 388 gprint (GP_LOG, "%20s ", date); 318 gprint (GP_LOG, "%7.4f ", catalog.measure[m].dR); 319 gprint (GP_LOG, "%7.4f ", catalog.measure[m].dD); 320 gprint (GP_LOG, "0x%08x ", catalog.measure[m].photFlags); 321 gprint (GP_LOG, "0x%08x ", catalog.measure[m].dbFlags); 322 gprint (GP_LOG, "%5d ", catalog.measure[m].photcode); 323 gprint (GP_LOG, "%-20s ", GetPhotcodeNamebyCode (catalog.measure[m].photcode)); 324 gprint (GP_LOG, "%5.2f ", FromShortPixels(catalog.measure[m].FWx)); 325 gprint (GP_LOG, "%5.2f ", FromShortPixels(catalog.measure[m].FWy)); 389 gprint (GP_LOG, "%7.4f ", catalog.measure[Nv].dR); 390 gprint (GP_LOG, "%7.4f ", catalog.measure[Nv].dD); 391 gprint (GP_LOG, "0x%08x ", catalog.measure[Nv].photFlags); 392 gprint (GP_LOG, "0x%08x ", catalog.measure[Nv].dbFlags); 393 if (SHOW_MASKS) { 394 gprint (GP_LOG, "%5d ", catalog.measure[Nv].photcode); 395 PhotCode *code = GetPhotcodebyCode (catalog.measure[Nv].photcode); 396 int badMask = 0; 397 int poorMask = 0; 398 if (code) { 399 badMask = catalog.measure[Nv].photFlags & code->photomBadMask; 400 poorMask = catalog.measure[Nv].photFlags & code->photomPoorMask; 401 } 402 gprint (GP_LOG, "0x%08x ", poorMask); 403 gprint (GP_LOG, "0x%08x ", badMask); 404 } 405 gprint (GP_LOG, "%5d ", catalog.measure[Nv].photcode); 406 gprint (GP_LOG, "%-20s ", GetPhotcodeNamebyCode (catalog.measure[Nv].photcode)); 407 gprint (GP_LOG, "%5.2f ", FromShortPixels(catalog.measure[Nv].FWx)); 408 gprint (GP_LOG, "%5.2f ", FromShortPixels(catalog.measure[Nv].FWy)); 326 409 327 410 if (FULL_OUTPUT) { 328 gprint (GP_LOG, "%6.3f ", catalog.measure[ m].Mcal);329 gprint (GP_LOG, "%6.3f ", catalog.measure[ m].Map);330 gprint (GP_LOG, "%6.3f ", catalog.measure[ m].Mkron);331 gprint (GP_LOG, "%6.3f ", catalog.measure[ m].dMkron);332 gprint (GP_LOG, "%5.1f ", pow(10.0, 0.4*catalog.measure[ m].dt));333 gprint (GP_LOG, "%5.3f ", catalog.measure[ m].airmass);334 gprint (GP_LOG, "%6.1f ", catalog.measure[ m].az);335 gprint (GP_LOG, "%6.1f ", catalog.measure[ m].Xccd);336 gprint (GP_LOG, "%6.1f ", catalog.measure[ m].Yccd);337 gprint (GP_LOG, "%3.1f ", FromShortPixels(catalog.measure[ m].dXccd));338 gprint (GP_LOG, "%3.1f ", FromShortPixels(catalog.measure[ m].dYccd));339 gprint (GP_LOG, "%6.1f ", catalog.measure[ m].Sky);340 gprint (GP_LOG, "%5.1f ", catalog.measure[ m].dSky);341 gprint (GP_LOG, "%8d ", catalog.measure[ m].averef);342 gprint (GP_LOG, "0x%08x ", catalog.measure[ m].detID);343 gprint (GP_LOG, "0x%08x ", catalog.measure[ m].imageID);344 gprint (GP_LOG, "%.3f ", catalog.measure[ m].psfQF);345 gprint (GP_LOG, "%.1f ", catalog.measure[ m].psfChisq);346 gprint (GP_LOG, "%.1f ", catalog.measure[ m].crNsigma);347 gprint (GP_LOG, "%.1f ", catalog.measure[ m].extNsigma);348 gprint (GP_LOG, "%.1f ", FromShortDegrees(catalog.measure[ m].theta));411 gprint (GP_LOG, "%6.3f ", catalog.measure[Nv].Mcal); 412 gprint (GP_LOG, "%6.3f ", catalog.measure[Nv].Map); 413 gprint (GP_LOG, "%6.3f ", catalog.measure[Nv].Mkron); 414 gprint (GP_LOG, "%6.3f ", catalog.measure[Nv].dMkron); 415 gprint (GP_LOG, "%5.1f ", pow(10.0, 0.4*catalog.measure[Nv].dt)); 416 gprint (GP_LOG, "%5.3f ", catalog.measure[Nv].airmass); 417 gprint (GP_LOG, "%6.1f ", catalog.measure[Nv].az); 418 gprint (GP_LOG, "%6.1f ", catalog.measure[Nv].Xccd); 419 gprint (GP_LOG, "%6.1f ", catalog.measure[Nv].Yccd); 420 gprint (GP_LOG, "%3.1f ", FromShortPixels(catalog.measure[Nv].dXccd)); 421 gprint (GP_LOG, "%3.1f ", FromShortPixels(catalog.measure[Nv].dYccd)); 422 gprint (GP_LOG, "%6.1f ", catalog.measure[Nv].Sky); 423 gprint (GP_LOG, "%5.1f ", catalog.measure[Nv].dSky); 424 gprint (GP_LOG, "%8d ", catalog.measure[Nv].averef); 425 gprint (GP_LOG, "0x%08x ", catalog.measure[Nv].detID); 426 gprint (GP_LOG, "0x%08x ", catalog.measure[Nv].imageID); 427 gprint (GP_LOG, "%.3f ", catalog.measure[Nv].psfQF); 428 gprint (GP_LOG, "%.1f ", catalog.measure[Nv].psfChisq); 429 gprint (GP_LOG, "%.1f ", catalog.measure[Nv].crNsigma); 430 gprint (GP_LOG, "%.1f ", catalog.measure[Nv].extNsigma); 431 gprint (GP_LOG, "%.1f ", FromShortDegrees(catalog.measure[Nv].theta)); 349 432 } 350 433 if (STACK_OUTPUT) { 351 gprint (GP_LOG, "%10.3e ", catalog.measure[ m].FluxPSF);352 gprint (GP_LOG, "%10.3e ", catalog.measure[ m].dFluxPSF);353 gprint (GP_LOG, "%10.3e ", catalog.measure[ m].FluxKron);354 gprint (GP_LOG, "%10.3e ", catalog.measure[ m].dFluxKron);434 gprint (GP_LOG, "%10.3e ", catalog.measure[Nv].FluxPSF); 435 gprint (GP_LOG, "%10.3e ", catalog.measure[Nv].dFluxPSF); 436 gprint (GP_LOG, "%10.3e ", catalog.measure[Nv].FluxKron); 437 gprint (GP_LOG, "%10.3e ", catalog.measure[Nv].dFluxKron); 355 438 } 356 439 gprint (GP_LOG, "\n"); … … 361 444 if (SaveVectors) { 362 445 vec1[0].elements.Flt[N] = Mcat; 363 vec2[0].elements.Flt[N] = TimeValue (catalog.measure[ m].t, TimeReference, TimeFormat);364 vec3[0].elements.Flt[N] = catalog.measure[ m].airmass;365 vec4[0].elements.Flt[N] = catalog.measure[ m].photcode;366 vec5[0].elements.Flt[N] = catalog.measure[ m].dR;367 vec6[0].elements.Flt[N] = catalog.measure[ m].dD;446 vec2[0].elements.Flt[N] = TimeValue (catalog.measure[Nv].t, TimeReference, TimeFormat); 447 vec3[0].elements.Flt[N] = catalog.measure[Nv].airmass; 448 vec4[0].elements.Flt[N] = catalog.measure[Nv].photcode; 449 vec5[0].elements.Flt[N] = catalog.measure[Nv].dR; 450 vec6[0].elements.Flt[N] = catalog.measure[Nv].dD; 368 451 N ++; 369 452 if (N == NPTS - 1) { … … 378 461 } 379 462 } 463 free (value); 464 free (index); 380 465 } 381 466 } … … 495 580 break; 496 581 582 case GSTAR_UCDIST: /* ubercal distance */ 583 if (seq == -1) { 584 gprint (GP_LOG, "%5d ", 0); 585 } else { 586 gprint (GP_LOG, "%5d ", secfilt[seq].ubercalDist); 587 } 588 break; 589 497 590 case GSTAR_AVE_AP_MAG: /* average ap mags */ 498 591 if (seq == -1) { -
trunk/Ohana/src/opihi/dvo/remote.c
r34749 r35109 26 26 gprint (GP_ERR, " -v : verbose mode:\n"); 27 27 gprint (GP_ERR, "OR: remote -reload (uniquer)\n"); 28 gprint (GP_ERR, "OR: remote -get-results (uniquer)\n"); 28 29 return FALSE; 29 30 } … … 48 49 } 49 50 51 if ((N = get_argument (argc, argv, "-get-results"))) { 52 remove_argument (N, &argc, argv); 53 if (argc != 2) { 54 gprint (GP_ERR, "USAGE: remote -get-results (uniquer)\n"); 55 gprint (GP_ERR, " (uniquer) is the element in the middle of the results file\n"); 56 gprint (GP_ERR, " eg: dvo.results.XXXXX.YYYYY.fits\n"); 57 return FALSE; 58 } 59 int status = HostTableGetResults (argv[1], VERBOSE); 60 return status; 61 } 62 50 63 // strip of the 'remote' and send the remaining arguments to the remote machine 51 64 int status = HostTableParallelOps (argc - 1, &argv[1], NULL, ReadVectors, 0, VERBOSE); -
trunk/Ohana/src/opihi/include/dvoshell.h
r34749 r35109 102 102 int HostTableParallelOps PROTO((int argc, char **argv, char *ResultFile, int ReadVectors, int Nelements, int VERBOSE)); 103 103 int HostTableReloadResults PROTO((char *uniquer, int VERBOSE)); 104 int HostTableGetResults PROTO((char *uniquer, int VERBOSE)); 104 105 105 106 # endif // DVOSHELL_H -
trunk/Ohana/src/opihi/lib.shell/VectorIO.c
r34584 r35109 23 23 goto escape; 24 24 } 25 if ((*ptr != 'B') && (*ptr != 'I') && (*ptr != 'J') && (*ptr != ' D') && (*ptr != 'E')) {25 if ((*ptr != 'B') && (*ptr != 'I') && (*ptr != 'J') && (*ptr != 'K') && (*ptr != 'D') && (*ptr != 'E')) { 26 26 gprint (GP_ERR, "error in binary table format %s: invalid character %c\n", format, *ptr); 27 27 goto escape;
Note:
See TracChangeset
for help on using the changeset viewer.
