IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12264


Ignore:
Timestamp:
Mar 5, 2007, 6:46:48 PM (19 years ago)
Author:
Paul Price
Message:

Putting metadata key names into #define in header file, so that other files can access as well.

Location:
trunk/psModules/src/detrend
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmShifts.c

    r12191 r12264  
    1313
    1414#define SHIFTS_BUFFER 100               // Buffer size for shifts
    15 #define TABLE_NAME "SHIFTS.TABLE"       // Name for table on the analysis metadata
    16 #define KERNEL_NAME "SHIFTS.KERNEL"     // Name for kernel on the analysis metadata
    1715#define TRACE "psModules.detrend"       // Trace facility
    1816#define FFT_SIZE 25                     // Size at which we use FFT instead of direct convolution
     
    7472
    7573    bool mdok;                          // Status of MD lookup
    76     pmShifts *check = psMetadataLookupPtr(&mdok, cell->analysis, TABLE_NAME); // Table, or NULL
     74    pmShifts *check = psMetadataLookupPtr(&mdok, cell->analysis, PM_SHIFTS_TABLE_NAME); // Table, or NULL
    7775    if (check) {
    7876        psTrace(TRACE, 2, "Cell already has OT kernel present.\n");
     
    298296    if (phuLevel == PM_FPA_LEVEL_CELL) {
    299297        // Only a single cell
    300         psMetadataAddPtr(cell->analysis, PS_LIST_TAIL, TABLE_NAME, PS_DATA_KERNEL,
     298        psMetadataAddPtr(cell->analysis, PS_LIST_TAIL, PM_SHIFTS_TABLE_NAME, PS_DATA_KERNEL,
    301299                         "Orthogonal transfer shifts", singleShifts);
    302300        psFree(singleShifts);
     
    336334                      }
    337335                      pmCell *cell = chip->cells->data[cellNum]; // Cell of interest
    338                       if (psMetadataLookup(cell->analysis, TABLE_NAME)) {
     336                      if (psMetadataLookup(cell->analysis, PM_SHIFTS_TABLE_NAME)) {
    339337                          // Already has a shifts table, for some reason
    340338                          psWarning("Chip %s, cell %s already has a shifts table --- overwriting\n",
     
    343341
    344342                      pmShifts *vectors = psHashLookup(cells, cellName); // Shifts for the cell of interest
    345                       psMetadataAddPtr(cell->analysis, PS_LIST_TAIL, TABLE_NAME,
     343                      psMetadataAddPtr(cell->analysis, PS_LIST_TAIL, PM_SHIFTS_TABLE_NAME,
    346344                                       PS_DATA_KERNEL | PS_META_REPLACE,
    347345                                       "Orthogonal transfer shifts", vectors);
     
    361359                  }
    362360                  pmCell *cell = chip->cells->data[cellNum]; // Cell of interest
    363                   if (psMetadataLookup(cell->analysis, TABLE_NAME)) {
     361                  if (psMetadataLookup(cell->analysis, PM_SHIFTS_TABLE_NAME)) {
    364362                      // Already has a shifts table, for some reason
    365363                      psWarning("Cell %s already has a shifts table --- overwriting\n", name);
     
    367365
    368366                  pmShifts *vectors = psHashLookup(multipleShifts, name); // Shifts for this cell
    369                   psMetadataAddPtr(cell->analysis, PS_LIST_TAIL, TABLE_NAME,
     367                  psMetadataAddPtr(cell->analysis, PS_LIST_TAIL, PM_SHIFTS_TABLE_NAME,
    370368                                   PS_DATA_KERNEL | PS_META_REPLACE,
    371369                                   "Orthogonal transfer shifts", vectors);
     
    393391
    394392    bool mdok;                          // Status of MD lookup
    395     pmShifts *shifts = psMetadataLookupPtr(&mdok, cell->analysis, TABLE_NAME);
     393    pmShifts *shifts = psMetadataLookupPtr(&mdok, cell->analysis, PM_SHIFTS_TABLE_NAME);
    396394    if (!shifts) {
    397395        psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find shifts table for cell.\n");
     
    405403        return false;
    406404    }
    407     psMetadataAddPtr(cell->analysis, PS_LIST_TAIL, KERNEL_NAME, PS_DATA_KERNEL,
     405    psMetadataAddPtr(cell->analysis, PS_LIST_TAIL, PM_SHIFTS_KERNEL_NAME, PS_DATA_KERNEL,
    408406                     "Orthogonal transfer kernel, calculated from shifts", kernel);
    409407    psFree(kernel);
     
    418416
    419417    bool mdok;                          // Status of MD lookup
    420     psKernel *kernel = psMetadataLookupPtr(&mdok, source->analysis, KERNEL_NAME);
     418    psKernel *kernel = psMetadataLookupPtr(&mdok, source->analysis, PM_SHIFTS_KERNEL_NAME);
    421419    if (!kernel) {
    422420        // Maybe they just forgot to generate the kernel with pmShiftsKernel
    423         if (psMetadataLookup(source->analysis, TABLE_NAME)) {
     421        if (psMetadataLookup(source->analysis, PM_SHIFTS_TABLE_NAME)) {
    424422            if (!pmShiftsKernel(source)) {
    425423                psError(PS_ERR_UNKNOWN, false, "Unable to generate shifts kernel.");
     
    427425            }
    428426            // Hopefully it's there now
    429             kernel = psMetadataLookupPtr(&mdok, source->analysis, KERNEL_NAME);
     427            kernel = psMetadataLookupPtr(&mdok, source->analysis, PM_SHIFTS_KERNEL_NAME);
    430428            if (!kernel) {
    431429                psError(PS_ERR_UNKNOWN, false, "Unable to find shifts kernel.");
  • trunk/psModules/src/detrend/pmShifts.h

    r12192 r12264  
    44#include <pslib.h>
    55#include "pmFPA.h"
     6
     7#define PM_SHIFTS_TABLE_NAME "SHIFTS.TABLE" ///< Name for table on the analysis metadata
     8#define PM_SHIFTS_KERNEL_NAME "SHIFTS.KERNEL" ///< Name for kernel on the analysis metadata
    69
    710/// Shifts due to orthogonal transfer
Note: See TracChangeset for help on using the changeset viewer.