IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35104


Ignore:
Timestamp:
Feb 6, 2013, 3:25:35 PM (13 years ago)
Author:
eugene
Message:

fix ubercal dist value; exclude some absurd values from mean mags; pass -set-mrel-version to the client if selected

Location:
trunk/Ohana/src/relphot
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relphot/include/relphot.h

    r34844 r35104  
    107107  unsigned int tzero;
    108108  unsigned char trate;
     109  short ubercalDist;
    109110} ImageSubset;
    110111
  • trunk/Ohana/src/relphot/src/ImageOps.c

    r34844 r35104  
    9696    image[i].tzero         = input[i].tzero        ;
    9797    image[i].trate         = input[i].trate        ;
     98    image[i].ubercalDist   = input[i].ubercalDist  ;
    9899  }
    99100  LineNumber = line_number;
     
    128129    subset[i].tzero         = image[i].tzero        ;
    129130    subset[i].trate         = image[i].trate        ;
     131    subset[i].ubercalDist   = image[i].ubercalDist  ;
    130132  }
    131133  return subset;
  • trunk/Ohana/src/relphot/src/ImageSubset.c

    r33963 r35104  
    6565  GET_COLUMN (tzero,   "TZERO",      int);
    6666  GET_COLUMN (trate,   "TRATE",      short);
     67  GET_COLUMN (ucdist,  "UBERCAL_DIST", short);
    6768
    6869  // XXX free the fits table data here
     
    7778    image[i].tzero         = tzero[i];
    7879    image[i].trate         = trate[i];
     80    image[i].ubercalDist   = ucdist[i];
    7981  }
    8082  fprintf (stderr, "loaded data for %lld images\n", (long long) Nrow);
     
    8789  free (tzero);
    8890  free (trate);
     91  free (ucdist);
    8992
    9093  *nimage = Nrow;
     
    124127  gfits_define_bintable_column (&theader, "I", "TRATE", "tti rate", NULL, 1.0, 0.0);
    125128
     129  gfits_define_bintable_column (&theader, "I", "UBERCAL_DIST", "ubercal distance", NULL, 1.0, 1.0*0x80);
     130
    126131  // generate the output array that carries the data
    127132  gfits_create_table (&theader, &ftable);
     
    130135  unsigned int *imageID, *map, *flags, *tzero;
    131136  unsigned short *trate;
     137  short *ucdist;
    132138
    133139  // create intermediate storage arrays
     
    139145  ALLOCATE (tzero,   unsigned int,   Nimage);
    140146  ALLOCATE (trate,   unsigned short, Nimage);
     147  ALLOCATE (ucdist,  short,          Nimage);
    141148
    142149  // assign the storage arrays
     
    149156    tzero[i]   = image[i].tzero;
    150157    trate[i]   = image[i].trate;
     158    ucdist[i]  = image[i].ubercalDist;
    151159  }
    152160
    153161  // add the columns to the output array
    154   gfits_set_bintable_column (&theader, &ftable, "MCAL",       Mcal,    Nimage);
    155   gfits_set_bintable_column (&theader, &ftable, "MCAL_ERR",   dMcal,   Nimage);
    156   gfits_set_bintable_column (&theader, &ftable, "IMAGE_ID",   imageID, Nimage);
    157   gfits_set_bintable_column (&theader, &ftable, "PHOTOM_MAP", map,     Nimage);
    158   gfits_set_bintable_column (&theader, &ftable, "FLAGS",      flags,   Nimage);
    159   gfits_set_bintable_column (&theader, &ftable, "TZERO",      tzero,   Nimage);
    160   gfits_set_bintable_column (&theader, &ftable, "TRATE",      trate,   Nimage);
     162  gfits_set_bintable_column (&theader, &ftable, "MCAL",         Mcal,    Nimage);
     163  gfits_set_bintable_column (&theader, &ftable, "MCAL_ERR",     dMcal,   Nimage);
     164  gfits_set_bintable_column (&theader, &ftable, "IMAGE_ID",     imageID, Nimage);
     165  gfits_set_bintable_column (&theader, &ftable, "PHOTOM_MAP",   map,     Nimage);
     166  gfits_set_bintable_column (&theader, &ftable, "FLAGS",        flags,   Nimage);
     167  gfits_set_bintable_column (&theader, &ftable, "TZERO",        tzero,   Nimage);
     168  gfits_set_bintable_column (&theader, &ftable, "TRATE",        trate,   Nimage);
     169  gfits_set_bintable_column (&theader, &ftable, "UBERCAL_DIST", ucdist,  Nimage);
    161170
    162171  free (Mcal);
     
    167176  free (tzero);
    168177  free (trate);
     178  free (ucdist);
    169179
    170180  FILE *f = fopen (filename, "w");
  • trunk/Ohana/src/relphot/src/StarOps.c

    r34844 r35104  
    451451        }
    452452
     453        // skip some absurd values NAN, < 0.0, > 30.0
    453454        Msys = PhotSysTiny (&catalog[Nc].measureT[m], &catalog[Nc].averageT[j], &catalog[Nc].secfilt[j*Nsecfilt]);
    454455        if (isnan(Msys)) SKIP_THIS_MEAS(Nsys);
     456        if (Msys <  0.0) SKIP_THIS_MEAS(Nsys);
     457        if (Msys > 30.0) SKIP_THIS_MEAS(Nsys);
    455458
    456459        int myUbercalDist = getUbercalDist(m,Nc);
  • trunk/Ohana/src/relphot/src/args.c

    r34889 r35104  
    9090  // XXX for the moment, make this selection manual.  it needs to be automatic
    9191  // based on the state of the SkyTable
     92  HOST_ID = 0;
    9293  PARALLEL = FALSE;
    9394  if ((N = get_argument (argc, argv, "-parallel"))) {
  • trunk/Ohana/src/relphot/src/reload_catalogs.c

    r34642 r35104  
    187187    if (!KEEP_UBERCAL)    { snprintf (tmpline, 1024, "%s -reset-ubercal",       command);                                         strcpy (command, tmpline); }
    188188    if (UPDATE_CATFORMAT) { snprintf (tmpline, 1024, "%s -update-catformat %s", command, UPDATE_CATFORMAT);                       strcpy (command, tmpline); }
     189    if (SET_MREL_VERSION != 1) { snprintf (tmpline, 1024, "%s -set-mrel-version %d", command, SET_MREL_VERSION);                  strcpy (command, tmpline); }
    189190    if (AreaSelect)       { snprintf (tmpline, 1024, "%s -area %f %f %f %f",    command, AreaXmin, AreaXmax, AreaYmin, AreaYmax); strcpy (command, tmpline); }
    190191    if (TimeSelect) {
  • trunk/Ohana/src/relphot/src/relphot_objects.c

    r34642 r35104  
    165165    if (UPDATE)        { snprintf (tmpline, 1024, "%s -update",         command);                    strcpy (command, tmpline); }
    166166    if (!KEEP_UBERCAL) { snprintf (tmpline, 1024, "%s -reset-ubercal",  command);                    strcpy (command, tmpline); }
     167    if (SET_MREL_VERSION != 1) { snprintf (tmpline, 1024, "%s -set-mrel-version %d", command, SET_MREL_VERSION); strcpy (command, tmpline); }
    167168
    168169    fprintf (stderr, "command: %s\n", command);
  • trunk/Ohana/src/relphot/src/setMrelCatalog.c

    r34878 r35104  
    150150      }
    151151
     152      // skip some absurd values NAN, < 0.0, > 30.0
    152153      Msys = PhotSysTiny (&measureT[k], &averageT[0], &secfilt[0]);
    153154      if (isnan(Msys)) SKIP_THIS_MEAS(Nsys);
     155      if (Msys <  0.0) SKIP_THIS_MEAS(Nsys);
     156      if (Msys > 30.0) SKIP_THIS_MEAS(Nsys);
    154157
    155158      int myUbercalDist = getUbercalDist(meas, cat);
Note: See TracChangeset for help on using the changeset viewer.