Changeset 17213
- Timestamp:
- Mar 28, 2008, 3:42:54 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/relastro/src/initialize.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/relastro/src/initialize.c
r14590 r17213 4 4 5 5 int NPHOTCODES; 6 char *codename, *ptr ;6 char *codename, *ptr, *list; 7 7 8 8 ConfigInit (&argc, argv); 9 9 args (argc, argv); 10 10 11 /* XXX we need tobuild a list of accepted photcodes. these will be used by bcatalog to accept or11 /* build a list of accepted photcodes. these will be used by bcatalog to accept or 12 12 reject loaded data */ 13 13 14 Nphotcodes = 0;15 photcodes = NULL;16 if (PHOTCODE_ LIST != NULL) {14 NphotcodesKeep = 0; 15 photcodesKeep = NULL; 16 if (PHOTCODE_KEEP_LIST != NULL) { 17 17 NPHOTCODES = 10; 18 ALLOCATE (photcodes , PhotCode *, NPHOTCODES);18 ALLOCATE (photcodesKeep, PhotCode *, NPHOTCODES); 19 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); 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); 24 25 fprintf (stderr, "codename: %s\n", codename); 25 if ((photcodes [Nphotcodes] = GetPhotcodebyName (codename)) == NULL) {26 if ((photcodesKeep[NphotcodesKeep] = GetPhotcodebyName (codename)) == NULL) { 26 27 fprintf (stderr, "ERROR: photcode %s not found in photcode table\n", codename); 27 28 exit (1); 28 29 } 29 Nphotcodes ++;30 CHECK_REALLOCATE (photcodes , PhotCode *, NPHOTCODES, Nphotcodes, 10);30 NphotcodesKeep ++; 31 CHECK_REALLOCATE (photcodesKeep, PhotCode *, NPHOTCODES, NphotcodesKeep, 10); 31 32 } 32 33 } 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 } 34 55 35 56 initstats (STATMODE); 36 57 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; 40 61 41 62 /* XXX drop irrelevant entries */ … … 49 70 fprintf (stderr, "VERBOSE: %d, PLOTSTUFF: %d\n", VERBOSE, PLOTSTUFF); 50 71 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);55 72 fprintf (stderr, "IMAGE_CATALOG %s\n", ImageCat); 56 73 fprintf (stderr, "GSCFILE %s\n", GSCFILE);
Note:
See TracChangeset
for help on using the changeset viewer.
