Changeset 37901
- Timestamp:
- Feb 6, 2015, 12:11:09 PM (11 years ago)
- Location:
- branches/eam_branches/ipp-20150112/Ohana/src/opihi
- Files:
-
- 2 added
- 4 edited
-
cmd.astro/cdhistogram.c (modified) (1 diff)
-
cmd.data/Makefile (modified) (2 diffs)
-
cmd.data/init.c (modified) (4 diffs)
-
cmd.data/read_vectors.c (modified) (6 diffs)
-
cmd.data/squash3d.c (added)
-
cmd.data/tdhistogram.c (added)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150112/Ohana/src/opihi/cmd.astro/cdhistogram.c
r37850 r37901 2 2 3 3 # define CHECKVAL(ARG) if (!isfinite(ARG)) { gprint (GP_ERR, "illegal value for %s: %f\n", #ARG, ARG); return (FALSE); } 4 enum {IS_DOT, IS_SQUARE, IS_CIRCLE, IS_GAUSS};5 4 6 5 int cdhistogram (int argc, char **argv) { -
branches/eam_branches/ipp-20150112/Ohana/src/opihi/cmd.data/Makefile
r37853 r37901 61 61 $(SRC)/ungridify.$(ARCH).o \ 62 62 $(SRC)/histogram.$(ARCH).o \ 63 $(SRC)/tdhistogram.$(ARCH).o \ 63 64 $(SRC)/hermitian1d.$(ARCH).o \ 64 65 $(SRC)/hermitian2d.$(ARCH).o \ … … 131 132 $(SRC)/imspline_apply.$(ARCH).o \ 132 133 $(SRC)/imspline_construct.$(ARCH).o \ 134 $(SRC)/squash3d.$(ARCH).o \ 133 135 $(SRC)/imstats.$(ARCH).o \ 134 136 $(SRC)/style.$(ARCH).o \ -
branches/eam_branches/ipp-20150112/Ohana/src/opihi/cmd.data/init.c
r37850 r37901 51 51 int ungridify PROTO((int, char **)); 52 52 int histogram PROTO((int, char **)); 53 int tdhistogram PROTO((int, char **)); 53 54 int hermitian1d PROTO((int, char **)); 54 55 int hermitian2d PROTO((int, char **)); … … 118 119 int imspline_apply PROTO((int, char **)); 119 120 int imspline_construct PROTO((int, char **)); 121 int squash3d PROTO((int, char **)); 120 122 int stats PROTO((int, char **)); 121 123 int imstats PROTO((int, char **)); … … 218 220 {1, "header", header, "print image header"}, 219 221 {1, "histogram", histogram, "generate histogram from vector"}, 222 {1, "tdhistogram", tdhistogram, "generate 2D histogram image from vector set"}, 220 223 {1, "hermitian1d", hermitian1d, "generate 1-D Hermitian Polynomial"}, 221 224 {1, "hermitian2d", hermitian2d, "generate 2-D Hermitian Polynomial"}, … … 291 294 {1, "imspline.apply", imspline_apply, "apply spline fit to generate an image"}, 292 295 {1, "imspline.const", imspline_construct, "create spline 2nd deriv. terms"}, 296 {1, "squash3d", squash3d, "squash 3d buffer to 2d"}, 293 297 {1, "stats", imstats, "statistics on a portion of an image"}, 294 298 {1, "style", style, "set the style for graph plots"}, -
branches/eam_branches/ipp-20150112/Ohana/src/opihi/cmd.data/read_vectors.c
r37807 r37901 372 372 } 373 373 374 int VERBOSE = FALSE; 375 if ((N = get_argument (argc, argv, "-v"))) { 376 remove_argument (N, &argc, argv); 377 VERBOSE = TRUE; 378 } 379 374 380 int start = 0; 375 381 int Nrows = -1; // -1 : read entire table … … 399 405 // } 400 406 401 if (argc < 2) ESCAPE ("USAGE: read -fits extension [-extnum] [-keyword key] name name ...\n"); 407 if ((argc < 2) && !getSizes) ESCAPE ("USAGE: read -fits extension [-extnum] [-keyword key] name name ...\n"); 408 if ((argc != 1) && getSizes) ESCAPE ("USAGE: read -sizes -fits extension [-extnum] (does not read data values)\n"); 402 409 403 410 if (f == NULL) ESCAPE ("file not found\n"); … … 436 443 if (start >= header.Naxis[1]) ESCAPE ("invalid range: start >= Ny (%d)\n", header.Naxis[1]); 437 444 if (Nrows < 0) ESCAPE ("invalid range: Nrows < 0\n"); 438 if (start + Nrows > header.Naxis[1]) ESCAPE ("invalid range: start + Nrows > Ny (%d)\n", header.Naxis[1]); 445 446 // just a warning: 447 if (start + Nrows > header.Naxis[1]) { 448 if (VERBOSE) gprint (GP_ERR, "NOTE: reading last block will return only %d rows\n", header.Naxis[1] - start); 449 } 439 450 440 451 // Ny = 100, start = 0, Nrows = -1 -> Nrows => 100 … … 472 483 } 473 484 485 if (getSizes) { 486 read_table_sizes (&header); 487 if (CCDKeyword != NULL) free (CCDKeyword); 488 gfits_free_header (&header); 489 return TRUE; 490 } 491 474 492 if (Nrows == -1) { 475 493 Nrows = header.Naxis[1] - start; … … 478 496 if (start >= header.Naxis[1]) ESCAPE ("invalid range: start >= Ny (%d)\n", header.Naxis[1]); 479 497 if (Nrows < 0) ESCAPE ("invalid range: Nrows < 0\n"); 480 if (start + Nrows > header.Naxis[1]) ESCAPE ("invalid range: start + Nrows > Ny (%d)\n", header.Naxis[1]); 498 499 // just a warning: 500 if (start + Nrows > header.Naxis[1]) { 501 if (VERBOSE) gprint (GP_ERR, "NOTE: reading last block will return only %d rows\n", header.Naxis[1] - start); 502 } 481 503 482 504 if (!gfits_fread_ftable_range (f, padIfShort, &table, start, Nrows)) ESCAPE ("error reading table for extension %d\n", Nextend); … … 603 625 604 626 set_int_variable ("table:Nx", header->Naxis[0]); 605 set_int_variable ("table:N x", header->Naxis[0]);627 set_int_variable ("table:Ny", header->Naxis[1]); 606 628 set_int_variable ("table:Nfields", Nfields); 607 629
Note:
See TracChangeset
for help on using the changeset viewer.
