IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 19, 2007, 1:52:39 PM (19 years ago)
Author:
Paul Price
Message:

Adding psFitsFloat.[ch] for quantising (and unquantising) floating-point images and setting BSCALE and BZERO. It isn't in a usable state yet, but checking in to the tree for safety. It's not activate in the build.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/fits/psFits.c

    r15179 r15335  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.72 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2007-10-03 21:27:21 $
     9 *  @version $Revision: 1.73 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2007-10-19 23:52:39 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    163163    fits->extword = NULL;
    164164    fits->conventions.compression = true;
     165    fits->conventions.psBitpix = true;
     166    fits->bscale = 0.0;
     167    fits->bzero = 0.0;
    165168    psMemSetDeallocator(fits,(psFreeFunc)fitsFree);
    166169
     
    397400{
    398401    PS_ASSERT_FITS_NON_NULL(fits, false);
    399 
    400     if (! fits->writable) {
    401         psError(PS_ERR_IO, true,
    402                 _("The psFits object is not writable."));
    403         return false;
    404     }
     402    PS_ASSERT_FITS_WRITABLE(fits, false);
    405403
    406404    // move to the specified HDU
     
    431429{
    432430    PS_ASSERT_FITS_NON_NULL(fits, false);
     431    PS_ASSERT_FITS_WRITABLE(fits, false);
    433432    PS_ASSERT_STRING_NON_EMPTY(extname, false);
    434 
    435     if (! fits->writable) {
    436         psError(PS_ERR_IO, true,
    437                 _("The psFits object is not writable."));
    438         return false;
    439     }
    440433
    441434    // move to the specified HDU
     
    509502bool psFitsTruncate(psFits* fits)
    510503{
    511     PS_ASSERT_FITS_NON_NULL(fits, NULL);
    512 
    513     if (! fits->writable) {
    514         psError(PS_ERR_IO, true,
    515                 _("The psFits object is not writable."));
    516         return PS_FITS_TYPE_NONE;
    517     }
     504    PS_ASSERT_FITS_NON_NULL(fits, false);
     505    PS_ASSERT_FITS_WRITABLE(fits, false);
    518506
    519507    int newEnd = psFitsGetExtNum(fits);
     
    547535{
    548536    PS_ASSERT_FITS_NON_NULL(fits, false);
     537    PS_ASSERT_FITS_WRITABLE(fits, false);
    549538
    550539    // convert psFitsCompressionType to cfitsio compression types
Note: See TracChangeset for help on using the changeset viewer.