IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2584


Ignore:
Timestamp:
Dec 1, 2004, 11:20:24 AM (22 years ago)
Author:
gusciora
Message:

First version of Subtract Sky.

Location:
trunk/psModules/src
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/pmReadoutCombine.c

    r2287 r2584  
    55 *  @author GLG, MHPCC
    66 *
    7  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2004-11-05 04:49:47 $
     7 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2004-12-01 21:20:24 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5555    PS_PTR_CHECK_NULL(inputs, NULL);
    5656    PS_PTR_CHECK_NULL(params, NULL);
    57     unsigned int maskVal = params->maskVal;
    5857    psStats *stats = params->stats;
    5958    int i;
     
    6463    int minInputRows = MAX_INT;
    6564    psListElem *tmpInput = NULL;
     65    psReadout *tmpReadout = NULL;
    6666    int numInputs = 0;
    67     psReadout *tmpReadout = NULL;
    68     float tmpF;
    69 
     67    int tmpI;
    7068
    7169    //
     
    9189        minInputRows = PS_MIN(minInputRows,
    9290                              (tmpReadout->row0 + tmpReadout->image->row0));
    93         tmpF = tmpReadout->row0 +
     91        tmpI = tmpReadout->row0 +
    9492               tmpReadout->image->row0 +
    9593               tmpReadout->image->numRows;
    96         maxInputRows = PS_MAX(maxInputRows, tmpF);
     94        maxInputRows = PS_MAX(maxInputRows, tmpI);
    9795
    9896        minInputCols = PS_MIN(minInputCols,
    9997                              (tmpReadout->col0 + tmpReadout->image->col0));
    100         tmpF = tmpReadout->col0 +
     98        tmpI = tmpReadout->col0 +
    10199               tmpReadout->image->col0 +
    102100               tmpReadout->image->numCols;
    103         maxInputCols = PS_MAX(maxInputCols, tmpF);
     101        maxInputCols = PS_MAX(maxInputCols, tmpI);
    104102        tmpInput = tmpInput->next;
    105103        numInputs++;
     
    170168    // For each input readout, we create a pointer to that readout in
    171169    // "tmpReadouts[]", and we store the min/max pixel indices for that
    172     // readout, in putput image coordinates, in the psVectors
     170    // readout, in output image coordinates, in the psVectors
    173171    // (outRowLower, outColLower, outRowUpper, outColUpper).
    174172    i = 0;
     
    184182                                   tmpReadouts[i]->image->col0 +
    185183                                   tmpReadouts[i]->image->numCols;
    186 
    187         //        printf("Bounds: [%d][%d] to [%d][%d]\n", outRowLower->data.U32[i], outColLower->data.U32[i], outRowUpper->data.U32[i], outColUpper->data.U32[i]);
    188 
    189 
    190184        tmpInput = tmpInput->next;
    191185        i++;
     
    203197        for (j = output->col0; j < (output->col0 + output->numCols) ; j++) {
    204198            for (int r = 0; r < numInputs ; r++) {
    205                 //                printf("[%d][%d]: [%d][%d] to [%d][%d]\n", i, j, outRowLower->data.U32[r], outColLower->data.U32[r], outRowUpper->data.U32[r], outColUpper->data.U32[r]);
     199                //  printf("[%d][%d]: [%d][%d] to [%d][%d]\n", i, j, outRowLower->data.U32[r], outColLower->data.U32[r], outRowUpper->data.U32[r], outColUpper->data.U32[r]);
    206200                if ((outRowLower->data.U32[r] <= i) &&
    207201                        (outColLower->data.U32[r] <= j) &&
     
    215209
    216210                    if ((NULL == tmpReadouts[r]->mask) ||
    217                             !(maskVal && tmpReadouts[r]->mask->data.U8[imageRow][imageCol])) {
     211                            !(params->maskVal && tmpReadouts[r]->mask->data.U8[imageRow][imageCol])) {
    218212                        tmpPixels->data.F32[r] = tmpReadouts[r]->image->data.F32[imageRow][imageCol];
    219213                        tmpPixelMask->data.U8[r] = 0;
     
    226220                    tmpPixelMask->data.U8[r] = 1;
    227221                }
    228                 //                printf("readout[%d], image [%d][%d] is %f\n", r, i, j, tmpPixels->data.F32[r]);
     222                // printf("readout[%d], image [%d][%d] is %f\n", r, i, j, tmpPixels->data.F32[r]);
    229223            }
    230224            // At this point, we have scanned all input readouts for this
Note: See TracChangeset for help on using the changeset viewer.