Changeset 19065 for trunk/Ohana/src/getstar
- Timestamp:
- Aug 14, 2008, 2:24:45 PM (18 years ago)
- Location:
- trunk/Ohana/src/getstar/src
- Files:
-
- 2 edited
-
GetFileMode.c (modified) (1 diff)
-
ReadImageHeader.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/getstar/src/GetFileMode.c
r12774 r19065 5 5 6 6 char ctype[80]; 7 int Naxis , Nx, Ny;8 int simple, extend, haveNaxis, have Nx, haveNy, haveCTYPE;7 int Naxis; 8 int simple, extend, haveNaxis, haveCTYPE; 9 9 10 10 gfits_scan (header, "SIMPLE", "%t", 1, &simple); 11 11 haveNaxis = gfits_scan (header, "NAXIS", "%d", 1, &Naxis); 12 haveNx = gfits_scan (header, "NAXIS1", "%d", 1, &Nx);13 haveNy = gfits_scan (header, "NAXIS2", "%d", 1, &Ny);14 12 haveCTYPE = gfits_scan (header, "CTYPE1", "%s", 1, ctype); 15 13 -
trunk/Ohana/src/getstar/src/ReadImageHeader.c
r16810 r19065 4 4 int ReadImageHeader (Header *header, Image *image) { 5 5 6 int Nastro, Nx, Ny ;6 int Nastro, Nx, Ny, haveNx, haveNy; 7 7 double tmp; 8 8 … … 14 14 // XXX currently, image uses an unsigned short for NX,XY. this is rather restrictive 15 15 // and needs to be at least checked. 16 gfits_scan (header, "NAXIS1", "%d", 1, &Nx); 17 gfits_scan (header, "NAXIS2", "%d", 1, &Ny); 16 haveNx = gfits_scan (header, "NAXIS1", "%d", 1, &Nx); 17 haveNy = gfits_scan (header, "NAXIS2", "%d", 1, &Ny); 18 19 if (!haveNx && !haveNy) { 20 haveNx = gfits_scan (header, "IMNAXIS1", "%d", 1, &Nx); 21 haveNy = gfits_scan (header, "IMNAXIS2", "%d", 1, &Ny); 22 } 23 24 if (!haveNx || !haveNy) { 25 fprintf (stderr, "missing image dimensions in header\n"); 26 return (FALSE); 27 } 28 18 29 if ((Nx < 0) || (Nx > 0xffff)) { 19 30 fprintf (stderr, "WARNING: NX, NY out of range : image boundary will be wrong\n");
Note:
See TracChangeset
for help on using the changeset viewer.
