IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7973


Ignore:
Timestamp:
Jul 25, 2006, 8:13:36 AM (20 years ago)
Author:
eugene
Message:

fixes for tycho / ptolemy related searches

Location:
trunk/Ohana/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/src/find_matches_refstars.c

    r7691 r7973  
    4141  Nmiss = catalog[0].Nmissing;
    4242  NMISS = Nmiss + 1000;
     43  if ((NMISS < 1) || (NMISS > 1e10)) {
     44      fprintf (stderr, "weird value for NMISS: %d\n", NMISS);
     45  }
    4346  ALLOCATE (next_miss, int, NMISS);
    4447  REALLOCATE (catalog[0].missing, Missing, NMISS);
  • trunk/Ohana/src/addstar/src/gettycho.c

    r7966 r7973  
    6363      nitems = fread (buffer, NBYTE, NITEM, f);
    6464      if (nitems == 0) break;
    65       if (nitems != NITEM) {
    66         fprintf (stderr, "ERROR: failure reading data from file %s\n", filename);
    67         exit (1);
    68       }
    6965
    70       for (j = 0; j < NITEM; j++) {
     66      for (j = 0; j < nitems; j++) {
    7167        line = &buffer[j*NBYTE];
    7268        stars[Ntycho].R = atof (&line[15]);
     
    115111        CHECK_REALLOCATE (stars, Stars, NTYCHO, Ntycho, 5000);
    116112      }
     113
     114      if (nitems != NITEM) break;
    117115    }
    118116  next_section:
  • trunk/Ohana/src/gastro2/include/gastro2.h

    r7962 r7973  
    125125int GASTRO_MAX_NSTARS;
    126126int TEXTMODE;
     127int PTOLEMY_FILL_FACTOR;
    127128
    128129int    FORCE;
  • trunk/Ohana/src/gastro2/src/gargs.c

    r7962 r7973  
    3535  if ((N = get_argument (*argc, argv, "-textmode"))) {
    3636    TEXTMODE = TRUE;
     37    remove_argument (N, argc, argv);
     38  }
     39
     40  /* force read of image database with mismatched NSTARS & size */
     41  PTOLEMY_FILL_FACTOR = FALSE;
     42  if ((N = get_argument (*argc, argv, "-ptolemy-fill-factor"))) {
     43    PTOLEMY_FILL_FACTOR = TRUE;
    3744    remove_argument (N, argc, argv);
    3845  }
  • trunk/Ohana/src/gastro2/src/getptolemy.c

    r2442 r7973  
    1818    if (Nptolemy == 0) continue;
    1919
    20     FracArea = ptolemy_area (ptolemy, Nptolemy, &regions[i]);
     20    // XXX this measurement adjusts a DVO database for
     21    // partial coverage; the correction is bogus if the
     22    // sky density of the catalog is too low (<< 100 stars
     23    // per field
     24    FracArea = 1.0;
     25    if (PTOLEMY_FILL_FACTOR) {
     26        FracArea = ptolemy_area (ptolemy, Nptolemy, &regions[i]);
     27    }
    2128
    2229    Ns = Ref[0].N;
  • trunk/Ohana/src/gastro2/src/gptolemy2.c

    r6683 r7973  
    1919  switch (lock_catalog (&catalog, LCK_SOFT)) {
    2020    case 0:
     21      fprintf (stderr, "can't lock catalog %s\n", filename);
     22      return ((GSCdata *)NULL);
    2123    case 2:
    22       fprintf (stderr, "can't lock catalog data %s\n", filename);
     24      fprintf (stderr, "catalog %s is empty\n", filename);
    2325      return ((GSCdata *)NULL);
    2426    case 1:
     
    4042  ALLOCATE (stars, GSCdata, *Nstars);
    4143
    42   /* select all entries, ignore magnitudes */
     44  /* select all entries, use first magnitude */
    4345  for (i = 0; i < catalog.Naverage; i++, nstar++) {
    4446    stars[nstar].R = catalog.average[i].R;
Note: See TracChangeset for help on using the changeset viewer.