IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 7, 2008, 3:31:01 PM (18 years ago)
Author:
eugene
Message:

big update from eam_branch_20081124 with updates to Opihi math

Location:
trunk/Ohana/src/libdvo
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libdvo/include/ps1_dev_3_defs.h

    r17190 r20936  
     1Image                   *Image_PS1_DEV_3_ToInternal (Image_PS1_DEV_3 *in, int Nvalues);
     2Image_PS1_DEV_3         *ImageInternalTo_PS1_DEV_3 (Image *in, int Nvalues);
     3
    14PhotCode *PhotCode_PS1_DEV_3_To_Internal (PhotCode_PS1_DEV_3 *in, int Nvalues);
    25PhotCode_PS1_DEV_3 *PhotCode_Internal_To_PS1_DEV_3 (PhotCode *in, int Nvalues);
  • trunk/Ohana/src/libdvo/src/dvo_catalog.c

    r17245 r20936  
    8888  catalog[0].secfilt = NULL;
    8989 
     90  catalog[0].objID = 0;
     91  catalog[0].catID = 0;
     92
    9093  catalog[0].Naverage = 0;
    9194  catalog[0].Nmeasure = 0;
  • trunk/Ohana/src/libdvo/src/dvo_catalog_create.c

    r15743 r20936  
    9494    gfits_modify (&catalog[0].header, "RA1",  "%lf", 1, region[0].Rmax);
    9595    gfits_modify (&catalog[0].header, "DEC1", "%lf", 1, region[0].Dmax);
     96   
     97    catalog[0].catID = region[0].index;
     98    gfits_modify (&catalog[0].header, "CATID", "%d", 1, catalog[0].catID);
    9699  }
    97100
  • trunk/Ohana/src/libdvo/src/dvo_catalog_mef.c

    r15743 r20936  
    2727  if (!gfits_scan (&catalog[0].header, "NMISS",    "%d", 1, &Nmissing)) return (FALSE);
    2828  if (!gfits_scan (&catalog[0].header, "NSECFILT", "%d", 1, &Nsecfilt)) Nsecfilt = 0;
     29
     30  /* the OBJID is a counter that uniquely defines an average entry and never changes.  if
     31     it is not defined for a legacy database, we can generate them using the existing index values.
     32     XXX if it is missing, give an error and require the user to upgrade the DB? */
     33  if (!gfits_scan (&catalog[0].header, "OBJID",    "%d", 1, &catalog[0].objID)) return (FALSE);
     34  if (!gfits_scan (&catalog[0].header, "CATID",    "%d", 1, &catalog[0].catID)) return (FALSE);
    2935
    3036  /* save the current number so we can do partial updates */
     
    228234  gfits_modify (&catalog[0].header, "NSECFILT", "%d", 1, Nsecfilt);
    229235  gfits_modify (&catalog[0].header, "EXTEND",   "%t", 1, TRUE);
     236  gfits_modify (&catalog[0].header, "OBJID",    "%d", 1, catalog[0].objID);
    230237
    231238  f = catalog[0].f;
  • trunk/Ohana/src/libdvo/src/dvo_catalog_raw.c

    r16810 r20936  
    2525  if (!gfits_scan (&catalog[0].header, "NMISS",    "%d", 1, &catalog[0].Nmissing)) return (FALSE);
    2626  if (!gfits_scan (&catalog[0].header, "NSECFILT", "%d", 1, &catalog[0].Nsecfilt)) catalog[0].Nsecfilt = 0;
     27
     28  /* the OBJID is a counter that uniquely defines an average entry and never changes.  if
     29     it is not defined for a legacy database, we can generate them using the existing index values.
     30     XXX if it is missing, give an error and require the user to upgrade the DB? */
     31  if (!gfits_scan (&catalog[0].header, "OBJID",    "%d", 1, &catalog[0].objID)) return (FALSE);
     32  if (!gfits_scan (&catalog[0].header, "CATID",    "%d", 1, &catalog[0].catID)) return (FALSE);
    2733
    2834  /* determine catalog format */
     
    249255  gfits_modify (&catalog[0].header, "NMISS",    "%d", 1, catalog[0].Nmissing);
    250256  gfits_modify (&catalog[0].header, "NSECFILT", "%d", 1, catalog[0].Nsecfilt);
     257  gfits_modify (&catalog[0].header, "OBJID",    "%d", 1, catalog[0].objID);
    251258
    252259  /* specify the appropriate data format */
  • trunk/Ohana/src/libdvo/src/dvo_catalog_split.c

    r17419 r20936  
    174174  if (!gfits_scan (&catalog[0].header, "NMISS",    "%d", 1, &Nmissing)) return (FALSE);
    175175  if (!gfits_scan (&catalog[0].header, "NSECFILT", "%d", 1, &Nsecfilt)) Nsecfilt = 0;
     176
     177  /* the OBJID is a counter that uniquely defines an average entry and never changes.  if
     178     it is not defined for a legacy database, we can generate them using the existing index values.
     179     XXX if it is missing, give an error and require the user to upgrade the DB? */
     180  if (!gfits_scan (&catalog[0].header, "OBJID",    "%d", 1, &catalog[0].objID)) return (FALSE);
     181  if (!gfits_scan (&catalog[0].header, "CATID",    "%d", 1, &catalog[0].catID)) return (FALSE);
    176182
    177183  /* save the current number so we can do partial updates */
     
    512518  gfits_modify (&catalog[0].header, "NSECFILT", "%d", 1, Nsecfilt);
    513519  gfits_modify (&catalog[0].header, "EXTEND",   "%t", 1, TRUE);
     520  gfits_modify (&catalog[0].header, "OBJID",    "%d", 1, catalog[0].objID);
    514521
    515522  /* in split mode, we can save only part of the data */
     
    712719  gfits_modify (&catalog[0].header, "NSECFILT", "%d", 1, Nsecfilt);
    713720  gfits_modify (&catalog[0].header, "EXTEND",   "%t", 1, TRUE);
     721  gfits_modify (&catalog[0].header, "OBJID",    "%d", 1, catalog[0].objID);
    714722
    715723  /* in split mode, we can save only part of the data */
     
    890898  gfits_modify (&catalog[0].header, "NSECFILT", "%d", 1, Nsecfilt);
    891899  gfits_modify (&catalog[0].header, "EXTEND",   "%t", 1, TRUE);
     900  gfits_modify (&catalog[0].header, "OBJID",    "%d", 1, catalog[0].objID);
    892901
    893902  /* in split mode, we can save only part of the data */
  • trunk/Ohana/src/libdvo/src/skyregion_gsc.c

    r17190 r20936  
    153153  skytable[0].Nregions = 0;
    154154
     155  // L0, L1, L2, L3, L4 all have index ranges of 0 -> Nregions and parent values pointing
     156  // at the index of the parent.  SkyTableAppend updates these values based on the
     157  // cumulative count
     158
    155159  SkyTableAppend (skytable, &L0, 0);
    156160  SkyTableAppend (skytable, &L1, skytable[0].Nregions - L0.Nregions);
     
    539543  for (i = 0; i < new[0].Nregions; i++) {
    540544    old[0].regions[i + Nold] = new[0].regions[i];
    541     old[0].regions[i + Nold].parent += Nprev;
     545    old[0].regions[i + Nold].parent += Nold;
     546    old[0].regions[i + Nold].index += Nold;
    542547  }
    543548  return;
     
    560565    notes and questions:
    561566    1) is the regions.index value used?
    562 
    563 
    564567***/
Note: See TracChangeset for help on using the changeset viewer.