IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 26, 2012, 11:46:01 AM (14 years ago)
Author:
eugene
Message:

updates for pedantic gcc, mods to relphot average mags to handle GPC1 stacks

Location:
trunk/Ohana/src/opihi/cmd.astro
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.astro

  • trunk/Ohana/src/opihi/cmd.astro/cdot.c

    r25757 r34088  
    3030
    3131  status = fRD_to_XY (&x, &y, r, d, &graphmode.coords);
    32 
     32  if (!status) return TRUE;
     33 
    3334  if (!KapaPrepPlot (kapa, 1, &graphmode)) return (FALSE);
    3435  KapaPlotVector (kapa, 1, &x, "x");
  • trunk/Ohana/src/opihi/cmd.astro/cline.c

    r30971 r34088  
    2323  graphmode.etype = 0;
    2424
     25  // need to plot to edge of picture..
    2526  status = fRD_to_XY (&x[0], &y[0], r[0], d[0], &graphmode.coords);
     27  if (!status) {
     28    return FALSE;
     29  }
    2630  status = fRD_to_XY (&x[1], &y[1], r[1], d[1], &graphmode.coords);
     31  if (!status) {
     32    return FALSE;
     33  }
    2734 
    2835  if (!KapaPrepPlot (kapa, 2, &graphmode)) return (FALSE);
  • trunk/Ohana/src/opihi/cmd.astro/fixcols.c

    r21061 r34088  
    6868int fixcols (int argc, char **argv) {
    6969 
    70   int ix, iy, Nx, Ny, Nvect, start, stop;
     70  int ix, iy, Nx, Nvect, start, stop;
    7171  float *Vin, *vect, *meds, median, stdev, sigma, Nsigma, value;
    7272  Buffer *in;
     
    8484
    8585  Nx = in[0].matrix.Naxis[0];
    86   Ny = in[0].matrix.Naxis[1];
     86  // Ny = in[0].matrix.Naxis[1];
    8787
    8888  ALLOCATE (meds, float, Nx);
  • trunk/Ohana/src/opihi/cmd.astro/fiximage.c

    r33700 r34088  
    33int fiximage (int argc, char **argv) {
    44
    5   int ix, iy, N;
     5  int ix, iy;
    66  Buffer *in, *ct, *mask;
    77
    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  // }
    1313
    1414  if (argc != 4) {
  • trunk/Ohana/src/opihi/cmd.astro/gauss.c

    r13479 r34088  
    55  char key[20];
    66  int i, N, Npix, Nborder, Nspot;
    7   double X, Y, Z, ZP, RA, DEC, max;
     7  double X, Y, ZP, RA, DEC, max;
    88  int kapa;
    99  char *name;
     
    5858    KiiCursorRead (kapa, &X, &Y, &ZP, &RA, &DEC, key);
    5959    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);
    6161  }
    6262  KiiCursorOff (kapa);
  • trunk/Ohana/src/opihi/cmd.astro/getvel.c

    r19823 r34088  
    44 
    55  int i, n, Ncurve;
    6   int nx, ny;
    76  double L, V, Vo, dV, Bo, dB;
    87  double xo, yo;
     
    2928
    3029  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];
    3332
    3433  /* we expect the input image to have units of velocity, lattitude, and longitude */
  • trunk/Ohana/src/opihi/cmd.astro/imfit.c

    r20936 r34088  
    33int imfit (int argc, char **argv) {
    44
    5   int i, j, N, Npts, Save, VERBOSE, ShapeVariation;
     5  int i, j, N, Npts, Save, VERBOSE;
    66  int sx, sy, nx, ny, Nx, Ny;
    77  float chisq, ochisq, dchisq, Gain, RDnoise, SatThreshold;
     
    1616  }
    1717
    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  // }
    2323
    2424  SatThreshold = 0xffff;
  • trunk/Ohana/src/opihi/cmd.astro/imsub.c

    r12840 r34088  
    33int imsub (int argc, char **argv) {
    44
    5   int i, j, N, VERBOSE;
     5  int i, j, N;
    66  int sx, sy, nx, ny, Nx, Ny;
    77  float value;
     
    99  Buffer *buf;
    1010
    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  // }
    1616
    1717  /* set fitting function */
  • trunk/Ohana/src/opihi/cmd.astro/kronflux.c

    r33963 r34088  
    6767  int i, j;
    6868
    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  // }
    7777
    7878  float *data = (float *) matrix->buffer;
  • trunk/Ohana/src/opihi/cmd.astro/medianmap.c

    r16006 r34088  
    66  int i, j, k, I0, I1, J0, J1, I, J, n, N;
    77  int nx, ny, Nx, Ny, NX, NY, Ignore;
    8   float Mv, Nv, Mv2, value, min, max, IgnoreValue;
     8  float value, min, max, IgnoreValue;
    99  float *In, *Out, *ip;
    1010  float fx, fy;
     
    7171  ALLOCATE (temp, float, 2*nx*ny);
    7272
    73   Nv = Mv = Mv2 = 0.0;
     73  // float Mv = Mv2 = 0.0;
    7474
    7575  for (j = 0; j < Ny; j++) {
  • trunk/Ohana/src/opihi/cmd.astro/objload.c

    r13479 r34088  
    5252    for (i = 0; i < Nline; i++) {
    5353      /* 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, &
     55overlay[Noverlay].y);
     56      if (status != 3) continue;
    5557      if (Objtype && (Objtype != type)) continue;
    5658      overlay[Noverlay].type = KII_OVERLAY_BOX;
  • trunk/Ohana/src/opihi/cmd.astro/outline.c

    r13479 r34088  
    88int outline (int argc, char **argv) {
    99 
    10   int i, j, k, Npar, BigChange, ABigChange;
     10  int i, j, k, BigChange, ABigChange;
    1111  float Io, *in, ochisq, dchi, chisq, chisq_p, chisq_m, dp, tmp_par;
    1212  float curve, frac;
     
    1414
    1515  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");
    1717    return (FALSE);
    1818  }
     
    2626  par[4] = atof(argv[5]);
    2727  Io = atof(argv[6]);
    28   Npar = atof (argv[8]);
     28  // int Npar = atof (argv[8]);
    2929
    3030  dpar[0] = 10;
  • trunk/Ohana/src/opihi/cmd.astro/rotcurve.c

    r19823 r34088  
    88  double L, dL, Lo, V, Vo, dV, Bo, dB, Do, dD;
    99  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;
    1111  double R[100], T[100], W[100];
    1212  FILE *f;
     
    9999      }
    100100      r = (wr - W[n]) *  (R[n-1] - R[n]) / (W[n-1] - W[n]) + R[n];
    101       fr = (Ro/r);
     101      // fr = (Ro/r);
    102102      if (r < fabs(Rs)) { /* can't be on rotation curve */
    103103        continue;
  • trunk/Ohana/src/opihi/cmd.astro/spec.c

    r20936 r34088  
    33int spec (int argc, char **argv) {
    44
    5   int i, j, Xo, X1, y1, y2, Nx, Ny;
     5  int i, j, Xo, X1, y1, y2, Nx;
    66  int Nlong, Ngap, Nrow, N, Nring;
    77  float *buffer, *V;
     
    4545  if ((buf = SelectBuffer (argv[1], OLDBUFFER, TRUE)) == NULL) return (FALSE);
    4646  Nx = buf[0].matrix.Naxis[0];
    47   Ny = buf[0].matrix.Naxis[1];
     47  // int Ny = buf[0].matrix.Naxis[1];
    4848
    4949  Xo = atof (argv[2]);
  • trunk/Ohana/src/opihi/cmd.astro/star.c

    r26891 r34088  
    44
    55  int x, y, N, dx, Nborder;
    6   double Z, max;
     6  double max;
    77  Buffer *buf;
    88
     
    3636  }
    3737
    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);
    3939 
    4040  return (TRUE);
  • trunk/Ohana/src/opihi/cmd.astro/transform.c

    r7917 r34088  
    55  int i, j, Nx, Ny;
    66  Coords coords_in, coords_out;
    7   double scale_in, scale_out;
    87  int X, Y;
    98  double x, y, r, d, dx, dy;
     
    3029  }
    3130 
    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)));
    3433
    3534  Vin  = (float *) in[0].matrix.buffer;
Note: See TracChangeset for help on using the changeset viewer.