Changeset 12264
- Timestamp:
- Mar 5, 2007, 6:46:48 PM (19 years ago)
- Location:
- trunk/psModules/src/detrend
- Files:
-
- 2 edited
-
pmShifts.c (modified) (11 diffs)
-
pmShifts.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/detrend/pmShifts.c
r12191 r12264 13 13 14 14 #define SHIFTS_BUFFER 100 // Buffer size for shifts 15 #define TABLE_NAME "SHIFTS.TABLE" // Name for table on the analysis metadata16 #define KERNEL_NAME "SHIFTS.KERNEL" // Name for kernel on the analysis metadata17 15 #define TRACE "psModules.detrend" // Trace facility 18 16 #define FFT_SIZE 25 // Size at which we use FFT instead of direct convolution … … 74 72 75 73 bool mdok; // Status of MD lookup 76 pmShifts *check = psMetadataLookupPtr(&mdok, cell->analysis, TABLE_NAME); // Table, or NULL74 pmShifts *check = psMetadataLookupPtr(&mdok, cell->analysis, PM_SHIFTS_TABLE_NAME); // Table, or NULL 77 75 if (check) { 78 76 psTrace(TRACE, 2, "Cell already has OT kernel present.\n"); … … 298 296 if (phuLevel == PM_FPA_LEVEL_CELL) { 299 297 // 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, 301 299 "Orthogonal transfer shifts", singleShifts); 302 300 psFree(singleShifts); … … 336 334 } 337 335 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)) { 339 337 // Already has a shifts table, for some reason 340 338 psWarning("Chip %s, cell %s already has a shifts table --- overwriting\n", … … 343 341 344 342 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, 346 344 PS_DATA_KERNEL | PS_META_REPLACE, 347 345 "Orthogonal transfer shifts", vectors); … … 361 359 } 362 360 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)) { 364 362 // Already has a shifts table, for some reason 365 363 psWarning("Cell %s already has a shifts table --- overwriting\n", name); … … 367 365 368 366 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, 370 368 PS_DATA_KERNEL | PS_META_REPLACE, 371 369 "Orthogonal transfer shifts", vectors); … … 393 391 394 392 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); 396 394 if (!shifts) { 397 395 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find shifts table for cell.\n"); … … 405 403 return false; 406 404 } 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, 408 406 "Orthogonal transfer kernel, calculated from shifts", kernel); 409 407 psFree(kernel); … … 418 416 419 417 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); 421 419 if (!kernel) { 422 420 // 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)) { 424 422 if (!pmShiftsKernel(source)) { 425 423 psError(PS_ERR_UNKNOWN, false, "Unable to generate shifts kernel."); … … 427 425 } 428 426 // Hopefully it's there now 429 kernel = psMetadataLookupPtr(&mdok, source->analysis, KERNEL_NAME);427 kernel = psMetadataLookupPtr(&mdok, source->analysis, PM_SHIFTS_KERNEL_NAME); 430 428 if (!kernel) { 431 429 psError(PS_ERR_UNKNOWN, false, "Unable to find shifts kernel."); -
trunk/psModules/src/detrend/pmShifts.h
r12192 r12264 4 4 #include <pslib.h> 5 5 #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 6 9 7 10 /// Shifts due to orthogonal transfer
Note:
See TracChangeset
for help on using the changeset viewer.
