IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 14, 2004, 12:33:28 PM (22 years ago)
Author:
gusciora
Message:

Tests for the SubtractBias module.

File:
1 edited

Legend:

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

    r2127 r2132  
    66 *  @author George Gusciora, MHPCC
    77 *
    8  *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-10-14 19:06:19 $
     8 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-10-14 22:33:28 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3838
    3939    if (((in->image)->numRows + in->row0 - bias->row0) > (bias->image)->numRows) {
    40         // XXX: psErrorMsg() bias image does not have enough rows.
     40        psError(__func__, "bias image does not have enough rows\n");
    4141    }
    4242    if (((in->image)->numCols + in->row0 - bias->row0) > (bias->image)->numCols) {
    43         // XXX: psErrorMsg() bias image does not have enough columns.
     43        psError(__func__, "bias image does not have enough columns\n");
    4444    }
    4545
     
    5252            (in->image)->data.F32[i][j]-=
    5353                (bias->image)->data.F32[i+in->row0-bias->row0][j+in->col0-bias->col0];
    54 
    55             ((in->mask)->data.U8[i][j])|=
    56                 (bias->mask)->data.U8[i+in->row0-bias->row0][j+in->col0-bias->col0];
     54            if ((in->mask != NULL) && (bias->mask != NULL)) {
     55                ((in->mask)->data.U8[i][j])|=
     56                    (bias->mask)->data.U8[i+in->row0-bias->row0][j+in->col0-bias->col0];
     57            }
    5758        }
    5859    }
     
    219220    psSpline1D *mySpline;
    220221
    221     if (in == NULL) {
    222         //XXX: psErrorMsg()
    223     }
     222    PS_CHECK_NULL_PTR_RETURN_NULL(in);
    224223
    225224    //
     
    231230
    232231    if ((overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)) {
     232        psError(__func__, "(overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)\n");
    233233        //XXX: psErrorMsg()
    234234        return(in);
     
    240240        //XXX: psWarningMsg()
    241241        //XXX: Then what?
    242         return(in);
     242        printf("WARNING: overScanAxis equals NONE or ALL, and fit equals NONE\n");
     243        //        return(in);
    243244    }
    244245
    245246    if (overScanAxis == PM_OVERSCAN_NONE) {
    246247        if (overscans != NULL) {
    247             //XXX: psWarningMsg()
     248            printf("WARNING: overScanAxis equals NONE and overscans does not equal NULL\n");
    248249        }
    249250        return(psSubtractFrame(in, bias));
Note: See TracChangeset for help on using the changeset viewer.