IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37578


Ignore:
Timestamp:
Nov 10, 2014, 4:48:17 PM (12 years ago)
Author:
eugene
Message:

use eddie-s rule for selecting cells

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140904/Ohana/src/libdvo/src/flatcorr_io.c

    r33963 r37578  
    183183}
    184184
     185// eddie uses cell_x = (int) (X + X_PAD) / (base + X_PAD)
     186// where base = 600, X_PAD = 8, Y_PAD = 10.  denominator is thus (608,610), whic is (4880/8),(4864/8)
     187// these match Eddie's NCELL_X,Y / CHIP_DX,DY, so I think we are good with this:
     188
     189# define X_PAD 8
     190# define Y_PAD 10
     191
    185192float FlatCorrectionOffset (FlatCorrectionTable *flatcorr, int ID, int X, int Y) {
    186193
     
    191198
    192199  // convert X,Y to Xbin, Ybin:
    193   int Xbin = MAX(MIN(X * flatcorr->image[seq].Nx / flatcorr->image[seq].DX, flatcorr->image[seq].Nx - 1), 0);
    194   int Ybin = MAX(MIN(Y * flatcorr->image[seq].Ny / flatcorr->image[seq].DY, flatcorr->image[seq].Ny - 1), 0);
     200  int Xbin = MAX(MIN((X + X_PAD) * flatcorr->image[seq].Nx / flatcorr->image[seq].DX, flatcorr->image[seq].Nx - 1), 0);
     201  int Ybin = MAX(MIN((Y + Y_PAD) * flatcorr->image[seq].Ny / flatcorr->image[seq].DY, flatcorr->image[seq].Ny - 1), 0);
    195202
    196203  // XXX warn if X,Y are out of range? not super important unless *way* out of range
Note: See TracChangeset for help on using the changeset viewer.