Changeset 36794
- Timestamp:
- Jun 2, 2014, 5:41:30 AM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140423/Ohana/src/checkastro
- Files:
-
- 7 edited
-
include/checkastro.h (modified) (1 diff)
-
src/ConfigInit.c (modified) (1 diff)
-
src/ImageOps.c (modified) (3 diffs)
-
src/args.c (modified) (4 diffs)
-
src/bcatalog.c (modified) (2 diffs)
-
src/load_catalogs.c (modified) (1 diff)
-
src/select_images.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140423/Ohana/src/checkastro/include/checkastro.h
r36793 r36794 83 83 84 84 float MinBadQF; 85 float MaxMeanOffset;86 85 87 86 int TimeSelect; 88 87 time_t TSTART, TSTOP; 89 90 int FlagOutlier;91 int CLIP_THRESH;92 88 93 89 SkyRegion UserPatch; -
branches/eam_branches/ipp-20140423/Ohana/src/checkastro/src/ConfigInit.c
r36793 r36794 19 19 20 20 // set defaults for all of these if they are not used by parallel / remote clients 21 // if (!ScanConfig (config, "RELASTRO_SIGMA_LIM", "%lf", 0, &SIGMA_LIM)) SIGMA_LIM = 0.01; 22 21 if (!ScanConfig (config, "RELASTRO_SIGMA_LIM", "%lf", 0, &SIGMA_LIM)) SIGMA_LIM = 0.01; 22 if (!ScanConfig (config, "RELASTRO_SRC_MEAS_TOOFEW", "%d", 0, &SRC_MEAS_TOOFEW)) SRC_MEAS_TOOFEW = 3; 23 23 24 // force CATDIR to be absolute (so parallel mode will work) 24 25 GetConfig (config, "CATDIR", "%s", 0, CATDIR); -
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 } -
branches/eam_branches/ipp-20140423/Ohana/src/checkastro/src/args.c
r36793 r36794 189 189 } 190 190 191 MaxMeanOffset = 10.0;192 if ((N = get_argument (argc, argv, "-max-mean-offset"))) {193 remove_argument (N, &argc, argv);194 MaxMeanOffset = atof (argv[N]);195 remove_argument (N, &argc, argv);196 }197 198 191 if (argc != 1) usage (); 199 192 return TRUE; … … 371 364 372 365 void usage () { 373 fprintf (stderr, "ERROR: USAGE: checkastro -images -update-simple [options]\n"); 374 fprintf (stderr, " OR: checkastro -images -update-chips [options]\n"); 375 fprintf (stderr, " OR: checkastro -images -update-mosaic [options]\n"); 376 fprintf (stderr, " OR: checkastro -parallel-regions -update-simple [options]\n"); 377 fprintf (stderr, " OR: checkastro -parallel-regions -update-chips [options]\n"); 378 fprintf (stderr, " OR: checkastro -parallel-regions -update-mosaic [options]\n"); 379 fprintf (stderr, " OR: checkastro -parallel-images -update-simple [options]\n"); 380 fprintf (stderr, " OR: checkastro -parallel-images -update-chips [options]\n"); 381 fprintf (stderr, " OR: checkastro -parallel-images -update-mosaic [options]\n"); 382 fprintf (stderr, " OR: checkastro -update-objects [options]\n"); 383 fprintf (stderr, " OR: checkastro -high-speed [options]\n"); 384 fprintf (stderr, " OR: checkastro -hpm [options]\n"); 385 fprintf (stderr, " OR: checkastro -merge-source [options]\n\n"); 386 387 fprintf (stderr, " specify one of the following modes: \n"); 388 fprintf (stderr, " -update-objects\n"); 389 fprintf (stderr, " -pm\n"); 390 fprintf (stderr, " -par\n"); 391 fprintf (stderr, " -pmpar\n"); 392 fprintf (stderr, " -update-simple\n"); 393 fprintf (stderr, " -update-chips\n"); 394 fprintf (stderr, " -update-mosaics\n"); 395 fprintf (stderr, " -high-speed (code[,code,code]) (code[,code,code]) (radius) (output catdir)\n"); 396 fprintf (stderr, " -hpm (radius) (output catdir)\n"); 397 fprintf (stderr, " -merge-source (objID) (catID) into (objID) (catID)\n\n"); 398 399 fprintf (stderr, " additional options: \n"); 366 fprintf (stderr, "ERROR: USAGE: checkastro [options]\n"); 367 fprintf (stderr, " options: \n"); 400 368 fprintf (stderr, " -region RA RA DEC DEC\n"); 401 369 fprintf (stderr, " -catalog (ra) (dec)\n\n"); … … 403 371 fprintf (stderr, " +photcode (code)[,code,code...]\n"); 404 372 fprintf (stderr, " -photcode (code)[,code,code...]\n"); 405 fprintf (stderr, " -plot\n"); 406 fprintf (stderr, " -plotdelay (seconds)\n"); 407 fprintf (stderr, " -statmode (mode)\n"); 408 fprintf (stderr, " -reset\n"); 409 fprintf (stderr, " -nloop (N) : number of image-fit iterations\n"); 410 fprintf (stderr, " -update : apply new fit to database\n"); 411 fprintf (stderr, " -params\n"); 412 fprintf (stderr, " -plrange\n"); 373 fprintf (stderr, " -reset-to-photcode (code)[,code,code...]\n"); 374 fprintf (stderr, " -max-density (rho)\n"); 375 fprintf (stderr, " -minerror\n"); 413 376 fprintf (stderr, " -minerror\n"); 414 377 fprintf (stderr, " -instmag min max\n\n"); … … 417 380 fprintf (stderr, " -photflagpoor\n"); 418 381 fprintf (stderr, " -v\n"); 382 fprintf (stderr, " -vv\n"); 383 fprintf (stderr, " -parallel\n"); 384 fprintf (stderr, " -parallel-manual\n"); 385 fprintf (stderr, " -parallel-serial\n"); 419 386 fprintf (stderr, " \n"); 420 387 exit (2); -
branches/eam_branches/ipp-20140423/Ohana/src/checkastro/src/bcatalog.c
r36793 r36794 37 37 /* exclude stars not in range or with too few measurements */ 38 38 for (i = 0; i < catalog[0].Naverage; i++) { 39 if (catalog[0].average[i].Nmeasure <= SRC_MEAS_TOOFEW) { 40 continue; 41 // XXX can't (easily) count this for a given chip 42 } 39 if (catalog[0].average[i].Nmeasure <= SRC_MEAS_TOOFEW) continue; 43 40 44 41 /* start with all stars good */ … … 278 275 279 276 // if we are resetting to a given photcode, we need to have that photcode... 280 if (NphotcodesReset) { 277 // XXX this is not relevant for the check... 278 if (FALSE && NphotcodesReset) { 281 279 int k; 282 280 int foundReset = FALSE; -
branches/eam_branches/ipp-20140423/Ohana/src/checkastro/src/load_catalogs.c
r36793 r36794 128 128 if (VERBOSE) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); } 129 129 if (VERBOSE2) { snprintf (tmpline, 1024, "%s -vv", command); strcpy (command, tmpline); } 130 if (MaxDensityUse) { snprintf (tmpline, 1024, "%s -max-density %f", command, MaxDensityValue); strcpy (command, tmpline); } 131 if (ImagSelect) { snprintf (tmpline, 1024, "%s -instmag %f %f", command, ImagMin, ImagMax); strcpy (command, tmpline); } 130 132 131 133 if (PHOTCODE_KEEP_LIST) { snprintf (tmpline, 1024, "%s +photcode %s", command, PHOTCODE_KEEP_LIST); strcpy (command, tmpline); } 132 134 if (PHOTCODE_SKIP_LIST) { snprintf (tmpline, 1024, "%s -photcode %s", command, PHOTCODE_SKIP_LIST); strcpy (command, tmpline); } 135 if (PHOTCODE_RESET_LIST) { snprintf (tmpline, 1024, "%s -reset-to-photcode %s", command, PHOTCODE_RESET_LIST); strcpy (command, tmpline); } 133 136 if (PhotFlagSelect) { snprintf (tmpline, 1024, "%s +photflags", command); strcpy (command, tmpline); } 134 137 if (PhotFlagBad) { snprintf (tmpline, 1024, "%s +photflagbad %d", command, PhotFlagBad); strcpy (command, tmpline); } -
branches/eam_branches/ipp-20140423/Ohana/src/checkastro/src/select_images.c
r36793 r36794 100 100 101 101 // check that this image is even in range of the searched region 102 if (Dexp - 1.5 > DmaxSkyRegion) continue;103 if (Dexp + 1.5 < DminSkyRegion) continue;102 if (Dexp + 1.5 > UserPatch.Dmax) continue; 103 if (Dexp - 1.5 < UserPatch.Dmin) continue; 104 104 105 105 // the sky region RA is defined to be 0 - 360.0 106 106 if ((Dexp < 88) && (Dexp > -88)) { 107 if (Rexp - 1.5/cos(Dexp*RAD_DEG) > RmaxSkyRegion) continue;108 if (Rexp + 1.5/cos(Dexp*RAD_DEG) < RminSkyRegion) continue;107 if (Rexp + 1.5/cos(Dexp*RAD_DEG) > UserPatch.Rmax) continue; 108 if (Rexp - 1.5/cos(Dexp*RAD_DEG) < UserPatch.Rmin) continue; 109 109 } 110 110
Note:
See TracChangeset
for help on using the changeset viewer.
