Changeset 29833 for trunk/ppImage/src/ppImageDetrendNonLinear.c
- Timestamp:
- Nov 25, 2010, 9:45:07 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ppImage/src/ppImageDetrendNonLinear.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/czw_branch/20100817 (added) merged: 28947,29486,29678-29679,29813
- Property svn:mergeinfo changed
-
trunk/ppImage/src/ppImageDetrendNonLinear.c
r11702 r29833 44 44 } 45 45 46 bool ppImageDetrendNonLinear(pmReadout *input, ppImageOptions *options) { 46 47 bool ppImageDetrendNonLinear(pmReadout *input, pmFPAview *detview, pmConfig *config) { 48 bool status; 49 50 pmFPAfile *linearity_file = psMetadataLookupPtr(&status,config->files,"PPIMAGE.LINEARITY"); 51 psFits *linearity_fits = linearity_file->fits; 52 53 char *extname = psMetadataLookupStr(&status,input->parent->concepts,"CELL.NAME"); 54 if (!extname) { 55 psError(PS_ERR_IO, false, "missing CELL.NAME in concepts"); 56 return(false); 57 } 58 59 if (!psFitsMoveExtName(linearity_fits,extname)) { 60 psError(PS_ERR_IO, false, "Unable to move to non-linearity table %s", extname); 61 return(false); 62 } 63 64 psArray *table = psFitsReadTable(linearity_fits); 65 if (!table) { 66 psError(PS_ERR_IO, false, "Unable to read non-linearity table.\n"); 67 return(false); 68 } 69 70 // It might be better to pack lookup table here... 71 // Why? I only use that lookup table once for the single cell it matches. 72 73 if (!pmNonLinearityApply(input,table)) { 74 psError(PS_ERR_UNKNOWN, false, "Unable to apply non-linearity corrections.\n"); 75 psFree (table); 76 return(false); 77 } 78 psFree (table); 79 80 return true; 81 } 82 83 bool ppImageDetrendNonLinear_Original(pmReadout *input, ppImageOptions *options) { 47 84 48 85 psMetadataItem *concept; … … 59 96 60 97 case PS_DATA_METADATA: 61 // XXX EAM: this is somewhat confusing : let's wrap in a function when i understand it62 63 98 // Go looking for the value in the hierarchy 64 99 concept = psMetadataLookup(cell->concepts, options->nonLinearSource);
Note:
See TracChangeset
for help on using the changeset viewer.
