Author: Jeannie Walldren Date: 2008-06-11 History: 2008-06-11 Jeannie Walldren - Original version 2009-05-20 Jeannie Walldren - Updated documentation and slope2flat.cpp using new algorithm from IDL CISSCAL 3.6 cassimg_dividebyflats.pro This directory contains calibration files for ISIS 3 CISSCAL's flat field corrections. They are derived from Cassini Orbiter ISS Volume 11 Version 2 (i.e. coiss_0011_v2). AAREADME_slope_isis3.txt - This document, written for ISIS 3 CISSCAL info. slope_info.txt - Describes original calibration files used by IDL CISSCAL 3.6 img.lis - List of original slope file names without extensions slope_db_2.tab /slope2flat/ /VAX2isis2/ /flat/ In the idl CISSCAL application file cassimg_dividebyflats.pro, slope files *.img and *.lbl were used. The flat field files are generated from the slope files by importing, inverting and normalizing. If newer versions become available the following steps can be used to convert them into cubes. 1) Create slope cubes from the *.img and *.lbl files: A) CREATE A BATCHLIST: > /bin/ls *.img | sed s/.img// > img.lis B) IMPORT TO ISIS CUBE FORMAT USING ISIS vicar2isis APPLICATION (pds2isis would not work on corrupted slope files 010,011,012) > vicar2isis from=\$1.img to=\$1.full.cub -batchlist=img.lis 2) Adjust for vax format images: Many of the original slope files were in VAX format which isis3 currently does not handle. So we handle this in isis2. Which files were VAX was not indicated in the *.lbl files but in the *.img files. A) GREP "VAX" IN THE *.img FILES AND REDIRECT THE OUTPUT TO LIST FILE > grep VAX *.img > vax.lis B) EDIT vax.lis TO REMOVE EVERYTHING BUT "slopeXXX" C) CREATE vax2isis2.pdf SCRIPT FROM vax.lis AND RUN IT IN isis2 > setisis isis2 > tae > vax2isis2 THIS SCRIPT INCLUDES THE FOLLOWING LINE FOR EACH SLOPE FILE IN VAX FORMAT: raw2isis from=slopeXXX.img to=slopeXXX.i2.cub itype=3 in_arch=vax ns=1024 nl=1024 skip=4096 D) IMPORT isis2 IMAGES TO isis3 USING VAX BATCH AND pds2isis APPLICATION > setisis isis3 > pds2isis from=\$1.i2.cub to=\$1.full.cub -batchlist=vax.lis 3) Create flatfiles from these slope cubes using algorithm in cassimg_dividebyflats.pro: The slope2flat program creates the needed flat files for each type of image. > slope2flat fromlist=img.lis The following steps are performed in the slope2flat program: A) IF THE IMAGE IS SUMMED (InstrumentModeId IS NOT FULL), RESIZE USING ISIS reduce APPLICATION > reduce from=slopeXXX.full.cub to=slopeXXX.sum2.cub onl=512 ons=512 > reduce from=slopeXXX.full.cub to=slopeXXX.sum4.cub onl=256 ons=256 B) TAKE THE RECIPROCAL OF THE IMAGE > fx f1=slopeXXX.full.cub to=slopeXXX.reciprocal.full.cub equation=1/f1 > fx f1=slopeXXX.sum2.cub to=slopeXXX.reciprocal.sum2.cub equation=1/f1 > fx f1=slopeXXX.sum4.cub to=slopeXXX.reciprocal.sum4.cub equation=1/f1 C) IF THE IMAGE IS SUMMED (InstrumentModeId IS NOT FULL), RESIZE USING BILINEAR INTERPOLATION WITH ISIS enlarge APPLICATION *** this creates divergence from IDL values*** > enlarge from=slopeXXX.reciprocal.sum2.cub to=slopeXXX.enlargedRecip.sum2.cub sscale=2 lscale=2 interp=bilinear > enlarge from=slopeXXX.reciprocal.sum4.cub to=slopeXXX.enlargedRecip.sum4.cub sscale=4 lscale=4 interp=bilinear D) CROP THE CENTER 400X400 PIXELS > crop from=slopeXXX.reciprocal.full.cub to=slopeXXX.center.full.cub sample=313 nsamples=400 line=313 nlines=400 > crop from=slopeXXX.enlargedRecip.sum2.cub to=slopeXXX.center.sum2.cub sample=313 nsamples=400 line=313 nlines=400 > crop from=slopeXXX.enlargedRecip.sum4.cub to=slopeXXX.center.sum4.cub sample=313 nsamples=400 line=313 nlines=400 E) FIND THE CENTER MEDIAN > stats from=slopeXXX.center.full.cub > stats from=slopeXXX.center.sum2.cub > stats from=slopeXXX.center.sum4.cub F) DIVIDE THE RECIPROCAL IMAGE BY THE CENTER MEDIAN (YYYYY) > fx f1=slopeXXX.reciprocal.full.cub to=flatXXX.full.cub equation=f1/YYYYY > fx f1=slopeXXX.enlargedRecip.sum2.cub to=slopeXXX.divided.sum2.cub equation=f1/YYYYY > fx f1=slopeXXX.enlargedRecip.sum4.cub to=slopeXXX.divided.sum4.cub equation=f1/YYYYY (where YYYYY is median) G) IF THE IMAGE IS SUMMED (InstrumentModeId IS NOT FULL), RESIZE USING ISIS reduce APPLICATION > reduce from=slopeXXX.divided.sum2.cub to=flatXXX.sum2.cub onl=512 ons=512 > reduce from=slopeXXX.divided.sum4.cub to=flatXXX.sum4.cub onl=256 ons=256 Unable to create flat files from following files. They are labelled SUM2 and are 512x512, so slope2flat fails when we try to create the center cube using crop. slope010.full.cub slope011.full.cub slope012.full.cub