Changeset 37664
- Timestamp:
- Nov 23, 2014, 5:04:15 AM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140904/Ohana/src
- Files:
-
- 9 edited
-
libdvo/include/dvo.h (modified) (1 diff)
-
libdvo/include/libdvo_astro.h (modified) (1 diff)
-
libdvo/src/AstromOffsetMapUtils.c (modified) (1 diff)
-
libdvo/src/RegionHostTable.c (modified) (1 diff)
-
relastro/include/relastro.h (modified) (1 diff)
-
relastro/src/assign_images.c (modified) (2 diffs)
-
relastro/src/launch_region_hosts.c (modified) (1 diff)
-
relastro/src/share_images_pos.c (modified) (4 diffs)
-
relphot/src/ImageTable.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140904/Ohana/src/libdvo/include/dvo.h
r37652 r37664 306 306 Image *image; 307 307 off_t *imseq; 308 309 AstromOffsetTable *astromTable; 308 310 309 311 int *neighbors; // list of neighbor index values -
branches/eam_branches/ipp-20140904/Ohana/src/libdvo/include/libdvo_astro.h
r37572 r37664 173 173 AstromOffsetTable *AstromOffsetTableInit(); 174 174 void AstromOffsetTableFree(AstromOffsetTable *table); 175 int AstromOffsetTableAddMapFromImage (AstromOffsetTable *table, Image *image); 175 176 176 177 # endif -
branches/eam_branches/ipp-20140904/Ohana/src/libdvo/src/AstromOffsetMapUtils.c
r37575 r37664 122 122 } 123 123 124 int AstromOffsetTableAddMapFromImage (AstromOffsetTable *table, Image *image) { 125 126 int Nmap = table->Nmap; 127 128 table->Nmap++; 129 REALLOCATE (table->map, AstromOffsetMap *, table->Nmap); 130 131 // find the imageID and update the IDtoSeq allocation if needed 132 off_t i; 133 if (image->imageID > table->MaxImageID) { 134 int oldMaxID = table->MaxImageID; 135 table->MaxImageID = image->imageID; 136 REALLOCATE (table->IDtoSeq, int, table->MaxImageID + 1); 137 for (i = oldMaxID + 1; i < table->MaxImageID + 1; i++) { 138 table->IDtoSeq[i] = -1; 139 } 140 } 141 myAssert (table->IDtoSeq[image->imageID] == -1, "table IDtoSeq not initiazed or image collision"); 142 table->IDtoSeq[image->imageID] = Nmap; 143 144 table->map[Nmap] = image[0].coords.offsetMap; 145 return TRUE; 146 } 147 124 148 AstromOffsetTable *AstromOffsetTableInit() { 125 149 -
branches/eam_branches/ipp-20140904/Ohana/src/libdvo/src/RegionHostTable.c
r36630 r37664 31 31 hosts[i].Nneighbors = 0; 32 32 hosts[i].isNeighbor = FALSE; 33 34 hosts[i].astromTable = NULL; 33 35 } 34 36 return; -
branches/eam_branches/ipp-20140904/Ohana/src/relastro/include/relastro.h
r37663 r37664 583 583 int save_astrom_table (); 584 584 AstromOffsetTable *get_astrom_table (); 585 void put_astrom_table (AstromOffsetTable *myTable); 585 586 586 587 int fit_map (AstromOffsetMap *map, StarData *raw, StarData *ref, int Npts); -
branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/assign_images.c
r37662 r37664 23 23 BuildChipMatch (image, Nimage); 24 24 MARKTIME("build chip match for %d images: %f sec\n", (int) Nimage, dtime); 25 26 char mapfile[DVO_MAX_PATH]; 27 snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR); 28 AstromOffsetTable *table = AstromOffsetMapLoad (mapfile, VERBOSE); 29 30 // assign images.coords.offsetMap -> table->map[i] 31 if (table) { 32 AstromOffsetTableMatchChips (image, Nimage, table); 33 } else { 34 table = AstromOffsetTableInit (); 35 } 36 put_astrom_table (table); 25 37 26 38 initMosaics (image, Nimage); … … 160 172 host->astromTable = AstromOffsetTableInit(); 161 173 } 162 AstromOffsetTableAddMapFromImage(host->astromTable, image[j]);174 AstromOffsetTableAddMapFromImage(host->astromTable, &image[j]); 163 175 } 164 176 } -
branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/launch_region_hosts.c
r37662 r37664 66 66 67 67 // write the image subset for this host 68 AstromOffsetMap TableSave (host->astromTable, mapname);68 AstromOffsetMapSave (host->astromTable, mapname); 69 69 } 70 70 -
branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/share_images_pos.c
r37662 r37664 41 41 42 42 // write the image subset for this host 43 AstromOffsetMap TableSave (table, mapname);43 AstromOffsetMapSave (table, mapname); 44 44 } 45 45 … … 53 53 int slurp_image_pos (RegionHostTable *regionHosts, int nloop) { 54 54 55 off_t Nimage, i ;55 off_t Nimage, i, j; 56 56 Image *images = getimages (&Nimage, NULL); 57 57 … … 95 95 // load the astrometry offset maps, if they exist, and apply 96 96 for (i = 0; i < regionHosts->Nhosts; i++) { 97 if (regionHosts->hosts[i].hostID == REGION_HOST_ID) continue; 98 if (REGION_HOST_ID && !regionHosts->hosts[i].isNeighbor) continue; 99 97 100 char mapname[1024]; 98 101 snprintf (mapname, 1024, "%s/AstroMapUpdate.%d.fits", CATDIR, regionHosts->hosts[i].hostID); … … 103 106 for (j = 0; j < table->Nmap; j++) { 104 107 off_t seq = getImageByID (table->map[j][0].imageID); 108 // I do not necessarily own all images listed in the table. skip if not found 109 if (seq < 0) continue; 110 105 111 images[seq].coords.offsetMap = table->map[j]; 106 112 // is this sufficient? -
branches/eam_branches/ipp-20140904/Ohana/src/relphot/src/ImageTable.c
r37593 r37664 32 32 } 33 33 34 // XXX do not make the chip match -- we have not loaded the PHU entries 34 // XXX do not make the chip match -- we have not loaded the PHU entries (and do not need them here) 35 35 // BuildChipMatch (image, Nimage); 36 36
Note:
See TracChangeset
for help on using the changeset viewer.
