IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 5, 2006, 5:44:26 PM (20 years ago)
Author:
eugene
Message:

big move: fits_ to gfits_; minor updates to relphot

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

Legend:

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

    r2598 r7080  
    1616  int NorthPole, SouthPole, N, OnPic, LOnPic, status, NELEMENTS, First;
    1717  Graphdata graphmode;
    18   int Ngraph;
    19 
    20   Ngraph = 0;
    21   if (!GetGraph (&graphmode, NULL, &Ngraph)) return (FALSE);
     18
     19  if (!style_args (&graphmode, &argc, argv, 0)) return FALSE;
    2220
    2321  if (argc != 1) {
    24     fprintf (stderr, "USAGE: cgrid\n");
     22    fprintf (stderr, "USAGE: cgrid [style]\n");
    2523    return (FALSE);
    2624  }
     25  SetGraph (graphmode);
    2726
    2827  /* are we plotting one of the poles? */
  • trunk/Ohana/src/opihi/cmd.astro/cplot.c

    r2598 r7080  
    33int cplot (int argc, char **argv) {
    44 
    5   int i, Npts, Ngraph;
     5  int i, Npts;
    66  float *x, *y, *r, *d, Rmin, Rmax;
    77  Vector Xvec, Yvec, *xvec, *yvec;
    88  Graphdata graphmode;
    99
     10  if (!style_args (&graphmode, &argc, argv, 0)) return FALSE;
     11
    1012  if (argc != 3) {
    11     fprintf (stderr, "USAGE: cplot <ra> <dec>\n");
     13    fprintf (stderr, "USAGE: cplot <ra> <dec> [style]\n");
    1214    return (FALSE);
    1315  }
    14  
    15   Ngraph = 0;
    16   if (!GetGraph (&graphmode, NULL, &Ngraph)) return (FALSE);
     16  SetGraph (graphmode);
    1717
    1818  Rmin = graphmode.coords.crval1 - 182.0;
     
    4545  }
    4646 
    47  
    4847  Npts = Xvec.Nelements;
    4948  graphmode.etype = 0;
     
    5655   
    5756  return (TRUE);
    58 
    5957}
    6058
  • trunk/Ohana/src/opihi/cmd.astro/czplot.c

    r2843 r7080  
    33int czplot (int argc, char **argv) {
    44 
    5   int i, N, Npts, Ngraph;
     5  int i, Npts;
    66  double min, range, Rmin, Rmax;
    77  float *in, *out, *r, *d, *x, *y;
     
    99  Graphdata graphmode;
    1010
    11   Ngraph = -1;
    12   if ((N = get_argument (argc, argv, "-n"))) {
    13     remove_argument (N, &argc, argv);
    14     Ngraph = atof (argv[N]);
    15     remove_argument (N, &argc, argv);
    16   }
    17   if (!GetGraph (&graphmode, NULL, &Ngraph)) return (FALSE);
     11  if (!style_args (&graphmode, &argc, argv, 0)) return FALSE;
    1812
    1913  if (argc != 6) {
     
    2115    return (FALSE);
    2216  }
     17  SetGraph (graphmode);
    2318
    2419  min = atof(argv[4]);
  • trunk/Ohana/src/opihi/cmd.astro/getvel.c

    r4689 r7080  
    3333
    3434  /* we expect the input image to have units of velocity, lattitude, and longitude */
    35   fits_scan (&buf[0].header, "CRVAL1", "%lf", 1, &Vo);
    36   fits_scan (&buf[0].header, "CDELT1", "%lf", 1, &dV);
    37   fits_scan (&buf[0].header, "CRPIX1", "%lf", 1, &xo);
    38   fits_scan (&buf[0].header, "CRVAL2", "%lf", 1, &Bo);
    39   fits_scan (&buf[0].header, "CDELT2", "%lf", 1, &dB);
    40   fits_scan (&buf[0].header, "CRPIX2", "%lf", 1, &yo);
    41   fits_scan (&buf[0].header, "CRVAL3", "%lf", 1, &L);
     35  gfits_scan (&buf[0].header, "CRVAL1", "%lf", 1, &Vo);
     36  gfits_scan (&buf[0].header, "CDELT1", "%lf", 1, &dV);
     37  gfits_scan (&buf[0].header, "CRPIX1", "%lf", 1, &xo);
     38  gfits_scan (&buf[0].header, "CRVAL2", "%lf", 1, &Bo);
     39  gfits_scan (&buf[0].header, "CDELT2", "%lf", 1, &dB);
     40  gfits_scan (&buf[0].header, "CRPIX2", "%lf", 1, &yo);
     41  gfits_scan (&buf[0].header, "CRVAL3", "%lf", 1, &L);
    4242  Vo *= 0.001;
    4343  dV *= 0.001;
  • trunk/Ohana/src/opihi/cmd.astro/medianmap.c

    r4689 r7080  
    4747  /* duplicate the (in) buffer to the (out), with different size */
    4848  /* this should probably be a function in misc */
    49   fits_free_matrix (&out[0].matrix);
    50   fits_free_header (&out[0].header);
     49  gfits_free_matrix (&out[0].matrix);
     50  gfits_free_header (&out[0].header);
    5151  out[0].bitpix = in[0].bitpix;
    5252  out[0].unsign = in[0].unsign;
    5353  out[0].bscale = in[0].bscale;
    5454  out[0].bzero  = in[0].bzero;
    55   fits_copy_header (&in[0].header, &out[0].header);
    56   fits_modify (&out[0].header, "NAXIS1", "%d", 1, Nx);
    57   fits_modify (&out[0].header, "NAXIS2", "%d", 1, Ny);
     55  gfits_copy_header (&in[0].header, &out[0].header);
     56  gfits_modify (&out[0].header, "NAXIS1", "%d", 1, Nx);
     57  gfits_modify (&out[0].header, "NAXIS2", "%d", 1, Ny);
    5858  out[0].header.Naxis[0] = Nx;
    5959  out[0].header.Naxis[1] = Ny;
    60   fits_create_matrix (&out[0].header, &out[0].matrix);
     60  gfits_create_matrix (&out[0].header, &out[0].matrix);
    6161
    6262  In = (float *) in[0].matrix.buffer;
  • trunk/Ohana/src/opihi/cmd.astro/polar.c

    r2598 r7080  
    3232
    3333  /* we expect the output image to have units of longitude and distance */
    34   fits_scan (&in[0].header, "CRVAL1", "%lf", 1, &Lo);
    35   fits_scan (&in[0].header, "CDELT1", "%lf", 1, &dL);
    36   fits_scan (&in[0].header, "CRPIX1", "%lf", 1, &xo);
    37   fits_scan (&in[0].header, "CRVAL2", "%lf", 1, &Do);
    38   fits_scan (&in[0].header, "CDELT2", "%lf", 1, &dD);
    39   fits_scan (&in[0].header, "CRPIX2", "%lf", 1, &yo);
     34  gfits_scan (&in[0].header, "CRVAL1", "%lf", 1, &Lo);
     35  gfits_scan (&in[0].header, "CDELT1", "%lf", 1, &dL);
     36  gfits_scan (&in[0].header, "CRPIX1", "%lf", 1, &xo);
     37  gfits_scan (&in[0].header, "CRVAL2", "%lf", 1, &Do);
     38  gfits_scan (&in[0].header, "CDELT2", "%lf", 1, &dD);
     39  gfits_scan (&in[0].header, "CRPIX2", "%lf", 1, &yo);
    4040
    4141  /* we expect the input image to have units of distance X and Y */
    42   fits_scan (&out[0].header, "CRVAL1", "%lf", 1, &Mo);
    43   fits_scan (&out[0].header, "CDELT1", "%lf", 1, &dM);
    44   fits_scan (&out[0].header, "CRPIX1", "%lf", 1, &Xo);
    45   fits_scan (&out[0].header, "CRVAL2", "%lf", 1, &No);
    46   fits_scan (&out[0].header, "CDELT2", "%lf", 1, &dN);
    47   fits_scan (&out[0].header, "CRPIX2", "%lf", 1, &Yo);
     42  gfits_scan (&out[0].header, "CRVAL1", "%lf", 1, &Mo);
     43  gfits_scan (&out[0].header, "CDELT1", "%lf", 1, &dM);
     44  gfits_scan (&out[0].header, "CRPIX1", "%lf", 1, &Xo);
     45  gfits_scan (&out[0].header, "CRVAL2", "%lf", 1, &No);
     46  gfits_scan (&out[0].header, "CDELT2", "%lf", 1, &dN);
     47  gfits_scan (&out[0].header, "CRPIX2", "%lf", 1, &Yo);
    4848
    4949  Vin  = (float *)in[0].matrix.buffer;
  • trunk/Ohana/src/opihi/cmd.astro/rotcurve.c

    r2843 r7080  
    5252
    5353  /* we expect the input image to have units of velocity, lattitude, and longitude */
    54   fits_scan (&in[0].header, "CRVAL1", "%lf", 1, &Vo);
    55   fits_scan (&in[0].header, "CDELT1", "%lf", 1, &dV);
    56   fits_scan (&in[0].header, "CRPIX1", "%lf", 1, &xo);
    57   fits_scan (&in[0].header, "CRVAL2", "%lf", 1, &Bo);
    58   fits_scan (&in[0].header, "CDELT2", "%lf", 1, &dB);
    59   fits_scan (&in[0].header, "CRPIX2", "%lf", 1, &yo);
    60   fits_scan (&in[0].header, "CRVAL3", "%lf", 1, &L);
     54  gfits_scan (&in[0].header, "CRVAL1", "%lf", 1, &Vo);
     55  gfits_scan (&in[0].header, "CDELT1", "%lf", 1, &dV);
     56  gfits_scan (&in[0].header, "CRPIX1", "%lf", 1, &xo);
     57  gfits_scan (&in[0].header, "CRVAL2", "%lf", 1, &Bo);
     58  gfits_scan (&in[0].header, "CDELT2", "%lf", 1, &dB);
     59  gfits_scan (&in[0].header, "CRPIX2", "%lf", 1, &yo);
     60  gfits_scan (&in[0].header, "CRVAL3", "%lf", 1, &L);
    6161  Vo *= 0.001;
    6262  dV *= 0.001;
    6363
    6464  /* we expect the output image to have units of longitude and distance */
    65   fits_scan (&out[0].header, "CRVAL1", "%lf", 1, &Lo);
    66   fits_scan (&out[0].header, "CDELT1", "%lf", 1, &dL);
    67   fits_scan (&out[0].header, "CRPIX1", "%lf", 1, &Xo);
    68   fits_scan (&out[0].header, "CRVAL2", "%lf", 1, &Do);
    69   fits_scan (&out[0].header, "CDELT2", "%lf", 1, &dD);
    70   fits_scan (&out[0].header, "CRPIX2", "%lf", 1, &Yo);
     65  gfits_scan (&out[0].header, "CRVAL1", "%lf", 1, &Lo);
     66  gfits_scan (&out[0].header, "CDELT1", "%lf", 1, &dL);
     67  gfits_scan (&out[0].header, "CRPIX1", "%lf", 1, &Xo);
     68  gfits_scan (&out[0].header, "CRVAL2", "%lf", 1, &Do);
     69  gfits_scan (&out[0].header, "CDELT2", "%lf", 1, &dD);
     70  gfits_scan (&out[0].header, "CRPIX2", "%lf", 1, &Yo);
    7171
    7272  while (L >= 360) {L -= 360.0;}
Note: See TracChangeset for help on using the changeset viewer.