Changeset 16970
- Timestamp:
- Mar 13, 2008, 8:46:39 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/libfits/matrix/F_compress_M.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libfits/matrix/F_compress_M.c
r16855 r16970 2 2 # include <gfitsio.h> 3 3 # include <zlib.h> 4 5 # define MOD_KEYWORD(NAME,ZNAME,TYPE,IN,OUT) { \6 gfits_scan (header, ZNAME, TYPE, 1, IN); \7 gfits_delete (header, ZNAME, 1); \8 gfits_print (header, NAME, TYPE, 1, OUT); }9 10 # define MOD_KEYWORD_REQUIRED(ZNAME,NAME,TYPE,IN,OUT) { \11 if (!gfits_scan (header, ZNAME, TYPE, 1, IN)) ESCAPE; \12 gfits_delete (header, ZNAME, 1); \13 gfits_print (header, NAME, TYPE, 1, OUT); }14 4 15 5 # define ESCAPE { \ … … 28 18 return (FALSE); } 29 19 20 # define MOD_KEYWORD(NAME,ZNAME,TYPE,IN,OUT) { \ 21 gfits_scan (header, ZNAME, TYPE, 1, IN); \ 22 gfits_delete (header, ZNAME, 1); \ 23 gfits_print (header, NAME, TYPE, 1, OUT); } 24 25 # define MOD_KEYWORD_REQUIRED(ZNAME,NAME,TYPE,IN,OUT) { \ 26 if (!gfits_scan (header, ZNAME, TYPE, 1, IN)) ESCAPE; \ 27 gfits_delete (header, ZNAME, 1); \ 28 gfits_print (header, NAME, TYPE, 1, OUT); } 29 30 30 int gfits_uncompress_image (Header *header, Matrix *matrix, FTable *ftable) { 31 31 … … 69 69 } 70 70 71 // set up the tile sizes 71 // set up the tile sizes : ztile is the default size of the tile in the Nth dimension 72 // the actual tile size may be smaller at the edge of a dimension. if the ZTILEn 73 // entries are not found, default to [Nx,1,1,...] 72 74 ALLOCATE (ztile, int, header->Naxes); 73 75 if (!gfits_scan (header, "ZTILE1", "%d", 1, &ztile[0])) { … … 84 86 } 85 87 86 // search for algorithm-specific keywords 88 // search for algorithm-specific keywords. these are used to control compression options 89 // note the difference between the keywords (1 indexed) and the variables (0 indexed) 87 90 NOPTIONS = 10; 88 91 ALLOCATE (optname, char *, NOPTIONS); … … 106 109 } 107 110 108 // XXX is Noptions set to the correct value?109 111 // XXX get ZMASKCMP 110 112 int zsimple, have_zsimple; … … 245 247 // and output pixel data..... 246 248 249 // true sizes of this tile (in pixels) 247 250 int gfits_tile_size (Matrix *matrix, int *otile, int *ztile) { 248 251 249 252 int i, Npixels, Ndimen; 250 253 251 // true sizes of this tile (in pixels)252 254 Npixels = 1; 253 255 for (i = 0; i < matrix->Naxes; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.
