IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2012, 10:06:05 AM (14 years ago)
Author:
eugene
Message:

merge from eam/20120905 (updates to delstar, setposangle, update to ps1-v4 schema to add measure.Xoff,Yoff)

Location:
trunk/Ohana/src/relastro/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relastro/src/ConfigInit.c

    r33963 r34749  
    55  char  *config, *file;
    66  char CatdirPhotcodeFile[256];
    7   char MasterPhotcodeFile[256];
    87  struct stat filestat;
    98  int status;
     
    4645  ScanConfig(config, "CATMODE",                "%s",  0, CATMODE);
    4746  ScanConfig(config, "CATFORMAT",              "%s",  0, CATFORMAT);
    48   ScanConfig(config, "PHOTCODE_FILE",          "%s",  0, MasterPhotcodeFile);
    4947
    5048  // Defaults for WHERE_A are established in db_utils.c: intializeConstraints
     
    7371  /* update master photcode table if not defined */
    7472  sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);
    75   if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {
    76     fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);
     73  if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) {
     74    fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile);
    7775    exit (1);
    7876  }
  • trunk/Ohana/src/relastro/src/ImageOps.c

    r34088 r34749  
    174174  for (i = 0; i < Ncatalog; i++) {
    175175    for (j = 0; j < catalog[i].Nmeasure; j++) {
    176       // XXX : update to optionally restrict by photcode equiv a la relphot
    177       // ecode = GetPhotcodeEquivCodebyCode (catalog[i].measure[j].photcode);
    178       // if (photcode[0].code != ecode) continue;
     176      if (NphotcodesSkip > 0) {
     177        int k;
     178        int found = FALSE;
     179        for (k = 0; (k < NphotcodesSkip) && !found; k++) {
     180          if (photcodesSkip[k][0].code == catalog[i].measure[j].photcode) found = TRUE;
     181          if (photcodesSkip[k][0].code == GetPhotcodeEquivCodebyCode(catalog[i].measure[j].photcode)) found = TRUE;
     182        }
     183        if (found) continue;
     184      } 
    179185      matchImage (catalog, j, i, MATCHCAT);
    180186    }
  • trunk/Ohana/src/relastro/src/UpdateObjects.c

    r34576 r34749  
    112112        if (XVERB) {
    113113          char *date = ohana_sec_to_date (measure[k].t);
    114           fprintf (stderr, OFF_T_FMT" %f %f %s : 0x%08x : 0x%08x\n",  k, measure[k].dR, measure[k].dD, date, measure[k].dbFlags, measureBig[k].dbFlags);
     114          int dbFlagsBig = measureBig ? measureBig[k].dbFlags : 0;
     115          fprintf (stderr, OFF_T_FMT" %f %f %s : 0x%08x : 0x%08x\n",  k, measure[k].dR, measure[k].dD, date, measure[k].dbFlags, dbFlagsBig);
    115116          free (date);
    116117        }
  • trunk/Ohana/src/relastro/src/args.c

    r33963 r34749  
    237237  }
    238238
    239   PHOTCODE_SKIP_LIST = NULL;
     239  PHOTCODE_SKIP_LIST = strcreate("SCOS.103a.E,SCOS.4414.OG590,SCOS.4415.OG590,SCOS.IIIaF.OG590,SCOS.IIIaF.RG610,SCOS.IIIaF.RG630,SCOS.IIIaJ.GG385,SCOS.IIIaJ.GG395,SCOS.IVN.RG715,SCOS.IVN.RG9");
    240240  if ((N = get_argument (argc, argv, "-photcode"))) {
    241241    remove_argument (N, &argc, argv);
    242     PHOTCODE_SKIP_LIST = strcreate(argv[N]);
     242    char *tmp1 = strcreate(argv[N]);
     243
     244    int Ntotal = strlen(tmp1) + strlen(PHOTCODE_SKIP_LIST) + 5;
     245
     246    char *tmp2 = NULL;
     247    ALLOCATE (tmp2, char, Ntotal);
     248    snprintf (tmp2, Ntotal, "%s,%s", PHOTCODE_SKIP_LIST, tmp1);
     249
     250    free (tmp1);
     251    free (PHOTCODE_SKIP_LIST);
     252
     253    PHOTCODE_SKIP_LIST = tmp2;
    243254    remove_argument (N, &argc, argv);
    244255  }
Note: See TracChangeset for help on using the changeset viewer.