IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34689


Ignore:
Timestamp:
Nov 23, 2012, 8:50:17 PM (13 years ago)
Author:
eugene
Message:

do not create an empty, default database if CATDIR is not found

Location:
branches/eam_branches/ipp-20120905/Ohana/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120905/Ohana/src/getstar/src/ConfigInit.c

    r25757 r34689  
    55  char *config, *file;
    66  char CatdirPhotcodeFile[256];
    7   char MasterPhotcodeFile[256];
    87
    98  /*** load configuration info ***/
     
    2120  ScanConfig (config, "CATMODE",                "%s",  0, CATMODE);
    2221  ScanConfig (config, "CATFORMAT",              "%s",  0, CATFORMAT);
    23   ScanConfig (config, "PHOTCODE_FILE",          "%s",  0, MasterPhotcodeFile);
    2422  if (!ScanConfig (config, "SKY_DEPTH",         "%d",  0, &SKY_DEPTH)) {
    2523    SKY_DEPTH = 2;
     
    3432  /* XXX this does not yet write out the master photcode table */
    3533  sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);
    36   if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {
    37     fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);
     34  if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) {
     35    fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile);
    3836    exit (1);
    3937  }
  • branches/eam_branches/ipp-20120905/Ohana/src/libdvo/src/LoadPhotcodes.c

    r28246 r34689  
    1111  }
    1212
     13  if (!master_file) return FALSE;
     14
    1315  /* next try to load the photcodes from the master text photcode file */
    1416  /* automatically (or on demand?) save the text file to the FITS version */
  • branches/eam_branches/ipp-20120905/Ohana/src/markrock/src/ConfigInit.c

    r25757 r34689  
    55  char *config, *file;
    66  char CatdirPhotcodeFile[256];
    7   char MasterPhotcodeFile[256];
    87
    98  /*** load configuration info ***/
     
    2120  ScanConfig (config, "CATMODE",                "%s",  0, CATMODE);
    2221  ScanConfig (config, "CATFORMAT",              "%s",  0, CATFORMAT);
    23   ScanConfig (config, "PHOTCODE_FILE",          "%s",  0, MasterPhotcodeFile);
    2422
    2523  /* unique to markrock */
     
    4442  /* XXX this does not yet write out the master photcode table */
    4543  sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);
    46   if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {
    47     fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);
     44  if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) {
     45    fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile);
    4846    exit (1);
    4947  }
  • branches/eam_branches/ipp-20120905/Ohana/src/markstar/src/ConfigInit.c

    r25757 r34689  
    55  char *config, *file;
    66  char CatdirPhotcodeFile[256];
    7   char MasterPhotcodeFile[256];
    87
    98  /*** load configuration info ***/
     
    2120  ScanConfig (config, "CATMODE",                "%s",  0, CATMODE);
    2221  ScanConfig (config, "CATFORMAT",              "%s",  0, CATFORMAT);
    23   ScanConfig (config, "PHOTCODE_FILE",          "%s",  0, MasterPhotcodeFile);
    2422
    2523  sprintf (ImageCat, "%s/Images.dat", CATDIR);
     
    5452  /* XXX this does not yet write out the master photcode table */
    5553  sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);
    56   if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {
    57     fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);
     54  if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) {
     55    fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile);
    5856    exit (1);
    5957  }
  • branches/eam_branches/ipp-20120905/Ohana/src/photdbc/src/ConfigInit.c

    r33963 r34689  
    1414  char *config, *file;
    1515  char CatdirPhotcodeFile[256];
    16   char MasterPhotcodeFile[256];
    1716
    1817  /*** load configuration info ***/
     
    6059  free (tmpcatdir);
    6160
    62   ScanConfig (config, "PHOTCODE_FILE",          "%s",  0, MasterPhotcodeFile);
    63 
    6461  sprintf (ImageCat, "%s/Images.dat", CATDIR);
    6562
     
    7370  /* XXX this does not yet write out the master photcode table */
    7471  sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);
    75   if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, TRUE)) {
     72  if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) {
    7673    fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile);
    7774    exit (1);
  • branches/eam_branches/ipp-20120905/Ohana/src/relastro/src/ConfigInit.c

    r33963 r34689  
    55  char  *config, *file;
    66  char CatdirPhotcodeFile[256];
    7   char MasterPhotcodeFile[256];
    87  struct stat filestat;
    98  int status;
     
    4645  ScanConfig(config, "CATMODE",                "%s",  0, CATMODE);
    4746  ScanConfig(config, "CATFORMAT",              "%s",  0, CATFORMAT);
    48   ScanConfig(config, "PHOTCODE_FILE",          "%s",  0, MasterPhotcodeFile);
    4947
    5048  // Defaults for WHERE_A are established in db_utils.c: intializeConstraints
     
    7371  /* update master photcode table if not defined */
    7472  sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);
    75   if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {
    76     fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);
     73  if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) {
     74    fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile);
    7775    exit (1);
    7876  }
  • branches/eam_branches/ipp-20120905/Ohana/src/relphot/src/ConfigInit.c

    r33963 r34689  
    66  char  *config, *file;
    77  char CatdirPhotcodeFile[256];
    8   char MasterPhotcodeFile[256];
    98
    109  /*** load configuration info ***/
     
    4544  ScanConfig (config, "CATMODE",                "%s",  0, CATMODE);
    4645  ScanConfig (config, "CATFORMAT",              "%s",  0, CATFORMAT);
    47   ScanConfig (config, "PHOTCODE_FILE",          "%s",  0, MasterPhotcodeFile);
    4846
    49   sprintf (ImageCat, "%s/Images.dat", CATDIR);
     47  sprintf (ImageCat, DVO_MAX_PATH, "%s/Images.dat", CATDIR);
    5048
    5149  if (!ScanConfig (config, "SKY_DEPTH",         "%d",  0, &SKY_DEPTH)) {
     
    6967  /* XXX this does not yet write out the master photcode table */
    7068  sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);
    71   if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {
    72     fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);
     69  if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) {
     70    fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile);
    7371    exit (1);
    7472  }
  • branches/eam_branches/ipp-20120905/Ohana/src/uniphot/src/initialize_setphot.c

    r33963 r34689  
    2121  // load the photcode table
    2222  sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);
    23   if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, TRUE)) {
     23  if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) {
    2424    fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile);
    2525    exit (1);
  • branches/eam_branches/ipp-20120905/Ohana/src/uniphot/src/initialize_setphot_client.c

    r33654 r34689  
    1717  // load the photcode table : XXX needed?
    1818  sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);
    19   if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, TRUE)) {
     19  if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) {
    2020    fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile);
    2121    exit (1);
Note: See TracChangeset for help on using the changeset viewer.