- Timestamp:
- Nov 26, 2010, 10:47:07 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101103/ppImage/src/ppImageDetrendNonLinear.c
r11702 r29851 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.
