- Timestamp:
- Sep 8, 2014, 2:44:35 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/images.c
r34584 r37378 152 152 SetVector (&Yvec, OPIHI_FLT, NPTS); 153 153 154 Image *mosaic = NULL; 155 154 156 ALLOCATE (plist, int, NPTS); 155 157 n = N = 0; … … 157 159 if (ByName && strncmp (image[i].name, name, strlen(name))) continue; 158 160 if (TimeSelect && ((image[i].tzero < tzero) || (image[i].tzero+image[i].trate*image[i].NY > tzero + trange))) continue; 159 if (!(Nmosaic = FindMosaicForImage (image, Nimage, i))) continue; 160 Nmosaic --; // XXX kind of a hack: FindMosaicForImage returns 0 or the mosaic seq number + 1 161 162 mosaic = image[i].parent; 163 Nmosaic = (SOLO_MOSAIC && mosaic) ? mosaic - image : -1; 164 161 165 if (photcode) { 162 166 if ( photcodeEquiv && (photcode[0].code != GetPhotcodeEquivCodebyCode(image[i].photcode))) continue; … … 170 174 typehash = wordhash (&image[i].coords.ctype[4]); 171 175 172 if (photcode && SOLO_MOSAIC ) {176 if (photcode && SOLO_MOSAIC && (Nmosaic >= 0)) { 173 177 // mosaic (DIS) images are not currently given a photcode : plot these via the WRP entries 174 178 /* DIS images represent a field, not a chip */ 175 179 if (typehash != ChipImage) continue; 176 180 if (foundMosaic[Nmosaic]) continue; 177 x[0] = -0.5* image[Nmosaic].NX; y[0] = -0.5*image[Nmosaic].NY;178 x[1] = +0.5* image[Nmosaic].NX; y[1] = -0.5*image[Nmosaic].NY;179 x[2] = +0.5* image[Nmosaic].NX; y[2] = +0.5*image[Nmosaic].NY;180 x[3] = -0.5* image[Nmosaic].NX; y[3] = +0.5*image[Nmosaic].NY;181 x[0] = -0.5*mosaic->NX; y[0] = -0.5*mosaic->NY; 182 x[1] = +0.5*mosaic->NX; y[1] = -0.5*mosaic->NY; 183 x[2] = +0.5*mosaic->NX; y[2] = +0.5*mosaic->NY; 184 x[3] = -0.5*mosaic->NX; y[3] = +0.5*mosaic->NY; 181 185 for (j = 0; j < Npts; j++) { 182 status = XY_to_RD (&r[j], &d[j], x[j], y[j], & image[Nmosaic].coords);186 status = XY_to_RD (&r[j], &d[j], x[j], y[j], &mosaic->coords); 183 187 if (!status) break; 184 188 r[j] = ohana_normalize_angle (r[j]); … … 198 202 199 203 /* DIS images represent a field, not a chip */ 200 if ((typehash == DistortImage) && !WITH_MOSAIC) continue; 201 if ((typehash != DistortImage) && SOLO_MOSAIC) continue; 204 if ((typehash == DistortImage) && !WITH_MOSAIC) continue; // do not plot the mosaic images 205 if ((typehash != DistortImage) && SOLO_MOSAIC) continue; // plot only the mosaic images 206 202 207 if (typehash == DistortImage) { 203 208 x[0] = -0.5*image[i].NX; y[0] = -0.5*image[i].NY;
Note:
See TracChangeset
for help on using the changeset viewer.
