- Timestamp:
- Jun 2, 2014, 5:41:30 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140423/Ohana/src/checkastro/src/ImageOps.c
r36793 r36794 130 130 } 131 131 132 BuildChipMatch (image, Nimage); 133 134 char output[128]; 135 snprintf (output, 128, "checkastrom.%+3.0f.%+3.0f.%03.0f.%03.0f.dat", UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 136 FILE *f = fopen (output, "w"); 137 if (!f) { 138 fprintf (stderr, "problem opening %s for output\n", output); 139 } 140 132 141 // watch for chips with few stars 133 142 int Nfew = 0; … … 139 148 name = GetPhotcodeNamebyCode (image[i].photcode); 140 149 141 if (VERBOSE2) { 142 char *date = ohana_sec_to_date(image[i].tzero); 143 fprintf (stderr, "image "OFF_T_FMT" (%d, %s) has "OFF_T_FMT" total and "OFF_T_FMT" ref of %d measures (%s, %s)\n", 144 i, image[i].imageID, image[i].name, N_onImage[i], Nref_onImage[i], image[i].nstar, 145 date, name); 146 free (date); 147 } 150 off_t myMosaic = FindMosaicForImage (image, Nimage, i); 151 152 /* only check exposure center */ 153 double Rexp = NAN, Dexp = NAN, Rccd = NAN, Dccd = NAN; 154 155 if (myMosaic) { 156 myMosaic --; 157 XY_to_RD (&Rccd, &Dccd, 0.5*image[i].NX, 0.5*image[i].NY, &image[i].coords); 158 XY_to_RD (&Rexp, &Dexp, 0.0, 0.0, &image[myMosaic].coords); 159 } 160 161 char *date = ohana_sec_to_date(image[i].tzero); 162 FILE *outfile = f ? f : stderr; 163 fprintf (outfile, "%d %s : %10.6f %10.6f : %10.6f %10.6f "OFF_T_FMT" "OFF_T_FMT" %d %s %s\n", 164 image[i].imageID, image[i].name, Rccd, Dccd, Rexp, Dexp, N_onImage[i], Nref_onImage[i], image[i].nstar, 165 date, name); 166 free (date); 148 167 149 168 if (N_onImage[i] < 20) { … … 154 173 } 155 174 } 175 if (f) { fclose (f); } 156 176 fprintf (stderr, OFF_T_FMT" total images, %d with < 20 measurements, %d with < 15\n", Nimage, Nfew, Nbad); 157 177 }
Note:
See TracChangeset
for help on using the changeset viewer.
