IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31144


Ignore:
Timestamp:
Apr 4, 2011, 11:07:41 AM (15 years ago)
Author:
eugene
Message:

add -density to skycoverage; update fit1d,2d usage line

Location:
branches/eam_branches/ipp-20110213/Ohana/src/opihi
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110213/Ohana/src/opihi/cmd.data/fit1d.c

    r27817 r31144  
    4242
    4343  if (argc != 4) {
    44     gprint (GP_ERR, "USAGE: fit x y order [-dy wt] [-quiet/-q] [-clip Nsigma Niter]\n");
     44    gprint (GP_ERR, "USAGE: fit1d x y order [-dy wt] [-quiet/-q] [-clip Nsigma Niter]\n");
    4545    return (FALSE);
    4646  }
  • branches/eam_branches/ipp-20110213/Ohana/src/opihi/cmd.data/fit2d.c

    r29001 r31144  
    4848
    4949  if (argc != 5) {
    50     gprint (GP_ERR, "USAGE: fit x y z order [-dz wt]\n");
     50    gprint (GP_ERR, "USAGE: fit2d x y z order [-dz wt] [-quiet/-q] [-clip Nsigma Niter]\n");
    5151    return (FALSE);
    5252  }
  • branches/eam_branches/ipp-20110213/Ohana/src/opihi/dvo/skycoverage.c

    r29540 r31144  
    55int skycoverage (int argc, char **argv) {
    66
    7   int WITH_MOSAIC, SOLO_MOSAIC;
     7  int WITH_MOSAIC, SOLO_MOSAIC, ShowDensity;
    88  off_t i, Nimage;
    99  int N, status, TimeSelect, ByName, xs, ys;
     
    6060  }
    6161
     62  ShowDensity = FALSE;
     63  if ((N = get_argument (argc, argv, "-density"))) {
     64    remove_argument (N, &argc, argv);
     65    ShowDensity = TRUE;
     66  }
     67
    6268  ByName = FALSE;
    6369  if ((N = get_argument (argc, argv, "-name"))) {
     
    141147  if (argc != 3) {
    142148    gprint (GP_ERR, "USAGE: skycoverage (buffer) (Npts)\n");
    143     gprint (GP_ERR, "  options: [-scale pixscale] [-center ra dec] [-size Nx Nx] [-proj projection] [-time start range] [-trange start stop] [-name name] [-photcode name] [+mosaic] [-mosaic]\n");
     149    gprint (GP_ERR, "  options: [-scale pixscale] [-center ra dec] [-size Nx Nx] [-proj projection] [-time start range] [-trange start stop] [-name name] [-photcode name] [+mosaic] [-mosaic] [-density]\n");
    144150    gprint (GP_ERR, "       (buffer) saves bitmapped image\n");
    145151    gprint (GP_ERR, "       (Npts) gives the number of test points per image in each dimension\n");
     
    148154    gprint (GP_ERR, "       -size (Nx) (Ny)    : specifies the size of the image [360/scale, 180/scale]\n");
    149155    gprint (GP_ERR, "       -proj (projection) : specifies the projection choice [AIT]\n");
     156    gprint (GP_ERR, "       -density           : create image with relative density (else binary on/off)\n");
    150157    gprint (GP_ERR, "       note: we need 64800 / (pixscale)^2 pixels to represent the sky\n");
    151158    return (FALSE);
     
    186193
    187194  V = (float *)buf[0].matrix.buffer;
    188   bzero (V, Nx*Ny*sizeof(float));
    189195
    190196  for (ys = 0; ys < Ny; ys++) {
     
    194200      status &= (r <= 360);
    195201      if (status) {
    196         V[ys*Nx + xs] = 2;
     202        V[ys*Nx + xs] = ShowDensity ?  0 : 2;
     203      } else {
     204        V[ys*Nx + xs] = ShowDensity ? -1 : 0;
    197205      }
    198206    }
     
    249257          xs = (int)Xs;
    250258          ys = (int)Ys;
    251           V[ys*Nx + xs] = 1;
     259          if (ShowDensity) {
     260              V[ys*Nx + xs] += 1;
     261          } else {
     262              V[ys*Nx + xs] = 1;
     263          }
    252264        }
    253265      }
Note: See TracChangeset for help on using the changeset viewer.