Changeset 39690
- Timestamp:
- Sep 11, 2016, 2:36:59 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20160809/Ohana/src/opihi/dvo/imbox.c
r37807 r39690 15 15 16 16 if (!style_args (&graphmode, &argc, argv, &kapa)) return FALSE; 17 18 char *xaxis = NULL; 19 if ((N = get_argument (argc, argv, "-xaxis"))) { 20 remove_argument (N, &argc, argv); 21 xaxis = strcreate (argv[N]); 22 remove_argument (N, &argc, argv); 23 } 24 char *yaxis = NULL; 25 if ((N = get_argument (argc, argv, "-yaxis"))) { 26 remove_argument (N, &argc, argv); 27 yaxis = strcreate (argv[N]); 28 remove_argument (N, &argc, argv); 29 } 17 30 18 31 SOLO_PHU = FALSE; … … 61 74 // XXX currently, image uses an unsigned short for NX,XY. this is rather restrictive 62 75 // and needs to be at least checked. 63 haveNx = gfits_scan (&header, "IMNAXIS1", "%d", 1, &Nx); 64 haveNy = gfits_scan (&header, "IMNAXIS2", "%d", 1, &Ny); 76 haveNx = FALSE; 77 if (xaxis) { 78 haveNx = gfits_scan (&header, xaxis, "%d", 1, &Nx); 79 } 80 if (!haveNx) { 81 haveNx = gfits_scan (&header, "IMNAXIS1", "%d", 1, &Nx); 82 } 83 if (!haveNx) { 84 haveNx = gfits_scan (&header, "ZNAXIS1", "%d", 1, &Nx); 85 } 86 if (!haveNx) { 87 haveNx = gfits_scan (&header, "NAXIS1", "%d", 1, &Nx); 88 } 65 89 66 if (!haveNx && !haveNy) { 67 haveNx = gfits_scan (&header, "ZNAXIS1", "%d", 1, &Nx); 90 haveNy = FALSE; 91 if (yaxis) { 92 haveNy = gfits_scan (&header, yaxis, "%d", 1, &Ny); 93 } 94 if (!haveNy) { 95 haveNy = gfits_scan (&header, "IMNAXIS2", "%d", 1, &Ny); 96 } 97 if (!haveNy) { 68 98 haveNy = gfits_scan (&header, "ZNAXIS2", "%d", 1, &Ny); 69 99 } 70 71 if (!haveNx && !haveNy) { 72 haveNx = gfits_scan (&header, "NAXIS1", "%d", 1, &Nx); 100 if (!haveNy) { 73 101 haveNy = gfits_scan (&header, "NAXIS2", "%d", 1, &Ny); 74 102 } … … 137 165 free (Xvec.elements.Flt); 138 166 free (Yvec.elements.Flt); 167 if (xaxis) free (xaxis); 168 if (yaxis) free (yaxis); 139 169 return (TRUE); 140 170
Note:
See TracChangeset
for help on using the changeset viewer.
