Changeset 37572
- Timestamp:
- Nov 9, 2014, 8:25:06 AM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140904/Ohana/src/libdvo
- Files:
-
- 3 edited
-
include/libdvo_astro.h (modified) (1 diff)
-
src/AstromOffsetMapUtils.c (modified) (1 diff)
-
src/LoadImages.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140904/Ohana/src/libdvo/include/libdvo_astro.h
r37563 r37572 172 172 int AstromOffsetTableMatchChips (Image *images, off_t Nimages, AstromOffsetTable *table); 173 173 AstromOffsetTable *AstromOffsetTableInit(); 174 void AstromOffsetTableFree(AstromOffsetTable *table); 174 175 175 176 # endif -
branches/eam_branches/ipp-20140904/Ohana/src/libdvo/src/AstromOffsetMapUtils.c
r37563 r37572 69 69 } 70 70 71 void AstromOffsetTableFree (AstromOffsetTable *table) { 72 73 if (!table) return; 74 75 int i, j; 76 for (i = 0; i < table->Nmap; i++) { 77 for (j = 0; j < table->map[i][0].Nx; j++) { 78 free (table->map[i][0].dXv); 79 free (table->map[i][0].dYv); 80 } 81 free (table->map[i]); 82 free (table->map[i][0].dXv[j]); 83 free (table->map[i][0].dYv[j]); 84 } 85 free (table->IDtoSeq); 86 free (table->map); 87 } 88 71 89 int AstromOffsetTableNewMap (AstromOffsetTable *table, int order, Image *image) { 72 90 -
branches/eam_branches/ipp-20140904/Ohana/src/libdvo/src/LoadImages.c
r33649 r37572 9 9 static Image *imageCache = NULL; 10 10 static off_t cacheNimage = 0; 11 AstromOffsetTable *table = NULL; 11 12 12 13 static time_t getLastModified(char *filename); … … 39 40 lastModified = 0; 40 41 } 41 42 42 43 43 gfits_db_init (&db); … … 77 77 } 78 78 79 // assign image->parent and image->coords.mosaic 80 BuildChipMatch (image, *Nimage); 81 // MARKTIME("build chip match: %f sec\n", dtime); 82 83 char mapfile[DVO_MAX_PATH]; 84 snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", catdir); 85 86 if (table) AstromOffsetTableFree(table); 87 table = AstromOffsetMapLoad (mapfile, FALSE); 88 89 // assign images.coords.offsetMap -> table->map[i] 90 if (table) { 91 AstromOffsetTableMatchChips (image, *Nimage, table); 92 } 93 79 94 return (image); 80 95 } … … 92 107 if (!dvoUseImageCache && (images != NULL)) { 93 108 free(images); 109 AstromOffsetTableFree (table); 94 110 } else { 95 111 // defer free until next LoadImages with a different or modified Images.dat
Note:
See TracChangeset
for help on using the changeset viewer.
