IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 6, 2009, 6:52:51 PM (17 years ago)
Author:
Paul Price
Message:

Making ppSub inverse mode work. Seems to work now --- produces the correct output files for inverse mode on and off, photometry on and off.

Location:
branches/pap/ppSub/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/pap/ppSub/src

    • Property svn:ignore
      •  

        old new  
        1010stamp-h1
        1111ppSubKernel
         12ppSubErrorCodes.h
         13ppSubErrorCodes.c
  • branches/pap/ppSub/src/ppSubReadoutUpdate.c

    r23711 r23719  
    2020
    2121#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 lookup
    29 
    30     // Look up recipe values
    31     psMetadata *recipe = psMetadataLookupMetadata(&mdok, config->recipes, PPSUB_RECIPE); // Recipe for ppSim
    32     psAssert(recipe, "We checked this earlier, so it should be here.");
    33 
    34     // Generate binned JPEGs
    35     {
    36         psImageMaskType maskBad = pmConfigMaskGet("BLANK", config); // Bits to mask for bad pixels
    37 
    38         int bin1 = psMetadataLookupS32(NULL, recipe, "BIN1"); // First binning level
    39         int bin2 = psMetadataLookupS32(NULL, recipe, "BIN2"); // Second binning level
    40 
    41         // Target cells
    42         pmCell *cell1 = pmFPAfileThisCell(config->files, view, "PPSUB.OUTPUT.JPEG1"); // Rebinned cell once
    43         pmCell *cell2 = pmFPAfileThisCell(config->files, view, "PPSUB.OUTPUT.JPEG2"); // Rebinned cell twice
    44 
    45         pmReadout *ro1 = pmReadoutAlloc(cell1), *ro2 = pmReadoutAlloc(cell2); // Binned readouts
    46         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.