IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15113


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

Changing the name for storing the compression. It's not all about
compression --- the BITPIX is there too. It's now called "FITS", or
"FITS.TYPE" in the FILERULES.

File:
1 edited

Legend:

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

    r15112 r15113  
    271271    }
    272272
    273     // Get compression scheme
    274     const char *compName = psMetadataLookupStr(&status, data, "COMPRESSION"); // Name of compression scheme
    275     if (compName && strcasecmp(compName, "NONE") != 0) {
    276         psMetadata *compSchemes = psMetadataLookupMetadata(&status, camera, "COMPRESSION"); // Comp. schemes
    277         if (!compSchemes) {
    278             psWarning("Unable to find COMPRESSION in camera configuration --- compression disabled.");
     273    // Get FITS output scheme
     274    const char *fitsType = psMetadataLookupStr(&status, data, "FITS.TYPE"); // Name of FITS scheme to use
     275    if (fitsType && strcasecmp(fitsType, "NONE") != 0) {
     276        psMetadata *fitsTypes = psMetadataLookupMetadata(&status, camera, "FITS"); // The FITS schemes
     277        if (!fitsTypes) {
     278            psWarning("Unable to find FITS in camera configuration --- compression disabled.");
    279279            goto COMPRESSION_DONE;
    280280        }
    281         psMetadata *compression = psMetadataLookupMetadata(NULL, compSchemes, compName); // Compression info
    282         if (!compression) {
    283             psWarning("Unable to find %s in COMPRESSION in camera configuration --- compression disabled.",
    284                       compName);
     281        psMetadata *scheme = psMetadataLookupMetadata(NULL, fitsTypes, fitsType); // FITS scheme
     282        if (!scheme) {
     283            psWarning("Unable to find %s in FITS in camera configuration --- compression disabled.",
     284                      fitsType);
    285285            goto COMPRESSION_DONE;
    286286        }
    287         const char *typeString = psMetadataLookupStr(NULL, compression, "COMPRESSION"); // Compression type
     287        const char *typeString = psMetadataLookupStr(NULL, fitsTypes, "COMPRESSION"); // Compression type
    288288        if (!typeString || strlen(typeString)) {
    289             psWarning("Can't find COMPRESSION in compression scheme %s --- compression disabled.", compName);
     289            psWarning("Can't find COMPRESSION in FITS scheme %s --- compression disabled.", fitsType);
    290290            goto COMPRESSION_DONE;
    291291        }
     
    293293
    294294        psString source = NULL;         // Source of options
    295         psStringAppend(&source, "%s in COMPRESSION in camera %s", compName, cameraName);
     295        psStringAppend(&source, "%s in FITS in camera %s", fitsType, cameraName);
    296296        psVector *tile = psVectorAlloc(3, PS_TYPE_S32); // Tile sizes
    297         file->bitpix = parseOptionInt(compression, "BITPIX", source, 0); // Bits per pixel
    298         tile->data.S32[0] = parseOptionInt(compression, "TILE.X", source, 0); // Tiling in x
    299         tile->data.S32[1] = parseOptionInt(compression, "TILE.Y", source, 1); // Tiling in y
    300         tile->data.S32[2] = parseOptionInt(compression, "TILE.Z", source, 1); // Tiling in z
    301         int noise = parseOptionInt(compression, "NOISE", source, 16); // Noise bits
    302         int hscale = parseOptionInt(compression, "HSCALE", source, 0); // Scaling for HCOMPRESS
    303         int hsmooth = parseOptionInt(compression, "HSMOOTH", source, 0); // Smoothing for HCOMPRESS
     297        file->bitpix = parseOptionInt(scheme, "BITPIX", source, 0); // Bits per pixel
     298        tile->data.S32[0] = parseOptionInt(scheme, "TILE.X", source, 0); // Tiling in x
     299        tile->data.S32[1] = parseOptionInt(scheme, "TILE.Y", source, 1); // Tiling in y
     300        tile->data.S32[2] = parseOptionInt(scheme, "TILE.Z", source, 1); // Tiling in z
     301        int noise = parseOptionInt(scheme, "NOISE", source, 16); // Noise bits
     302        int hscale = parseOptionInt(scheme, "HSCALE", source, 0); // Scaling for HCOMPRESS
     303        int hsmooth = parseOptionInt(scheme, "HSMOOTH", source, 0); // Smoothing for HCOMPRESS
    304304        psFree(source);
    305305
Note: See TracChangeset for help on using the changeset viewer.