Changeset 7917 for trunk/Ohana/src/opihi/dvo/simage.c
- Timestamp:
- Jul 16, 2006, 10:58:49 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo/simage.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/simage.c
r7680 r7917 31 31 32 32 if (argc != 2) { 33 fprintf (stderr, "USAGE: image (filename)\n");33 gprint (GP_ERR, "USAGE: image (filename)\n"); 34 34 return (FALSE); 35 35 } 36 36 37 fprintf (stderr, "not working at the moment (cmp format)\n");37 gprint (GP_ERR, "not working at the moment (cmp format)\n"); 38 38 return (FALSE); 39 39 40 40 /* read header */ 41 41 if (!gfits_read_header (argv[1], &header)) { 42 fprintf (stderr, "ERROR: can't find image file %s\n", argv[1]);42 gprint (GP_ERR, "ERROR: can't find image file %s\n", argv[1]); 43 43 return (FALSE); 44 44 } … … 47 47 gfits_scan (&header, "CTYPE1", "%s", 1, coords.ctype); 48 48 if (strcmp (coords.ctype, "RA---PLY")) { 49 fprintf (stderr, "ERROR: wrong astrometric info in header\n");49 gprint (GP_ERR, "ERROR: wrong astrometric info in header\n"); 50 50 return (FALSE); 51 51 } … … 81 81 gfits_scan (&header, "NSTARS", "%d", 1, &Nstars); 82 82 if (Nstars == 0) { 83 fprintf (stderr, "no stars in file\n");83 gprint (GP_ERR, "no stars in file\n"); 84 84 return (FALSE); 85 85 } … … 88 88 f = fopen (argv[1], "r"); 89 89 if (f == NULL) { 90 fprintf (stderr, "can't find data in file %s\n", argv[1]);90 gprint (GP_ERR, "can't find data in file %s\n", argv[1]); 91 91 return (FALSE); 92 92 } … … 108 108 nbytes = fread (buffer, 1, (BLOCK*BYTES_STAR), f); 109 109 if (nbytes != BLOCK*BYTES_STAR) { 110 fprintf (stderr, "failed to read in stars (1)\n");110 gprint (GP_ERR, "failed to read in stars (1)\n"); 111 111 free (Xvec.elements); 112 112 free (Yvec.elements); … … 127 127 nbytes = fread (buffer, 1, (Nbytes % (BLOCK*BYTES_STAR)), f); 128 128 if (nbytes != (Nbytes % (BLOCK*BYTES_STAR))) { 129 fprintf (stderr, "ERROR: failed to read in stars (2)\n");129 gprint (GP_ERR, "ERROR: failed to read in stars (2)\n"); 130 130 free (Xvec.elements); 131 131 free (Yvec.elements); … … 144 144 145 145 if (nstars != Nstars) { 146 fprintf (stderr, "ERROR: failed to read in all stars (%d of %d)\n", nstars, Nstars);146 gprint (GP_ERR, "ERROR: failed to read in all stars (%d of %d)\n", nstars, Nstars); 147 147 free (Xvec.elements); 148 148 free (Yvec.elements);
Note:
See TracChangeset
for help on using the changeset viewer.
