IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2916


Ignore:
Timestamp:
Jan 5, 2005, 1:43:58 PM (22 years ago)
Author:
gusciora
Message:

Added some type checking.

Location:
trunk/psModules/src
Files:
4 edited

Legend:

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

    r2915 r2916  
    55 *  @author GLG, MHPCC
    66 *
    7  *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2005-01-05 23:25:24 $
     7 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2005-01-05 23:43:58 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3535    PS_PTR_CHECK_NULL(inputReadout, NULL);
    3636    PS_PTR_CHECK_NULL(inputReadout->image, NULL);
     37    PS_IMAGE_CHECK_TYPE(inputReadout->image, PS_TYPE_F32, NULL);
    3738    PS_PTR_CHECK_NULL(input1DPoly, NULL);
    3839
     
    6263    PS_PTR_CHECK_NULL(inputReadout,NULL);
    6364    PS_PTR_CHECK_NULL(inputReadout->image,NULL);
     65    PS_IMAGE_CHECK_TYPE(inputReadout->image, PS_TYPE_F32, NULL);
    6466    PS_PTR_CHECK_NULL(inFlux,NULL);
    6567    psS32 tableSize = inFlux->n;
     
    7476                 "WARNING: pmNonLinear.c: pmNonLinearityLookup(): input vectors have different sizes (%d, %d)\n", inFlux->n, outFlux->n);
    7577    }
     78    PS_VECTOR_CHECK_TYPE(inFlux, PS_TYPE_F32, NULL);
     79    PS_VECTOR_CHECK_TYPE(outFlux, PS_TYPE_F32, NULL);
    7680
    7781    psS32 i;
  • trunk/psModules/src/pmReadoutCombine.c

    r2915 r2916  
    55 *  @author GLG, MHPCC
    66 *
    7  *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2005-01-05 23:25:24 $
     7 *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2005-01-05 23:43:58 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    160160        *(psS32 *) &(output->row0) = minInputRows;
    161161    } else {
     162        PS_IMAGE_CHECK_TYPE(output, PS_TYPE_F32, NULL);
    162163        if (((output->col0 + output->numCols) < maxInputCols) ||
    163164                ((output->row0 + output->numRows) < maxInputRows)) {
  • trunk/psModules/src/pmSubtractBias.c

    r2857 r2916  
    66 *  @author George Gusciora, MHPCC
    77 *
    8  *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-12-30 22:22:00 $
     8 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-01-05 23:43:58 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    252252    PS_READOUT_CHECK_EMPTY(in, NULL);
    253253    PS_READOUT_CHECK_TYPE(in, PS_TYPE_F32, NULL);
     254
     255    //
     256    // If the overscans != NULL, then check the type of each image.
     257    //
     258    if (overscans != NULL) {
     259        psListElem *tmpOverscan = (psListElem *) overscans->head;
     260        while (NULL != tmpOverscan) {
     261            psImage *myOverscanImage = (psImage *) tmpOverscan->data;
     262            PS_IMAGE_CHECK_TYPE(myOverscanImage, PS_TYPE_F32, NULL);
     263            tmpOverscan = tmpOverscan->next;
     264        }
     265    }
     266
    254267    if ((overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)) {
    255268        psError(PS_ERR_UNKNOWN,true, "(overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE).  Returning in image\n");
     
    301314    }
    302315
     316
     317
     318
    303319    if (overScanAxis == PM_OVERSCAN_NONE) {
    304320        if (fit != PM_FIT_NONE) {
     
    322338    //
    323339    // We subtract each overscan region from the image data.
     340    // If we get here we know that overscans != NULL.
    324341    //
     342
    325343    if (overScanAxis == PM_OVERSCAN_ALL) {
    326344        tmpOverscan = (psListElem *) overscans->head;
    327345        while (NULL != tmpOverscan) {
    328346            myOverscanImage = (psImage *) tmpOverscan->data;
     347
     348            PS_IMAGE_CHECK_TYPE(myOverscanImage, PS_TYPE_F32, NULL);
    329349            psStats *rc = psImageStats(myStats, myOverscanImage, NULL, 0xffffffff);
    330350            if (rc == NULL) {
  • trunk/psModules/src/pmSubtractSky.c

    r2857 r2916  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-12-30 22:22:00 $
     8 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-01-05 23:43:58 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    414414 
    415415XXX: use static vectors for myStats, and the binned image
     416 
     417XXX: The SDR is silent about types.  PS_TYPE_F32 is implemented here.
    416418 *****************************************************************************/
    417419psReadout *pmSubtractSky(psReadout *in,
Note: See TracChangeset for help on using the changeset viewer.