IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 7, 2021, 4:11:39 PM (5 years ago)
Author:
eugene
Message:

add options to allow PS1, PS2, Megacam, HSC grids to be independently set

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/relphot.20210521/src/GridOps.c

    r41637 r41646  
    1919static int                 NGridCorr = 0;
    2020
    21 # if (1)
     21# if (0)
    2222/* PS1 / PS2 values */
    2323# define NX_CHIP 4900
     
    2525# define NX_BIN 16
    2626# define NY_BIN 16
    27 # else
     27# endif
     28
    2829/* test values */
    29 # define NX_CHIP 1000
    30 # define NY_CHIP 1000
    31 # define NX_BIN 2
    32 # define NY_BIN 2
    33 # endif
     30# define NX_CHIP_DEFAULT 1000
     31# define NY_CHIP_DEFAULT 1000
     32# define NX_BIN_DEFAULT 2
     33# define NY_BIN_DEFAULT 2
    3434
    3535void initGridBins (void) {
     
    141141    if (!code) continue;
    142142
     143    int NX_CHIP = NX_CHIP_DEFAULT;
     144    int NY_CHIP = NY_CHIP_DEFAULT;
     145    int NX_BIN  = NX_BIN_DEFAULT;
     146    int NY_BIN  = NY_BIN_DEFAULT;
     147    if (isGPC1chip(code)) { NX_CHIP = 4900; NY_CHIP = 4900; NX_BIN = NY_BIN = GRID_BIN_GPC1; }
     148    if (isGPC2chip(code)) { NX_CHIP = 4900; NY_CHIP = 4900; NX_BIN = NY_BIN = GRID_BIN_GPC2; }
     149    if (isHSCchip(code))  { NX_CHIP = 2100; NY_CHIP = 4200; NX_BIN = NY_BIN = GRID_BIN_HSC;  }
     150    if (isCFHchip(code))  { NX_CHIP = 2100; NY_CHIP = 4200; NX_BIN = NY_BIN = GRID_BIN_CFH;  }
     151
    143152    if (GridCorr[code]) continue; // already created this one
    144153
     
    150159    GridCorr[code]->Ny = NY_BIN;
    151160    GridCorr[code]->dX = NX_BIN / (float) NX_CHIP;
    152     GridCorr[code]->dY = NY_BIN / (float) NX_CHIP;
     161    GridCorr[code]->dY = NY_BIN / (float) NY_CHIP;
    153162
    154163    // we are normally accessing this array randomly, so there is no advantage to
Note: See TracChangeset for help on using the changeset viewer.