Changeset 34088 for trunk/Ohana/src/opihi/cmd.astro
- Timestamp:
- Jun 26, 2012, 11:46:01 AM (14 years ago)
- Location:
- trunk/Ohana/src/opihi/cmd.astro
- Files:
-
- 17 edited
-
. (modified) (1 prop)
-
cdot.c (modified) (1 diff)
-
cline.c (modified) (1 diff)
-
fixcols.c (modified) (2 diffs)
-
fiximage.c (modified) (1 diff)
-
gauss.c (modified) (2 diffs)
-
getvel.c (modified) (2 diffs)
-
imfit.c (modified) (2 diffs)
-
imsub.c (modified) (2 diffs)
-
kronflux.c (modified) (1 diff)
-
medianmap.c (modified) (2 diffs)
-
objload.c (modified) (1 diff)
-
outline.c (modified) (3 diffs)
-
rotcurve.c (modified) (2 diffs)
-
spec.c (modified) (2 diffs)
-
star.c (modified) (2 diffs)
-
transform.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.astro
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro (added) merged: 33985,34049,34073
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/cmd.astro/cdot.c
r25757 r34088 30 30 31 31 status = fRD_to_XY (&x, &y, r, d, &graphmode.coords); 32 32 if (!status) return TRUE; 33 33 34 if (!KapaPrepPlot (kapa, 1, &graphmode)) return (FALSE); 34 35 KapaPlotVector (kapa, 1, &x, "x"); -
trunk/Ohana/src/opihi/cmd.astro/cline.c
r30971 r34088 23 23 graphmode.etype = 0; 24 24 25 // need to plot to edge of picture.. 25 26 status = fRD_to_XY (&x[0], &y[0], r[0], d[0], &graphmode.coords); 27 if (!status) { 28 return FALSE; 29 } 26 30 status = fRD_to_XY (&x[1], &y[1], r[1], d[1], &graphmode.coords); 31 if (!status) { 32 return FALSE; 33 } 27 34 28 35 if (!KapaPrepPlot (kapa, 2, &graphmode)) return (FALSE); -
trunk/Ohana/src/opihi/cmd.astro/fixcols.c
r21061 r34088 68 68 int fixcols (int argc, char **argv) { 69 69 70 int ix, iy, Nx, N y, Nvect, start, stop;70 int ix, iy, Nx, Nvect, start, stop; 71 71 float *Vin, *vect, *meds, median, stdev, sigma, Nsigma, value; 72 72 Buffer *in; … … 84 84 85 85 Nx = in[0].matrix.Naxis[0]; 86 Ny = in[0].matrix.Naxis[1];86 // Ny = in[0].matrix.Naxis[1]; 87 87 88 88 ALLOCATE (meds, float, Nx); -
trunk/Ohana/src/opihi/cmd.astro/fiximage.c
r33700 r34088 3 3 int fiximage (int argc, char **argv) { 4 4 5 int ix, iy , N;5 int ix, iy; 6 6 Buffer *in, *ct, *mask; 7 7 8 int VERBOSE = FALSE;9 if ((N = get_argument (argc, argv, "-v"))) {10 VERBOSE = TRUE;11 remove_argument (N, &argc, argv);12 }8 // int VERBOSE = FALSE; 9 // if ((N = get_argument (argc, argv, "-v"))) { 10 // VERBOSE = TRUE; 11 // remove_argument (N, &argc, argv); 12 // } 13 13 14 14 if (argc != 4) { -
trunk/Ohana/src/opihi/cmd.astro/gauss.c
r13479 r34088 5 5 char key[20]; 6 6 int i, N, Npix, Nborder, Nspot; 7 double X, Y, Z , ZP, RA, DEC, max;7 double X, Y, ZP, RA, DEC, max; 8 8 int kapa; 9 9 char *name; … … 58 58 KiiCursorRead (kapa, &X, &Y, &ZP, &RA, &DEC, key); 59 59 if (!strcasecmp (key, "Q")) break; 60 Z =get_aperture_stats (&buf[0].matrix, (int)(X+0.5), (int)(Y+0.5), Npix, Nborder, max);60 get_aperture_stats (&buf[0].matrix, (int)(X+0.5), (int)(Y+0.5), Npix, Nborder, max); 61 61 } 62 62 KiiCursorOff (kapa); -
trunk/Ohana/src/opihi/cmd.astro/getvel.c
r19823 r34088 4 4 5 5 int i, n, Ncurve; 6 int nx, ny;7 6 double L, V, Vo, dV, Bo, dB; 8 7 double xo, yo; … … 29 28 30 29 if ((buf = SelectBuffer (argv[1], OLDBUFFER, TRUE)) == NULL) return (FALSE); 31 nx = buf[0].matrix.Naxis[0];32 ny = buf[0].matrix.Naxis[1];30 // int nx = buf[0].matrix.Naxis[0]; 31 // int ny = buf[0].matrix.Naxis[1]; 33 32 34 33 /* we expect the input image to have units of velocity, lattitude, and longitude */ -
trunk/Ohana/src/opihi/cmd.astro/imfit.c
r20936 r34088 3 3 int imfit (int argc, char **argv) { 4 4 5 int i, j, N, Npts, Save, VERBOSE , ShapeVariation;5 int i, j, N, Npts, Save, VERBOSE; 6 6 int sx, sy, nx, ny, Nx, Ny; 7 7 float chisq, ochisq, dchisq, Gain, RDnoise, SatThreshold; … … 16 16 } 17 17 18 ShapeVariation = FALSE;19 if ((N = get_argument (argc, argv, "-shapes"))) {20 remove_argument (N, &argc, argv);21 ShapeVariation = TRUE;22 }18 // int ShapeVariation = FALSE; 19 // if ((N = get_argument (argc, argv, "-shapes"))) { 20 // remove_argument (N, &argc, argv); 21 // ShapeVariation = TRUE; 22 // } 23 23 24 24 SatThreshold = 0xffff; -
trunk/Ohana/src/opihi/cmd.astro/imsub.c
r12840 r34088 3 3 int imsub (int argc, char **argv) { 4 4 5 int i, j, N , VERBOSE;5 int i, j, N; 6 6 int sx, sy, nx, ny, Nx, Ny; 7 7 float value; … … 9 9 Buffer *buf; 10 10 11 VERBOSE = FALSE;12 if ((N = get_argument (argc, argv, "-v"))) {13 remove_argument (N, &argc, argv);14 VERBOSE = TRUE;15 }11 // int VERBOSE = FALSE; 12 // if ((N = get_argument (argc, argv, "-v"))) { 13 // remove_argument (N, &argc, argv); 14 // VERBOSE = TRUE; 15 // } 16 16 17 17 /* set fitting function */ -
trunk/Ohana/src/opihi/cmd.astro/kronflux.c
r33963 r34088 67 67 int i, j; 68 68 69 double gain;70 char *string = get_variable ("GAIN");71 if (string == (char *) NULL) {72 if (VERBOSE) gprint (GP_ERR, "assuming a value of 1.0\n");73 gain = 1.0;74 } else {75 gain = atof (string);76 }69 // double gain; 70 // char *string = get_variable ("GAIN"); 71 // if (string == (char *) NULL) { 72 // if (VERBOSE) gprint (GP_ERR, "assuming a value of 1.0\n"); 73 // gain = 1.0; 74 // } else { 75 // gain = atof (string); 76 // } 77 77 78 78 float *data = (float *) matrix->buffer; -
trunk/Ohana/src/opihi/cmd.astro/medianmap.c
r16006 r34088 6 6 int i, j, k, I0, I1, J0, J1, I, J, n, N; 7 7 int nx, ny, Nx, Ny, NX, NY, Ignore; 8 float Mv, Nv, Mv2,value, min, max, IgnoreValue;8 float value, min, max, IgnoreValue; 9 9 float *In, *Out, *ip; 10 10 float fx, fy; … … 71 71 ALLOCATE (temp, float, 2*nx*ny); 72 72 73 Nv =Mv = Mv2 = 0.0;73 // float Mv = Mv2 = 0.0; 74 74 75 75 for (j = 0; j < Ny; j++) { -
trunk/Ohana/src/opihi/cmd.astro/objload.c
r13479 r34088 52 52 for (i = 0; i < Nline; i++) { 53 53 /* we are now using all entries on the *.obj line */ 54 status = sscanf (&buffer[i*CHAR_LINE], "%d %f %f", &type, &overlay[Noverlay].x, &overlay[Noverlay].y); 54 status = sscanf (&buffer[i*CHAR_LINE], "%d %f %f", &type, &overlay[Noverlay].x, & 55 overlay[Noverlay].y); 56 if (status != 3) continue; 55 57 if (Objtype && (Objtype != type)) continue; 56 58 overlay[Noverlay].type = KII_OVERLAY_BOX; -
trunk/Ohana/src/opihi/cmd.astro/outline.c
r13479 r34088 8 8 int outline (int argc, char **argv) { 9 9 10 int i, j, k, Npar,BigChange, ABigChange;10 int i, j, k, BigChange, ABigChange; 11 11 float Io, *in, ochisq, dchi, chisq, chisq_p, chisq_m, dp, tmp_par; 12 12 float curve, frac; … … 14 14 15 15 if (argc != 9) { 16 gprint (GP_ERR, "USAGE: outline x y dx dy dxy Io (buffer) Npar\n");16 gprint (GP_ERR, "USAGE: outline x y dx dy dxy Io (buffer)\n"); 17 17 return (FALSE); 18 18 } … … 26 26 par[4] = atof(argv[5]); 27 27 Io = atof(argv[6]); 28 Npar = atof (argv[8]);28 // int Npar = atof (argv[8]); 29 29 30 30 dpar[0] = 10; -
trunk/Ohana/src/opihi/cmd.astro/rotcurve.c
r19823 r34088 8 8 double L, dL, Lo, V, Vo, dV, Bo, dB, Do, dD; 9 9 double xo, yo, Xo, Yo; 10 double sl, cl, wo, Ro, Rs, wr, r, fr,d, min;10 double sl, cl, wo, Ro, Rs, wr, r, d, min; 11 11 double R[100], T[100], W[100]; 12 12 FILE *f; … … 99 99 } 100 100 r = (wr - W[n]) * (R[n-1] - R[n]) / (W[n-1] - W[n]) + R[n]; 101 fr = (Ro/r);101 // fr = (Ro/r); 102 102 if (r < fabs(Rs)) { /* can't be on rotation curve */ 103 103 continue; -
trunk/Ohana/src/opihi/cmd.astro/spec.c
r20936 r34088 3 3 int spec (int argc, char **argv) { 4 4 5 int i, j, Xo, X1, y1, y2, Nx , Ny;5 int i, j, Xo, X1, y1, y2, Nx; 6 6 int Nlong, Ngap, Nrow, N, Nring; 7 7 float *buffer, *V; … … 45 45 if ((buf = SelectBuffer (argv[1], OLDBUFFER, TRUE)) == NULL) return (FALSE); 46 46 Nx = buf[0].matrix.Naxis[0]; 47 Ny = buf[0].matrix.Naxis[1];47 // int Ny = buf[0].matrix.Naxis[1]; 48 48 49 49 Xo = atof (argv[2]); -
trunk/Ohana/src/opihi/cmd.astro/star.c
r26891 r34088 4 4 5 5 int x, y, N, dx, Nborder; 6 double Z,max;6 double max; 7 7 Buffer *buf; 8 8 … … 36 36 } 37 37 38 Z =get_aperture_stats (&buf[0].matrix, x, y, dx, Nborder, max);38 get_aperture_stats (&buf[0].matrix, x, y, dx, Nborder, max); 39 39 40 40 return (TRUE); -
trunk/Ohana/src/opihi/cmd.astro/transform.c
r7917 r34088 5 5 int i, j, Nx, Ny; 6 6 Coords coords_in, coords_out; 7 double scale_in, scale_out;8 7 int X, Y; 9 8 double x, y, r, d, dx, dy; … … 30 29 } 31 30 32 scale_in = sqrt(fabs(coords_in.cdelt1*coords_in.cdelt2*(coords_in.pc1_1*coords_in.pc2_2 - coords_in.pc1_2*coords_in.pc2_1)));33 scale_out = sqrt(fabs(coords_out.cdelt1*coords_out.cdelt2*(coords_out.pc1_1*coords_out.pc2_2 - coords_out.pc1_2*coords_out.pc2_1)));31 // double scale_in = sqrt(fabs(coords_in.cdelt1*coords_in.cdelt2*(coords_in.pc1_1*coords_in.pc2_2 - coords_in.pc1_2*coords_in.pc2_1))); 32 // double scale_out = sqrt(fabs(coords_out.cdelt1*coords_out.cdelt2*(coords_out.pc1_1*coords_out.pc2_2 - coords_out.pc1_2*coords_out.pc2_1))); 34 33 35 34 Vin = (float *) in[0].matrix.buffer;
Note:
See TracChangeset
for help on using the changeset viewer.
