Changeset 5451 for trunk/Ohana/src/opihi/dvo/imdata.c
- Timestamp:
- Oct 27, 2005, 7:10:17 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo/imdata.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/imdata.c
r5448 r5451 4 4 5 5 int i, j, k, I; 6 int Nimage, N, NPTS, skip, mode, TimeSelect;7 int n, Nregion , Ntregion, TimeFormat;6 int Nimage, N, NPTS, found, mode, TimeSelect; 7 int n, Nregions, NREGIONS, TimeFormat; 8 8 int *subset, Nsubset; 9 char filename[256];10 9 double trange; 11 10 unsigned long tzero, start, stop, TimeReference; … … 81 80 82 81 /* load sky from correct table */ 83 sky = SkyTableLoadOptimal (CATDIR, SKY_TABLE, GSCFILE, -1, VERBOSE); 84 SkyTableSetFilenames (sky, CATDIR, "cpt"); 82 sky = GetSkyTable (); 85 83 86 84 Nregions = 0; 87 85 NREGIONS = 10; 88 86 ALLOCATE (skylist, SkyList, 1); 89 ALLOCATE (skylist[0].regions, SkyRegion s*, NREGIONS);87 ALLOCATE (skylist[0].regions, SkyRegion *, NREGIONS); 90 88 91 89 /* for each image of interest, find the appropriate region files */ … … 94 92 95 93 if (!FindMosaicForImage (image, Nimage, I)) continue; 96 skyset = SkyListByImage ( table, -1, &image[I]);94 skyset = SkyListByImage (sky, -1, &image[I]); 97 95 98 96 for (j = 0; j < skyset[0].Nregions; j++) { 99 97 found = FALSE; 100 for (k = 0; (k < skylist[0].Nregion ) && !found; k++) {101 found = !strcmp (skylist[0].regions[k] .name, skyset[0].regions[j].name);98 for (k = 0; (k < skylist[0].Nregions) && !found; k++) { 99 found = !strcmp (skylist[0].regions[k][0].name, skyset[0].regions[j][0].name); 102 100 } 103 101 if (found) continue; 104 102 skylist[0].regions[Nregions] = skyset[0].regions[j]; 105 103 Nregions ++; 106 CHECK_REALLOCATE (skylist[0].regions, SkyRegion s*, NREGIONS, Nregions, 10);107 } 108 SkyListFree (skyset );104 CHECK_REALLOCATE (skylist[0].regions, SkyRegion *, NREGIONS, Nregions, 10); 105 } 106 SkyListFree (skyset, FALSE); 109 107 } 110 108 free (subset); … … 122 120 123 121 /* get file name and open */ 124 catalog.filename = skylist[0].regions[j][0].filename;122 catalog.filename = (char *) skylist[0].regions[j][0].filename; 125 123 switch (lock_catalog (&catalog, LCK_SOFT)) { 126 124 case 2:
Note:
See TracChangeset
for help on using the changeset viewer.
