Changeset 28703
- Timestamp:
- Jul 23, 2010, 10:19:15 AM (16 years ago)
- Location:
- branches/eam_branches/ipp-20100621/Ohana/src/relastro
- Files:
-
- 4 edited
-
Makefile (modified) (1 diff)
-
include/relastro.h (modified) (3 diffs)
-
src/ConfigInit.c (modified) (1 diff)
-
src/StarMaps.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100621/Ohana/src/relastro/Makefile
r28184 r28703 58 58 $(SRC)/CoordOps.$(ARCH).o \ 59 59 $(SRC)/FixProblemImages.$(ARCH).o \ 60 $(SRC)/StarMaps.$(ARCH).o \ 60 61 $(SRC)/high_speed_catalogs.$(ARCH).o \ 61 62 $(SRC)/high_speed_objects.$(ARCH).o \ -
branches/eam_branches/ipp-20100621/Ohana/src/relastro/include/relastro.h
r28184 r28703 145 145 int DoUpdateChips; 146 146 int DoUpdateMosaics; 147 148 // StarMap parameters: 149 int NX_MAP; 150 int NY_MAP; 151 double DPOS_MAX; 147 152 148 153 /*** relphot prototypes ***/ … … 293 298 StarData *getImageRef (Catalog *catalog, int Ncatalog, off_t im, off_t *Nstars, CoordMode mode); 294 299 StarData *getImageRaw (Catalog *catalog, int Ncatalog, off_t im, off_t *Nstars, CoordMode mode); 300 off_t getImageByID (off_t ID); 295 301 296 302 Mosaic *getmosaics (off_t *N); … … 331 337 int high_speed_objects (SkyRegion *region, Catalog *catalog); 332 338 int MeasMatchesPhotcode(Measure *measure, PhotCode **photcodeSet, int Nset); 339 340 int initStarMaps (); 341 int updateStarMaps(Catalog *catalog); 342 int createStarMapPoints(); 343 int checkStarMap(int N); -
branches/eam_branches/ipp-20100621/Ohana/src/relastro/src/ConfigInit.c
r25757 r28703 32 32 GetConfig (config, "PM_TOOFEW", "%d", 0, &PM_TOOFEW); 33 33 GetConfig (config, "POS_TOOFEW", "%d", 0, &POS_TOOFEW); 34 35 GetConfig (config, "RELASTRO_MAP_NX", "%d", 0, &NX_MAP); 36 GetConfig (config, "RELASTRO_MAP_NY", "%d", 0, &NY_MAP); 37 GetConfig (config, "RELASTRO_DPOS_MAX", "%lf", 0, &DPOS_MAX); 34 38 35 39 GetConfig (config, "GSCFILE", "%s", 0, GSCFILE); -
branches/eam_branches/ipp-20100621/Ohana/src/relastro/src/StarMaps.c
r28695 r28703 26 26 27 27 static StarMap *starmap; 28 static int Nstarmap; 28 // static int Nstarmap; -- is it always == Nimages? 29 29 30 30 /** we have two possible options for how the user defines the map bins: … … 56 56 57 57 Image *images; 58 off_t i, Nimages; 58 off_t i, N, Nimages; 59 int xbin, ybin; 59 60 60 61 images = getimages(&Nimages); … … 81 82 Image *images; 82 83 off_t i, Nimages; 84 int ix, iy; 83 85 84 86 images = getimages(&Nimages); … … 91 93 for (ix = 0; ix < NX_MAP; ix++) { 92 94 for (iy = 0; iy < NY_MAP; iy++) { 93 if (starmap[i].stars[iy bin*NX_BAP + ixbin] < 1) continue;95 if (starmap[i].stars[iy*NX_MAP + ix] < 1) continue; 94 96 StarMapPoint *point = &starmap[i].points[starmap[i].Npoints]; 95 97 starmap[i].Npoints++; 96 98 97 99 // set the pixel coordinates 98 point[0].X = ix bin* NX_MAP; // XXX fix 0.5 pixel offset99 point[0].Y = iy bin* NY_MAP; // XXX fix 0.5 pixel offset100 point[0].X = ix * NX_MAP; // XXX fix 0.5 pixel offset 101 point[0].Y = iy * NY_MAP; // XXX fix 0.5 pixel offset 100 102 101 103 // set the transformed coordinates 102 XY_to_LM (&point[0].L, &point[0].M, point[0].X, point[0].Y, &image [i].coords);104 XY_to_LM (&point[0].L, &point[0].M, point[0].X, point[0].Y, &images[i].coords); 103 105 104 106 point[0].dL = 0.0; … … 124 126 125 127 // set the transformed coordinates 126 XY_to_LM (&L, &M, starmap[N].point [i].X, starmap[N].point[i].Y, &image[N].coords);128 XY_to_LM (&L, &M, starmap[N].points[i].X, starmap[N].points[i].Y, &images[N].coords); 127 129 128 starmap[N].point [i].dL = starmap[N].point[i].L - L;129 starmap[N].point [i].dM = starmap[N].point[i].M - M;130 starmap[N].points[i].dL = starmap[N].points[i].L - L; 131 starmap[N].points[i].dM = starmap[N].points[i].M - M; 130 132 131 dLmax = MAX(starmap[N].point [i].dL, dLmax);132 dMmax = MAX(starmap[N].point [i].dM, dMmax);133 dLmax = MAX(starmap[N].points[i].dL, dLmax); 134 dMmax = MAX(starmap[N].points[i].dM, dMmax); 133 135 } 134 136 135 if (dLmax > XXX) return (FALSE); 136 if (dMmax > XXX) return (FALSE); 137 // XXX these need to be set somehow 138 if (dLmax > DPOS_MAX) return (FALSE); 139 if (dMmax > DPOS_MAX) return (FALSE); 137 140 return (TRUE); 138 141 }
Note:
See TracChangeset
for help on using the changeset viewer.
