Changeset 33364
- Timestamp:
- Feb 24, 2012, 7:54:02 AM (14 years ago)
- Location:
- branches/eam_branches/ipp-20111122/Ohana/src/relphot
- Files:
-
- 11 edited
-
include/relphot.h (modified) (2 diffs)
-
src/BrightCatalog.c (modified) (4 diffs)
-
src/ConfigInit.c (modified) (1 diff)
-
src/ImageSubset.c (modified) (1 diff)
-
src/StarOps.c (modified) (2 diffs)
-
src/bcatalog.c (modified) (6 diffs)
-
src/load_catalogs.c (modified) (2 diffs)
-
src/reload_catalogs.c (modified) (1 diff)
-
src/relphot.c (modified) (1 diff)
-
src/setExclusions.c (modified) (2 diffs)
-
src/setMrelFinal.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/Ohana/src/relphot/include/relphot.h
r33328 r33364 81 81 char CATFORMAT[16]; /* internal, elixir, loneos, panstarrs */ 82 82 char CameraConfig[MAX_PATH_LENGTH]; 83 char CAMERA[64]; /* eg, gpc1 */ 83 84 char SKY_TABLE[MAX_PATH_LENGTH]; 84 85 int SKY_DEPTH; /** XXX EAM : depth of catalog tables, fix usage */ … … 256 257 int reload_catalogs_parallel PROTO((SkyList *sky)); 257 258 int reload_images PROTO((FITS_DB *db)); 258 int setExclusions PROTO((Catalog *catalog, int Ncatalog ));259 int setExclusions PROTO((Catalog *catalog, int Ncatalog, int verbose)); 259 260 void setMcal PROTO((Catalog *catalog, int Poor, FlatCorrectionTable *flatcorr)); 260 261 void setMcalFinal PROTO((void)); -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/BrightCatalog.c
r33274 r33364 98 98 measure[i].photcode = photcode[i]; 99 99 } 100 fprintf (stderr, "loaded data for %lld measures\n", (long long) Nrow);100 // fprintf (stderr, "loaded data for %lld measures\n", (long long) Nrow); 101 101 102 102 free (dR ); … … 535 535 536 536 for (i = 0; i < catalogs->NCATALOG; i++) { 537 dvo_catalog_init (&catalogs->catalog[i], TRUE); 537 538 catalogs->catIDs[i] = 0; 538 539 catalogs->NAVERAGE[i] = 100; … … 609 610 if (catalogs->Ncatalog >= catalogs->NCATALOG) { 610 611 catalogs->NCATALOG += 16; 611 fprintf (stderr, "realloc catalogs->catalog: old: %llx ", (long long) catalogs->catalog);612 // fprintf (stderr, "realloc catalogs->catalog: old: %llx ", (long long) catalogs->catalog); 612 613 REALLOCATE (catalogs->catalog, Catalog, catalogs->NCATALOG); 613 fprintf (stderr, "new: %llx - %llx\n", (long long) catalogs->catalog, (long long) (catalogs->catalog + sizeof(Catalog)*catalogs->NCATALOG));614 615 fprintf (stderr, "realloc catalogs->NAVERAGE: old: %llx ", (long long) catalogs->NAVERAGE);614 // fprintf (stderr, "new: %llx - %llx\n", (long long) catalogs->catalog, (long long) (catalogs->catalog + sizeof(Catalog)*catalogs->NCATALOG)); 615 616 // fprintf (stderr, "realloc catalogs->NAVERAGE: old: %llx ", (long long) catalogs->NAVERAGE); 616 617 REALLOCATE (catalogs->NAVERAGE, off_t, catalogs->NCATALOG); 617 fprintf (stderr, "new: %llx - %llx\n", (long long) catalogs->NAVERAGE, (long long) (catalogs->NAVERAGE + sizeof(off_t)*catalogs->NCATALOG));618 619 fprintf (stderr, "realloc catalogs->NMEASURE: old: %llx ", (long long) catalogs->NMEASURE);618 // fprintf (stderr, "new: %llx - %llx\n", (long long) catalogs->NAVERAGE, (long long) (catalogs->NAVERAGE + sizeof(off_t)*catalogs->NCATALOG)); 619 620 // fprintf (stderr, "realloc catalogs->NMEASURE: old: %llx ", (long long) catalogs->NMEASURE); 620 621 REALLOCATE (catalogs->NMEASURE, off_t, catalogs->NCATALOG); 621 fprintf (stderr, "new: %llx - %llx\n", (long long) catalogs->NMEASURE, (long long) (catalogs->NMEASURE + sizeof(off_t)*catalogs->NCATALOG));622 // fprintf (stderr, "new: %llx - %llx\n", (long long) catalogs->NMEASURE, (long long) (catalogs->NMEASURE + sizeof(off_t)*catalogs->NCATALOG)); 622 623 623 624 REALLOCATE (catalogs->catIDs, int, catalogs->NCATALOG); … … 625 626 int j; 626 627 for (j = catalogs->NCATALOG - 16; j < catalogs->NCATALOG; j++) { 627 // XXX call the catalog init function in libdvo?628 dvo_catalog_init (&catalogs->catalog[j], TRUE); 628 629 catalogs->catIDs[j] = 0; 629 630 catalogs->NAVERAGE[j] = 100; -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/ConfigInit.c
r33301 r33364 40 40 free (tmpcatdir); 41 41 42 GetConfig (config, "GSCFILE", "%s", 0, GSCFILE); 42 GetConfig (config, "CAMERA", "%s", 0, CAMERA); 43 44 GetConfig (config, "GSCFILE", "%s", 0, GSCFILE); 43 45 ScanConfig (config, "CATMODE", "%s", 0, CATMODE); 44 46 ScanConfig (config, "CATFORMAT", "%s", 0, CATFORMAT); -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/ImageSubset.c
r33303 r33364 142 142 tzero[i] = image[i].tzero; 143 143 trate[i] = image[i].trate; 144 fprintf (stderr, "time: %d, trate: %d\n", image[i].tzero, image[i].trate);145 144 } 146 145 -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/StarOps.c
r33328 r33364 697 697 list[n] = pow (10.0, 0.01*Xm); 698 698 dlist[n] = 1; 699 if (list[n] > 100000) { 700 fprintf (stderr, "!"); 701 } 699 702 n++; 700 703 } … … 733 736 734 737 dM = catalog[i].secfilt[Nsecfilt*j+Nsec].dM; 738 if (isnan(dM)) continue; 739 if (dM > 100) { 740 fprintf (stderr, "."); 741 } 735 742 list[n] = dM; 736 743 dlist[n] = 1; -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/bcatalog.c
r33274 r33364 42 42 off_t NAVERAGE, NMEASURE, Naverage, Nmeasure, Nm; 43 43 float mag; 44 int Ncode, Ntime, Ndophot, Nmag, Nsigma, Nimag, Nfew, Ngalaxy, Npsfqf ;44 int Ncode, Ntime, Ndophot, Nmag, Nsigma, Nimag, Nfew, Ngalaxy, Npsfqf, Nnan; 45 45 46 46 int Nsecfilt = GetPhotcodeNsecfilt (); … … 56 56 Nmeasure = Naverage = 0; 57 57 58 Ncode = Ntime = Ndophot = Nmag = Nsigma = Nimag = Nfew = Npsfqf = Ngalaxy = 0;58 Ncode = Ntime = Ndophot = Nmag = Nsigma = Nimag = Nfew = Npsfqf = Ngalaxy = Nnan = 0; 59 59 60 60 // copy the following fields to the subcatalog: … … 83 83 subcatalog[0].secfilt[Nsecfilt*Naverage+Nsec].M = NAN; 84 84 subcatalog[0].secfilt[Nsecfilt*Naverage+Nsec].dM = NAN; 85 subcatalog[0].secfilt[Nsecfilt*Naverage+Nsec].Xm = NAN_S_SHORT; 85 86 subcatalog[0].secfilt[Nsecfilt*Naverage+Nsec].flags &= ~ID_STAR_FEW; 86 87 subcatalog[0].secfilt[Nsecfilt*Naverage+Nsec].flags &= ~ID_STAR_POOR; … … 117 118 // skip garbage measurements 118 119 if (catalog[0].measure[offset].psfQual < 0.85) { Npsfqf ++; continue; } 120 if (isnan(catalog[0].measure[offset].M)) { Nnan ++; continue; } 119 121 120 122 // check for galaxies … … 196 198 fprintf (stderr, "using "OFF_T_FMT" stars ("OFF_T_FMT" measures) of "OFF_T_FMT" for catalog %s\n", 197 199 subcatalog[0].Naverage, subcatalog[0].Nmeasure, i, catalog[0].filename); 198 fprintf (stderr, "rejections: %d code, %d time, %d dophot, %d mag, %d sigma, %d imag, %d few, %d psfqf, %d galaxies\n",199 Ncode, Ntime, Ndophot, Nmag, Nsigma, Nimag, Nfew, Npsfqf, N galaxy);200 fprintf (stderr, "rejections: %d code, %d time, %d dophot, %d mag, %d sigma, %d imag, %d few, %d psfqf, %d Nnan, %d galaxies\n", 201 Ncode, Ntime, Ndophot, Nmag, Nsigma, Nimag, Nfew, Npsfqf, Nnan, Ngalaxy); 200 202 } 201 203 return (TRUE); … … 269 271 tmpcatalog.measureT[Nmeasure].averef = i; 270 272 Nmeasure ++; 273 } 274 for (j = 0; j < Nsecfilt; j++) { 275 tmpcatalog.secfilt[i*Nsecfilt + j] = subcatalog[0].secfilt[ave*Nsecfilt + j]; 271 276 } 272 277 } -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/load_catalogs.c
r33303 r33364 132 132 133 133 char command[1024]; 134 snprintf (command, 1024, "relphot_client %s -load %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -D MAG_LIM %f -D SIGMA_LIM %f",135 PhotcodeList, catalogFile, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, MAG_LIM, SIGMA_LIM);134 snprintf (command, 1024, "relphot_client %s -load %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -D CAMERA %s -D MAG_LIM %f -D SIGMA_LIM %f", 135 PhotcodeList, catalogFile, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, CAMERA, MAG_LIM, SIGMA_LIM); 136 136 137 137 char tmpline[1024]; … … 210 210 BrightCatalogSplitFree (catalogs); 211 211 212 int Nmeasure = 0; 213 int Naverage = 0; 214 for (i = 0; i < catalogs->Ncatalog; i++) { 215 Nmeasure += catalogs->catalog[i].Nmeasure; 216 Naverage += catalogs->catalog[i].Naverage; 217 } 218 219 fprintf (stderr, "loaded %d catalogs, using a total of %d stars (%d measures)\n", catalogs->Ncatalog, Naverage, Nmeasure); 220 212 221 return (catalog); 213 222 } -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/reload_catalogs.c
r33303 r33364 139 139 140 140 char command[1024]; 141 snprintf (command, 1024, "relphot_client %s -update %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -D STAR_TOOFEW %d -minerror %f",142 PhotcodeList, imageFile, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, STAR_TOOFEW, MIN_ERROR);141 snprintf (command, 1024, "relphot_client %s -update %s -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -statmode %s -D CAMERA %s -D STAR_TOOFEW %d -minerror %f", 142 PhotcodeList, imageFile, table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax, STATMODE, CAMERA, STAR_TOOFEW, MIN_ERROR); 143 143 144 144 // options & configs which affect relphot_client -update -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/relphot.c
r33328 r33364 88 88 SAVEPLOT = FALSE; 89 89 90 setExclusions (catalog, Ncatalog );90 setExclusions (catalog, Ncatalog, TRUE); 91 91 92 92 global_stats (catalog, Ncatalog, flatcorr); -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/setExclusions.c
r31450 r33364 6 6 // and uses the bits read from disk as the test 7 7 8 int setExclusions (Catalog *catalog, int Ncatalog ) {8 int setExclusions (Catalog *catalog, int Ncatalog, int verbose) { 9 9 10 10 off_t i, j, k, m, Narea, Nnocal, Ngood; … … 59 59 } 60 60 } 61 if ( VERBOSE) fprintf (stderr, OFF_T_FMT" measurements marked by area\n", Narea);62 if ( VERBOSE) fprintf (stderr, OFF_T_FMT" measurements marked nocal\n", Nnocal);63 if ( VERBOSE) fprintf (stderr, OFF_T_FMT" measurements kept for analysis\n", Ngood);61 if (verbose) fprintf (stderr, OFF_T_FMT" measurements marked by area\n", Narea); 62 if (verbose) fprintf (stderr, OFF_T_FMT" measurements marked nocal\n", Nnocal); 63 if (verbose) fprintf (stderr, OFF_T_FMT" measurements kept for analysis\n", Ngood); 64 64 return (TRUE); 65 65 } -
branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/setMrelFinal.c
r33117 r33364 51 51 52 52 // this sets flags in the measureT element, not the measure element 53 setExclusions (catalog, 1 ); /* mark by area */53 setExclusions (catalog, 1, VERBOSE); /* mark by area */ 54 54 55 55 /* set catalog[0].found[i] = FALSE */
Note:
See TracChangeset
for help on using the changeset viewer.
