IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 6, 2007, 8:55:39 AM (19 years ago)
Author:
eugene
Message:

lots of work to get initial compilation going

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dvo-mods-2007-02/Ohana/src/relastro/src/initialize.c

    r12048 r12276  
    33void initialize (int argc, char **argv) {
    44
    5   int N;
     5  int NPHOTCODES;
     6  char *codename, *ptr;
    67
    78  ConfigInit (&argc, argv);
    89  args (argc, argv);
    910
    10   N = UserPatchSelect ? 1 : 2;
    11   if ((photcode = GetPhotcodebyName (argv[N])) == NULL) {
    12     fprintf (stderr, "ERROR: photcode %s not found in photcode table\n", argv[N]);
    13     exit (1);
     11  /* XXX we need to build a list of accepted photcodes. these will be used by bcatalog to accept or
     12     reject loaded data */
     13
     14  Nphotcodes = 0;
     15  photcodes = NULL;
     16  if (PHOTCODE_LIST != NULL) {
     17    NPHOTCODES = 10;
     18    ALLOCATE (photcodes, PhotCode *, NPHOTCODES);
     19
     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);
     24      fprintf (stderr, "codename: %s\n", codename);
     25      if ((photcodes[Nphotcodes] = GetPhotcodebyName (codename)) == NULL) {
     26        fprintf (stderr, "ERROR: photcode %s not found in photcode table\n", codename);
     27        exit (1);
     28      }
     29      Nphotcodes ++;
     30      CHECK_REALLOCATE (photcodes, PhotCode *, NPHOTCODES, Nphotcodes, 10);
     31    }
    1432  }
    15   if (photcode[0].type != PHOT_SEC) {
    16     fprintf (stderr, "photcode %s is not a primary or secondary filter\n", argv[N]);
    17     exit (1);
    18   }
    19 
    2033  PhotNsec = GetPhotcodeNsecfilt ();
    21   PhotSec = GetPhotcodeNsec (photcode[0].code);
    2234
    2335  initstats (STATMODE);
     
    2739  MEAS_BAD  = ID_MEAS_NOCAL | ID_MEAS_POOR | ID_MEAS_SKIP | ID_MEAS_AREA;
    2840
     41  /* XXX drop irrelevant entries */
    2942  if (SHOW_PARAMS) {
    3043    fprintf (stderr, "current parameter settings:\n");
Note: See TracChangeset for help on using the changeset viewer.