IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2017, 8:43:50 PM (9 years ago)
Author:
eugene
Message:

generate unique frame IDs; randomize better?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20170822/src/addstar/src/mkcmf.c

    r39457 r40228  
    254254    struct timeval now;
    255255    gettimeofday (&now, NULL);
    256     long A = now.tv_sec + now.tv_usec * 1000000;
     256    int  B = getpid();
     257    long A = now.tv_sec - now.tv_usec * 1000000 + B*100000;
    257258    srand48(A);
    258259  }
     
    412413    gfits_modify (&header, "NINPUTS",         "%d", 1, 5);
    413414
     415    // if we have multiple stacks using the same input image IDs, we run into trouble
     416    int nFrame = 800 * drand48();
     417
    414418    int i;
    415419    for (i = 0; i < 5; i++) {
    416420      char field[64], expname[64];
    417421      sprintf (field, "INP_%04d", i);
    418       sprintf (expname, "o5745g01%02do.356%03d.wrp.1199763.skycell.1315.090.fits", i, i);
     422      sprintf (expname, "o5745g01%02do.%03d%03d.wrp.1199763.skycell.1315.090.fits", i, nFrame, i);
    419423      gfits_modify (&header, field, "%s", 1, expname);
    420424
Note: See TracChangeset for help on using the changeset viewer.