IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 12, 2015, 12:29:24 PM (12 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-pv3-20140717-merge/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-pv3-20140717-merge/Ohana

  • branches/eam_branches/ipp-pv3-20140717-merge/Ohana/src/libdvo/src/TessellationTable.c

    r36490 r37822  
    2828    tess[i].dPix = NAN;
    2929
    30     tess[i].dX = 0;
    31     tess[i].dY = 0;
    32 
    33     tess[i].NX_SUB = 0;
    34     tess[i].NY_SUB = 0;
     30    tess[i].dX = NAN;
     31    tess[i].dY = NAN;
     32
     33    tess[i].NX_SUB = NAN;
     34    tess[i].NY_SUB = NAN;
    3535
    3636    tess[i].basename = NULL;
     
    123123  GET_COLUMN_NEW(Xo,     "X_CENT", double);
    124124  GET_COLUMN_NEW(Yo,     "Y_CENT", double);
    125   GET_COLUMN_NEW(dX,     "X_GRID", int);
    126   GET_COLUMN_NEW(dY,     "Y_GRID", int);
     125  GET_COLUMN_NEW(dX,     "X_GRID", float);
     126  GET_COLUMN_NEW(dY,     "Y_GRID", float);
    127127  GET_COLUMN_NEW(Rmin,   "R_MIN",  double);
    128128  GET_COLUMN_NEW(Rmax,   "R_MAX",  double);
     
    130130  GET_COLUMN_NEW(Dmax,   "D_MAX",  double);
    131131  GET_COLUMN_NEW(dPix,   "SCALE",  double);
    132   GET_COLUMN_NEW(NX_SUB, "NX_SUB", int);
    133   GET_COLUMN_NEW(NY_SUB, "NY_SUB", int);
     132  GET_COLUMN_NEW(NX_SUB, "NX_SUB", float);
     133  GET_COLUMN_NEW(NY_SUB, "NY_SUB", float);
    134134  GET_COLUMN_NEW(TYPE,   "TYPE",   int);
    135135
     
    280280    gfits_modify (&header, "DEC_OFF", "%lf", 1, rings->DEC_offset);
    281281
    282     gfits_modify (&header, "NX_SUB", "%d", 1, rings->NX_SUB);
    283     gfits_modify (&header, "NY_SUB", "%d", 1, rings->NY_SUB);
     282    gfits_modify (&header, "NX_SUB", "%f", 1, rings->NX_SUB);
     283    gfits_modify (&header, "NY_SUB", "%f", 1, rings->NY_SUB);
    284284    gfits_modify (&header, "PIXSCALE", "%lf", 1, rings->dPix);
    285285  }
     
    300300  gfits_define_bintable_column (&theader, "D", "X_CENT", "projection cell center pixel", "none", 1.0, 0.0);
    301301  gfits_define_bintable_column (&theader, "D", "Y_CENT", "projection cell center pixel", "none", 1.0, 0.0);
    302   gfits_define_bintable_column (&theader, "J", "X_GRID", "skycell grid spacing", "none", 1.0, 0.0);
    303   gfits_define_bintable_column (&theader, "J", "Y_GRID", "skycell grid spacing", "none", 1.0, 0.0);
     302  gfits_define_bintable_column (&theader, "E", "X_GRID", "skycell grid spacing", "none", 1.0, 0.0);
     303  gfits_define_bintable_column (&theader, "E", "Y_GRID", "skycell grid spacing", "none", 1.0, 0.0);
    304304  gfits_define_bintable_column (&theader, "D", "R_MIN",  "RA limit (lower)", "none", 1.0, 0.0);
    305305  gfits_define_bintable_column (&theader, "D", "R_MAX",  "RA limit (upper)", "none", 1.0, 0.0);
     
    307307  gfits_define_bintable_column (&theader, "D", "D_MAX",  "DEC limit (upper)", "none", 1.0, 0.0);
    308308  gfits_define_bintable_column (&theader, "D", "SCALE",  "pixel scale for projection cell", "none", 1.0, 0.0);
    309   gfits_define_bintable_column (&theader, "J", "NX_SUB", "skycell subdivision in x", "none", 1.0, 0.0);
    310   gfits_define_bintable_column (&theader, "J", "NY_SUB", "skycell subdivision in y", "none", 1.0, 0.0);
     309  gfits_define_bintable_column (&theader, "E", "NX_SUB", "skycell subdivision in x", "none", 1.0, 0.0);
     310  gfits_define_bintable_column (&theader, "E", "NY_SUB", "skycell subdivision in y", "none", 1.0, 0.0);
    311311  gfits_define_bintable_column (&theader, "J", "TYPE",   "type of tessellation", "none", 1.0, 0.0);
    312312
     
    330330  double *Xo            ; ALLOCATE (Xo    ,    double, Nout);
    331331  double *Yo            ; ALLOCATE (Yo    ,    double, Nout);
    332   int    *dX            ; ALLOCATE (dX    ,    int,    Nout);
    333   int    *dY            ; ALLOCATE (dY    ,    int,    Nout);
     332  float  *dX            ; ALLOCATE (dX    ,    float,  Nout);
     333  float  *dY            ; ALLOCATE (dY    ,    float,  Nout);
    334334  double *Rmin          ; ALLOCATE (Rmin  ,    double, Nout);
    335335  double *Rmax          ; ALLOCATE (Rmax  ,    double, Nout);
     
    337337  double *Dmax          ; ALLOCATE (Dmax  ,    double, Nout);
    338338  double *dPix          ; ALLOCATE (dPix  ,    double, Nout);
    339   int    *NX_SUB        ; ALLOCATE (NX_SUB,    int,    Nout);
    340   int    *NY_SUB        ; ALLOCATE (NY_SUB,    int,    Nout);
     339  float  *NX_SUB        ; ALLOCATE (NX_SUB,    float,  Nout);
     340  float  *NY_SUB        ; ALLOCATE (NY_SUB,    float,  Nout);
    341341  int    *TYPE          ; ALLOCATE (TYPE,      int,    Nout);
    342342
     
    559559    int xi = x / tess[myTess].tree->dX[zone][band];
    560560    int yi = y / tess[myTess].tree->dY[zone][band];
     561
     562    xi = MAX(MIN(xi, tess[myTess].tree->NX_SUB - 1.0), 0);
     563    yi = MAX(MIN(yi, tess[myTess].tree->NY_SUB - 1.0), 0);
     564
    561565    int N = xi + tess[myTess].tree->NX_SUB * yi;
    562566 
Note: See TracChangeset for help on using the changeset viewer.