IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 23, 2008, 11:39:37 AM (18 years ago)
Author:
Paul Price
Message:

Adding binned JPEG outputs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubReadout.c

    r19692 r19698  
    568568                     "Subtraction input", inFile->filename);
    569569
     570
     571    // Generate binned JPEGs
     572    {
     573        int bin1 = psMetadataLookupS32(NULL, recipe, "BIN1"); // First binning level
     574        int bin2 = psMetadataLookupS32(NULL, recipe, "BIN2"); // Second binning level
     575
     576        // Target cells
     577        pmCell *cell1 = pmFPAfileThisCell(config->files, view, "PPSUB.OUTPUT.JPEG1");
     578        pmCell *cell2 = pmFPAfileThisCell(config->files, view, "PPSUB.OUTPUT.JPEG2");
     579
     580        pmReadout *ro1 = pmReadoutAlloc(cell1), *ro2 = pmReadoutAlloc(cell2); // Binned readouts
     581        if (!pmReadoutRebin(ro1, outRO, maskBad, bin1, bin1) || !pmReadoutRebin(ro2, ro1, 0, bin2, bin2)) {
     582            psError(PS_ERR_UNKNOWN, false, "Unable to bin output.");
     583            psFree(ro1);
     584            psFree(ro2);
     585            psFree(outRO);
     586            return false;
     587        }
     588        psFree(ro1);
     589        psFree(ro2);
     590    }
     591
    570592    psFree(outRO);
    571593
Note: See TracChangeset for help on using the changeset viewer.