Changeset 42305
- Timestamp:
- Nov 14, 2022, 8:33:33 PM (4 years ago)
- Location:
- branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/Makefile
r42166 r42305 154 154 $(SRC)/set.$(ARCH).o \ 155 155 $(SRC)/shift.$(ARCH).o \ 156 $(SRC)/opihi_size.$(ARCH).o \ 156 157 $(SRC)/sort.$(ARCH).o \ 157 158 $(SRC)/spline.$(ARCH).o \ -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/init.c
r42166 r42305 160 160 int tvgrid PROTO((int, char **)); 161 161 int opihi_type PROTO((int, char **)); 162 int opihi_size PROTO((int, char **)); 162 163 int uniq PROTO((int, char **)); 163 164 int uniqpair PROTO((int, char **)); … … 350 351 {1, "set", set, "image and vector math"}, 351 352 {1, "shift", shift, "shift data in an image"}, 353 {1, "size", opihi_size, "get vector/matrix dimension/size information"}, 352 354 {1, "sort", sort_vectors, "sort list of vectors"}, 353 355 {1, "spline", spline_command, "shift data in an image"}, -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/limits.c
r40291 r42305 61 61 APPLY = TRUE; 62 62 } 63 63 64 char *name = NULL; 64 65 if ((N = get_argument (argc, argv, "-n"))) { … … 67 68 remove_argument (N, &argc, argv); 68 69 } 69 70 70 if (!GetGraph (&graphmode, &kapa, name)) return (FALSE); 71 71 FREE (name); 72 73 // this is not super intuitive 74 if ((N = get_argument (argc, argv, "-boxsize"))) { 75 remove_argument (N, &argc, argv); 76 float dx, dy; 77 // ask kapa for the size of the graph region in pixels 78 KapaGetLimits (kapa, &dx, &dy); 79 set_variable ("KAPA_XPIX", fabs(dx)); 80 set_variable ("KAPA_YPIX", fabs(dy)); 81 } 72 82 73 83 // XXX need an option to set the limits based on the current image bounds … … 169 179 return (TRUE); 170 180 } 181 182 /* -minX value : the minimum X axis value will be no higher than this value 183 -maxX value : the maximum X axis value will be no lower than this value 184 -delX value : the range of the X axis will be at least this value 185 186 These can be used to prevent the range from collapsing. 187 These are only used if the -a option is supplied, otherwise the supplied or auto-calculated 188 ranges are used (this seems like an poor choice) 189 190 */ 191 192 193 -
branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/reindex.c
r42082 r42305 72 72 } 73 73 } 74 if (ivec->type == OPIHI_STR) { 75 opihi_int *vx = xvec[0].elements.Int; 76 for (Npts = i = 0; i < xvec[0].Nelements; i++, vx++) { 77 if (Npts >= NPTS) { 78 NPTS += 2000; 79 REALLOCATE (ovec[0].elements.Str, char *, NPTS); 80 } 81 if (*vx < 0) { 82 if (KEEP_UNMATCH) { 83 ovec[0].elements.Str[Npts] = strcreate(""); // XXX use a different or a specified value? 84 Npts++; 85 } 86 continue; 87 } 88 if (*vx > Nmax) ESCAPE("unexpected value in index: "OPIHI_INT_FMT" (%d)\n", *vx, i); 89 ovec[0].elements.Str[Npts] = strcreate(ivec->elements.Str[*vx]); 90 Npts++; 91 } 92 } 74 93 75 94 // free up unused memory
Note:
See TracChangeset
for help on using the changeset viewer.
