Changeset 39487
- Timestamp:
- Mar 27, 2016, 3:21:04 PM (10 years ago)
- Location:
- trunk/Ohana/src/dvolens
- Files:
-
- 3 added
- 8 edited
-
Makefile (modified) (2 diffs)
-
include/dvolens.h (modified) (3 diffs)
-
src/ConfigInit.c (modified) (1 diff)
-
src/WarpImageMaps.c (added)
-
src/args.c (modified) (2 diffs)
-
src/dvolens.c (modified) (1 diff)
-
src/dvolens_client.c (modified) (1 diff)
-
src/load_images.c (added)
-
src/select_images.c (added)
-
src/update_objects.c (modified) (4 diffs)
-
src/update_objects_catalog.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/dvolens/Makefile
r38153 r39487 23 23 24 24 DVOLENS = \ 25 $(SRC)/load_images.$(ARCH).o \ 26 $(SRC)/select_images.$(ARCH).o \ 27 $(SRC)/WarpImageMaps.$(ARCH).o \ 25 28 $(SRC)/ConfigInit.$(ARCH).o \ 26 29 $(SRC)/SetSignals.$(ARCH).o \ … … 39 42 40 43 DVOLENS_CLIENT = \ 44 $(SRC)/load_images.$(ARCH).o \ 45 $(SRC)/select_images.$(ARCH).o \ 46 $(SRC)/WarpImageMaps.$(ARCH).o \ 41 47 $(SRC)/ConfigInit.$(ARCH).o \ 42 48 $(SRC)/SetSignals.$(ARCH).o \ -
trunk/Ohana/src/dvolens/include/dvolens.h
r38986 r39487 27 27 char CATMODE[16]; /* raw, mef, split, mysql */ 28 28 char CATFORMAT[16]; /* internal, elixir, loneos, panstarrs */ 29 char ImageCat[DVO_MAX_PATH]; 29 30 30 31 int HOST_ID; … … 39 40 int UPDATE; 40 41 int NTHREADS; 42 43 int REPAIR_LENSING_IDS; 41 44 42 45 DvoLensMode MODE; … … 82 85 int myIndexSetEntry (myIndexType *myIndex, int value, int entry); 83 86 int myIndexGetEntry (myIndexType *myIndex, int value); 87 88 int FindWarpGroups (void); 89 int RecoverLensingIndex (Average *average, myIndexType *measureIndex, Lensing *lensing); 90 void FreeWarpGroups (void); 91 92 int isGPC1warp (int photcode); 93 94 Image *select_images (SkyList *skylist, Image *timage, off_t Ntimage, off_t *Nimage); 95 96 int load_images (SkyList *skylist); 97 void free_images (void); 98 Image *getimages (off_t *N); 99 off_t getImageByID (off_t ID); 100 -
trunk/Ohana/src/dvolens/src/ConfigInit.c
r39484 r39487 21 21 CATDIR = abspath (tmpcatdir, DVO_MAX_PATH); 22 22 free (tmpcatdir); 23 24 snprintf (ImageCat, DVO_MAX_PATH, "%s/Images.dat", CATDIR); 23 25 24 26 ScanConfig (config, "CATMODE", "%s", 0, CATMODE); -
trunk/Ohana/src/dvolens/src/args.c
r37358 r39487 37 37 if ((N = get_argument (argc, argv, "-vv"))) { 38 38 VERBOSE2 = VERBOSE = TRUE; 39 remove_argument (N, &argc, argv); 40 } 41 42 REPAIR_LENSING_IDS = FALSE; 43 if ((N = get_argument (argc, argv, "-repair-lensing-ids"))) { 44 REPAIR_LENSING_IDS = TRUE; 39 45 remove_argument (N, &argc, argv); 40 46 } … … 162 168 } 163 169 170 REPAIR_LENSING_IDS = FALSE; 171 if ((N = get_argument (argc, argv, "-repair-lensing-ids"))) { 172 REPAIR_LENSING_IDS = TRUE; 173 remove_argument (N, &argc, argv); 174 } 175 164 176 UPDATE = FALSE; 165 177 if ((N = get_argument (argc, argv, "-update"))) { -
trunk/Ohana/src/dvolens/src/dvolens.c
r39484 r39487 13 13 FREE (UserCatalog); 14 14 FREE (CATDIR); 15 free_images(); 16 FreeWarpGroups(); 15 17 ohana_memcheck (VERBOSE); 16 18 ohana_memdump (VERBOSE); -
trunk/Ohana/src/dvolens/src/dvolens_client.c
r39484 r39487 19 19 FREE (HOSTDIR); 20 20 FREE (CATDIR); 21 free_images(); 22 FreeWarpGroups(); 21 23 ohana_memcheck (VERBOSE); 22 24 ohana_memdump (VERBOSE); -
trunk/Ohana/src/dvolens/src/update_objects.c
r39484 r39487 37 37 38 38 if (VERBOSE) fprintf (stderr, "re-loading catalog data\n"); 39 40 // XXX I need to load enough of the images to load the warp groups 41 42 if (REPAIR_LENSING_IDS) { 43 load_images (skylist); 44 FindWarpGroups(); 45 } 39 46 40 47 /* load data from each region file */ … … 150 157 table->hosts[i].pathname = tmppath; 151 158 152 char command[1024]; 153 snprintf (command, 1024, "dvolens_client -update-objects -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f", 154 table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, 155 UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 156 157 // options & configs which affect dvolens_client -update-catalogs 159 char *command = NULL; 160 strextend (&command, "dvolens_client -update-objects"); 161 strextend (&command, "-hostID %d", table->hosts[i].hostID); 162 strextend (&command, "-D CATDIR %s", CATDIR); 163 strextend (&command, "-hostdir %s", table->hosts[i].pathname); 164 strextend (&command, "-region %f %f %f %f", UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax); 165 166 // options & configs which affect dvolens_client -update-catalogs: 158 167 // VERBOSE, VERBOSE2, UPDATE 159 160 char tmpline[1024];161 if (VERBOSE ) { snprintf (tmpline, 1024, "%s -v", command); strcpy (command, tmpline); }162 if ( VERBOSE2) { snprintf (tmpline, 1024, "%s -vv", command); strcpy (command, tmpline); }163 if ( UPDATE) { snprintf (tmpline, 1024, "%s -update", command); strcpy (command, tmpline); }168 169 if (VERBOSE) strextend (&command, "-v"); 170 if (VERBOSE2) strextend (&command, "-vv"); 171 if (UPDATE) strextend (&command, "-update"); 172 if (REPAIR_LENSING_IDS) strextend (&command, "-repair-lensing-ids"); 164 173 165 174 fprintf (stderr, "command: %s\n", command); 166 175 167 176 if (PARALLEL_MANUAL) { 177 free (command); 168 178 continue; 169 179 } … … 185 195 table->hosts[i].pid = pid; // save for future reference 186 196 } 197 free (command); 187 198 } 188 199 … … 198 209 } 199 210 } 211 212 FreeHostTable (table); 200 213 return (TRUE); 201 214 } -
trunk/Ohana/src/dvolens/src/update_objects_catalog.c
r39484 r39487 83 83 84 84 Mj = myIndexGetEntry (measureIndex, lensing->imageID); 85 86 // if we are unable to find a match in the measure table, we may have the wrong 87 // imageID. there was a bug in which we only matched to the correct warp obstime, 88 // but got the wrong skycell. if this is the case, we can try to recover by finding 89 // the set of warps which match our obstime, then choosing the one from that set 90 // which matches one of our warps. 91 if ((Mj < 0) && REPAIR_LENSING_IDS) { 92 Mj = RecoverLensingIndex (average, measureIndex, lensing); 93 } 85 94 myAssert (Mj > -1, "missing index"); 86 95
Note:
See TracChangeset
for help on using the changeset viewer.
