IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26817


Ignore:
Timestamp:
Feb 8, 2010, 5:30:35 PM (16 years ago)
Author:
Paul Price
Message:

Use names instead of numbers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/ppImage/src/ppImageDetrendPattern.c

    r26780 r26817  
    3333            }
    3434            if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
    35               ESCAPE(false, "load failure for Cell");
     35              ESCAPE(false, "load failure for Cell");
    3636            }
    3737
     
    4545            }
    4646
    47             bool doPattern = false;
    48             if (!doPatternForView(&doPattern, config, chip, view, RECIPE_NAME, "PATTERN.ROW.SUBSET")) {
    49                 ESCAPE(false, "Unable to determine whether row pattern matching should be applied.");
    50             }
    51             if (!doPattern) continue;
     47            bool doPattern = false;
     48            if (!doPatternForView(&doPattern, config, chip, view, RECIPE_NAME, "PATTERN.ROW.SUBSET")) {
     49                ESCAPE(false, "Unable to determine whether row pattern matching should be applied.");
     50            }
     51            if (!doPattern) continue;
    5252
    53             psLogMsg("ppImage", PS_LOG_INFO, "Performing row pattern correction for %d,%d\n",
    54                      view->chip, view->cell);
     53            const char *chipName = psMetadataLookupStr(NULL, chip->concepts, "CHIP.NAME");
     54            const char *cellName = psMetadataLookupStr(NULL, cell->concepts, "CELL.NAME");
     55            psLogMsg("ppImage", PS_LOG_INFO, "Performing row pattern correction for %s, %s\n",
     56                     chipName, cellName);
    5557
    5658            // process each of the readouts
     
    5860            while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) {
    5961                if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {
    60                     ESCAPE(false, "load failure for Readout");
     62                    ESCAPE(false, "load failure for Readout");
    6163                }
    6264                if (!readout->data_exists) {
     
    8486            view->cell = i;
    8587
    86             bool doPattern = false;
    87             if (!doPatternForView(&doPattern, config, chip, view, RECIPE_NAME, "PATTERN.CELL.SUBSET")) {
    88                 ESCAPE(false, "Unable to determine whether row pattern matching should be applied.");
    89             }
    90             if (doPattern) {
    91                 tweak->data.U8[i] = 0xFF;
    92             }
     88            bool doPattern = false;
     89            if (!doPatternForView(&doPattern, config, chip, view, RECIPE_NAME, "PATTERN.CELL.SUBSET")) {
     90                ESCAPE(false, "Unable to determine whether row pattern matching should be applied.");
     91            }
     92            if (doPattern) {
     93                const char *chipName = psMetadataLookupStr(NULL, chip->concepts, "CHIP.NAME");
     94                const char *cellName = psMetadataLookupStr(NULL, cell->concepts, "CELL.NAME");
     95                psLogMsg("ppImage", PS_LOG_INFO, "Performing cell pattern correction for %s, %s\n",
     96                         chipName, cellName);
     97                tweak->data.U8[i] = 0xFF;
     98            }
    9399        }
    94100
     
    113119    psMetadataItem *doPattern = pmConfigRecipeValueByView(config, recipeName, recipeValue, chip->parent, view);
    114120    if (!doPattern) {
    115         psError(PS_ERR_UNKNOWN, false, "Unable to determine whether row pattern matching should be applied.");
    116         return false;
     121        psError(PS_ERR_UNKNOWN, false, "Unable to determine whether row pattern matching should be applied.");
     122        return false;
    117123    }
    118124    if (doPattern->type == PS_DATA_BOOL) {
    119         *doit = doPattern->data.B;
    120         return true;
     125        *doit = doPattern->data.B;
     126        return true;
    121127    }
    122128    if (doPattern->type == PS_DATA_STRING) {
    123         // expect a string of the form "000110001001" with at least view->cell entries
    124         char *string = doPattern->data.str;
    125         if (strlen(string) < view->cell) {
    126             psError(PS_ERR_UNKNOWN, true, "error in PATTERN.ROW.SUBSET chip string (too few elements %d)", (int) strlen(string));
    127             return false;
    128         }
    129         switch (string[view->cell]) {
    130           case '0':
    131           case 'f':
    132           case 'F':
    133           case 'n':
    134           case 'N':
    135             *doit = false;
    136             return true;
    137           case '1':
    138           case 't':
    139           case 'T':
    140           case 'y':
    141           case 'Y':
    142             *doit = true;
    143             return true;
    144           default:
    145             psError(PS_ERR_UNKNOWN, true, "error in PATTERN.ROW.SUBSET chip string %s (unknown value %c))", string, string[view->cell]);
    146             return false;
    147         }
    148         psAbort("imposible to reach here");
     129        // expect a string of the form "000110001001" with at least view->cell entries
     130        char *string = doPattern->data.str;
     131        if (strlen(string) < view->cell) {
     132            psError(PS_ERR_UNKNOWN, true, "error in PATTERN.ROW.SUBSET chip string (too few elements %d)", (int) strlen(string));
     133            return false;
     134        }
     135        switch (string[view->cell]) {
     136          case '0':
     137          case 'f':
     138          case 'F':
     139          case 'n':
     140          case 'N':
     141            *doit = false;
     142            return true;
     143          case '1':
     144          case 't':
     145          case 'T':
     146          case 'y':
     147          case 'Y':
     148            *doit = true;
     149            return true;
     150          default:
     151            psError(PS_ERR_UNKNOWN, true, "error in PATTERN.ROW.SUBSET chip string %s (unknown value %c))", string, string[view->cell]);
     152            return false;
     153        }
     154        psAbort("imposible to reach here");
    149155    }
    150156    psError(PS_ERR_UNKNOWN, true, "error in PATTERN.ROW.SUBSET : invalid data type");
Note: See TracChangeset for help on using the changeset viewer.