Changeset 12732
- Timestamp:
- Apr 3, 2007, 10:55:41 AM (19 years ago)
- Location:
- trunk/Ohana/src/addstar
- Files:
-
- 9 edited
-
include/addstar.h (modified) (1 diff)
-
src/ConfigInit.c (modified) (1 diff)
-
src/FilterStars.c (modified) (3 diffs)
-
src/ReadImageHeader.c (modified) (3 diffs)
-
src/ReadStarsFITS.c (modified) (2 diffs)
-
src/addstar.c (modified) (1 diff)
-
src/get2mass_ops.c (modified) (1 diff)
-
src/gstars.c (modified) (1 diff)
-
src/load2mass_as_rawdata.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/include/addstar.h
r12461 r12732 104 104 int VERBOSE; 105 105 int PLOT; 106 double MAX_CERROR; 106 107 107 108 /* modify server behavior (make this an addstar cleanup mode?) */ -
trunk/Ohana/src/addstar/src/ConfigInit.c
r12332 r12732 38 38 ScanConfig (config, "MIN_SN_FSTAT", "%lf", 0, &SNLIMIT); 39 39 ScanConfig (config, "ADDSTAR_SNLIMIT", "%lf", 0, &SNLIMIT); 40 41 MAX_CERROR = 0.5; // arcseconds 42 ScanConfig (config, "ADDSTAR_MAX_CERROR", "%lf", 0, &MAX_CERROR); 40 43 41 44 /* used by parse_time to find time-related keywords */ -
trunk/Ohana/src/addstar/src/FilterStars.c
r12332 r12732 6 6 float MTIME, dMs; 7 7 Stars *stars; 8 float RMIN, RMAX, DMIN, DMAX; 8 9 9 10 /* correct instrumental mags for exposure time */ 10 11 MTIME = (image[0].exptime > 0) ? 2.500*log10(image[0].exptime) : 0.0; 12 13 RMIN = 360.0; 14 RMAX = 0.0; 15 DMIN = +90.0; 16 DMAX = -90.0; 11 17 12 18 /* modify resulting star list */ … … 27 33 stars[N].code = image[0].photcode; 28 34 35 RMIN = MIN (RMIN, stars[N].R); 36 RMAX = MAX (RMAX, stars[N].R); 37 DMIN = MIN (DMIN, stars[N].D); 38 DMAX = MAX (DMAX, stars[N].D); 29 39 /** additional quantities to supply to Stars based on the image data **/ 30 40 … … 54 64 55 65 if (VERBOSE) fprintf (stderr, "read %d stars from target file\n", image[0].nstar); 66 if (VERBOSE) fprintf (stderr, "stars cover region %f,%f - %f,%f\n", RMIN, DMIN, RMAX, DMAX); 56 67 return (stars); 57 68 } -
trunk/Ohana/src/addstar/src/ReadImageHeader.c
r12487 r12732 6 6 7 7 int Nastro, ccdnum, hour, min, Nx, Ny; 8 double tmp, sec ;8 double tmp, sec, Cerror; 9 9 char *c, photname[64], line[80]; 10 10 … … 37 37 Nastro = 0; 38 38 gfits_scan (header, "NASTRO", "%d", 1, &Nastro); 39 if ((Nastro == 0) && !ACCEPT_ASTROM) { 39 Cerror = 0; 40 gfits_scan (header, "CERROR", "%lf", 1, &Cerror); 41 if (((Nastro == 0) || (Cerror > MAX_CERROR)) && !ACCEPT_ASTROM) { 40 42 fprintf (stderr, "bad astrometric solution in header\n"); 41 43 return (FALSE); … … 51 53 while (image[0].coords.crval1 < 0) image[0].coords.crval1 += 360.0; 52 54 while (image[0].coords.crval1 > 360.0) image[0].coords.crval1 -= 360.0; 55 } 56 57 { 58 double R, D; 59 /* sanity check on the image coordinates */ 60 XY_to_RD (&R, &D, 0.5*Nx, 0.5*Ny, &image[0].coords); 61 if (!finite(R) || !finite(D)) { 62 fprintf (stderr, "corrupted header coordinates, skipping\n"); 63 return (FALSE); 64 } 53 65 } 54 66 -
trunk/Ohana/src/addstar/src/ReadStarsFITS.c
r12461 r12732 77 77 } 78 78 79 // XXX I need to make the IPP I/O functions and these functions 80 // consistent wrt ZERO_POINT.... 79 81 Stars *ConvertPS1_DEV_0 (FTable *table, int *nstars) { 80 82 … … 91 93 stars[i].dX = ps1data[i].dX; 92 94 stars[i].dY = ps1data[i].dY; 93 stars[i].M = ps1data[i].M ;95 stars[i].M = ps1data[i].M + 25.0; 94 96 stars[i].dM = ps1data[i].dM; 95 97 stars[i].Mpeak = ps1data[i].Mpeak; -
trunk/Ohana/src/addstar/src/addstar.c
r12690 r12732 79 79 80 80 // set the parameters which guide catalog open/load/create 81 catalog.filename = skylist[0].filename[i]; 81 82 catalog.catformat = dvo_catalog_catformat (CATFORMAT); // set the default catformat from config data 82 83 catalog.catmode = dvo_catalog_catmode (CATMODE); // set the default catmode from config data 83 catalog. filename = skylist[0].filename[i];84 catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF; 84 85 catalog.Nsecfilt = GetPhotcodeNsecfilt (); 85 catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;86 86 if (options.update) catalog.catflags = LOAD_AVES | LOAD_MEAS_META | LOAD_MISS | LOAD_SECF; 87 87 -
trunk/Ohana/src/addstar/src/get2mass_ops.c
r7780 r12732 217 217 Rs *= 15.0; 218 218 Re *= 15.0; 219 220 // don't restrict by RA, but limit by DEC 221 if (De < UserPatch.Dmin) continue; 222 if (Ds > UserPatch.Dmax) continue; 223 219 224 regions[Nregions].Rmin = Rs; 220 225 regions[Nregions].Rmax = Re; -
trunk/Ohana/src/addstar/src/gstars.c
r12488 r12732 229 229 snprintf (image[N].name, 32, "%s", name); 230 230 } else { 231 snprintf (image[N].name, 32, "%s .%s", name, exthead[i]);231 snprintf (image[N].name, 32, "%s[%s]", name, exthead[i]); 232 232 } 233 233 -
trunk/Ohana/src/addstar/src/load2mass_as_rawdata.c
r8361 r12732 120 120 if (tstars[j].D < region[0].Dmin) continue; 121 121 if (tstars[j].D > region[0].Dmax) continue; 122 123 // check if in UserPatch 124 if (tstars[j].R < UserPatch.Rmin) continue; 125 if (tstars[j].R > UserPatch.Rmax) continue; 126 if (tstars[j].D < UserPatch.Dmin) continue; 127 if (tstars[j].D > UserPatch.Dmax) continue; 122 128 123 129 offset = tstars[j].offset;
Note:
See TracChangeset
for help on using the changeset viewer.
