IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 10, 2020, 10:52:25 AM (6 years ago)
Author:
eugene
Message:

csystem: save scalar results to variables; mkgauss: add normalization option; read_vectors: add hms and date conversion options

File:
1 edited

Legend:

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

    r26891 r41305  
    1010  double x, y, r, f, Xo, Yo;
    1111  Buffer *buf;
     12
     13  int Normalize = FALSE;
     14  if ((N = get_argument (argc, argv, "-norm"))) {
     15    Normalize = TRUE;
     16    remove_argument (N, &argc, argv);
     17  }   
    1218
    1319  // this should be Nx/2, Ny/2 if not set
     
    6066  /* f = exp (-r), r = (x^2 / 2Sx) + (y^2 / 2Sy) + Sxy*x*y */
    6167
     68  double Io = Normalize ? 1.0 / (2.0 * M_PI * Sig_x * Sig_y) : 1.0;
     69
    6270  in = (float *) buf[0].matrix.buffer;
    6371  for (j = 0; j < Ny; j++) {
     
    6775      y = j - Yo;
    6876      r = 0.5*x*x/Sx + 0.5*y*y/Sy + x*y*Sxy;
    69       f = exp (-r);
     77      f = Io * exp (-r);
    7078      *in += f;
    7179    }
Note: See TracChangeset for help on using the changeset viewer.