IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 14, 2016, 7:28:23 AM (10 years ago)
Author:
eugene
Message:

add rndseed

Location:
branches/czw_branch/20160809/Ohana/src/opihi
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20160809/Ohana/src/opihi/cmd.astro/spex1dgas.c

    r33662 r39856  
    108108  IDList = NULL;
    109109  XoList = NULL;
    110   {
    111     // init random numbers
    112     long A, B;
    113     A = time(NULL);
    114     for (B = 0; A == time(NULL); B++);
    115     srand48(B);
    116   }
    117110 
     111  // srand48() is called by startup.c
     112
    118113  if (argc != 11) goto usage;
    119114
  • branches/czw_branch/20160809/Ohana/src/opihi/cmd.astro/spex2dgas.c

    r33662 r39856  
    120120  float XoMax, YoMax;
    121121
    122   {
    123     // init random numbers
    124     long A, B;
    125     A = time(NULL);
    126     for (B = 0; A == time(NULL); B++);
    127     srand48(B);
    128   }
    129  
     122  // srand48() is called by startup.c
     123
    130124  if (argc != 9) goto usage;
    131125
  • branches/czw_branch/20160809/Ohana/src/opihi/cmd.astro/spexseq.c

    r39457 r39856  
    9090  int Nobject = 0;
    9191
    92   {
    93     // init random numbers
    94     long A, B;
    95     A = time(NULL);
    96     for (B = 0; A == time(NULL); B++);
    97     srand48(B);
    98   }
    99  
    10092  if (argc != 6) goto usage;
     93
     94  // srand48() is called by startup.c
    10195
    10296  // XXX enforce matching lengths on the three vectors
  • branches/czw_branch/20160809/Ohana/src/opihi/cmd.data/Makefile

    r39638 r39856  
    124124$(SRC)/resize.$(ARCH).o         \
    125125$(SRC)/relocate.$(ARCH).o       \
     126$(SRC)/rndseed.$(ARCH).o                \
    126127$(SRC)/roll.$(ARCH).o           \
    127128$(SRC)/rotate.$(ARCH).o \
  • branches/czw_branch/20160809/Ohana/src/opihi/cmd.data/init.c

    r39638 r39856  
    113113int reindex          PROTO((int, char **));
    114114int relocate         PROTO((int, char **));
     115int rndseed          PROTO((int, char **));
    115116int roll             PROTO((int, char **));
    116117int rotate           PROTO((int, char **));
     
    293294  {1, "relocate",     relocate,         "set graphics/image window position"},
    294295  {1, "roll",         roll,             "roll image to new start point"},
     296  {1, "rndseed",      rndseed,          "set the pseudo-random seed"},
    295297  {1, "rotate",       rotate,           "rotate image"},
    296298  {1, "save",         save,             "save an SAOimage style image overlay"},
  • branches/czw_branch/20160809/Ohana/src/opihi/cmd.data/stats-new.c

    r15274 r39856  
    129129  ALLOCATE (values, float, Nsample);
    130130   
    131   A = time(NULL);
    132   for (B = 0; A == time(NULL); B++);
    133   srand48(B);
     131  // srand48() is called by startup.c
    134132 
    135133  *buffer = (float *) matrix[0].buffer;
  • branches/czw_branch/20160809/Ohana/src/opihi/dvo/imdense.c

    r37807 r39856  
    44int imdense (int argc, char **argv) {
    55 
    6   long A, B;
    76  off_t i, Nimage;
    87  int kapa, N, status, NPTS;
     
    2726  Rmax = graphmode.coords.crval1 + 182.0;
    2827 
    29   A = time(NULL);
    30   for (B = 0; A == time(NULL); B++);
    31   srand48(B);
     28  // srand48() is called by startup.c
    3229
    3330  N = 0;
Note: See TracChangeset for help on using the changeset viewer.