Changeset 39225 for trunk/Ohana/src/opihi
- Timestamp:
- Dec 3, 2015, 4:16:29 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
- 3 copied
-
. (modified) (1 prop)
-
Ohana (modified) (1 prop)
-
Ohana/src/opihi/cmd.astro (modified) (1 prop)
-
Ohana/src/opihi/cmd.astro/Makefile (modified) (2 diffs)
-
Ohana/src/opihi/cmd.astro/cneedles.c (copied) (copied from branches/eam_branches/ipp-20151113/Ohana/src/opihi/cmd.astro/cneedles.c )
-
Ohana/src/opihi/cmd.astro/drizzle.c (modified) (2 diffs)
-
Ohana/src/opihi/cmd.astro/init.c (modified) (4 diffs)
-
Ohana/src/opihi/cmd.astro/region.c (modified) (2 diffs)
-
Ohana/src/opihi/cmd.astro/wcs.c (copied) (copied from branches/eam_branches/ipp-20151113/Ohana/src/opihi/cmd.astro/wcs.c )
-
Ohana/src/opihi/cmd.data/Makefile (modified) (1 diff)
-
Ohana/src/opihi/cmd.data/init.c (modified) (2 diffs)
-
Ohana/src/opihi/cmd.data/needles.c (copied) (copied from branches/eam_branches/ipp-20151113/Ohana/src/opihi/cmd.data/needles.c )
-
Ohana/src/opihi/dvo/avmatch.c (modified) (1 diff)
-
Ohana/src/opihi/dvo/imlist.c (modified) (4 diffs)
-
Ohana/src/opihi/include/dvomath.h (modified) (1 diff)
-
Ohana/src/opihi/lib.shell/VectorOps.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20151113 (added) merged: 39135-39136,39166,39182-39185,39193-39208,39211-39215,39218-39224
- Property svn:mergeinfo changed
-
trunk/Ohana
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20151113/Ohana (added) merged: 39166,39182-39185,39193-39208,39211-39215,39218-39224
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/cmd.astro
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20151113/Ohana/src/opihi/cmd.astro (added) merged: 39166,39183,39194,39199,39223
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/cmd.astro/Makefile
r39169 r39225 23 23 $(SRC)/cdot.$(ARCH).o \ 24 24 $(SRC)/cline.$(ARCH).o \ 25 $(SRC)/cneedles.$(ARCH).o \ 25 26 $(SRC)/cplot.$(ARCH).o \ 26 27 $(SRC)/csystem.$(ARCH).o \ … … 76 77 $(SRC)/vshimage.$(ARCH).o \ 77 78 $(SRC)/shimage.$(ARCH).o \ 79 $(SRC)/wcs.$(ARCH).o \ 78 80 $(SRC)/imsub.$(ARCH).o \ 79 81 $(SRC)/imfit.$(ARCH).o \ -
trunk/Ohana/src/opihi/cmd.astro/drizzle.c
r19823 r39225 141 141 142 142 if (Vmk && Vmk[Ni]) continue; 143 if (!isfinite(Vin[Ni])) continue; 144 143 145 Vout[No] += Vin[Ni]; 144 146 Vwt[No] ++; … … 195 197 196 198 if (Vmk && Vmk[Ni]) continue; 199 if (!isfinite(Vin[Ni])) continue; 197 200 Vout[No] += Vin[Ni]; 198 201 Vwt[No] ++; -
trunk/Ohana/src/opihi/cmd.astro/init.c
r39169 r39225 7 7 int cdot PROTO((int, char **)); 8 8 int cline PROTO((int, char **)); 9 int cneedles PROTO((int, char **)); 9 10 int cplot PROTO((int, char **)); 10 11 int csystem PROTO((int, char **)); … … 66 67 int vshimage PROTO((int, char **)); 67 68 int shimage PROTO((int, char **)); 69 int wcs PROTO((int, char **)); 68 70 69 71 static Command cmds[] = { … … 74 76 {1, "cdot", cdot, "plot point in sky coordinates"}, 75 77 {1, "cline", cline, "plot line connecting two sky coordinates"}, 78 {1, "cneedles", cneedles, "plot vectors in sky coordinates"}, 76 79 {1, "cplot", cplot, "plot vectors in sky coordinates"}, 77 80 {1, "csystem", csystem, "convert between coordinate systems"}, … … 131 134 {1, "vshimage", vshimage, "generate images for vector spherical harmonic terms"}, 132 135 {1, "shimage", shimage, "generate images for spherical harmonic terms"}, 136 {1, "wcs", wcs, "set the wcs for the given image"}, 133 137 }; 134 138 -
trunk/Ohana/src/opihi/cmd.astro/region.c
r37807 r39225 74 74 } 75 75 76 float Angle = 0.0; 77 if ((N = get_argument (argc, argv, "-angle"))) { 78 remove_argument (N, &argc, argv); 79 Angle = atof(argv[N]); 80 remove_argument (N, &argc, argv); 81 } 82 76 83 if ((argc != 4) && (argc != 5)) { 77 84 gprint (GP_ERR, "USAGE: region Ra Dec Radius [projection] [orientation]\n"); 78 gprint (GP_ERR, " [-image] [-ew] [+ew] [-ns] [+ns] [-no-clear] \n");85 gprint (GP_ERR, " [-image] [-ew] [+ew] [-ns] [+ns] [-no-clear] [-angle theta]\n"); 79 86 gprint (GP_ERR, " current: %f %f (%f x %f) (%s)\n", 80 87 graphmode.coords.crval1, graphmode.coords.crval2, … … 111 118 graphmode.coords.crval2 = Dec; 112 119 113 graphmode.coords.pc1_1 = (graphmode.flipeast) ? -1 : 1; 114 graphmode.coords.pc2_2 = (graphmode.flipnorth) ? -1 : 1; 120 float pc1_1 = (graphmode.flipeast) ? -1 : 1; 121 float pc2_2 = (graphmode.flipnorth) ? -1 : 1; 122 123 graphmode.coords.pc1_1 = cos(Angle*RAD_DEG)*pc1_1; 124 graphmode.coords.pc1_2 = sin(Angle*RAD_DEG)*pc2_2; 125 graphmode.coords.pc2_1 = -sin(Angle*RAD_DEG)*pc1_1; 126 graphmode.coords.pc2_2 = cos(Angle*RAD_DEG)*pc2_2; 115 127 116 128 /* ask kapa for coordinate limits, to get the right aspect ratio */ -
trunk/Ohana/src/opihi/cmd.data/Makefile
r38463 r39225 97 97 $(SRC)/medimage_commands.$(ARCH).o \ 98 98 $(SRC)/mset.$(ARCH).o \ 99 $(SRC)/needles.$(ARCH).o \ 99 100 $(SRC)/peak.$(ARCH).o \ 100 101 $(SRC)/periodogram.$(ARCH).o \ -
trunk/Ohana/src/opihi/cmd.data/init.c
r38463 r39225 86 86 int medimage_command PROTO((int, char **)); 87 87 int mset PROTO((int, char **)); 88 int needles PROTO((int, char **)); 88 89 int peak PROTO((int, char **)); 89 90 int periodogram PROTO((int, char **)); … … 261 262 {1, "mset", mset, "insert a vector in an image"}, 262 263 {1, "imset", mset, "insert a vector in an image"}, 264 {1, "needles", needles, "plot vectors needles"}, 263 265 {1, "parity", parity, "set image parity"}, 264 266 {1, "peak", peak, "find vector peak in range"}, -
trunk/Ohana/src/opihi/dvo/avmatch.c
r38601 r39225 328 328 gprint (GP_ERR, "USAGE: avmatch (RA) (DEC) (RADIUS) field[,field,field...]\n"); 329 329 gprint (GP_ERR, " OR: avmatch -coords (filename.fits) (RADIUS) field[,field,field...]\n"); 330 gprint (GP_ERR, " RADIUS is in arcseconds\n"); 330 331 331 332 if ((argc > N + 1) && !strcasecmp (argv[N+1], "fields")) { -
trunk/Ohana/src/opihi/dvo/imlist.c
r37807 r39225 21 21 } 22 22 23 int VERBOSE = TRUE; 24 if ((N = get_argument (argc, argv, "-quiet"))) { 25 VERBOSE = FALSE; 26 remove_argument (N, &argc, argv); 27 } 28 if ((N = get_argument (argc, argv, "-q"))) { 29 VERBOSE = FALSE; 30 remove_argument (N, &argc, argv); 31 } 32 23 33 TimeSelect = FALSE; 24 34 if ((N = get_argument (argc, argv, "-time"))) { … … 35 45 remove_argument (N, &argc, argv); 36 46 TimeSelect = TRUE; 37 gprint (GP_ERR, "plotting in range %ds - %ds (%f seconds)\n", (int)tzero, (int)(tzero + trange), trange);47 if (VERBOSE) gprint (GP_ERR, "plotting in range %ds - %ds (%f seconds)\n", (int)tzero, (int)(tzero + trange), trange); 38 48 } 39 49 … … 88 98 GetTimeFormat (&TimeReference, &TimeFormat); 89 99 100 int Nfound = 0; 101 90 102 for (j = 0; j < MAX_LIST; j++) { 91 103 i = subset[j]; … … 104 116 XY_to_RD (&r, &d, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords); 105 117 } 106 gprint (GP_LOG, "%3lld %s %8lld %8.4f %8.4f %f %5d %2d %4.2f %5.3f %5.3f\n", 107 (long long) i, image[i].name, (long long) image[i].imageID, r, d, t, image[i].nstar, image[i].photcode, image[i].secz, image[i].Mcal, image[i].dMcal); 118 if (VERBOSE) gprint (GP_LOG, "%3lld %s %8lld %8.4f %8.4f %f %5d %2d %4.2f %5.3f %5.3f\n", 119 (long long) i, image[i].name, (long long) image[i].imageID, r, d, t, image[i].nstar, image[i].photcode, image[i].secz, image[i].Mcal, image[i].dMcal); 120 121 char name[80]; 122 sprintf (name, "imlist:%d", Nfound); 123 set_str_variable (name, image[i].name); 124 Nfound ++; 108 125 } 126 set_int_variable ("imlist:n", Nfound); 109 127 110 128 FreeImagesDVO(image); -
trunk/Ohana/src/opihi/include/dvomath.h
r38441 r39225 147 147 Vector *InitVector PROTO((void)); 148 148 void FreeVectorArray PROTO((Vector **vec, int Nvec)); 149 void FreeVector PROTO((Vector *vec)); 149 150 int CopyVector PROTO((Vector *out, Vector *in)); 150 151 int ResetVector PROTO((Vector *vec, char type, int Nelements)); -
trunk/Ohana/src/opihi/lib.shell/VectorOps.c
r33662 r39225 15 15 16 16 // this function is NOT thread protected : it is only used in startup and/or shutdown 17 void FreeVector (Vector *vec) { 18 19 if (!vec) return; 20 if (vec->elements.Int) { 21 free (vec->elements.Int); 22 } 23 free (vec); 24 } 25 26 // this function is NOT thread protected : it is only used in startup and/or shutdown 17 27 void FreeVectorArray (Vector **vec, int Nvec) { 18 28 … … 21 31 if (!vec) return; 22 32 for (i = 0; i < Nvec; i++) { 23 if (!vec[i]) continue; 24 if (vec[i]->elements.Int) { 25 free (vec[i]->elements.Int); 26 } 27 free (vec[i]); 33 FreeVector (vec[i]); 28 34 } 29 35 free (vec);
Note:
See TracChangeset
for help on using the changeset viewer.
