IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28703


Ignore:
Timestamp:
Jul 23, 2010, 10:19:15 AM (16 years ago)
Author:
eugene
Message:

relastro now compiles with new StarMap feature

Location:
branches/eam_branches/ipp-20100621/Ohana/src/relastro
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100621/Ohana/src/relastro/Makefile

    r28184 r28703  
    5858$(SRC)/CoordOps.$(ARCH).o            \
    5959$(SRC)/FixProblemImages.$(ARCH).o    \
     60$(SRC)/StarMaps.$(ARCH).o    \
    6061$(SRC)/high_speed_catalogs.$(ARCH).o  \
    6162$(SRC)/high_speed_objects.$(ARCH).o  \
  • branches/eam_branches/ipp-20100621/Ohana/src/relastro/include/relastro.h

    r28184 r28703  
    145145int DoUpdateChips;
    146146int DoUpdateMosaics;
     147
     148// StarMap parameters:
     149int NX_MAP;
     150int NY_MAP;
     151double DPOS_MAX;
    147152
    148153/*** relphot prototypes ***/
     
    293298StarData *getImageRef (Catalog *catalog, int Ncatalog, off_t im, off_t *Nstars, CoordMode mode);
    294299StarData *getImageRaw (Catalog *catalog, int Ncatalog, off_t im, off_t *Nstars, CoordMode mode);
     300off_t getImageByID (off_t ID);
    295301
    296302Mosaic *getmosaics (off_t *N);
     
    331337int high_speed_objects (SkyRegion *region, Catalog *catalog);
    332338int MeasMatchesPhotcode(Measure *measure, PhotCode **photcodeSet, int Nset);
     339
     340int initStarMaps ();
     341int updateStarMaps(Catalog *catalog);
     342int createStarMapPoints();
     343int checkStarMap(int N);
  • branches/eam_branches/ipp-20100621/Ohana/src/relastro/src/ConfigInit.c

    r25757 r28703  
    3232  GetConfig (config, "PM_TOOFEW",              "%d",  0, &PM_TOOFEW);
    3333  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);
    3438
    3539  GetConfig (config, "GSCFILE",                "%s",  0, GSCFILE);
  • branches/eam_branches/ipp-20100621/Ohana/src/relastro/src/StarMaps.c

    r28695 r28703  
    2626
    2727static StarMap     *starmap;         
    28 static int         Nstarmap;
     28// static int         Nstarmap;  -- is it always == Nimages?
    2929
    3030/** we have two possible options for how the user defines the map bins:
     
    5656
    5757  Image *images;
    58   off_t i, Nimages;
     58  off_t i, N, Nimages;
     59  int xbin, ybin;
    5960
    6061  images = getimages(&Nimages);
     
    8182  Image *images;
    8283  off_t i, Nimages;
     84  int ix, iy;
    8385
    8486  images = getimages(&Nimages);
     
    9193    for (ix = 0; ix < NX_MAP; ix++) {
    9294      for (iy = 0; iy < NY_MAP; iy++) {
    93         if (starmap[i].stars[iybin*NX_BAP + ixbin] < 1) continue;
     95        if (starmap[i].stars[iy*NX_MAP + ix] < 1) continue;
    9496        StarMapPoint *point = &starmap[i].points[starmap[i].Npoints];
    9597        starmap[i].Npoints++;
    9698
    9799        // set the pixel coordinates
    98         point[0].X = ixbin * NX_MAP; // XXX fix 0.5 pixel offset
    99         point[0].Y = iybin * NY_MAP; // XXX fix 0.5 pixel offset
     100        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
    100102
    101103        // 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);
    103105
    104106        point[0].dL = 0.0;
     
    124126
    125127    // 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);
    127129
    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;
    130132
    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);
    133135  }
    134136
    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);
    137140  return (TRUE);
    138141}
Note: See TracChangeset for help on using the changeset viewer.