Changeset 7080 for trunk/Ohana/src/opihi/dvo/simage.c
- Timestamp:
- May 5, 2006, 5:44:26 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo/simage.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/simage.c
r4689 r7080 39 39 40 40 /* read header */ 41 if (! fits_read_header (argv[1], &header)) {41 if (!gfits_read_header (argv[1], &header)) { 42 42 fprintf (stderr, "ERROR: can't find image file %s\n", argv[1]); 43 43 return (FALSE); … … 45 45 /* get astrometry information */ 46 46 strcpy (coords.ctype, "NONE"); 47 fits_scan (&header, "CTYPE1", "%s", 1, coords.ctype);47 gfits_scan (&header, "CTYPE1", "%s", 1, coords.ctype); 48 48 if (strcmp (coords.ctype, "RA---PLY")) { 49 49 fprintf (stderr, "ERROR: wrong astrometric info in header\n"); 50 50 return (FALSE); 51 51 } 52 fits_scan (&header, "CDELT1", "%f", 1, &coords.cdelt1);53 fits_scan (&header, "CDELT2", "%f", 1, &coords.cdelt2);54 fits_scan (&header, "CRVAL1", "%lf", 1, &coords.crval1);55 fits_scan (&header, "CRVAL2", "%lf", 1, &coords.crval2);56 fits_scan (&header, "CRPIX1", "%f", 1, &coords.crpix1);57 fits_scan (&header, "CRPIX2", "%f", 1, &coords.crpix2);58 fits_scan (&header, "PC001001", "%f", 1, &coords.pc1_1);59 fits_scan (&header, "PC001002", "%f", 1, &coords.pc1_2);60 fits_scan (&header, "PC002001", "%f", 1, &coords.pc2_1);61 fits_scan (&header, "PC002002", "%f", 1, &coords.pc2_2);52 gfits_scan (&header, "CDELT1", "%f", 1, &coords.cdelt1); 53 gfits_scan (&header, "CDELT2", "%f", 1, &coords.cdelt2); 54 gfits_scan (&header, "CRVAL1", "%lf", 1, &coords.crval1); 55 gfits_scan (&header, "CRVAL2", "%lf", 1, &coords.crval2); 56 gfits_scan (&header, "CRPIX1", "%f", 1, &coords.crpix1); 57 gfits_scan (&header, "CRPIX2", "%f", 1, &coords.crpix2); 58 gfits_scan (&header, "PC001001", "%f", 1, &coords.pc1_1); 59 gfits_scan (&header, "PC001002", "%f", 1, &coords.pc1_2); 60 gfits_scan (&header, "PC002001", "%f", 1, &coords.pc2_1); 61 gfits_scan (&header, "PC002002", "%f", 1, &coords.pc2_2); 62 62 /* RA Terms */ 63 fits_scan (&header, "PCA1X2Y0", "%f", 1, &coords.polyterms[0][0]);64 fits_scan (&header, "PCA1X1Y1", "%f", 1, &coords.polyterms[1][0]);65 fits_scan (&header, "PCA1X0Y2", "%f", 1, &coords.polyterms[2][0]);66 fits_scan (&header, "PCA1X3Y0", "%f", 1, &coords.polyterms[3][0]);67 fits_scan (&header, "PCA1X2Y1", "%f", 1, &coords.polyterms[4][0]);68 fits_scan (&header, "PCA1X1Y2", "%f", 1, &coords.polyterms[5][0]);69 fits_scan (&header, "PCA1X0Y3", "%f", 1, &coords.polyterms[6][0]);63 gfits_scan (&header, "PCA1X2Y0", "%f", 1, &coords.polyterms[0][0]); 64 gfits_scan (&header, "PCA1X1Y1", "%f", 1, &coords.polyterms[1][0]); 65 gfits_scan (&header, "PCA1X0Y2", "%f", 1, &coords.polyterms[2][0]); 66 gfits_scan (&header, "PCA1X3Y0", "%f", 1, &coords.polyterms[3][0]); 67 gfits_scan (&header, "PCA1X2Y1", "%f", 1, &coords.polyterms[4][0]); 68 gfits_scan (&header, "PCA1X1Y2", "%f", 1, &coords.polyterms[5][0]); 69 gfits_scan (&header, "PCA1X0Y3", "%f", 1, &coords.polyterms[6][0]); 70 70 /* Dec Terms */ 71 fits_scan (&header, "PCA2X2Y0", "%f", 1, &coords.polyterms[0][1]);72 fits_scan (&header, "PCA2X1Y1", "%f", 1, &coords.polyterms[1][1]);73 fits_scan (&header, "PCA2X0Y2", "%f", 1, &coords.polyterms[2][1]);74 fits_scan (&header, "PCA2X3Y0", "%f", 1, &coords.polyterms[3][1]);75 fits_scan (&header, "PCA2X2Y1", "%f", 1, &coords.polyterms[4][1]);76 fits_scan (&header, "PCA2X1Y2", "%f", 1, &coords.polyterms[5][1]);77 fits_scan (&header, "PCA2X0Y3", "%f", 1, &coords.polyterms[6][1]);71 gfits_scan (&header, "PCA2X2Y0", "%f", 1, &coords.polyterms[0][1]); 72 gfits_scan (&header, "PCA2X1Y1", "%f", 1, &coords.polyterms[1][1]); 73 gfits_scan (&header, "PCA2X0Y2", "%f", 1, &coords.polyterms[2][1]); 74 gfits_scan (&header, "PCA2X3Y0", "%f", 1, &coords.polyterms[3][1]); 75 gfits_scan (&header, "PCA2X2Y1", "%f", 1, &coords.polyterms[4][1]); 76 gfits_scan (&header, "PCA2X1Y2", "%f", 1, &coords.polyterms[5][1]); 77 gfits_scan (&header, "PCA2X0Y3", "%f", 1, &coords.polyterms[6][1]); 78 78 coords.Npolyterms = 2; /* how many do we use? */ 79 79 80 80 /* find number of stars */ 81 fits_scan (&header, "NSTARS", "%d", 1, &Nstars);81 gfits_scan (&header, "NSTARS", "%d", 1, &Nstars); 82 82 if (Nstars == 0) { 83 83 fprintf (stderr, "no stars in file\n");
Note:
See TracChangeset
for help on using the changeset viewer.
