Changeset 23719 for branches/pap/ppSub/src/ppSubReadoutUpdate.c
- Timestamp:
- Apr 6, 2009, 6:52:51 PM (17 years ago)
- Location:
- branches/pap/ppSub/src
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ppSubReadoutUpdate.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/ppSub/src
- Property svn:ignore
-
old new 10 10 stamp-h1 11 11 ppSubKernel 12 ppSubErrorCodes.h 13 ppSubErrorCodes.c
-
- Property svn:ignore
-
branches/pap/ppSub/src/ppSubReadoutUpdate.c
r23711 r23719 20 20 21 21 #include "ppSub.h" 22 23 bool ppSubReadoutUpdate(pmConfig *config, ppSubData *data, const pmFPAview *view)24 {25 psAssert(config, "Require configuration");26 psAssert(view, "Require view");27 28 bool mdok = false; // Status of MD lookup29 30 // Look up recipe values31 psMetadata *recipe = psMetadataLookupMetadata(&mdok, config->recipes, PPSUB_RECIPE); // Recipe for ppSim32 psAssert(recipe, "We checked this earlier, so it should be here.");33 34 // Generate binned JPEGs35 {36 psImageMaskType maskBad = pmConfigMaskGet("BLANK", config); // Bits to mask for bad pixels37 38 int bin1 = psMetadataLookupS32(NULL, recipe, "BIN1"); // First binning level39 int bin2 = psMetadataLookupS32(NULL, recipe, "BIN2"); // Second binning level40 41 // Target cells42 pmCell *cell1 = pmFPAfileThisCell(config->files, view, "PPSUB.OUTPUT.JPEG1"); // Rebinned cell once43 pmCell *cell2 = pmFPAfileThisCell(config->files, view, "PPSUB.OUTPUT.JPEG2"); // Rebinned cell twice44 45 pmReadout *ro1 = pmReadoutAlloc(cell1), *ro2 = pmReadoutAlloc(cell2); // Binned readouts46 if (!pmReadoutRebin(ro1, outRO, maskBad, bin1, bin1)) {47 psError(PS_ERR_UNKNOWN, false, "Unable to bin output (1st binning)");48 psFree(ro1);49 psFree(ro2);50 return false;51 }52 if (!pmReadoutRebin(ro2, ro1, 0, bin2, bin2)) {53 psError(PS_ERR_UNKNOWN, false, "Unable to bin output (2nd binning)");54 psFree(ro1);55 psFree(ro2);56 return false;57 }58 psFree(ro1);59 psFree(ro2);60 }61 62 return true;63 }
Note:
See TracChangeset
for help on using the changeset viewer.
