IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 29, 2007, 12:01:01 PM (19 years ago)
Author:
Paul Price
Message:

Enabling compression when writing out. Introduces a new field in the FILERULES for output files (COMPRESSION), which provides a keyword which is looked up in COMPRESSION(METADATA) in the camera configuration. That then provides BITPIX,TILE.X,TILE.Y,TILE.Z,NOISE,HSCALE,HSMOOTH to set the compression and bits per pixel. Enabled compression, but not bitpix yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_070920/psModules/src/camera/pmFPAfileIO.c

    r14938 r15112  
    688688        }
    689689
    690         // In some cases, we need to read the PHU after we've opened the file.  This happens for
    691         // the images supplied by the detrend database, which are only identified here (pmConfigConvertFilename).
     690        if (file->compression && !psFitsCompressionApply(file->fits, file->compression)) {
     691            psError(PS_ERR_UNKNOWN, false, "Unable to set compression options for %s (%s) (%d:%d:%d)\n",
     692                     file->filename, file->name, view->chip, view->cell, view->readout);
     693            return false;
     694        }
     695
     696        // In some cases, we need to read the PHU after we've opened the file.  This happens for the images
     697        // supplied by the detrend database, which are only identified here (pmConfigConvertFilename).
    692698        if (!pmFPAfileReadPHU (file, view, config)) {
    693             psError (PS_ERR_IO, true, "error reading PHU for %s (%s) (%d:%d:%d)\n", file->filename, file->name, view->chip, view->cell, view->readout);
     699            psError (PS_ERR_IO, true, "error reading PHU for %s (%s) (%d:%d:%d)\n",
     700                     file->filename, file->name, view->chip, view->cell, view->readout);
    694701            return false;
    695702        }
     
    758765            return false;
    759766        }
    760         file->formatName = psStringCopy(config->formatName);
     767        file->formatName = psStringCopy(config->formatName);
    761768
    762769    } else {
     
    795802      case PM_FPA_FILE_WEIGHT:
    796803      case PM_FPA_FILE_FRINGE:
    797         status = pmFPAviewFitsWritePHU (view, file, config);
    798         break;
     804        status = pmFPAviewFitsWritePHU (view, file, config);
     805        break;
    799806      case PM_FPA_FILE_CMF:
    800         status = pmSource_CMF_WritePHU (view, file, config);
    801         break;
     807        status = pmSource_CMF_WritePHU (view, file, config);
     808        break;
    802809      case PM_FPA_FILE_PSF:
    803         status = pmPSFmodelWritePHU (view, file, config);
    804         break;
     810        status = pmPSFmodelWritePHU (view, file, config);
     811        break;
    805812      case PM_FPA_FILE_SX:
    806813      case PM_FPA_FILE_RAW:
Note: See TracChangeset for help on using the changeset viewer.