IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42369


Ignore:
Timestamp:
Feb 4, 2023, 12:11:06 PM (3 years ago)
Author:
eugene
Message:

merge changes from trunk: remove excess verbosity and allow detections under CTE masks

Location:
branches/eam_branches/ipp-20220316/pswarp/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20220316/pswarp/src/pswarpMapGrid.c

    r42166 r42369  
    3838    int nYpts = (int)(Ny / nYpix) + 1;
    3939
    40     psLogMsg("pswarp", 3, "in grid sampling\n");
    4140    // create the grid of maps
    4241    pswarpMapGrid *grid = pswarpMapGridAlloc (nXpts, nYpts);
     
    5049    }
    5150
    52     //if (0) {
     51    if (0) {
    5352        // test the transformation sky<->chip for chip in smf:
    5453        if (fout == NULL) { fout = fopen ("map.grid.txt", "w"); }
     
    8988                fprintf (fout, "%f %f < %f %f < %f %f \n", TP1->x, TP1->y, FP1->x, FP1->y, CH1->x, CH1->y);
    9089
    91                 psLogMsg("pswarp", 3, "testing grid sampling\n");
    92                 psLogMsg("pswarp", 3, "%f %f > %f %f > %f %f > %f %f | ", CH0->x, CH0->y, FP0->x, FP0->y, TP0->x, TP0->y, sky->r*180/M_PI, sky->d*180/M_PI);
    93                 psLogMsg("pswarp", 3, "%f %f < %f %f < %f %f \n", TP1->x, TP1->y, FP1->x, FP1->y, CH1->x, CH1->y);
    94 
    9590            }
    9691        }
     
    106101
    107102        psFree (sky);
    108     //}
     103    }
    109104
    110105    grid->nXpix = nXpix;
  • branches/eam_branches/ipp-20220316/pswarp/src/pswarpSetMaskBits.c

    r27096 r42369  
    2020 * updated in the config metadata.
    2121 */
     22 
    2223bool pswarpSetMaskBits (pmConfig *config)
    2324{
     
    2627    psImageMaskType maskOut = 0x00;                     // mask for the output image
    2728
     29    // Look up recipe values
     30    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PSWARP_RECIPE); // Recipe for ppSim
     31    psAssert(recipe, "We checked this earlier, so it should be here.");
     32    bool doDetectCTE = psMetadataLookupBool(NULL, recipe, "DETECT.CTE"); // Do detections on pixels underneath CTE masks
     33
    2834    // this function sets the required single-image mask bits
    29     if (!pmConfigMaskSetBits (&maskIn, &markIn, config)) {
    30         psError (psErrorCodeLast(), false, "Unable to define the mask bit values");
    31         return false;
     35    if(!doDetectCTE) {
     36      if (!pmConfigMaskSetBits (&maskIn, &markIn, config)) {
     37          psError (psErrorCodeLast(), false, "Unable to define the mask bit values");
     38          return false;
     39      }
     40    } else {
     41      psMetadata *maskrecipe = psMetadataLookupMetadata(NULL, config->recipes, "MASKS"); // The recipe
     42      if (!maskrecipe) {
     43          psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find MASKS recipe.");
     44          return false;
     45      }
     46      if (!pswarpMaskSetInMetadata(&maskIn, &markIn, maskrecipe)) {
     47          psError (psErrorCodeLast(), false, "Unable to determine the mask value");
     48          return false;
     49      }
    3250    }
    33 
     51   
    3452    // mask for non-linear flat regions (default to DETECTOR if not defined)
    3553    psImageMaskType badMask = pmConfigMaskGet("CONV.BAD", config);
  • branches/eam_branches/ipp-20220316/pswarp/src/pswarpTransformReadout.c

    r42166 r42369  
    104104    // pswarpMapGridFromImage builds a set of locally-linear maps which convert the
    105105    // output coordinates to input coordinates
    106     psLogMsg("pswarp", 3, "going into MapGrid \n");
    107106    pswarpMapGrid *grid = pswarpMapGridFromImage(input, output, nGridX, nGridY);
    108107   
Note: See TracChangeset for help on using the changeset viewer.