IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19745


Ignore:
Timestamp:
Sep 24, 2008, 1:11:36 PM (18 years ago)
Author:
Paul Price
Message:

Adding generation of JPEGs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackLoop.c

    r19671 r19745  
    2626
    2727// Output files for the combination
    28 static char *combineFiles[] = { "PPSTACK.OUTPUT", "PPSTACK.OUTPUT.MASK", "PPSTACK.OUTPUT.WEIGHT", NULL };
     28static char *combineFiles[] = { "PPSTACK.OUTPUT", "PPSTACK.OUTPUT.MASK", "PPSTACK.OUTPUT.WEIGHT",
     29                                "PPSTACK.OUTPUT.JPEG1", "PPSTACK.OUTPUT.JPEG2", NULL };
    2930
    3031// Files for photometry
     
    952953    memDump("cleanup");
    953954
     955    // Generate binned JPEGs
     956    {
     957        int bin1 = psMetadataLookupS32(NULL, recipe, "BIN1"); // First binning level
     958        int bin2 = psMetadataLookupS32(NULL, recipe, "BIN2"); // Second binning level
     959
     960        // Target cells
     961        pmCell *cell1 = pmFPAfileThisCell(config->files, view, "PPSTACK.OUTPUT.JPEG1");
     962        pmCell *cell2 = pmFPAfileThisCell(config->files, view, "PPSTACK.OUTPUT.JPEG2");
     963        psMaskType maskValue = pmConfigMaskGet("BLANK", config); // Bits to mask
     964
     965        pmReadout *ro1 = pmReadoutAlloc(cell1), *ro2 = pmReadoutAlloc(cell2); // Binned readouts
     966        if (!pmReadoutRebin(ro1, outRO, maskValue, bin1, bin1) || !pmReadoutRebin(ro2, ro1, 0, bin2, bin2)) {
     967            psError(PS_ERR_UNKNOWN, false, "Unable to bin output.");
     968            psFree(ro1);
     969            psFree(ro2);
     970            psFree(outRO);
     971            return false;
     972        }
     973        psFree(ro1);
     974        psFree(ro2);
     975    }
     976
    954977    if (psMetadataLookupBool(&mdok, recipe, "PHOTOMETRY")) {
    955978        psTrace("ppStack", 1, "Photometering stacked image....\n");
Note: See TracChangeset for help on using the changeset viewer.