Changeset 8386 for trunk/Ohana/src/libdvo/src/dvo_catalog_split.c
- Timestamp:
- Aug 16, 2006, 10:12:55 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/libdvo/src/dvo_catalog_split.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libdvo/src/dvo_catalog_split.c
r8342 r8386 60 60 gfits_free_header (&header); 61 61 } 62 dvo_catalog_test (catalog, FALSE); 62 63 63 64 /*** Measure Table ***/ … … 68 69 if (catalog[0].catflags & LOAD_MEAS) { 69 70 ALLOCATE (measure, Catalog, 1); 70 measure[0].measure_catalog = NULL; 71 measure[0].missing_catalog = NULL; 72 measure[0].secfilt_catalog = NULL; 71 dvo_catalog_init (measure, TRUE); 73 72 74 73 /* get split filename from main header (paths relative to cpt file) */ … … 90 89 /* matrix should be empty */ 91 90 if (!gfits_fread_matrix (measure[0].f, &matrix, &measure[0].header)) { 92 if (VERBOSE) fprintf (stderr, "can't read primary matrix ");91 if (VERBOSE) fprintf (stderr, "can't read primary matrix\n"); 93 92 return (FALSE); 94 93 } 95 94 /* read Measure table header */ 96 95 if (!gfits_fread_header (measure[0].f, &header)) { 97 if (VERBOSE) fprintf (stderr, "can't read measure PHU header ");96 if (VERBOSE) fprintf (stderr, "can't read measure PHU header\n"); 98 97 return (FALSE); 99 98 } 100 99 /* read Measure table data */ 101 100 if (!gfits_fread_ftable_data (measure[0].f, &ftable)) { 102 if (VERBOSE) fprintf (stderr, "can't read table measure data ");101 if (VERBOSE) fprintf (stderr, "can't read table measure data\n"); 103 102 return (FALSE); 104 103 } … … 112 111 gfits_free_matrix (&matrix); 113 112 } 113 dvo_catalog_test (catalog, FALSE); 114 114 115 115 /* (Meta Load) */ 116 116 if (catalog[0].catflags & LOAD_MEAS_META) { 117 117 ALLOCATE (measure, Catalog, 1); 118 dvo_catalog_init (measure, TRUE); 118 119 119 120 /* get split filename from main header (paths relative to cpt file) */ … … 142 143 } 143 144 catalog[0].measure_catalog = measure; 145 dvo_catalog_test (catalog, FALSE); 144 146 145 147 /*** Missing Table ***/ … … 148 150 if (catalog[0].catflags & LOAD_MISS) { 149 151 ALLOCATE (missing, Catalog, 1); 150 missing[0].measure_catalog = NULL; 151 missing[0].missing_catalog = NULL; 152 missing[0].secfilt_catalog = NULL; 152 dvo_catalog_init (missing, TRUE); 153 153 154 154 /* get split filename from main header (paths relative to cpt file) */ … … 170 170 /* matrix should be empty */ 171 171 if (!gfits_fread_matrix (missing[0].f, &matrix, &missing[0].header)) { 172 if (VERBOSE) fprintf (stderr, "can't read primary matrix ");172 if (VERBOSE) fprintf (stderr, "can't read primary matrix\n"); 173 173 return (FALSE); 174 174 } 175 175 /* read Missing table header */ 176 176 if (!gfits_fread_header (missing[0].f, &header)) { 177 if (VERBOSE) fprintf (stderr, "can't read table missing header ");177 if (VERBOSE) fprintf (stderr, "can't read table missing header\n"); 178 178 return (FALSE); 179 179 } 180 180 /* read Missing table data */ 181 181 if (!gfits_fread_ftable_data (missing[0].f, &ftable)) { 182 if (VERBOSE) fprintf (stderr, "can't read table missing data ");182 if (VERBOSE) fprintf (stderr, "can't read table missing data\n"); 183 183 return (FALSE); 184 184 } … … 192 192 } 193 193 catalog[0].missing_catalog = missing; 194 dvo_catalog_test (catalog, FALSE); 194 195 195 196 /*** Secfilt Table ***/ … … 198 199 if (catalog[0].catflags & LOAD_SECF) { 199 200 ALLOCATE (secfilt, Catalog, 1); 200 secfilt[0].measure_catalog = NULL; 201 secfilt[0].missing_catalog = NULL; 202 secfilt[0].secfilt_catalog = NULL; 201 dvo_catalog_init (secfilt, TRUE); 203 202 204 203 /* get split filename from main header (paths relative to cpt file) */ … … 220 219 /* matrix should be empty */ 221 220 if (!gfits_fread_matrix (secfilt[0].f, &matrix, &secfilt[0].header)) { 222 if (VERBOSE) fprintf (stderr, "can't read primary matrix ");221 if (VERBOSE) fprintf (stderr, "can't read primary matrix\n"); 223 222 return (FALSE); 224 223 } 225 224 /* read secfilt table header */ 226 225 if (!gfits_fread_header (secfilt[0].f, &header)) { 227 if (VERBOSE) fprintf (stderr, "can't read table secfilt header ");226 if (VERBOSE) fprintf (stderr, "can't read table secfilt header\n"); 228 227 return (FALSE); 229 228 } 230 229 /* read secfilt table data */ 231 230 if (!gfits_fread_ftable_data (secfilt[0].f, &ftable)) { 232 if (VERBOSE) fprintf (stderr, "can't read table secfilt data ");231 if (VERBOSE) fprintf (stderr, "can't read table secfilt data\n"); 233 232 return (FALSE); 234 233 } … … 242 241 } 243 242 catalog[0].secfilt_catalog = secfilt; 243 dvo_catalog_test (catalog, FALSE); 244 244 245 245 /* save the current number so we can do partial updates */
Note:
See TracChangeset
for help on using the changeset viewer.
