IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 10, 2010, 7:24:46 PM (16 years ago)
Author:
eugene
Message:

updates from eam_branches/20091201

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

Legend:

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

    r7917 r26891  
    1111  Buffer *buf;
    1212
    13   Xo = Yo = 0;
     13  // this should be Nx/2, Ny/2 if not set
     14  Xo = Yo = NAN;
    1415  if ((N = get_argument (argc, argv, "-c"))) {
    1516    remove_argument (N, &argc, argv);
     
    3031  Ny = buf[0].header.Naxis[1];
    3132 
     33  if (isnan(Xo)) Xo = Nx / 2;
     34  if (isnan(Yo)) Yo = Ny / 2;
     35
    3236  /* gaussian parameters */
    3337  Sig_x = atof (argv[2]);
  • trunk/Ohana/src/opihi/cmd.astro/profile.c

    r20936 r26891  
    3131  ResetVector (yvec, OPIHI_FLT, (int)SQ(2*N+1));
    3232
    33   bzero (yvec[0].elements.Flt, (int)SQ(2*N+1)*sizeof(opihi_flt)+1);
     33  bzero (yvec[0].elements.Flt, (int)SQ(2*N+1)*sizeof(opihi_flt));
    3434  V = (float *)(buf[0].matrix.buffer);
    3535  Npt = 0;
    3636  Nx = buf[0].matrix.Naxis[0];
    37   for (i = sx - N; i < sx + N; i++) {
    38     for (j = sy - N; j < sy + N; j++, Npt++) {
     37  for (i = sx - N; i <= sx + N; i++) {
     38    for (j = sy - N; j <= sy + N; j++, Npt++) {
    3939      yvec[0].elements.Flt[Npt] = V[i + j*Nx];
    40       xvec[0].elements.Flt[Npt] = hypot (i - sx, j - sy);
     40      xvec[0].elements.Flt[Npt] = hypot (i + 0.5 - sx, j + 0.5 - sy);
    4141    }
    4242  }
  • trunk/Ohana/src/opihi/cmd.astro/star.c

    r7917 r26891  
    2424  if ((argc != 4) && (argc != 5)) {
    2525    gprint (GP_ERR, "USAGE: star (buffer) x y [dx] [-border N] [-sat cnts]\n");
     26    gprint (GP_ERR, " dx is the aperture diameter, but is adjusted up to the next odd number\n");
    2627    return (FALSE);
    2728  }
Note: See TracChangeset for help on using the changeset viewer.