- Timestamp:
- May 3, 2010, 8:50:52 AM (16 years ago)
- Location:
- branches/simtest_nebulous_branches
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/simtest_nebulous_branches
- Property svn:mergeinfo changed
-
branches/simtest_nebulous_branches/Ohana
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk/Ohana merged eligible /branches/eam_branches/Ohana.20100407 27635-27772 /branches/pap_delete/Ohana 27530-27595
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/simtest_nebulous_branches/Ohana/src/opihi/dvo/gimages.c
r21508 r27840 5 5 int gimages (int argc, char **argv) { 6 6 7 int i, j, N, Nimage, Nfound, *subset, Nsubset, status; 7 off_t i, j, Nimage, *subset, Nsubset; 8 int N, Nfound, status; 8 9 double ra, dec, Ra, Dec, X, Y, Yo; 9 10 double trange, t; … … 114 115 { 115 116 Coords local; 116 double Ro, Do, Xo, Yo, Xs, Ys, Xe, Ye,Radius;117 double Ro, Do, Xo, Yo, Xs, Ys, Radius; 117 118 118 119 if (typehash == DistortImage) { … … 124 125 } 125 126 127 // find coordinates of image center 126 128 XY_to_RD (&Ro, &Do, Xo, Yo, &image[i].coords); 129 if (fabs(Ro - Ra) > 120.0) continue; 127 130 128 131 local.crval1 = Ro; … … 138 141 Xs = -0.5*image[i].NX; 139 142 Ys = -0.5*image[i].NY; 140 Xe = +0.5*image[i].NX;141 Ye = +0.5*image[i].NY;142 143 } else { 143 144 Xs = 0.0; 144 145 Ys = 0.0; 145 Xe = image[i].NX;146 Ye = image[i].NY;147 146 } 148 147 148 // find coordinates of an image corner 149 149 XY_to_RD (&Ro, &Do, Xs, Ys, &image[i].coords); 150 RD_to_XY (&Xo, &Xo, Ro, Do, &local); 150 151 // find radius of image in arcsec 152 RD_to_XY (&Xo, &Yo, Ro, Do, &local); 151 153 Radius = hypot (Xo, Yo); 152 154 // fprintf (stderr, "%s: %f %f %f ", image[i].name, local.crval1, local.crval2, Radius); 153 155 154 XY_to_RD (&Ro, &Do, Xs, Ye, &image[i].coords); 155 RD_to_XY (&Xo, &Xo, Ro, Do, &local); 156 Radius = MAX (Radius, hypot (Xo, Yo)); 157 // fprintf (stderr, "%f ", Radius); 158 159 XY_to_RD (&Ro, &Do, Xe, Ys, &image[i].coords); 160 RD_to_XY (&Xo, &Xo, Ro, Do, &local); 161 Radius = MAX (Radius, hypot (Xo, Yo)); 162 // fprintf (stderr, "%f ", Radius); 163 164 XY_to_RD (&Ro, &Do, Xe, Ye, &image[i].coords); 165 RD_to_XY (&Xo, &Xo, Ro, Do, &local); 166 Radius = MAX (Radius, hypot (Xo, Yo)); 167 // fprintf (stderr, "%f ", Radius); 168 156 // check for distances to coordinates in arcsec 169 157 RD_to_XY (&Xo, &Yo, Ra, Dec, &local); 170 158 // fprintf (stderr, " : %f\n", hypot(Xo,Yo)); 159 160 // skip images with center too far from coordinaes 171 161 if (hypot(Xo,Yo) > 1.5*Radius) continue; 172 162 // fprintf (stderr, " ** try me **\n"); … … 217 207 got_spot: 218 208 date = ohana_sec_to_date (image[i].tzero); 209 210 // double-check coorsd: 211 # if 0 212 { 213 double Rout, Dout; 214 status = XY_to_RD (&Rout, &Dout, X, Y, &image[i].coords); 215 fprintf (stderr, "r,d = %f,%f\n", Rout, Dout); 216 } 217 # endif 219 218 220 219 if (PixelCoords) {
Note:
See TracChangeset
for help on using the changeset viewer.
