Changeset 20923
- Timestamp:
- Dec 7, 2008, 1:26:05 PM (17 years ago)
- Location:
- branches/eam_branch_20081124/Ohana/src/libdvo/src
- Files:
-
- 3 edited
-
dvo_catalog_mef.c (modified) (2 diffs)
-
dvo_catalog_raw.c (modified) (2 diffs)
-
dvo_catalog_split.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20081124/Ohana/src/libdvo/src/dvo_catalog_mef.c
r15743 r20923 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; -
branches/eam_branch_20081124/Ohana/src/libdvo/src/dvo_catalog_raw.c
r16810 r20923 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 */ -
branches/eam_branch_20081124/Ohana/src/libdvo/src/dvo_catalog_split.c
r17419 r20923 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 */
Note:
See TracChangeset
for help on using the changeset viewer.
