- Timestamp:
- Feb 23, 2007, 4:39:53 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/photometry.c
r12008 r12031 9 9 if (C[0].code != M.photcode) continue; \ 10 10 break; \ 11 case PHOT_PRI: \12 11 case PHOT_SEC: \ 13 12 if (C[0].code != GetPhotcodeEquivCodebyCode (M.photcode)) continue; \ … … 134 133 if (mode == MAG_CAL) status = TRUE; 135 134 } 136 if ( (code[0].type == PHOT_PRI) || (code[0].type == PHOT_SEC)) {135 if (code[0].type == PHOT_SEC) { 137 136 if (mode == MAG_NONE) mode = MAG_AVE; 138 137 if (mode == MAG_INST) status = TRUE; … … 302 301 } 303 302 if (NeedPhotcode) { 304 if (code[0][0].type == PHOT_PRI) return (TRUE);305 303 if (code[0][0].type == PHOT_SEC) return (TRUE); 306 gprint (GP_ERR, "photcode selection problem: average value requires PRI/SECphotcode\n");304 gprint (GP_ERR, "photcode selection problem: average value requires average photcode\n"); 307 305 return (FALSE); 308 306 } … … 322 320 323 321 double ZERO_POINT; 324 char PhotCodeFile[256]; 322 char MasterPhotcodeFile[256]; 323 char CatdirPhotcodeFile[256]; 324 char *catdir; 325 325 326 326 if (VarConfig ("ZERO_PT", "%lf", &ZERO_POINT) == (char *) NULL) { … … 330 330 SetZeroPoint (ZERO_POINT); 331 331 332 if (VarConfig ("PHOTCODE_FILE", "%s", PhotCodeFile) == (char *) NULL) { 332 catdir = GetCATDIR(); 333 if (catdir == NULL) { 334 CatdirPhotcodeFile[0] = 0; 335 } else { 336 sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", catdir); 337 } 338 339 if (VarConfig ("PHOTCODE_FILE", "%s", MasterPhotcodeFile) == (char *) NULL) { 333 340 gprint (GP_ERR, "PHOTCODE_FILE undefined in config\n"); 334 341 return (FALSE); 335 342 } 336 if (!LoadPhotcodes ( PhotCodeFile)) {337 gprint (GP_ERR, "error loading photcode s\n");343 if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile)) { 344 gprint (GP_ERR, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile); 338 345 return (FALSE); 339 346 }
Note:
See TracChangeset
for help on using the changeset viewer.
