IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 23, 2007, 4:39:53 PM (19 years ago)
Author:
eugene
Message:

remove the concept of primary / secondary photcodes: all average mags go into the secfilt table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dvo-mods-2007-02/Ohana/src/opihi/dvo/photometry.c

    r12008 r12031  
    99      if (C[0].code != M.photcode) continue; \
    1010      break; \
    11     case PHOT_PRI: \
    1211    case PHOT_SEC: \
    1312      if (C[0].code != GetPhotcodeEquivCodebyCode (M.photcode)) continue; \
     
    134133    if (mode == MAG_CAL)  status = TRUE;
    135134  } 
    136   if ((code[0].type == PHOT_PRI) || (code[0].type == PHOT_SEC)) {
     135  if (code[0].type == PHOT_SEC) {
    137136    if (mode == MAG_NONE) mode  = MAG_AVE;
    138137    if (mode == MAG_INST) status = TRUE;
     
    302301  }
    303302  if (NeedPhotcode) {
    304     if (code[0][0].type == PHOT_PRI) return (TRUE);
    305303    if (code[0][0].type == PHOT_SEC) return (TRUE);
    306     gprint (GP_ERR, "photcode selection problem: average value requires PRI/SEC photcode\n");
     304    gprint (GP_ERR, "photcode selection problem: average value requires average photcode\n");
    307305    return (FALSE);
    308306  }
     
    322320
    323321  double ZERO_POINT;
    324   char PhotCodeFile[256];
     322  char MasterPhotcodeFile[256];
     323  char CatdirPhotcodeFile[256];
     324  char *catdir;
    325325
    326326  if (VarConfig ("ZERO_PT", "%lf", &ZERO_POINT) == (char *) NULL) {
     
    330330  SetZeroPoint (ZERO_POINT);
    331331
    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) {
    333340      gprint (GP_ERR, "PHOTCODE_FILE undefined in config\n");
    334341      return (FALSE);
    335342  }
    336   if (!LoadPhotcodes (PhotCodeFile)) {
    337     gprint (GP_ERR, "error loading photcodes\n");
     343  if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile)) {
     344    gprint (GP_ERR, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);
    338345    return (FALSE);
    339346  }
Note: See TracChangeset for help on using the changeset viewer.