Changeset 36084
- Timestamp:
- Aug 31, 2013, 5:31:39 AM (13 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 27 edited
- 4 copied
-
. (modified) (1 prop)
-
src/dvomerge (modified) (1 prop)
-
src/dvomerge/src/dvoverify_catalogs.c (modified) (1 diff)
-
src/getstar/src/dvoImagesAtCoords.c (modified) (2 diffs)
-
src/kapa2/include/constants.h (modified) (1 diff)
-
src/libdvo/include/dvo.h (modified) (1 diff)
-
src/libdvo/include/dvodb.h (modified) (1 diff)
-
src/libdvo/src/dbExtractAverages.c (modified) (1 diff)
-
src/libdvo/src/dbFields.c (modified) (1 diff)
-
src/libdvo/src/dvosorts.c (modified) (1 diff)
-
src/libkapa/src/IOfuncs.c (modified) (2 diffs)
-
src/libohana/src (modified) (1 prop)
-
src/libohana/src/gaussj.c (modified) (3 diffs)
-
src/opihi (modified) (1 prop)
-
src/opihi/cmd.astro (modified) (1 prop)
-
src/opihi/cmd.astro/Makefile (modified) (1 diff)
-
src/opihi/cmd.astro/init.c (modified) (2 diffs)
-
src/opihi/cmd.astro/sersic.c (copied) (copied from branches/eam_branches/ipp-20130711/Ohana/src/opihi/cmd.astro/sersic.c )
-
src/opihi/cmd.basic/list.c (modified) (10 diffs)
-
src/opihi/cmd.data (modified) (1 prop)
-
src/opihi/cmd.data/Makefile (modified) (2 diffs)
-
src/opihi/cmd.data/init.c (modified) (4 diffs)
-
src/opihi/cmd.data/join.c (copied) (copied from branches/eam_branches/ipp-20130711/Ohana/src/opihi/cmd.data/join.c )
-
src/opihi/cmd.data/match2d.c (modified) (3 diffs)
-
src/opihi/cmd.data/test/join.sh (copied) (copied from branches/eam_branches/ipp-20130711/Ohana/src/opihi/cmd.data/test/join.sh )
-
src/opihi/cmd.data/vlist.c (copied) (copied from branches/eam_branches/ipp-20130711/Ohana/src/opihi/cmd.data/vlist.c )
-
src/opihi/dvo/avmatch.c (modified) (3 diffs)
-
src/opihi/dvo/hosts.c (modified) (3 diffs)
-
src/opihi/lib.shell/ListOps.c (modified) (1 diff)
-
src/relastro/src (modified) (1 prop)
-
src/tools/src/medianfilter.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20130711/Ohana (added) merged: 35802,35842,35869-35875,35877-35878,35969,36012-36013,36022-36023,36065,36073
- Property svn:mergeinfo changed
-
trunk/Ohana/src/dvomerge
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20130711/Ohana/src/dvomerge (added) merged: 35874,36073
- Property svn:mergeinfo changed
-
trunk/Ohana/src/dvomerge/src/dvoverify_catalogs.c
r34405 r36084 143 143 continue; 144 144 } 145 fscanf (results, "%*s %d %*s %d", &NbadHost, &NNotSortedHost); 145 int Nresults = fscanf (results, "%*s %d %*s %d", &NbadHost, &NNotSortedHost); 146 if (Nresults != 2) { 147 fprintf (stderr, "warning: failure scanning results\n"); 148 fclose (results); 149 continue; 150 } 146 151 *Nbad += NbadHost; 147 152 NNotSorted += NNotSortedHost; -
trunk/Ohana/src/getstar/src/dvoImagesAtCoords.c
r36057 r36084 16 16 int status; 17 17 Image *dbImages; 18 int Npoints;19 18 FITS_DB db; 20 19 … … 25 24 Point *points; 26 25 int readStdin = 0; 26 int Npoints = 0; 27 27 if (coordsFile) { 28 28 if (strcmp(coordsFile, "-") == 0) { -
trunk/Ohana/src/kapa2/include/constants.h
r35766 r36084 15 15 // XXX for the moment, this is set to match the values in SetColorScale3D_CC 16 16 # define NPIXELS_STATIC 128 17 // # define NPIXELS_STATIC 100017 // # define NPIXELS_STATIC 4600 -- if we want fullcolor to work, need this 18 18 19 19 # define PAD1 3 -
trunk/Ohana/src/libdvo/include/dvo.h
r35755 r36084 696 696 void sort_coords_index (double *X, double *Y, off_t *S, off_t N); 697 697 void sort_coords_indexonly (double *X, double *Y, off_t *S, off_t N); 698 void sort_IDs_indexonly (opihi_int *X, off_t *S, off_t N); 698 699 void sort_regions (SkyRegion *region, off_t N); 699 700 -
trunk/Ohana/src/libdvo/include/dvodb.h
r35416 r36084 174 174 AVE_TMEAN, 175 175 AVE_TRANGE, 176 AVE_PSF_QF, 177 AVE_PSF_QF_PERF, 178 AVE_STARGAL, 176 179 AVE_Xp, 177 180 AVE_NMEAS, -
trunk/Ohana/src/libdvo/src/dbExtractAverages.c
r35416 r36084 151 151 case AVE_TRANGE: 152 152 value.Flt = TimeValue (average[0].Trange, 0, TimeFormat); 153 break; 154 155 case AVE_PSF_QF: 156 value.Flt = average[0].psfQF; 157 break; 158 case AVE_PSF_QF_PERF: 159 value.Flt = average[0].psfQFperf; 160 break; 161 case AVE_STARGAL: 162 value.Flt = average[0].stargal; 153 163 break; 154 164 -
trunk/Ohana/src/libdvo/src/dbFields.c
r35416 r36084 314 314 } 315 315 316 if (!strcasecmp (fieldName, "RA")) ESCAPE (AVE_RA, MAG_NONE, OPIHI_FLT); 317 if (!strcasecmp (fieldName, "DEC")) ESCAPE (AVE_DEC, MAG_NONE, OPIHI_FLT); 318 if (!strcasecmp (fieldName, "GLON")) ESCAPE (AVE_GLON, MAG_NONE, OPIHI_FLT); 319 if (!strcasecmp (fieldName, "GLAT")) ESCAPE (AVE_GLAT, MAG_NONE, OPIHI_FLT); 320 if (!strcasecmp (fieldName, "ELON")) ESCAPE (AVE_ELON, MAG_NONE, OPIHI_FLT); 321 if (!strcasecmp (fieldName, "ELAT")) ESCAPE (AVE_ELAT, MAG_NONE, OPIHI_FLT); 322 if (!strcasecmp (fieldName, "dRA")) ESCAPE (AVE_RA_ERR, MAG_NONE, OPIHI_FLT); 323 if (!strcasecmp (fieldName, "dDEC")) ESCAPE (AVE_DEC_ERR, MAG_NONE, OPIHI_FLT); 324 if (!strcasecmp (fieldName, "uRA")) ESCAPE (AVE_U_RA, MAG_NONE, OPIHI_FLT); 325 if (!strcasecmp (fieldName, "uDEC")) ESCAPE (AVE_U_DEC, MAG_NONE, OPIHI_FLT); 326 if (!strcasecmp (fieldName, "duRA")) ESCAPE (AVE_U_RA_ERR, MAG_NONE, OPIHI_FLT); 327 if (!strcasecmp (fieldName, "duDEC")) ESCAPE (AVE_U_DEC_ERR, MAG_NONE, OPIHI_FLT); 328 if (!strcasecmp (fieldName, "PAR")) ESCAPE (AVE_PAR, MAG_NONE, OPIHI_FLT); 329 if (!strcasecmp (fieldName, "dPAR")) ESCAPE (AVE_PAR_ERR, MAG_NONE, OPIHI_FLT); 330 if (!strcasecmp (fieldName, "ChiSqPos")) ESCAPE (AVE_CHISQ_POS, MAG_NONE, OPIHI_FLT); 331 if (!strcasecmp (fieldName, "ChiSqPM")) ESCAPE (AVE_CHISQ_PM, MAG_NONE, OPIHI_FLT); 332 if (!strcasecmp (fieldName, "ChiSqPar")) ESCAPE (AVE_CHISQ_PAR, MAG_NONE, OPIHI_FLT); 333 if (!strcasecmp (fieldName, "Tmean")) ESCAPE (AVE_TMEAN, MAG_NONE, OPIHI_FLT); 334 if (!strcasecmp (fieldName, "Trange")) ESCAPE (AVE_TRANGE, MAG_NONE, OPIHI_FLT); 335 if (!strcasecmp (fieldName, "NMEAS")) ESCAPE (AVE_NMEAS, MAG_NONE, OPIHI_INT); 336 if (!strcasecmp (fieldName, "NMISS")) ESCAPE (AVE_NMISS, MAG_NONE, OPIHI_INT); 337 if (!strcasecmp (fieldName, "NPOS")) ESCAPE (AVE_NPOS, MAG_NONE, OPIHI_INT); 338 if (!strcasecmp (fieldName, "NASTROM")) ESCAPE (AVE_NPOS, MAG_NONE, OPIHI_INT); 339 if (!strcasecmp (fieldName, "FLAGS")) ESCAPE (AVE_OBJ_FLAGS, MAG_NONE, OPIHI_INT); 340 if (!strcasecmp (fieldName, "OBJ_FLAGS")) ESCAPE (AVE_OBJ_FLAGS, MAG_NONE, OPIHI_INT); 341 if (!strcasecmp (fieldName, "OBJFLAGS")) ESCAPE (AVE_OBJ_FLAGS, MAG_NONE, OPIHI_INT); 342 if (!strcasecmp (fieldName, "OBJID")) ESCAPE (AVE_OBJID, MAG_NONE, OPIHI_INT); 343 if (!strcasecmp (fieldName, "CATID")) ESCAPE (AVE_CATID, MAG_NONE, OPIHI_INT); 344 if (!strcasecmp (fieldName, "EXTID_HI")) ESCAPE (AVE_EXTID_HI, MAG_NONE, OPIHI_INT); 345 if (!strcasecmp (fieldName, "EXTID_LO")) ESCAPE (AVE_EXTID_LO, MAG_NONE, OPIHI_INT); 316 if (!strcasecmp (fieldName, "RA")) ESCAPE (AVE_RA, MAG_NONE, OPIHI_FLT); 317 if (!strcasecmp (fieldName, "DEC")) ESCAPE (AVE_DEC, MAG_NONE, OPIHI_FLT); 318 if (!strcasecmp (fieldName, "GLON")) ESCAPE (AVE_GLON, MAG_NONE, OPIHI_FLT); 319 if (!strcasecmp (fieldName, "GLAT")) ESCAPE (AVE_GLAT, MAG_NONE, OPIHI_FLT); 320 if (!strcasecmp (fieldName, "ELON")) ESCAPE (AVE_ELON, MAG_NONE, OPIHI_FLT); 321 if (!strcasecmp (fieldName, "ELAT")) ESCAPE (AVE_ELAT, MAG_NONE, OPIHI_FLT); 322 if (!strcasecmp (fieldName, "dRA")) ESCAPE (AVE_RA_ERR, MAG_NONE, OPIHI_FLT); 323 if (!strcasecmp (fieldName, "dDEC")) ESCAPE (AVE_DEC_ERR, MAG_NONE, OPIHI_FLT); 324 if (!strcasecmp (fieldName, "uRA")) ESCAPE (AVE_U_RA, MAG_NONE, OPIHI_FLT); 325 if (!strcasecmp (fieldName, "uDEC")) ESCAPE (AVE_U_DEC, MAG_NONE, OPIHI_FLT); 326 if (!strcasecmp (fieldName, "duRA")) ESCAPE (AVE_U_RA_ERR, MAG_NONE, OPIHI_FLT); 327 if (!strcasecmp (fieldName, "duDEC")) ESCAPE (AVE_U_DEC_ERR, MAG_NONE, OPIHI_FLT); 328 if (!strcasecmp (fieldName, "PAR")) ESCAPE (AVE_PAR, MAG_NONE, OPIHI_FLT); 329 if (!strcasecmp (fieldName, "dPAR")) ESCAPE (AVE_PAR_ERR, MAG_NONE, OPIHI_FLT); 330 if (!strcasecmp (fieldName, "ChiSqPos")) ESCAPE (AVE_CHISQ_POS, MAG_NONE, OPIHI_FLT); 331 if (!strcasecmp (fieldName, "ChiSqPM")) ESCAPE (AVE_CHISQ_PM, MAG_NONE, OPIHI_FLT); 332 if (!strcasecmp (fieldName, "ChiSqPar")) ESCAPE (AVE_CHISQ_PAR, MAG_NONE, OPIHI_FLT); 333 if (!strcasecmp (fieldName, "Tmean")) ESCAPE (AVE_TMEAN, MAG_NONE, OPIHI_FLT); 334 if (!strcasecmp (fieldName, "Trange")) ESCAPE (AVE_TRANGE, MAG_NONE, OPIHI_FLT); 335 if (!strcasecmp (fieldName, "psfqf")) ESCAPE (AVE_PSF_QF, MAG_NONE, OPIHI_FLT); 336 if (!strcasecmp (fieldName, "psfqfperf")) ESCAPE (AVE_PSF_QF_PERF, MAG_NONE, OPIHI_FLT); 337 if (!strcasecmp (fieldName, "psf_qf")) ESCAPE (AVE_PSF_QF, MAG_NONE, OPIHI_FLT); 338 if (!strcasecmp (fieldName, "psf_qf_perf")) ESCAPE (AVE_PSF_QF_PERF, MAG_NONE, OPIHI_FLT); 339 if (!strcasecmp (fieldName, "stargal")) ESCAPE (AVE_STARGAL, MAG_NONE, OPIHI_FLT); 340 if (!strcasecmp (fieldName, "NMEAS")) ESCAPE (AVE_NMEAS, MAG_NONE, OPIHI_INT); 341 if (!strcasecmp (fieldName, "NMISS")) ESCAPE (AVE_NMISS, MAG_NONE, OPIHI_INT); 342 if (!strcasecmp (fieldName, "NPOS")) ESCAPE (AVE_NPOS, MAG_NONE, OPIHI_INT); 343 if (!strcasecmp (fieldName, "NASTROM")) ESCAPE (AVE_NPOS, MAG_NONE, OPIHI_INT); 344 if (!strcasecmp (fieldName, "FLAGS")) ESCAPE (AVE_OBJ_FLAGS, MAG_NONE, OPIHI_INT); 345 if (!strcasecmp (fieldName, "OBJ_FLAGS")) ESCAPE (AVE_OBJ_FLAGS, MAG_NONE, OPIHI_INT); 346 if (!strcasecmp (fieldName, "OBJFLAGS")) ESCAPE (AVE_OBJ_FLAGS, MAG_NONE, OPIHI_INT); 347 if (!strcasecmp (fieldName, "OBJID")) ESCAPE (AVE_OBJID, MAG_NONE, OPIHI_INT); 348 if (!strcasecmp (fieldName, "CATID")) ESCAPE (AVE_CATID, MAG_NONE, OPIHI_INT); 349 if (!strcasecmp (fieldName, "EXTID_HI")) ESCAPE (AVE_EXTID_HI, MAG_NONE, OPIHI_INT); 350 if (!strcasecmp (fieldName, "EXTID_LO")) ESCAPE (AVE_EXTID_LO, MAG_NONE, OPIHI_INT); 346 351 347 352 // check for code:mode in photcode name -
trunk/Ohana/src/libdvo/src/dvosorts.c
r35263 r36084 60 60 61 61 /* sort a coordinate pair (X,Y) and the associated index (S) */ 62 void sort_IDs_indexonly (opihi_int *X, off_t *S, off_t N) { 63 64 # define SWAPFUNC(A,B){ off_t itmp; \ 65 itmp = S[A]; S[A] = S[B]; S[B] = itmp; \ 66 } 67 # define COMPARE(A,B)(X[S[A]] < X[S[B]]) 68 69 OHANA_SORT (N, COMPARE, SWAPFUNC); 70 71 # undef SWAPFUNC 72 # undef COMPARE 73 74 } 75 76 /* sort a coordinate pair (X,Y) and the associated index (S) */ 62 77 void sort_coords_indexonly (double *X, double *Y, off_t *S, off_t N) { 63 78 -
trunk/Ohana/src/libkapa/src/IOfuncs.c
r35761 r36084 54 54 va_end (argp); 55 55 56 if (!Nbyte) return (FALSE); 56 if (!Nbyte) { 57 KiiSendCommand (device, 16, "LEN: %11d", 0); 58 return (FALSE); 59 } 57 60 58 61 /* the message may contain up to 99,999,999,999 bytes (100MB) */ … … 84 87 /* find the message length, allocate space */ 85 88 sscanf (buffer, "%*s %d", &Nbytes); 89 if (Nbytes == 0) { 90 return TRUE; 91 } 92 86 93 ALLOCATE (message, char, Nbytes + 1); 87 94 memset (message, 0, Nbytes + 1); 95 88 96 89 97 /* read Nbytes from the device */ -
trunk/Ohana/src/libohana/src
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20130711/Ohana/src/libohana/src (added) merged: 35877,36065,36073
- Property svn:mergeinfo changed
-
trunk/Ohana/src/libohana/src/gaussj.c
r24080 r36084 1 1 # include <ohana.h> 2 2 # define GROWTHTEST 0 3 # define MAX_RANGE 1.0e 73 # define MAX_RANGE 1.0e9 4 4 5 5 // Gauss-Jordan elimination using full pivots based on Press et al's description. Substantially … … 91 91 /* rescale by pivot reciprocal */ 92 92 double tmpval = 1.0 / A[maxcol][maxcol]; 93 // XXX why is this here (don't I double count this element?) A[maxcol][maxcol] = 1.0; 93 94 A[maxcol][maxcol] = 1.0; 94 95 for (col = 0; col < N; col++) A[maxcol][col] *= tmpval; … … 117 118 } 118 119 } 120 121 # if (GROWTHTEST) 122 fprintf (stderr, "final A matrix:\n"); 123 for (row = 0; row < N; row++) { 124 for (col = 0; col < N; col++) { 125 fprintf (stderr, "%10.3e ", A[row][col]); 126 } 127 fprintf (stderr, "\n"); 128 } 129 fprintf (stderr, "\n"); 130 # endif 119 131 120 132 // swap back the inverse matrix based on the row swaps above -
trunk/Ohana/src/opihi
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20130711/Ohana/src/opihi (added) merged: 35802,35873,35875,35878,35969,36022-36023,36073
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/cmd.astro
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20130711/Ohana/src/opihi/cmd.astro (added) merged: 35969,36073
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/cmd.astro/Makefile
r35416 r36084 60 60 $(SRC)/scale.$(ARCH).o \ 61 61 $(SRC)/sexigesimal.$(ARCH).o \ 62 $(SRC)/sersic.$(ARCH).o \ 62 63 $(SRC)/spec.$(ARCH).o \ 63 64 $(SRC)/specpairfit.$(ARCH).o \ -
trunk/Ohana/src/opihi/cmd.astro/init.c
r35757 r36084 49 49 int scale PROTO((int, char **)); 50 50 int sexigesimal PROTO((int, char **)); 51 int sersic PROTO((int, char **)); 51 52 int spec PROTO((int, char **)); 52 53 int specpairfit PROTO((int, char **)); … … 107 108 {1, "scale", scale, "get / set real bzero / bscale values"}, 108 109 {1, "sexigesimal", sexigesimal, "convert to/from sexigesimal/decimal"}, 110 {1, "sersic", sersic, "generate sub-pixel resolved sersic model"}, 109 111 {1, "spec", spec, "extract a spectrum"}, 110 112 {1, "specpairfit", specpairfit, "fit spectrum to another spectrum"}, -
trunk/Ohana/src/opihi/cmd.basic/list.c
r33662 r36084 2 2 # define D_NLINES 100 3 3 static char prompt[] = ">> "; 4 5 static int set_list_varname (char *line, char *base, int N, int excelStyle); 4 6 5 7 int list (int argc, char **argv) { … … 21 23 } 22 24 25 int EXCEL_STYLE = FALSE; 26 if ((N = get_argument (argc, argv, "-excel-style"))) { 27 remove_argument (N, &argc, argv); 28 EXCEL_STYLE = TRUE; 29 } 30 if ((N = get_argument (argc, argv, "-excel"))) { 31 remove_argument (N, &argc, argv); 32 EXCEL_STYLE = TRUE; 33 } 34 23 35 if ((N = get_argument (argc, argv, "-vectors"))) { 24 36 remove_argument (N, &argc, argv); … … 49 61 50 62 for (i = 0; i < argc - 3; i++) { 51 s printf (line, "%s:%d", argv[1], i);63 set_list_varname (line, argv[1], i, EXCEL_STYLE); 52 64 set_str_variable (line, argv[i+3]); 53 65 } … … 83 95 if (!word) break; 84 96 85 sprintf (line, "%s:%d", argv[1], nWords); 97 // sprintf (line, "%s:%d", argv[1], nWords); 98 set_list_varname (line, argv[1], nWords, EXCEL_STYLE); 99 86 100 set_str_variable (line, word); 87 101 FREE (word); … … 120 134 sprintf (line, "%s:%d", argv[3], i); 121 135 value = get_variable (line); 122 sprintf (line, "%s:%d", argv[1], i); 136 // sprintf (line, "%s:%d", argv[1], i); 137 set_list_varname (line, argv[1], i, EXCEL_STYLE); 123 138 set_str_variable (line, value); 124 139 } … … 136 151 N = get_int_variable (line, &found); 137 152 for (i = 0; i < argc - 3; i++) { 138 sprintf (line, "%s:%d", argv[1], N + i); 153 // sprintf (line, "%s:%d", argv[1], N + i); 154 set_list_varname (line, argv[1], N + i, EXCEL_STYLE); 139 155 set_str_variable (line, argv[i+3]); 140 156 } … … 159 175 N = get_int_variable (line, &found); 160 176 for (i = 0; i < N; i++) { 161 sprintf (line, "%s:%d", argv[1], i); 177 // sprintf (line, "%s:%d", argv[1], i); 178 set_list_varname (line, argv[1], i, EXCEL_STYLE); 162 179 value = get_variable (line); 163 180 if (value == NULL) continue; … … 165 182 free (value); 166 183 for (j = i + 1; j < N; j++) { 167 sprintf (line2, "%s:%d", argv[1], j); 184 // sprintf (line2, "%s:%d", argv[1], j); 185 set_list_varname (line2, argv[1], j, EXCEL_STYLE); 168 186 next_value = get_variable (line2); 169 187 set_str_variable (line, next_value); … … 235 253 if (B != (char *) NULL) { *B = 0; } 236 254 if (*A != 0) { 237 sprintf (line, "%s:%d", argv[1], i); 255 // sprintf (line, "%s:%d", argv[1], i); 256 set_list_varname (line, argv[1], i, EXCEL_STYLE); 238 257 set_str_variable (line, A); 239 258 A = B + 1; … … 283 302 284 303 if (*input) { 285 sprintf (line, "%s:%d", argv[1], i); 304 // sprintf (line, "%s:%d", argv[1], i); 305 set_list_varname (line, argv[1], i, EXCEL_STYLE); 286 306 set_str_variable (line, input); 287 307 free (input); 288 308 i++; 289 }309 } 290 310 } 291 311 return (TRUE); 292 312 } 313 314 static int set_list_varname (char *line, char *base, int N, int excelStyle) { 315 316 int i; 317 318 // A-Z correspond to 0 - 25 319 320 if (excelStyle) { 321 float f = log(26.0); 322 float g = (N == 0) ? 0.0 : log(1.0*N); 323 int Ndigit = (int) (g / f) + 1; 324 if (Ndigit > 10) { 325 sprintf (line, "%s:ZZZZZZZZZZ", base); 326 return FALSE; 327 } 328 char name[12]; 329 memset (name, 0, 12); 330 for (i = 0; i < Ndigit; i++) { 331 float Npow = Ndigit - i - 1; 332 float g = pow(26.0, Npow); 333 int V = (int) (N / g); 334 name[i] = (Npow == 0.0) ? 'A' + V : 'A' + V - 1; 335 N -= V * g; 336 } 337 sprintf (line, "%s:%s", base, name); 338 } else { 339 sprintf (line, "%s:%d", base, N); 340 } 341 return TRUE; 342 } -
trunk/Ohana/src/opihi/cmd.data
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20130711/Ohana/src/opihi/cmd.data (added) merged: 35875,36022-36023,36073
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/cmd.data/Makefile
r35416 r36084 66 66 $(SRC)/integrate.$(ARCH).o \ 67 67 $(SRC)/interpolate.$(ARCH).o \ 68 $(SRC)/join.$(ARCH).o \ 68 69 $(SRC)/jpeg.$(ARCH).o \ 69 70 $(SRC)/kern.$(ARCH).o \ … … 143 144 $(SRC)/vmaxwell.$(ARCH).o \ 144 145 $(SRC)/vgrid.$(ARCH).o \ 146 $(SRC)/vlist.$(ARCH).o \ 145 147 $(SRC)/vload.$(ARCH).o \ 146 148 $(SRC)/vzload.$(ARCH).o \ -
trunk/Ohana/src/opihi/cmd.data/init.c
r35416 r36084 55 55 int integrate PROTO((int, char **)); 56 56 int interpolate PROTO((int, char **)); 57 int join PROTO((int, char **)); 57 58 int jpeg PROTO((int, char **)); 58 59 int kern PROTO((int, char **)); … … 133 134 int vmaxwell PROTO((int, char **)); 134 135 int vload PROTO((int, char **)); 136 int vlist PROTO((int, char **)); 135 137 int vzload PROTO((int, char **)); 136 138 int vstats PROTO((int, char **)); … … 209 211 {1, "integrate", integrate, "integrate a vector"}, 210 212 {1, "interpolate", interpolate, "interpolate between vector pairs"}, 213 {1, "join", join, "find the join of two ID vectors"}, 211 214 {1, "jpeg", jpeg, "convert display image to JPEG"}, 212 215 {1, "kern", kern, "convolve with 3x3 kernel"}, … … 290 293 {1, "vgrid", vgrid, "generate an image from a triplet of vectors"}, 291 294 {1, "vhistogram", histogram, "generate histogram from vector"}, 295 {1, "vlist", vlist, "append values to a vector from command line"}, 292 296 {1, "vload", vload, "load vectors as overlay on image display"}, 293 297 {1, "vmaxwell", vmaxwell, "fit a Maxwellian to a vector"}, -
trunk/Ohana/src/opihi/cmd.data/match2d.c
r33963 r36084 14 14 Vector *index1, *index2; 15 15 16 if ((N = get_argument (argc, argv, "-h"))) goto usage; 17 if ((N = get_argument (argc, argv, "--help"))) goto usage; 18 16 19 CLOSEST = FALSE; 17 20 if ((N = get_argument (argc, argv, "-closest"))) { … … 38 41 if (argc != 6) { 39 42 gprint (GP_ERR, "USAGE: match2d X1 Y1 X2 Y2 Radius [-index1 (index1)] [-index2 (index2)] [-closest]\n"); 40 gprint (GP_ERR, " if -closest is provided, index1 & index2 will have the same length as X1 and X2 (respectively)\n"); 41 gprint (GP_ERR, " with either the index of the match or a value of -1 for non-matches\n"); 43 gprint (GP_ERR, " use -h or --help for more detail\n"); 42 44 return (FALSE); 43 45 } … … 90 92 91 93 return (TRUE); 94 95 usage: 96 gprint (GP_ERR, "we have two modes of operation:\n\n"); 97 98 gprint (GP_ERR, "without -closest, we are finding all matched pairs within the match radius. in this\n"); 99 gprint (GP_ERR, "case, the two index vectors have the same length, one entry per matched pair.\n"); 100 gprint (GP_ERR, "x1[index1],y1[index1] matches to x2[index2],y2[index2].\n\n"); 101 102 gprint (GP_ERR, "with -closest selected, we are finding the closest element of set 1 to each of set 2\n"); 103 gprint (GP_ERR, "and vice versa. in this case, index1 is always the same length as x1,y1, while index2\n"); 104 gprint (GP_ERR, "is the same lengths as x2,y2. x2[index1],y2[index1] matches x1,y1 while\n"); 105 gprint (GP_ERR, "x1[index2],y1[index2] matches x2,y2\n\n"); 106 107 gprint (GP_ERR, "if -index1 or -index2 is not supplied, the vectors are created with names index1 or index2\n"); 108 gprint (GP_ERR, "use 'reindex' to generate new vectors based on these index vectors\n"); 109 110 return FALSE; 92 111 } 93 112 -
trunk/Ohana/src/opihi/dvo/avmatch.c
r35416 r36084 70 70 dbExtractAveragesInit (); 71 71 72 // this does all the work of re-packaging the command, calling it on the remote machines, then loading in the results73 72 RAvec = NULL; 74 73 DECvec = NULL; 75 if (PARALLEL && !HOST_ID) {76 if (!CoordsFile) {77 // get vectors corresponding to coordinates of interest78 if ((RAvec = SelectVector (argv[1], ANYVECTOR, TRUE)) == NULL) goto help;79 if ((DECvec = SelectVector (argv[2], ANYVECTOR, TRUE)) == NULL) goto help;80 81 ALLOCATE (vec, Vector *, 2);82 vec[0] = RAvec;83 vec[1] = DECvec;84 85 CoordsFile = abspath("coords.fits", 1024);86 int status = WriteVectorTableFITS (CoordsFile, "COORDS", vec, 2, FALSE, NULL);87 if (!status) goto escape;88 }89 90 char *targv1 = argv[1];91 char *targv2 = argv[2];92 argv[1] = strcreate ("-coords");93 argv[2] = strcreate (CoordsFile);94 free (CoordsFile);95 96 // I need to pass the RA & DEC vectors to the remote clients...97 int status = HostTableParallelOps (skylist, argc, argv, RESULT_FILE, TRUE, RAvec->Nelements, VERBOSE);98 if (vec) free (vec);99 100 free (argv[1]);101 free (argv[2]);102 argv[1] = targv1;103 argv[2] = targv2;104 105 return status;106 }107 108 74 // get vectors corresponding to coordinates of interest 109 75 if (CoordsFile) { … … 120 86 remove_argument (1, &argc, argv); 121 87 } 88 89 /* load regions which contain all supplied RA,DEC coordinates */ 90 if ((skylist = SelectRegionsByCoordVectors (RAvec, DECvec)) == NULL) goto escape; 91 92 // this does all the work of re-packaging the command, calling it on the remote machines, then loading in the results 93 if (PARALLEL && !HOST_ID) { 94 95 // We need to copy the args to a temp array and modify them so that we send the 96 // correct set to the remote client. The args list looks like this: 97 // if (!CoordsFile) : avmatch (RADIUS) field, ... [we removed RA & DEC above] 98 // if ( CoordsFile) : avmatch (RADIUS) field, ... [because we stripped off the -coords filename elements] 99 100 // allocate the temp array and copy all but (RA) (DEC) 101 int targc = 0; 102 char **targv = NULL; 103 ALLOCATE (targv, char *, argc + 2); 104 for (i = 0; i < argc; i++) { 105 targv[targc] = strcreate (argv[i]); 106 targc ++; 107 } 108 109 // if not specified, create the coords.fits input file 110 // NOTE: RAvec, DECvec were set above 111 if (!CoordsFile) { 112 ALLOCATE (vec, Vector *, 2); 113 vec[0] = RAvec; 114 vec[1] = DECvec; 115 116 CoordsFile = abspath("coords.fits", 1024); 117 int status = WriteVectorTableFITS (CoordsFile, "COORDS", vec, 2, FALSE, NULL); 118 if (!status) goto escape; 119 } 120 121 // add the coords file to the args list 122 targv[targc+0] = strcreate ("-coords"); 123 targv[targc+1] = CoordsFile; // this gets freed with targv 124 targc += 2; 125 126 // I need to pass the RA & DEC vectors to the remote clients... 127 int status = HostTableParallelOps (skylist, targc, targv, RESULT_FILE, TRUE, RAvec->Nelements, VERBOSE); 128 if (vec) free (vec); 129 130 // free up targv 131 for (i = 0; i < targc; i++) { 132 free (targv[i]); 133 } 134 free (targv); 135 136 return status; 137 } 138 122 139 RADIUS = atof (argv[1]); 123 140 remove_argument (1, &argc, argv); … … 140 157 if (fields[i].photcode[0].type == PHOT_DEP) needMeasures = TRUE; 141 158 } 142 143 /* load regions which contain all supplied RA,DEC coordinates */144 if ((skylist = SelectRegionsByCoordVectors (RAvec, DECvec)) == NULL) goto escape;145 159 146 160 /* create output storage vectors */ -
trunk/Ohana/src/opihi/dvo/hosts.c
r35757 r36084 12 12 gprint (GP_ERR, " commands:\n"); 13 13 gprint (GP_ERR, " purge-temp : delete all tempfiles for this shell\n"); 14 gprint (GP_ERR, " : [-old-pid] [-all-pid] [-v] [-verbose] [-commit] [-type type] \n");14 gprint (GP_ERR, " : [-old-pid] [-all-pid] [-v] [-verbose] [-commit] [-type type] [-age hours]\n"); 15 15 gprint (GP_ERR, " get-results : determine name of RESULTS file\n"); 16 16 return FALSE; … … 33 33 } 34 34 35 struct timeval now; 36 gettimeofday (&now, NULL); 37 38 float AGE = 0; 39 int NOW = now.tv_sec; 40 if ((N = get_argument (argc, argv, "-age"))) { 41 remove_argument (N, &argc, argv); 42 AGE = atof(argv[N]); 43 remove_argument (N, &argc, argv); 44 } 45 35 46 int VERBOSE = FALSE; 36 47 if ((N = get_argument (argc, argv, "-v"))) { … … 121 132 glob (name, 0, NULL, &pglob); 122 133 int j; 134 struct stat filestats; 123 135 for (j = 0; j < pglob.gl_pathc; j++) { 136 if (AGE > 0) { 137 if (stat(pglob.gl_pathv[j], &filestats)) { 138 gprint (GP_ERR, "failed to get stats for %s\n", pglob.gl_pathv[j]); 139 continue; 140 } 141 float myAge = (NOW - filestats.st_mtime) / 3600.0; 142 if (myAge < AGE) continue; 143 } 124 144 if (VERBOSE) gprint (GP_ERR, "unlink %s\n", pglob.gl_pathv[j]); 125 145 if (!DRYRUN) unlink (pglob.gl_pathv[j]); -
trunk/Ohana/src/opihi/lib.shell/ListOps.c
r33963 r36084 189 189 int is_list_data (char *line) { 190 190 191 char *comm , *temp;192 193 temp = thisword (nextword (nextword (line)));194 comm = thisword (line); 195 191 char *comm = NULL; 192 char *temp = NULL; 193 char *ptr = NULL; 194 195 comm = thisword (line); 196 196 if (comm == NULL) goto escape; 197 198 197 if (strcmp (comm, "list")) goto escape; 198 199 ptr = nextword (line); 200 if (!strncmp("-excel", ptr, strlen("-excel"))) ptr = nextword (ptr); 201 if (!strncmp("-excel-style", ptr, strlen("-excel-style"))) ptr = nextword (ptr); 202 ptr = nextword (ptr); 203 if (!strncmp("-excel", ptr, strlen("-excel"))) ptr = nextword (ptr); 204 if (!strncmp("-excel-style", ptr, strlen("-excel-style"))) ptr = nextword (ptr); 205 temp = thisword (ptr); 199 206 200 207 /* if (cond) (command) does not define a complete block */ -
trunk/Ohana/src/relastro/src
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20130711/Ohana/src/relastro/src (added) merged: 36073
- Property svn:mergeinfo changed
-
trunk/Ohana/src/tools/src/medianfilter.c
r20652 r36084 96 96 for (j = 0; j < Npixrd; j++, O++) { 97 97 Nvalid = 0; 98 int debug = FALSE && (n == 5) && (j >= 1776779) && (j <= 1776789); 98 99 for (k = 0; k < Nfiles; k++) { 99 100 v = (float *)tmpmatr[k].buffer; 101 if (debug) { 102 fprintf (stderr, "%8.2f ", v[j]); 103 } 100 104 if (v[j] < MinValid) continue; 101 if (isnan(v[j])) continue; 102 if (isinf(v[j])) continue; 103 list[k] = v[j]; 105 if (isnan(v[j])) { 106 continue; 107 } 108 if (isinf(v[j])) { 109 continue; 110 } 111 list[Nvalid] = v[j]; 104 112 Nvalid ++; 105 113 } 114 if (debug) fprintf (stderr, "\n"); 106 115 if (Nvalid == 0) { 107 116 *O = 0.0; 117 if (debug) { 118 fprintf (stderr, "Nvalid is 0\n"); 119 } 108 120 continue; 109 121 } … … 111 123 sum = 0; 112 124 Nval = 0; 125 if (debug) fprintf (stderr, "list : "); 113 126 for (k = fmin*Nvalid; k < fmax*Nvalid; k++) { 127 if (debug) { 128 fprintf (stderr, "%8.2f ", list[k]); 129 } 114 130 sum += list[k]; 115 131 Nval ++; 116 132 } 117 133 *O = (sum / Nval); 134 if (debug) { 135 fprintf (stderr, " = %f / %f = %f\n", sum, Nval, *O); 136 fprintf (stderr, "\n"); 137 } 118 138 } 119 139
Note:
See TracChangeset
for help on using the changeset viewer.
