Changeset 15113
- Timestamp:
- Sep 29, 2007, 12:09:57 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap_branch_070920/psModules/src/camera/pmFPAfileDefine.c
r15112 r15113 271 271 } 272 272 273 // Get compressionscheme274 const char * compName = psMetadataLookupStr(&status, data, "COMPRESSION"); // Name of compression scheme275 if ( compName && strcasecmp(compName, "NONE") != 0) {276 psMetadata * compSchemes = psMetadataLookupMetadata(&status, camera, "COMPRESSION"); // Comp.schemes277 if (! compSchemes) {278 psWarning("Unable to find COMPRESSIONin 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."); 279 279 goto COMPRESSION_DONE; 280 280 } 281 psMetadata * compression = psMetadataLookupMetadata(NULL, compSchemes, compName); // Compression info282 if (! compression) {283 psWarning("Unable to find %s in COMPRESSIONin 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); 285 285 goto COMPRESSION_DONE; 286 286 } 287 const char *typeString = psMetadataLookupStr(NULL, compression, "COMPRESSION"); // Compression type287 const char *typeString = psMetadataLookupStr(NULL, fitsTypes, "COMPRESSION"); // Compression type 288 288 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); 290 290 goto COMPRESSION_DONE; 291 291 } … … 293 293 294 294 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); 296 296 psVector *tile = psVectorAlloc(3, PS_TYPE_S32); // Tile sizes 297 file->bitpix = parseOptionInt( compression, "BITPIX", source, 0); // Bits per pixel298 tile->data.S32[0] = parseOptionInt( compression, "TILE.X", source, 0); // Tiling in x299 tile->data.S32[1] = parseOptionInt( compression, "TILE.Y", source, 1); // Tiling in y300 tile->data.S32[2] = parseOptionInt( compression, "TILE.Z", source, 1); // Tiling in z301 int noise = parseOptionInt( compression, "NOISE", source, 16); // Noise bits302 int hscale = parseOptionInt( compression, "HSCALE", source, 0); // Scaling for HCOMPRESS303 int hsmooth = parseOptionInt( compression, "HSMOOTH", source, 0); // Smoothing for HCOMPRESS297 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 304 304 psFree(source); 305 305
Note:
See TracChangeset
for help on using the changeset viewer.
