IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 24, 2013, 1:37:30 PM (13 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20130509
Files:
74 edited
13 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130509

  • branches/eam_branches/ipp-20130509/Nebulous

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/Nebulous-Server

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/Ohana

  • branches/eam_branches/ipp-20130509/Ohana/src/addstar/include/addstar.h

    r35263 r35594  
    119119int     ACCEPT_TIME;    // accept time stamp (or 0)
    120120int     NO_STARS;       // ignore the stars
     121int     NO_DUPLICATE_IMAGES; // allow / skip duplicate images
     122int     IMAGE_ID_OVERRIDE; // allow / skip duplicate images
    121123int     TEXTMODE;       // force input file to be loaded as RAW
    122124int     SUBPIX;         // apply a subpix correction
  • branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/ImageIndex.c

    r35263 r35594  
    159159  if (!index) {
    160160      fprintf (stderr, "image index file is not found, cannot check for image duplicates\n");
    161       exit (2);
     161      exit (1);
    162162  }
    163163
  • branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/UpdateImageIDs.c

    r35263 r35594  
    3535  }
    3636
     37  // TEST IMAGE_ID OVER-RIDE:
     38  if (IMAGE_ID_OVERRIDE) {
     39    imageID = IMAGE_ID_OVERRIDE;
     40  }
     41
    3742  // XXX should the first image ID be 1, not 0?
    3843  if (imageID == 0) imageID = 1;
     
    5459  // set and update the imageID sequence
    5560  // the file holding the index is created above if this is an empty db
    56   CheckDuplicateImageIDs (images, Nimages);
     61  if (NO_DUPLICATE_IMAGES) {
     62    CheckDuplicateImageIDs (images, Nimages);
     63  }
    5764
    5865  imageID += Nimages;
  • branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/args.c

    r34405 r35594  
    308308  if ((N = get_argument (argc, argv, "-no-stars"))) {
    309309    NO_STARS = TRUE;
     310    remove_argument (N, &argc, argv);
     311  }
     312  /* skip the stars */
     313  NO_DUPLICATE_IMAGES = TRUE;
     314  if ((N = get_argument (argc, argv, "-dup-images"))) {
     315    NO_DUPLICATE_IMAGES = FALSE;
     316    remove_argument (N, &argc, argv);
     317  }
     318  /* skip the stars */
     319  IMAGE_ID_OVERRIDE = 0;
     320  if ((N = get_argument (argc, argv, "-image-id-override"))) {
     321    remove_argument (N, &argc, argv);
     322    IMAGE_ID_OVERRIDE = atoi(argv[N]);
    310323    remove_argument (N, &argc, argv);
    311324  }
     
    438451  fprintf (stderr, "  -use-name                   : use the given name instead of the filename as the filename\n");
    439452  fprintf (stderr, "  -no-stars                   : skip the stars\n");
     453  fprintf (stderr, "  -dup-images                 : skip the test for duplicate image IDs (test only!)\n");
    440454  fprintf (stderr, "  -force                      : force read of database with inconsistent info\n");
    441455  fprintf (stderr, "  -threads (N)                : use N threads for resort option\n");
  • branches/eam_branches/ipp-20130509/Ohana/src/dvomerge

  • branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/include/dvomerge.h

    r35416 r35594  
    2525
    2626int    VERBOSE;
     27int    VERIFY;
     28int    IMAGES_ONLY;
    2729char   CATDIR[256];
    2830char   GSCFILE[256];
  • branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/src/args.c

    r35416 r35594  
    1212    remove_argument (N, argc, argv);
    1313  }
     14
     15  /* verify merge status of output tables, but do not modify */
     16  VERIFY = FALSE;
     17  if ((N = get_argument (*argc, argv, "-verify"))) {
     18    VERIFY = TRUE;
     19    remove_argument (N, argc, argv);
     20  }
     21  if ((N = get_argument (*argc, argv, "-check-only"))) {
     22    VERIFY = TRUE;
     23    remove_argument (N, argc, argv);
     24  }
     25
     26  /* use a different photcode file to define mean values */
    1427  if ((N = get_argument (*argc, argv, "-photcode-file"))) {
    1528    remove_argument (N, argc, argv);
     
    113126  }
    114127
     128  /* verify merge status of output tables, but do not modify */
     129  VERIFY = FALSE;
     130  if ((N = get_argument (*argc, argv, "-verify"))) {
     131    VERIFY = TRUE;
     132    remove_argument (N, argc, argv);
     133  }
     134  if ((N = get_argument (*argc, argv, "-check-only"))) {
     135    VERIFY = TRUE;
     136    remove_argument (N, argc, argv);
     137  }
     138
    115139  /* replace measurement, don't duplicate */
    116140  REPLACE_BY_PHOTCODE = FALSE;
  • branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/src/dvomerge.c

    r29938 r35594  
    1010  if (argc == 6) {
    1111    if (!strcasecmp (argv[2], "and")) {
     12      if (VERIFY) {
     13        fprintf (stderr, "WARNING / ERROR : dvomerge (input1) and (input2) into (output) : VERIFY mode not implemented\n");
     14        exit (3);
     15      }
    1216      dvomergeCreate (argc, argv);
    1317    } else {
     18      if (VERIFY) {
     19        fprintf (stderr, "WARNING / ERROR : dvomerge (input) into (output) from (list) : VERIFY mode not implemented\n");
     20        exit (3);
     21      }
    1422      dvomergeFromList (argc, argv);
    1523    }
     
    2634}
    2735
    28 /* we have two possible modes of operation:
     36/* we have two major modes of operation:
    2937
    30    Create   : dvomerge (in1) and (in2) to (out) -- create a new db from two input dbs
    31    Update   : dvomerge (in) into (out)          -- merge a new db into an existing db
    32    Continue : dvomerge (in) into (out) continue -- merge a new db into an existing db
     38   Create    : dvomerge (in1) and (in2) to (out) -- create a new db from two input dbs
     39   Update    : dvomerge (in) into (out)          -- merge a new db into an existing db
    3340
     41   we also have varients on Update:
     42   Continue  : dvomerge (in) into (out) continue -- merge only unmerged tables into the existing db
     43   From List : dvomerge (in) into (out) from (list) -- merge only specified tables into the existing db
     44
     45   neither of the 2 above modes update the image table
    3446*/
  • branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/src/dvomergeFromList.c

    r35454 r35594  
    108108    dmhObjectStats *inStats = dmhObjectStatsRead (inputfile);
    109109
     110    // XXX : we are not checking for already-merged entries
     111
    110112    LoadCatalog (&incatalog, NULL, inputfile, "r", NsecfiltInput);
    111113
  • branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/src/dvomergeUpdate.c

    r33963 r35594  
    2323    CONTINUE = TRUE;
    2424  }
     25  if (VERIFY) CONTINUE = TRUE;
    2526
    2627  input  = argv[1];
     
    7879  } else {
    7980    dvomergeImagesUpdate (&IDmap, input, output);
     81    if (IMAGES_ONLY) exit (0);
    8082  }
    8183
  • branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c

    r34405 r35594  
    7676    }
    7777    if (!missed) {
    78       if (VERBOSE) fprintf (stderr, "skipping %s, empty or already merged\n", inlist[0].filename[i]);
     78      if (VERBOSE || VERIFY) fprintf (stderr, "skipping %s, already merged\n", inlist[0].filename[i]);
    7979      OutputStatusFree (outstat, outlist->Nregions);
    8080      dmhObjectStatsFree (inStats);
    8181      SkyListFree (outlist);
     82      continue;
     83    }
     84    if (VERIFY) {
     85      fprintf (stderr, "%s NOT merged\n", inlist[0].filename[i]);
    8286      continue;
    8387    }
     
    193197    char tmpline[DVO_MAX_PATH];
    194198    if (VERBOSE)             { snprintf (tmpline, DVO_MAX_PATH, "%s -v",       command); strcpy (command, tmpline); }
     199    if (VERIFY)              { snprintf (tmpline, DVO_MAX_PATH, "%s -verify",  command); strcpy (command, tmpline); }
    195200    if (REPLACE_BY_PHOTCODE) { snprintf (tmpline, DVO_MAX_PATH, "%s -replace", command); strcpy (command, tmpline); }
    196201
  • branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/src/dvomergeUpdate_threaded.c

    r33657 r35594  
    129129  output = argv[3];
    130130
     131  fprintf (stderr, "WARNING / ERROR : multi-threaded dvomerge does not handle merge tracking yet\n");
     132  exit (2);
     133
    131134  if (ALTERNATE_PHOTCODE_FILE) {
    132135    fprintf (stderr, "cannot specify photcodes when merging into an existing catdir\n");
  • branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/src/help.c

    r35416 r35594  
    5959  fprintf (stderr, "  optional flags:\n");
    6060  fprintf (stderr, "  -v                          : verbose mode\n");
     61  fprintf (stderr, "  -verify                     : verify merge status of output tables, but do not modify\n");
     62  fprintf (stderr, "  -check-only                 : verify merge status of output tables, but do not modify [same as -verify]\n");
    6163  fprintf (stderr, "  -help                       : this list\n");
    6264  fprintf (stderr, "  -h                          : this list\n\n");
     
    8183  fprintf (stderr, "  optional flags:\n");
    8284  fprintf (stderr, "  -v                          : verbose mode\n");
     85  fprintf (stderr, "  -verify                     : verify merge status of output tables, but do not modify\n");
     86  fprintf (stderr, "  -check-only                 : verify merge status of output tables, but do not modify [same as -verify]\n");
    8387  fprintf (stderr, "  -help                       : this list\n");
    8488  fprintf (stderr, "  -h                          : this list\n\n");
  • branches/eam_branches/ipp-20130509/Ohana/src/dvopsps/include/dvopsps.h

    r35207 r35594  
    1313  uint64_t ippObjID;
    1414  uint64_t objID;
     15  int      photcode;
    1516  unsigned int flags;
    1617  float zp;
  • branches/eam_branches/ipp-20130509/Ohana/src/dvopsps/src/DetectionOps.c

    r35098 r35594  
    5454  GET_COLUMN(ippObjID    , "ippObjID",    int64_t);
    5555  GET_COLUMN(objID       , "objID",       int64_t);
     56  GET_COLUMN(photcode    , "photcode",    int);
    5657  GET_COLUMN(flags       , "flags",       int);
    5758  GET_COLUMN(zp          , "zp",          float);
     
    7374    detections[i].ippObjID     = ippObjID[i];   
    7475    detections[i].objID        = objID[i];     
     76    detections[i].photcode     = photcode[i];     
    7577    detections[i].flags        = flags[i];     
    7678    detections[i].zp           = zp[i];         
     
    9092  free (ippObjID   );
    9193  free (objID      );
     94  free (photcode   );
    9295  free (flags      );
    9396  free (zp         );
     
    154157  // gfits_define_bintable_column (&theader, "K", "ippObjID",    NULL, NULL, 1.0, BZERO_INT64);
    155158  // gfits_define_bintable_column (&theader, "K", "objID",       NULL, NULL, 1.0, BZERO_INT64);
     159  gfits_define_bintable_column (&theader, "J", "photcode",    NULL, NULL, 1.0, 0.0);
    156160  gfits_define_bintable_column (&theader, "J", "flags",       NULL, NULL, 1.0, BZERO_INT32);
    157161  gfits_define_bintable_column (&theader, "E", "zp",          NULL, NULL, 1.0, 0.0);
     
    173177  uint64_t   *ippObjID    ; ALLOCATE (ippObjID    ,  uint64_t, Ndetections);
    174178  uint64_t   *objID       ; ALLOCATE (objID       ,  uint64_t, Ndetections);
     179  int        *photcode    ; ALLOCATE (photcode    ,  int,      Ndetections);
    175180  uint32_t   *flags       ; ALLOCATE (flags       ,  uint32_t, Ndetections);
    176181  float      *zp          ; ALLOCATE (zp          ,  float,    Ndetections);
     
    190195    ippObjID[i]    = detections[i].ippObjID    ;
    191196    objID[i]       = detections[i].objID       ;
     197    photcode[i]    = detections[i].photcode    ;
    192198    flags[i]       = detections[i].flags       ;
    193199    zp[i]          = detections[i].zp          ;
     
    207213  gfits_set_bintable_column (&theader, &ftable, "ippObjID",    ippObjID    , Ndetections);
    208214  gfits_set_bintable_column (&theader, &ftable, "objID",       objID       , Ndetections);
     215  gfits_set_bintable_column (&theader, &ftable, "photcode",    photcode    , Ndetections);
    209216  gfits_set_bintable_column (&theader, &ftable, "flags",       flags       , Ndetections);
    210217  gfits_set_bintable_column (&theader, &ftable, "zp",          zp          , Ndetections);
     
    222229  free (ippObjID    );
    223230  free (objID       );
     231  free (photcode    );
    224232  free (flags       );
    225233  free (zp          );
  • branches/eam_branches/ipp-20130509/Ohana/src/dvopsps/src/insert_detections_dvopsps_catalog.c

    r35416 r35594  
    4949      // detections[Ndetections]. ((uint64_t)average->catID << 32) + (uint64_t)average->objID; // ippObjID
    5050      detections[Ndetections].objID        = average->extID;   // objID
     51      detections[Ndetections].photcode     = measure->photcode;   // photcode
    5152      detections[Ndetections].flags        = measure->dbFlags;  // flags
    5253      detections[Ndetections].zp           = code->C * 0.001 + code->K * (measure->airmass - 1) - measure->Mcal;   // zp
     
    168169  }
    169170
    170   PrintIOBuffer (buffer, "INSERT INTO dvoDetectionFull (imageID, ippDetectID, detectID, ippObjID, objID, flags, zp, zpErr, airMass, expTime, ra, dec_, raErr, decErr) VALUES \n");
     171  PrintIOBuffer (buffer, "INSERT INTO dvoDetectionFull (imageID, ippDetectID, detectID, ippObjID, objID, photcode, flags, zp, zpErr, airMass, expTime, ra, dec_, raErr, decErr) VALUES \n");
    171172
    172173  return TRUE;
     
    179180int insert_detections_mysql_value (IOBuffer *buffer, Average *average, Measure *measure) {
    180181
    181   // XXX I am changing the def of ippObjID if I use the code below
    182182  PhotCode *code = GetPhotcodebyCode(measure->photcode);
    183   // PrintIOBuffer (buffer, "    (%d, %u, %lu, %lu, %lu, %u, %f, %f, %f, %f, %lf, %lf, %f, %f),\n",
    184   //             measure->imageID,    // imageID
    185   //             measure->detID,   // ippDetectID
    186   //             measure->extID,   // detectID
    187   //             ((uint64_t)average->catID * 1000000000) + (uint64_t)average->objID, // ippObjID
    188   //             // NOTE: this is better, but the above is the current ippToPsps value
    189   //             // ((uint64_t)average->catID << 32) + (uint64_t)average->objID, // ippObjID
    190   //             average->extID,   // objID
    191   //             measure->dbFlags,  // flags
    192   //             code->C * 0.001 + code->K * (measure->airmass - 1) - measure->Mcal,   // zp
    193   //             measure->dMcal,    // zpErr
    194   //             measure->airmass,
    195   //             pow(10.0, 0.4 * measure->dt),    // expTime
    196   //             average->R - measure->dR / 3600.,    // ra
    197   //             average->D - measure->dR / 3600.,    // dec
    198   //             measure->dXccd * 0.01 * fabs(measure->pltscale), // estimate of raErr
    199   //             measure->dYccd * 0.01 * fabs(measure->pltscale) // estimate of decErr
    200   //   );
    201  
    202183  PrintIOBuffer (buffer, "(%d, ", measure->imageID);      // imageID
    203184  PrintIOBuffer (buffer, "%u, ", measure->detID); // ippDetectID
     
    207188  // ((uint64_t)average->catID << 32) + (uint64_t)average->objID, // ippObjID
    208189  PrintIOBuffer (buffer, "%lu, ", average->extID);        // objID
     190  PrintIOBuffer (buffer, "%d, ", measure->photcode);      // photcode
    209191  PrintIOBuffer (buffer, "%u, ", measure->dbFlags);       // flags
    210192
  • branches/eam_branches/ipp-20130509/Ohana/src/libfits/include/gfitsio.h

    r35162 r35594  
    2626# define FT_LINE_LENGTH          80  /* FITS header line length */
    2727# define FT_RECORD_SIZE        2880  /* FITS block size */
     28
     29# define FT_BZERO_INT16 1.0*0x8000       
     30# define FT_BZERO_INT32 1.0*0x80000000
    2831
    2932/* this structure defines the buffer which contains a header
  • branches/eam_branches/ipp-20130509/Ohana/src/libfits/table/F_define_column.c

    r33648 r35594  
    11# include <ohana.h>
    22# include <gfitsio.h>
     3
     4# if (0)
     5/*** special version of this function to define unsigned int columns (special values for BZERO, BSCALE) ********************/
     6int gfits_define_bintable_column_unsigned_int (Header *header, char *format, char *label, char *comment, char *unit, int inttype) {
     7
     8  assert (label);
     9  assert (format);
     10
     11  off_t Naxis1;
     12  int Nfields, Nbytes, Nval;
     13  char type[16], field[16];
     14 
     15  if (!gfits_bintable_format (format, type, &Nval, &Nbytes)) return (FALSE);
     16 
     17  Nfields = 0;
     18  gfits_scan (header, "TFIELDS", "%d", 1, &Nfields);
     19  gfits_scan (header, "NAXIS1",  OFF_T_FMT, 1,  &Naxis1);
     20  Nfields ++;
     21  Naxis1 += Nbytes*Nval;
     22
     23  sprintf (field, "TTYPE%d", Nfields);
     24  gfits_modify (header, field, "%s", 1, label);
     25  gfits_modify_alt (header, field, "%C", 1, comment);
     26  sprintf (field, "TUNIT%d", Nfields);
     27  gfits_modify (header, field, "%s", 1, unit);
     28  sprintf (field, "TFORM%d", Nfields);
     29  gfits_modify (header, field, "%s", 1, format);
     30
     31  // add scaling parameters unless they amount to a noop
     32  if ((bscale != 1.0) || (bzero != 0.0)) {
     33      sprintf (field, "TSCAL%d", Nfields);
     34      gfits_modify (header, field, "%lf", 1, bscale);
     35      sprintf (field, "TZERO%d", Nfields);
     36      gfits_modify (header, field, "%lf", 1, bzero);
     37  }
     38
     39  /* update TFIELDS & NAXIS1 */
     40  gfits_modify (header, "TFIELDS", "%d", 1, Nfields);
     41  gfits_modify (header, "NAXIS1",  OFF_T_FMT, 1,  Naxis1);
     42  header[0].Naxis[0] = Naxis1;
     43
     44  return (TRUE);
     45}
     46# endif
    347
    448/***********************/
  • branches/eam_branches/ipp-20130509/Ohana/src/libohana/src

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/Ohana/src/opihi

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/Ohana/src/opihi/cmd.astro

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/Ohana/src/opihi/cmd.data

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/Ohana/src/relastro/src

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/dbconfig/cam.md

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/dbconfig/changes.txt

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippMonitor

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippScripts/scripts/chip_imfile.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippScripts/scripts/destreak_restore_camera.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippScripts/scripts/ipp_apply_burntool_single.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippScripts/scripts/magic_destreak.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippScripts/scripts/publish_file.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippScripts/scripts/warp_skycell.pl

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippTasks

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippToPsps

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippTools/share

  • branches/eam_branches/ipp-20130509/ippTools/share/Makefile.am

    r35397 r35594  
    449449        diffphottool_data.sql \
    450450        laptool_definerun.sql \
     451        laptool_definerunbyrelease.sql \
    451452        laptool_exposures.sql \
    452453        laptool_inactiveexp.sql \
  • branches/eam_branches/ipp-20130509/ippTools/share/camtool_find_pendingimfile.sql

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippTools/share/chiptool_find_rawexp.sql

    r30049 r35594  
    66FROM rawExp
    77JOIN newExp using (exp_id)
    8 LEFT JOIN chipRun USING (exp_id)
     8LEFT JOIN chipRun ON chipRun.exp_id = rawExp.exp_id -- JOIN hook %s
    99WHERE
    1010    rawExp.fault = 0
  • branches/eam_branches/ipp-20130509/ippTools/share/chiptool_setimfiletoupdate.sql

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippTools/share/pxadmin_create_tables.sql

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippTools/share/warptool_towarped.sql

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippTools/src

  • branches/eam_branches/ipp-20130509/ippTools/src/camtool.c

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippTools/src/camtoolConfig.c

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippTools/src/chiptool.c

    r34766 r35594  
    269269
    270270    PXOPT_LOOKUP_STR(workdir, config->args, "-set_workdir", true, false);
    271     PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false);
     271    PXOPT_LOOKUP_STR(label, config->args, "-set_label", true, false);
    272272    PXOPT_LOOKUP_STR(reduction, config->args, "-set_reduction", false, false);
    273273    PXOPT_LOOKUP_STR(expgroup, config->args, "-set_expgroup", false, false);
     
    298298    psFree(where);
    299299
     300    psString labelHook = NULL;
    300301    if (unique) {
    301       psStringAppend(&query, "AND chip_id IS NULL");
     302      psStringAppend(&labelHook, "\nAND chipRun.label = '%s'", label);
     303      psStringAppend(&query, " AND chip_id IS NULL");
    302304    }
    303305   
    304     if (!p_psDBRunQuery(config->dbh, query)) {
     306    if (!p_psDBRunQueryF(config->dbh, query, labelHook ? labelHook : "")) {
    305307        psError(PS_ERR_UNKNOWN, false, "database error");
    306308        psFree(query);
  • branches/eam_branches/ipp-20130509/ippTools/src/chiptoolConfig.c

    r34766 r35594  
    5252
    5353    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_workdir",  0,            "define workdir (required)", NULL);
    54     psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_label",  0,            "define label", NULL);
     54    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_label",  0,            "define label (required)", NULL);
    5555    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_reduction",  0,            "define reduction class", NULL);
    5656    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_expgroup",  0,            "define exposure group", NULL);
  • branches/eam_branches/ipp-20130509/ippTools/src/laptool.c

    r35308 r35594  
    2222// Run level
    2323static bool definerunMode(pxConfig *config);
     24static bool definerunbyreleaseMode(pxConfig *config);
    2425static bool pendingrunMode(pxConfig *config);
    2526static bool updaterunMode(pxConfig *config);
     27
    2628// Exposure level
    2729static bool pendingexpMode(pxConfig *config);
     
    6466   
    6567    MODECASE(LAPTOOL_MODE_DEFINERUN,     definerunMode);
     68    MODECASE(LAPTOOL_MODE_DEFINERUNBYRELEASE, definerunbyreleaseMode);
    6669    MODECASE(LAPTOOL_MODE_PENDINGRUN,    pendingrunMode);
    6770    MODECASE(LAPTOOL_MODE_UPDATERUN,     updaterunMode);
     
    401404}
    402405
     406static bool definerunbyreleaseMode(pxConfig *config)
     407{
     408  PS_ASSERT_PTR_NON_NULL(config, false);
     409
     410  PXOPT_LOOKUP_S64(seq_id,          config->args, "-seq_id",          true, false);
     411  PXOPT_LOOKUP_STR(projection_cell, config->args, "-projection_cell", true, false);
     412  PXOPT_LOOKUP_STR(tess_id,         config->args, "-tess_id",         true, false);
     413  PXOPT_LOOKUP_STR(filter,          config->args, "-filter",          true, false);
     414  PXOPT_LOOKUP_STR(label,           config->args, "-label",           false, false);
     415  PXOPT_LOOKUP_STR(dist_group,      config->args, "-dist_group",      false, false);
     416  PXOPT_LOOKUP_S64(rel_id,          config->args, "-rel_id",          false, false);
     417  PXOPT_LOOKUP_STR(rel_name,        config->args, "-release_name",    false, false);
     418  PXOPT_LOOKUP_BOOL(simple,         config->args, "-simple",          false);
     419
     420  // Validate config
     421  if ((!rel_name)&&(!rel_id)) {
     422    // Die here.
     423  }
     424 
     425  lapRunRow *run = lapRunRowAlloc(0, // lap_id
     426                                  seq_id,
     427                                  tess_id,
     428                                  projection_cell,
     429                                  filter,
     430                                  "registered", // state
     431                                  label,
     432                                  dist_group,
     433                                  NULL, // registered
     434                                  0,    // fault
     435                                  INT64_MAX,    // quick_sass_id
     436                                  INT64_MAX     // final_sass_id
     437                                  );
     438  if (!run) {
     439    psError(PS_ERR_UNKNOWN, false, "failed to alloc lapRun object");
     440    return(true);
     441  }
     442
     443  if (!psDBTransaction(config->dbh)) {
     444    psError(PS_ERR_UNKNOWN, false, "database error");
     445    return(false);
     446  }
     447   
     448  if (!lapRunInsertObject(config->dbh, run)) {
     449    if (!psDBRollback(config->dbh)) {
     450      psError(PS_ERR_UNKNOWN, false, "database error");
     451    }
     452    psError(PS_ERR_UNKNOWN, false, "database error");
     453    psFree(run);
     454    return(false);
     455  }
     456
     457  if (!lapRunPrintObject(stdout, run, !simple)) {
     458    if (!psDBRollback(config->dbh)) {
     459      psError(PS_ERR_UNKNOWN, false, "database error");
     460    }
     461    psError(PS_ERR_UNKNOWN, false, "failed to print object");
     462    psFree(run);
     463    return(false);
     464  }
     465
     466  psS64 lap_id = psDBLastInsertID(config->dbh);
     467
     468  psString query = pxDataGet("laptool_definerunbyrelease.sql");
     469  if (!query) {
     470    if (!psDBRollback(config->dbh)) {
     471      psError(PS_ERR_UNKNOWN, false, "database error");
     472    }
     473    psError(PXTOOLS_ERR_SYS, false, "failed to retrieve SQL statement");
     474    return(false);
     475  }
     476 
     477  // Add constraints
     478  psMetadata *relWhere = psMetadataAlloc();
     479  PXOPT_COPY_STR(config->args, relWhere, "-filter",       "rawExp.filter", "==");
     480  PXOPT_COPY_STR(config->args, relWhere, "-release_name", "ippRelease.release_name", "==");
     481  PXOPT_COPY_S64(config->args, relWhere, "-rel_id",       "ippRelease.rel_id", "==");
     482  PXOPT_COPY_TIME(config->args, relWhere, "-dateobs_begin", "rawExp.dateobs", ">=");
     483  PXOPT_COPY_TIME(config->args, relWhere, "-dateobs_end", "rawExp.dateobs", "<=");
     484  PXOPT_COPY_RADEC(config->args, relWhere, "-ra_min", "rawExp.ra", ">=");
     485  PXOPT_COPY_RADEC(config->args, relWhere, "-ra_max", "rawExp.ra", "<");
     486  PXOPT_COPY_RADEC(config->args, relWhere, "-decl_min", "rawExp.decl", ">=");
     487  PXOPT_COPY_RADEC(config->args, relWhere, "-decl_max", "rawExp.decl", "<");
     488
     489  psMetadata *lapWhere = psMetadataAlloc();
     490  PXOPT_COPY_S64(config->args, lapWhere, "-seq_id",       "lapRun.seq_id", "==");
     491  PXOPT_COPY_STR(config->args, lapWhere, "-filter",       "lapRun.filter", "==");
     492
     493  psString relWhereClause = psDBGenerateWhereConditionSQL(relWhere,NULL);
     494  psString lapWhereClause = psDBGenerateWhereConditionSQL(lapWhere,NULL);
     495
     496  if (relWhereClause) {
     497    psStringSubstitute(&query,relWhereClause,"@RELWHERE@");
     498  }
     499  if (lapWhereClause) {
     500    psStringSubstitute(&query,lapWhereClause,"@LAPWHERE@");
     501  }
     502  psFree(relWhere);
     503  psFree(lapWhere);
     504
     505  // Fetch exposures
     506  if (!p_psDBRunQuery(config->dbh, query)) {
     507    if (!psDBRollback(config->dbh)) {
     508      psError(PS_ERR_UNKNOWN, false, "database error");
     509    }
     510
     511    psError(PS_ERR_UNKNOWN, false, "database error");
     512    psFree(query);
     513    return(false);
     514  }
     515  psFree(query);
     516
     517  psArray *output = p_psDBFetchResult(config->dbh);
     518  if (!output) {
     519    if (!psDBRollback(config->dbh)) {
     520      psError(PS_ERR_UNKNOWN, false, "database error");
     521    }
     522
     523    psError(PS_ERR_UNKNOWN, false, "database error");
     524    return(false);
     525  }
     526  if (!psArrayLength(output)) {
     527    if (!psDBRollback(config->dbh)) {
     528      psError(PS_ERR_UNKNOWN, false, "database error");
     529    }
     530
     531    psTrace("laptool", PS_LOG_INFO, "no rows found");
     532    psFree(output);
     533    return(true);
     534  }
     535
     536  // Insert the exposure data
     537  for (long i = 0; i < output->n; i++) {
     538    psMetadata *row = output->data[i]; // Row from select
     539    // Add default values from this run:
     540    psMetadataAddS64(row, PS_LIST_TAIL, "lap_id", 0, "", lap_id);
     541    psMetadataAddS64(row, PS_LIST_TAIL, "pair_id", 0, "", INT64_MAX);
     542    psMetadataAddStr(row, PS_LIST_TAIL, "data_state", 0, "", "new");
     543    lapExpRow *lapExp = lapExpObjectFromMetadata(row);
     544    lapExp->lap_id = lap_id;
     545
     546    if (!lapExpInsertObject(config->dbh,lapExp)) {
     547      if (!lapExpPrintObject(stdout, lapExp, !simple)) {
     548        if (!psDBRollback(config->dbh)) {
     549          psError(PS_ERR_UNKNOWN, false, "database error");
     550        }
     551        psError(PS_ERR_UNKNOWN, false, "failed to print object");
     552        psFree(run);
     553        return false;
     554      }
     555     
     556      if (!psDBRollback(config->dbh)) {
     557        psError(PS_ERR_UNKNOWN, false, "database error");
     558      }
     559      psError(PS_ERR_UNKNOWN, false, "database error");
     560      psFree(output);
     561      psFree(lapExp);
     562      return(false);
     563    }
     564  }
     565
     566  // point of no return
     567  if (!psDBCommit(config->dbh)) {
     568    psError(PS_ERR_UNKNOWN, false, "database error");
     569    return false;
     570  }
     571
     572 
     573  psFree(output);
     574  return(true); 
     575}
     576
     577
     578 
     579 
     580                   
    403581static bool pendingrunMode(pxConfig *config)
    404582{
  • branches/eam_branches/ipp-20130509/ippTools/src/laptool.h

    r35308 r35594  
    1313  LAPTOOL_MODE_LISTSEQUENCE,
    1414  LAPTOOL_MODE_DEFINERUN,
     15  LAPTOOL_MODE_DEFINERUNBYRELEASE,
    1516  LAPTOOL_MODE_PENDINGRUN,
    1617  LAPTOOL_MODE_UPDATERUN,
  • branches/eam_branches/ipp-20130509/ippTools/src/laptoolConfig.c

    r35308 r35594  
    5757  ADD_OPT(Str, definerunArgs, "-label",                       "define the label used", NULL);
    5858  ADD_OPT(Str, definerunArgs, "-dist_group",                  "define the distribution group for this data", NULL);
    59 
     59 
    6060  psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-obsmode", PS_META_DUPLICATE_OK, "search by obsmode", NULL);
    6161  ADD_OPT(Bool,definerunArgs, "-all_obsmode",                 "use all science obsmodes", false);
    6262 
    6363  ADD_OPT(Bool,definerunArgs, "-simple",                      "use the simple output format", false);
     64
     65  // -definerunbyrelease
     66  psMetadata *definerunbyreleaseArgs = psMetadataAlloc();
     67  ADD_OPT(S64, definerunbyreleaseArgs, "-seq_id",             "define the LAP sequence for this run (required)", 0);
     68  ADD_OPT(Str, definerunbyreleaseArgs, "-projection_cell",    "define the projection cell for this run (required)", NULL);
     69  ADD_OPT(Str, definerunbyreleaseArgs, "-tess_id",            "define the tessellation used (required)", NULL);
     70  ADD_OPT(Str, definerunbyreleaseArgs, "-filter",             "define the filter used (required)", NULL);
     71  ADD_OPT(Str, definerunbyreleaseArgs, "-label",              "define the label used", NULL);
     72  ADD_OPT(Str, definerunbyreleaseArgs, "-dist_group",         "define the distribution group for this data", NULL);
     73  ADD_OPT(S64, definerunbyreleaseArgs, "-rel_id",             "define the release to copy", 0);
     74  ADD_OPT(Str, definerunbyreleaseArgs, "-release_name",       "define the release to copy", NULL);
     75 
     76  ADD_OPT(Bool, definerunbyreleaseArgs, "-simple",            "use the simple output format", false);
     77  psMetadataAddTime(definerunbyreleaseArgs, PS_LIST_TAIL, "-dateobs_begin",      0, "search for exposures by time (>=)", NULL);
     78  psMetadataAddTime(definerunbyreleaseArgs, PS_LIST_TAIL, "-dateobs_end",        0, "search for exposures by time (<=)", NULL);
     79  psMetadataAddF64(definerunbyreleaseArgs,  PS_LIST_TAIL, "-ra_min",             0, "search by min RA (degrees) ", NAN);
     80  psMetadataAddF64(definerunbyreleaseArgs,  PS_LIST_TAIL, "-ra_max",             0, "search by max RA (degrees) ", NAN);
     81  psMetadataAddF64(definerunbyreleaseArgs,  PS_LIST_TAIL, "-decl_min",           0, "search by min DEC (degrees)", NAN);
     82  psMetadataAddF64(definerunbyreleaseArgs,  PS_LIST_TAIL, "-decl_max",           0, "search by max DEC (degrees)", NAN);
    6483 
    6584  // -pendingrun
     
    204223  PXOPT_ADD_MODE("-listsequence",            "", LAPTOOL_MODE_LISTSEQUENCE,     listsequenceArgs);
    205224  PXOPT_ADD_MODE("-definerun",               "", LAPTOOL_MODE_DEFINERUN,        definerunArgs);
     225  PXOPT_ADD_MODE("-definerunbyrelease",      "", LAPTOOL_MODE_DEFINERUNBYRELEASE, definerunbyreleaseArgs);
    206226  PXOPT_ADD_MODE("-pendingrun",              "", LAPTOOL_MODE_PENDINGRUN,       pendingrunArgs);
    207227  PXOPT_ADD_MODE("-listrun",                 "", LAPTOOL_MODE_PENDINGRUN,       listrunArgs);
  • branches/eam_branches/ipp-20130509/ippTools/src/magictool.c

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippconfig

  • branches/eam_branches/ipp-20130509/ippconfig/gpc1/ppStack.config

    r35492 r35594  
    8181END
    8282
    83 STACK_ALLDEEP    METADATA                  # N>>20 inputs, typically MD fields, no cuts
     83
     84STACK_MD_REF       METADATA  ## revised config for MD refstacks vs PS1_REFERENCE above after ppStack mods 5/03/13
    8485    OUTPUT.NOCOMP           BOOL  TRUE
    8586    OUTPUT.LOGFLUX          BOOL  FALSE
    8687    OUTPUT.REPLICATE        BOOL  TRUE
     88    STACK.TYPE              STR   DEEP_STACK  ## needed?
     89    PSF.INPUT.CLIP.SIMPLE   BOOL  True
     90    PSF.INPUT.MAX           F32   6.0   # never really want >6 pixels in refstack
     91    PSF.INPUT.CLIP.NSIGMA   F32   1.0   # sample typically on rising side of distribution (set even smaller?)
     92    PSF.INPUT.THRESH        F32   NAN
     93    PSF.INPUT.ASYMMETRY     F32   NAN
     94    MATCH.REJ               F32   4.0 # need ot tune?
     95    SAFE                    BOOL  FALSE
     96END
     97
     98STACK_MD_DEEP     METADATA   ## revised config for MD deepstack above after ppStack mods 5/03/13
     99    OUTPUT.NOCOMP           BOOL  TRUE
     100    OUTPUT.LOGFLUX          BOOL  FALSE
     101    OUTPUT.REPLICATE        BOOL  TRUE
     102    STACK.TYPE              STR   DEEP_STACK
     103    PSF.INPUT.CLIP.SIMPLE   BOOL  True
     104    PSF.INPUT.MAX           F32   10.0
     105    PSF.INPUT.CLIP.NSIGMA   F32   100.0
     106    PSF.INPUT.THRESH        F32   NAN
     107    PSF.INPUT.ASYMMETRY     F32   NAN
     108    MATCH.REJ               F32   4.0 # need ot tune?
     109    SAFE                    BOOL  FALSE
     110END
     111
     112STACK_ALLDEEP      METADATA     # no cuts, everything in changes after ppStack mods 5/03/13
     113    OUTPUT.NOCOMP           BOOL  TRUE
     114    OUTPUT.LOGFLUX          BOOL  FALSE
     115    OUTPUT.REPLICATE        BOOL  TRUE
     116    STACK.TYPE              STR   DEEP_STACK
     117    PSF.INPUT.CLIP.SIMPLE   BOOL  True
     118    PSF.INPUT.MAX           F32   100.0
     119    PSF.INPUT.CLIP.NSIGMA   F32   100.0
     120    PSF.INPUT.THRESH        F32   NAN
     121    PSF.INPUT.ASYMMETRY     F32   NAN
     122    MATCH.REJ               F32   4.0 # need ot tune?
     123    SAFE                    BOOL  FALSE
    87124END
    88125
  • branches/eam_branches/ipp-20130509/ippconfig/gpc1/psphot.config

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippconfig/recipes/ppStack.config

    r35529 r35594  
    164164END
    165165
     166STACK_MD_REF    METADATA
     167END
     168
     169STACK_MD_DEEP   METADATA
     170END
     171
    166172STACK_ALLDEEP   METADATA
    167173END
     174
     175
     176
    168177
    169178TEST1 METADATA
  • branches/eam_branches/ipp-20130509/ippconfig/recipes/ppSub.config

    r35562 r35594  
    108108END
    109109
     110# test setup for nodual case
     111DIFF_NODUAL    METADATA   
     112        DUAL             BOOL    FALSE    # Dual convolution?
     113        INVERSE          BOOL    TRUE    # Generate inverse subtraction?
     114        PHOTOMETRY       BOOL    TRUE    # Perform photometry?
     115        CONVOLVE.TARGET  STR     SINGLE_AUTO
     116
     117        @ISIS.WIDTHS    F32     1.5  3.0  6.0   # Gaussian kernel FWHM values
     118        @ISIS.ORDERS    S32     6    4    2     # Polynomial orders for ISIS kernels
     119
     120        SCALE.REF       F32     5.0             # FWHM reference for kernel parameter scaling
     121        KERNEL.SIZE     S32     20              # Kernel half-size (pixels)
     122        STAMP.FOOTPRINT S32     20              # Size of stamps (pixels)
     123END
     124
    110125# Difference of two warps
    111126WARPWARP        METADATA
  • branches/eam_branches/ipp-20130509/ippconfig/recipes/psphot.config

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/ippconfig/recipes/reductionClasses.mdc

    r35562 r35594  
    299299END
    300300
     301# sweetspot no dual test case
     302SWEETSPOT_NODUAL            METADATA
     303        DIFF_PPSUB        STR     DIFF_NODUAL
     304        DIFF_PSPHOT       STR     SSTF_DIFF
     305        JPEG_BIN1         STR     PPIMAGE_J1
     306        JPEG_BIN2         STR     PPIMAGE_J2
     307END
    301308
    302309CONSTANT_WEIGHTPHOT             METADATA
     
    544551END
    545552
     553## MD refstack
     554MD_REF_STACK            METADATA
     555      STACK_PPSTACK           STR     STACK_MD_REF
     556      STACK_PPSUB             STR     STACK
     557      STACK_PSPHOT            STR     STACK
     558      STACKPHOT_PSPHOT        STR     STACKPHOT
     559      STATICSKY_CALIBRATION   STR     STATICSKY_DEEPCAL
     560END
     561
     562## MD deepstack
     563MD_DEEP_STACK            METADATA
     564      STACK_PPSTACK           STR     STACK_MD_DEEP
     565      STACK_PPSUB             STR     STACK
     566      STACK_PSPHOT            STR     STACK
     567      STACKPHOT_PSPHOT        STR     STACKPHOT
     568      STATICSKY_CALIBRATION   STR     STATICSKY_DEEPCAL
     569END
    546570
    547571# quick stacks
  • branches/eam_branches/ipp-20130509/ppImage/src

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/psModules

  • branches/eam_branches/ipp-20130509/psModules/src/detrend/pmDark.c

    r34800 r35594  
    383383      }
    384384      values_set->data[i] = values;
    385     }
    386 
     385      psFree(orders);
     386    }
     387     
    387388    // retrieve the norm vector, if supplied
    388389    psVector *norm       = psMetadataLookupPtr(&mdok, output->analysis, "DARK.NORM");
     
    433434                }
    434435                pmReadout *readout = inputs->data[r]; // Input readout
     436                if ((!readout)||(!readout->image)) {
     437                  mask->data.PS_TYPE_VECTOR_MASK_DATA[r] = 0xff;
     438                  continue;
     439                }                 
    435440                int yIn = i - readout->row0; // y position on input readout
    436441                int xIn = j - readout->col0; // x position on input readout
     
    504509    psFree(mask);
    505510
     511    for (int i = 0; i < max_orders->n; i++) {
     512      psFree(poly_set->data[i]);
     513      psArray *values = values_set->data[i];
     514      for (int j = 0; j < values->n; j++) {
     515        psFree(values->data[j]);
     516      }
     517      psFree(values_set->data[i]);
     518    }
     519    psFree(values_set);
     520    psFree(poly_set);
     521    psFree(logL);
     522
    506523    return true;
    507524}
  • branches/eam_branches/ipp-20130509/psModules/src/objects/models/pmModel_TRAIL.c

    r35560 r35594  
    169169        dPAR[PM_PAR_SIGMA]  = 0;        // we don't actually allow this to vary, so we do not need to calculate it
    170170
    171         for (int i = 0; i < 7; i++) {
    172           if (isnan(dPAR[i])) {
    173             fprintf (stderr, "*");
    174           }
    175         }
    176     }
    177     if (isnan(f)) {
    178       fprintf (stderr, "!");
    179     }
     171        //      for (int i = 0; i < 7; i++) {
     172        //        if (isnan(dPAR[i])) {
     173        //          fprintf (stderr, "*");
     174        //        }
     175        //      }
     176    }
     177    //    if (isnan(f)) {
     178    //      fprintf (stderr, "!");
     179    //    }
    180180    return(f);
    181181}
  • branches/eam_branches/ipp-20130509/psconfig

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/psphot

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/psphot/src

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/psphot/src/psphotStackImageLoop.c

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/pstamp/scripts

  • branches/eam_branches/ipp-20130509/pstamp/scripts/pstamp_save_server_status.pl

    r30469 r35594  
    1212use Pod::Usage qw( pod2usage );
    1313
    14 # XXX: We should get this from site.config, but that would about double
    15 # the execution time for this script.
    16 my $rundir = "/data/ippc17.0/pstamp";
    17 
    18 my $status_file = "$rundir/web/status.html";
    19 
    2014my $updatelink;
    2115my $verbose;
    2216my $save_temps;
     17my $pstamp_workdir;
    2318
    2419GetOptions(
    25     'rundir=s'      => \$rundir,
     20    'workdir=s'      => \$pstamp_workdir,
    2621    'update-link'    => \$updatelink,
    2722    'verbose'       => \$verbose,
     
    3732}
    3833
     34if (!$pstamp_workdir) {
     35    my $ipprc = PS::IPP::Config->new(); # IPP Configuration
     36    $pstamp_workdir = metadataLookupStr($ipprc->{_siteConfig}, 'PSTAMP_WORKDIR');
     37}
     38
     39if (!$pstamp_workdir) {
     40    warn("Failed to find PSTAMP_WORKDIR in the config\n");
     41    exit($PS_EXIT_CONFIG_ERROR);
     42}
     43my $status_file = "$pstamp_workdir/server_status/status.html";
     44
    3945my ($sec, $min, $hour, $mday, $month, $year) = gmtime;
    4046$year += 1900;
    4147$month += 1;
    4248
    43 my $dir = sprintf "$rundir/work/server_status/%4d/%02d/%02d", $year, $month, $mday;
     49my $dir = sprintf "$pstamp_workdir/server_status/%4d/%02d/%02d", $year, $month, $mday;
    4450
    4551if (!-e $dir ) {
  • branches/eam_branches/ipp-20130509/pstamp/test/maketestreq

    r35441 r35594  
    3030}
    3131
    32 # XXX: get these from site.config
    33 $pstamptool .= " -dbserver ippc19 -dbname ippRequestServer";
    34 
    3532
    3633my ($input, $submit, $listfile, $delete, $simple, $tag_req_name, $req_name, $email);
     34my ($dbname, $dbserver);
    3735my ($save_temps, $verbose);
    3836
     
    5048    'label=s'           => \$label,
    5149    'email=s'           => \$email,
     50
     51    'dbname=s'           => \$dbname,
     52    'dbserver=s'         => \$dbserver,
    5253
    5354    'listfile|l'        => \$listfile,
     
    6869die ("Input file $input not found\n") unless (-e $input);
    6970die ("Input file $input not readable\n") unless (-r $input);
     71
     72if (!$dbname or !$dbserver) {
     73    my $ipprc = PS::IPP::Config->new('GPC1');
     74
     75    if (!$dbserver) {
     76        $dbserver =  metadataLookupStr($ipprc->{_siteConfig}, 'PS_DBSERVER');
     77        die ("couldn't find dbserver in site.config\n") unless $dbserver;
     78    }
     79    if (!$dbname) {
     80        $dbname =  metadataLookupStr($ipprc->{_siteConfig}, 'PS_DBNAME');
     81        die ("couldn't find dbname in site.config\n") unless $dbname;
     82    }
     83}
     84$pstamptool .= " -dbserver $dbserver -dbname $dbname";
     85
    7086
    7187# if request name was not supplied make one
  • branches/eam_branches/ipp-20130509/psvideophot

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/eam_branches/ipp-20130509/pswarp/src/pswarpUpdateStatistics.c

    r35563 r35594  
    7373              // skip empty output readouts
    7474                if (!readout->data_exists) {
    75                   Nreadout ++;
    7675                  continue;
    7776                }
     77                Nreadout ++;
    7878   
    7979                psString readoutName = NULL;
Note: See TracChangeset for help on using the changeset viewer.