IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 26, 2010, 3:53:54 PM (16 years ago)
Author:
rhenders
Message:

using isfinite() instead of isnormal (which counts 0.0 as 'not normal'); improved debug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/src/ippToPspsConfig.c

    r27701 r27779  
    737737                    if (fromHeader) {
    738738                        fits_read_key(fitsIn, TBYTE, table->columns[i].ippName, &int8col[0], NULL, &readStatus);
    739                         if (!isnormal(int8col[0])) int8col[0] = int8null;
     739                        if (!isfinite(int8col[0])) int8col[0] = int8null;
    740740                    }
    741741                    else fits_read_col(fitsIn, TBYTE, table->columns[i].ippColNum, 1, 1, nRows, &int8null, int8col, &anynull, &readStatus);
     
    745745                    if (fromHeader) {
    746746                        fits_read_key(fitsIn, TSHORT, table->columns[i].ippName, &int16col[0], NULL, &readStatus);
    747                         if (!isnormal(int16col[0])) int16col[0] = int16null;
     747                        if (!isfinite(int16col[0])) int16col[0] = int16null;
    748748                    }
    749749                    else fits_read_col(fitsIn, TSHORT, table->columns[i].ippColNum, 1, 1, nRows, &int16null, int16col, &anynull, &readStatus);
     
    753753                    if (fromHeader) {
    754754                        fits_read_key(fitsIn, TLONG, table->columns[i].ippName, &longcol[0], NULL, &readStatus);
    755                         if (!isnormal(longcol[0])) longcol[0] = longnull;
     755                        if (!isfinite(longcol[0])) longcol[0] = longnull;
    756756                    }
    757757                    else fits_read_col(fitsIn, TLONG, table->columns[i].ippColNum, 1, 1, nRows, &longnull, longcol, &anynull, &readStatus);
     
    761761                    if (fromHeader) {
    762762                        fits_read_key(fitsIn, TLONGLONG, table->columns[i].ippName, &longcol[0], NULL, &readStatus);
    763                         if (!isnormal(longcol[0])) longcol[0] = longnull;
     763                        if (!isfinite(longcol[0])) longcol[0] = longnull;
    764764                    }
    765765                    else fits_read_col(fitsIn, TLONGLONG, table->columns[i].ippColNum, 1, 1, nRows, &longnull, longcol, &anynull, &readStatus);
     
    769769                    if (fromHeader) {
    770770                        fits_read_key(fitsIn, TFLOAT, table->columns[i].ippName,&floatcol[0], NULL, &readStatus);
    771                         if (!isnormal(floatcol[0])) floatcol[0] = floatnull;
     771                        if (!isfinite(floatcol[0])) floatcol[0] = floatnull;
    772772                    }
    773773                    else fits_read_col(fitsIn, TFLOAT, table->columns[i].ippColNum, 1, 1, nRows, &floatnull, floatcol, &anynull, &readStatus);
     
    777777                    if (fromHeader) {
    778778                        fits_read_key(fitsIn, TDOUBLE, table->columns[i].ippName, &doublecol[0], NULL, &readStatus);
    779                         if (!isnormal(doublecol[0])) doublecol[0] = doublenull;
     779                        if (!isfinite(doublecol[0])) doublecol[0] = doublenull;
    780780                    }
    781781                    else fits_read_col(fitsIn, TDOUBLE, table->columns[i].ippColNum, 1, 1, nRows, &doublenull, doublecol, &anynull, &readStatus);
     
    795795
    796796            // TODO need these errors, but strange error handling runs out of memory
    797             //if (readStatus) psError(PS_ERR_IO, false, "Unable to read col num '%d' col name '%s'", table->columns[i].ippColNum, table->columns[i].ippName );
    798             //if (writeStatus) psError(PS_ERR_IO, false, "Unable to write col '%s'", table->columns[i].pspsName );
     797            //if (readStatus) {
     798            //    psError(PS_ERR_IO, false, "Unable to read col num '%d' col name '%s', type %d",
     799            //        table->columns[i].ippColNum, table->columns[i].ippName, table->columns[i].ippType);
     800            //    fits_report_error(stderr, readStatus);
     801            //}
     802            //if (writeStatus) {
     803            //    psError(PS_ERR_IO, false, "Unable to write col '%s'", table->columns[i].pspsName );
     804            //    fits_report_error(stderr, writeStatus);
     805            //}
    799806        }
    800807    }
Note: See TracChangeset for help on using the changeset viewer.