- Timestamp:
- Mar 6, 2007, 8:55:39 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dvo-mods-2007-02/Ohana/src/relastro/src/initialize.c
r12048 r12276 3 3 void initialize (int argc, char **argv) { 4 4 5 int N; 5 int NPHOTCODES; 6 char *codename, *ptr; 6 7 7 8 ConfigInit (&argc, argv); 8 9 args (argc, argv); 9 10 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 } 14 32 } 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 20 33 PhotNsec = GetPhotcodeNsecfilt (); 21 PhotSec = GetPhotcodeNsec (photcode[0].code);22 34 23 35 initstats (STATMODE); … … 27 39 MEAS_BAD = ID_MEAS_NOCAL | ID_MEAS_POOR | ID_MEAS_SKIP | ID_MEAS_AREA; 28 40 41 /* XXX drop irrelevant entries */ 29 42 if (SHOW_PARAMS) { 30 43 fprintf (stderr, "current parameter settings:\n");
Note:
See TracChangeset
for help on using the changeset viewer.
