Changeset 29938 for trunk/Ohana/src/opihi/cmd.data
- Timestamp:
- Dec 5, 2010, 10:04:42 PM (16 years ago)
- Location:
- trunk/Ohana/src/opihi/cmd.data
- Files:
-
- 7 edited
- 1 copied
-
Makefile (modified) (1 diff)
-
densify.c (copied) (copied from branches/eam_branches/ipp-20101103/Ohana/src/opihi/cmd.data/densify.c )
-
init.c (modified) (2 diffs)
-
rd.c (modified) (1 diff)
-
read_vectors.c (modified) (4 diffs)
-
resize.c (modified) (1 diff)
-
section.c (modified) (4 diffs)
-
vgauss.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.data/Makefile
r29540 r29938 36 36 $(SRC)/cut.$(ARCH).o \ 37 37 $(SRC)/delete.$(ARCH).o \ 38 $(SRC)/densify.$(ARCH).o \ 38 39 $(SRC)/device.$(ARCH).o \ 39 40 $(SRC)/dimendown.$(ARCH).o \ -
trunk/Ohana/src/opihi/cmd.data/init.c
r29540 r29938 25 25 int dbselect PROTO((int, char **)); 26 26 int delete PROTO((int, char **)); 27 int densify PROTO((int, char **)); 27 28 int device PROTO((int, char **)); 28 29 int dimendown PROTO((int, char **)); … … 161 162 {1, "dbselect", dbselect, "extract vectors from mysql database table"}, 162 163 {1, "delete", delete, "delete vectors or images"}, 164 {1, "densify", densify, "create an image histogram from a set of vectors"}, 163 165 {1, "device", device, "set / get current graphics device"}, 164 166 {1, "dimendown", dimendown, "convert image to vector"}, -
trunk/Ohana/src/opihi/cmd.data/rd.c
r28241 r29938 184 184 ftable.header[0].buffer = NULL; 185 185 gfits_copy_header (&buf[0].header, ftable.header); 186 status = gfits_fread_ftable_data (f, &ftable ); // this just reads the bytes (not even a SWAP)186 status = gfits_fread_ftable_data (f, &ftable, FALSE); // this just reads the bytes (not even a SWAP) 187 187 status = gfits_uncompress_image (&buf[0].header, &buf[0].matrix, &ftable); 188 188 // uncompressing the image leaves the format as an extension -
trunk/Ohana/src/opihi/cmd.data/read_vectors.c
r29540 r29938 160 160 161 161 off_t Nbytes; 162 int i, j, k, N, Nextend, Ny, Binary, vecType ;162 int i, j, k, N, Nextend, Ny, Binary, vecType, padIfShort; 163 163 char type[16], ID[80], *CCDKeyword; 164 164 FTable table; … … 174 174 CCDKeyword = strcreate (argv[N]); 175 175 remove_argument (N, &argc, argv); 176 } 177 178 padIfShort = FALSE; 179 if ((N = get_argument (argc, argv, "-pad-if-short"))) { 180 remove_argument (N, &argc, argv); 181 padIfShort = TRUE; 176 182 } 177 183 … … 205 211 } 206 212 if (!gfits_load_header (f, &header)) ESCAPE ("error reading header for extension"); 207 if (!gfits_fread_ftable_data (f, &table )) ESCAPE ("error reading table for extension");213 if (!gfits_fread_ftable_data (f, &table, padIfShort)) ESCAPE ("error reading table for extension"); 208 214 209 215 } else { … … 236 242 continue; 237 243 } 238 if (!gfits_fread_ftable_data (f, &table )) ESCAPE ("error reading table for extension");244 if (!gfits_fread_ftable_data (f, &table, padIfShort)) ESCAPE ("error reading table for extension"); 239 245 break; 240 246 } -
trunk/Ohana/src/opihi/cmd.data/resize.c
r13479 r29938 17 17 if (!GetImage (NULL, &kapa, name)) return (FALSE); 18 18 FREE (name); 19 20 if ((N = get_argument (argc, argv, "-by-image"))) { 21 remove_argument (N, &argc, argv); 22 KiiResizeByImage (kapa); 23 return (TRUE); 24 } 19 25 20 26 if (argc != 3) { -
trunk/Ohana/src/opihi/cmd.data/section.c
r27790 r29938 1 1 # include "data.h" 2 2 3 enum {NONE, LIST, UP, DOWN, TOP, BOTTOM, TOOL, BG };3 enum {NONE, LIST, UP, DOWN, TOP, BOTTOM, TOOL, BG, IMAGE}; 4 4 5 5 int section (int argc, char **argv) { … … 49 49 remove_argument (N, &argc, argv); 50 50 action = BG; 51 } 52 53 if ((N = get_argument (argc, argv, "-image"))) { 54 remove_argument (N, &argc, argv); 55 action = IMAGE; 51 56 } 52 57 … … 130 135 } 131 136 137 if (argc == 4) { 138 /* set section */ 139 section.name = argv[1]; 140 section.x = atof (argv[2]); 141 section.y = atof (argv[3]); 142 section.bg = background; 143 KapaSetSectionByImage (kapa, §ion); 144 return (TRUE); 145 } 146 132 147 if (argc == 6) { 133 148 /* set section */ … … 142 157 } 143 158 gprint (GP_ERR, "USAGE: section name [x y dx dy]\n"); 159 gprint (GP_ERR, "USAGE: section name [-image x y] : width based on current image\n"); 144 160 gprint (GP_ERR, "USAGE: section name [-list] [-up] [-down] [-top] [-bottom]\n"); 145 161 return (FALSE); -
trunk/Ohana/src/opihi/cmd.data/vgauss.c
r29001 r29938 45 45 CastVector (yvec, OPIHI_FLT); 46 46 CastVector (svec, OPIHI_FLT); 47 // XXX Cast is failing. 48 47 49 48 50 Npts = xvec[0].Nelements;
Note:
See TracChangeset
for help on using the changeset viewer.
