IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17213


Ignore:
Timestamp:
Mar 28, 2008, 3:42:54 PM (18 years ago)
Author:
eugene
Message:

drop unused globals

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relastro/src/initialize.c

    r14590 r17213  
    44
    55  int NPHOTCODES;
    6   char *codename, *ptr;
     6  char *codename, *ptr, *list;
    77
    88  ConfigInit (&argc, argv);
    99  args (argc, argv);
    1010
    11   /* XXX we need to build a list of accepted photcodes. these will be used by bcatalog to accept or
     11  /* build a list of accepted photcodes. these will be used by bcatalog to accept or
    1212     reject loaded data */
    1313
    14   Nphotcodes = 0;
    15   photcodes = NULL;
    16   if (PHOTCODE_LIST != NULL) {
     14  NphotcodesKeep = 0;
     15  photcodesKeep = NULL;
     16  if (PHOTCODE_KEEP_LIST != NULL) {
    1717    NPHOTCODES = 10;
    18     ALLOCATE (photcodes, PhotCode *, NPHOTCODES);
     18    ALLOCATE (photcodesKeep, PhotCode *, NPHOTCODES);
    1919
    20     /* parse the comma-separated list of photcodes */
    21     strtok_r (PHOTCODE_LIST, ",", &ptr);
    22     while ((codename = strtok_r (NULL, ",", &ptr)) != NULL) {
    23       fprintf (stderr, "PHOTCODE_LIST: %s\n", PHOTCODE_LIST);
     20    /* parse the comma-separated list of photcodesKeep */
     21    list = PHOTCODE_KEEP_LIST;
     22    while ((codename = strtok_r (list, ",", &ptr)) != NULL) {
     23      list = NULL; // pass NULL on successive strtok_r calls
     24      fprintf (stderr, "PHOTCODE_LIST: %s\n", PHOTCODE_KEEP_LIST);
    2425      fprintf (stderr, "codename: %s\n", codename);
    25       if ((photcodes[Nphotcodes] = GetPhotcodebyName (codename)) == NULL) {
     26      if ((photcodesKeep[NphotcodesKeep] = GetPhotcodebyName (codename)) == NULL) {
    2627        fprintf (stderr, "ERROR: photcode %s not found in photcode table\n", codename);
    2728        exit (1);
    2829      }
    29       Nphotcodes ++;
    30       CHECK_REALLOCATE (photcodes, PhotCode *, NPHOTCODES, Nphotcodes, 10);
     30      NphotcodesKeep ++;
     31      CHECK_REALLOCATE (photcodesKeep, PhotCode *, NPHOTCODES, NphotcodesKeep, 10);
    3132    }
    3233  }
    33   PhotNsec = GetPhotcodeNsecfilt ();
     34
     35  NphotcodesSkip = 0;
     36  photcodesSkip = NULL;
     37  if (PHOTCODE_SKIP_LIST != NULL) {
     38    NPHOTCODES = 10;
     39    ALLOCATE (photcodesSkip, PhotCode *, NPHOTCODES);
     40
     41    /* parse the comma-separated list of photcodesSkip */
     42    list = PHOTCODE_SKIP_LIST;
     43    while ((codename = strtok_r (list, ",", &ptr)) != NULL) {
     44      list = NULL; // pass NULL on successive strtok_r calls
     45      fprintf (stderr, "PHOTCODE_LIST: %s\n", PHOTCODE_SKIP_LIST);
     46      fprintf (stderr, "codename: %s\n", codename);
     47      if ((photcodesSkip[NphotcodesSkip] = GetPhotcodebyName (codename)) == NULL) {
     48        fprintf (stderr, "ERROR: photcode %s not found in photcode table\n", codename);
     49        exit (1);
     50      }
     51      NphotcodesSkip ++;
     52      CHECK_REALLOCATE (photcodesSkip, PhotCode *, NPHOTCODES, NphotcodesSkip, 10);
     53    }
     54  }
    3455
    3556  initstats (STATMODE);
    3657
    37   IMAGE_BAD = ID_IMAGE_POOR | ID_IMAGE_FEW | ID_IMAGE_SKIP;
    38   STAR_BAD  = ID_STAR_POOR | ID_STAR_FEW;
    39   MEAS_BAD  = ID_MEAS_NOCAL | ID_MEAS_POOR | ID_MEAS_SKIP | ID_MEAS_AREA;
     58  // IMAGE_BAD = ID_IMAGE_POOR | ID_IMAGE_FEW | ID_IMAGE_SKIP;
     59  // STAR_BAD  = ID_STAR_POOR | ID_STAR_FEW;
     60  // MEAS_BAD  = ID_MEAS_NOCAL | ID_MEAS_POOR_ASTROM | ID_MEAS_SKIP_ASTROM | ID_MEAS_AREA;
    4061
    4162  /* XXX drop irrelevant entries */
     
    4970    fprintf (stderr, "VERBOSE: %d, PLOTSTUFF: %d\n", VERBOSE, PLOTSTUFF);
    5071
    51     fprintf (stderr, "MAG_LIM                %lf\n", MAG_LIM);
    52     fprintf (stderr, "STAR_SCATTER           %lf\n", STAR_SCATTER);
    53     fprintf (stderr, "IMAGE_SCATTER          %lf\n", IMAGE_SCATTER);
    54     fprintf (stderr, "IMAGE_OFFSET           %lf\n", IMAGE_OFFSET);
    5572    fprintf (stderr, "IMAGE_CATALOG          %s\n",  ImageCat);
    5673    fprintf (stderr, "GSCFILE                %s\n",  GSCFILE);
Note: See TracChangeset for help on using the changeset viewer.