Changeset 20936 for trunk/Ohana/src/libdvo
- Timestamp:
- Dec 7, 2008, 3:31:01 PM (18 years ago)
- Location:
- trunk/Ohana/src/libdvo
- Files:
-
- 7 edited
-
include/ps1_dev_3_defs.h (modified) (1 diff)
-
src/dvo_catalog.c (modified) (1 diff)
-
src/dvo_catalog_create.c (modified) (1 diff)
-
src/dvo_catalog_mef.c (modified) (2 diffs)
-
src/dvo_catalog_raw.c (modified) (2 diffs)
-
src/dvo_catalog_split.c (modified) (4 diffs)
-
src/skyregion_gsc.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libdvo/include/ps1_dev_3_defs.h
r17190 r20936 1 Image *Image_PS1_DEV_3_ToInternal (Image_PS1_DEV_3 *in, int Nvalues); 2 Image_PS1_DEV_3 *ImageInternalTo_PS1_DEV_3 (Image *in, int Nvalues); 3 1 4 PhotCode *PhotCode_PS1_DEV_3_To_Internal (PhotCode_PS1_DEV_3 *in, int Nvalues); 2 5 PhotCode_PS1_DEV_3 *PhotCode_Internal_To_PS1_DEV_3 (PhotCode *in, int Nvalues); -
trunk/Ohana/src/libdvo/src/dvo_catalog.c
r17245 r20936 88 88 catalog[0].secfilt = NULL; 89 89 90 catalog[0].objID = 0; 91 catalog[0].catID = 0; 92 90 93 catalog[0].Naverage = 0; 91 94 catalog[0].Nmeasure = 0; -
trunk/Ohana/src/libdvo/src/dvo_catalog_create.c
r15743 r20936 94 94 gfits_modify (&catalog[0].header, "RA1", "%lf", 1, region[0].Rmax); 95 95 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); 96 99 } 97 100 -
trunk/Ohana/src/libdvo/src/dvo_catalog_mef.c
r15743 r20936 27 27 if (!gfits_scan (&catalog[0].header, "NMISS", "%d", 1, &Nmissing)) return (FALSE); 28 28 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); 29 35 30 36 /* save the current number so we can do partial updates */ … … 228 234 gfits_modify (&catalog[0].header, "NSECFILT", "%d", 1, Nsecfilt); 229 235 gfits_modify (&catalog[0].header, "EXTEND", "%t", 1, TRUE); 236 gfits_modify (&catalog[0].header, "OBJID", "%d", 1, catalog[0].objID); 230 237 231 238 f = catalog[0].f; -
trunk/Ohana/src/libdvo/src/dvo_catalog_raw.c
r16810 r20936 25 25 if (!gfits_scan (&catalog[0].header, "NMISS", "%d", 1, &catalog[0].Nmissing)) return (FALSE); 26 26 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); 27 33 28 34 /* determine catalog format */ … … 249 255 gfits_modify (&catalog[0].header, "NMISS", "%d", 1, catalog[0].Nmissing); 250 256 gfits_modify (&catalog[0].header, "NSECFILT", "%d", 1, catalog[0].Nsecfilt); 257 gfits_modify (&catalog[0].header, "OBJID", "%d", 1, catalog[0].objID); 251 258 252 259 /* specify the appropriate data format */ -
trunk/Ohana/src/libdvo/src/dvo_catalog_split.c
r17419 r20936 174 174 if (!gfits_scan (&catalog[0].header, "NMISS", "%d", 1, &Nmissing)) return (FALSE); 175 175 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); 176 182 177 183 /* save the current number so we can do partial updates */ … … 512 518 gfits_modify (&catalog[0].header, "NSECFILT", "%d", 1, Nsecfilt); 513 519 gfits_modify (&catalog[0].header, "EXTEND", "%t", 1, TRUE); 520 gfits_modify (&catalog[0].header, "OBJID", "%d", 1, catalog[0].objID); 514 521 515 522 /* in split mode, we can save only part of the data */ … … 712 719 gfits_modify (&catalog[0].header, "NSECFILT", "%d", 1, Nsecfilt); 713 720 gfits_modify (&catalog[0].header, "EXTEND", "%t", 1, TRUE); 721 gfits_modify (&catalog[0].header, "OBJID", "%d", 1, catalog[0].objID); 714 722 715 723 /* in split mode, we can save only part of the data */ … … 890 898 gfits_modify (&catalog[0].header, "NSECFILT", "%d", 1, Nsecfilt); 891 899 gfits_modify (&catalog[0].header, "EXTEND", "%t", 1, TRUE); 900 gfits_modify (&catalog[0].header, "OBJID", "%d", 1, catalog[0].objID); 892 901 893 902 /* in split mode, we can save only part of the data */ -
trunk/Ohana/src/libdvo/src/skyregion_gsc.c
r17190 r20936 153 153 skytable[0].Nregions = 0; 154 154 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 155 159 SkyTableAppend (skytable, &L0, 0); 156 160 SkyTableAppend (skytable, &L1, skytable[0].Nregions - L0.Nregions); … … 539 543 for (i = 0; i < new[0].Nregions; i++) { 540 544 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; 542 547 } 543 548 return; … … 560 565 notes and questions: 561 566 1) is the regions.index value used? 562 563 564 567 ***/
Note:
See TracChangeset
for help on using the changeset viewer.
