Changeset 8648
- Timestamp:
- Aug 27, 2006, 1:36:29 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo/cmpread.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/cmpread.c
r7917 r8648 6 6 int cmpread (int argc, char **argv) { 7 7 8 int i, field, extend, Nbytes, Nstars;8 int i, field, Naxis, Nbytes, Nstars; 9 9 double tR, tD; 10 10 float value; … … 71 71 72 72 /* read from FITS table or from text table */ 73 extend = FALSE; 74 gfits_scan (&header, "EXTEND", "%t", 1, &extend); 75 if (extend) { 76 gprint (GP_ERR, "reading from FITS cmp file %s\n", argv[2]); 77 Nbytes = gfits_matrix_size (&header); 78 fseek (f, Nbytes, SEEK_CUR); 79 stars = cmpReadFits (f, &Nstars); 80 } else { 73 Naxis = 0; 74 gfits_scan (&header, "NAXIS", "%d", 1, &Naxis); 75 if (Naxis == 2) { 81 76 /* allocate space for stars */ 82 77 gprint (GP_ERR, "reading from TEXT cmp file %s\n", argv[2]); … … 86 81 } 87 82 stars = cmpReadText (f, &Nstars); 83 } else { 84 gprint (GP_ERR, "reading from FITS cmp file %s\n", argv[2]); 85 Nbytes = gfits_matrix_size (&header); 86 fseek (f, Nbytes, SEEK_CUR); 87 stars = cmpReadFits (f, &Nstars); 88 88 } 89 89 fclose (f);
Note:
See TracChangeset
for help on using the changeset viewer.
