CASSINI Procedures

To ingest images, you first need to setup the directory. The programs are (to JRW's knowledge) unique to CASSINI.

Directory Structure

Saturn

CASSINI

DATA

UTILITIES

Dione

Mimas

Etc

Contents of the CASSINI Directory

DATA has all the kernels in it, with no subdirectories. Will also need cumindex.tab (Cumulative Image Index provided by the PDS) in this directory, as well as TABLE.TXT (used to convert images to 12 bit).

UTILITIES has three files.

list.e - User inputs object name (i.e. DIONE, TETHYS, etc. all caps!!!) and the minimum size of the object in pixels. Use this to flush out low resolution images (list.e scales the size of the body) and make a list of images to download and an input file for the next utility. Source is here list.f

Note that when running download.b (see below), you may need to first change the curl command to "curl -L" to follow redirects.

convert.e - Enter the object name as "OBJ.TXT" where OBJ is the object name you entered previously. Puts the DAT image files into IMAGEFILES and makes make_sumfiles.in. Source is here convert.f

make_sumfiles.e - Makes the SUMFILES. When it asks if you want to "Include Pole (y/n)" SAY NO!!! Bob toyed with the idea of putting the pole into the SUMFILE, but never implemented that. Source is here make_sumfiles.f

# Below is from Bob's email 29 July 2020../CASSINI/UTILITIES/list.eDIONE100 <- minimum size in pixels [makes DIONE.TXT and b/w coverage plot] [makes ./NEW_IMAGES/download.b]cd NEW_IMAGESchmod +x download.b./download.bcd ..../CASSINI/UTILITIES/convert.e <- this is equivalent to PROCESS_IMGDIONE.TXT [makes images and puts into IMAGEFILES] [makes make_sumfiles.in]../CASSINI/UTILITIES/make_sumfiles.e 0. Create new SUMFILES & NOMINALS and .. 1. Update old NOMINALS and .. 2. Update old SUMFILES 0 Include Pole? (y/n)n <- ALWAYS SAY NO!

make_sumfiles.txt and INIT_LITHOS.TXT

Here is the top portion of make_sumfiles.txt with the camera model for the Cassini ISS. "608 IAPETUS" and "IAU_IAPETUS BFRAME" will need to be changed appropriately.

2 NCAM'CASSINI_ISS_NAC'1024 1024 NPXA, NLNA2002.703 512.5 512.5 MMFLA, PX0A, LN0A83.3333, 0, 0, 0, 83.3428, 0 KMATA 0, 8.28E-06, 5.45E-06, -19.67E-06 DA160, 4095 T1,T2'CASSINI_ISS_WAC'1024 1024 NPXB, NLNB200.7761 512.5 512.5 MMFLB, PX0B, LN0B83.3333, 0, 0, 0, 83.3411, 0 KMATB 0, 60.88E-06, 5.28E-06, -71.86E-06 DB160, 4095 T1,T21 NSC-82 CASSINI1.d-1,1.d-1,1.d-1 sigV03.d-4,3.d-4,3.d-4 sigPT608 IAPETUS'IAU_IAPETUS' BFRAME'LT+S' ABCORRKERNELS../CASSINI/DATA/naif0012.tls../CASSINI/DATA/cas_iss_v10.ti../CASSINI/DATA/cas_v40.tf../CASSINI/DATA/cas_v42.tf../CASSINI/DATA/cpck31Oct2017.tpc../CASSINI/DATA/cas00172.tsc../CASSINI/DATA/de421.bsp ../CASSINI/DATA/sat286.bsp ../CASSINI/DATA/051212AP_RE_90165_14363.bsp../CASSINI/DATA/041014R_SCPSE_01066_04199.bsp../CASSINI/DATA/041219R_SCPSE_04199_04247.bsp<snip>

Example INIT_LITHOS.TXT is here INIT_LITHOS.TXT.

Potential Errors

When you run the output from list.e (i.e. NEW_IMAGES/download.b) you get an <Name>.IMG file for each image, even if there was an error in the download. If you don't notice there was an error and run convert.e, you get an error that looks like this ...

<rand> Iapetus$ ../CASSINI/UTILITIES/convert.e INPUT LISTIAPETUS.TXTAt line 118 of file convert.f (unit = 10, file = 'NEW_IMAGES/N1483150865_1.IMG')Fortran runtime error: Non-existing record number

This happened to JRW because the directory structure on the PDS server is different from that in cumindex.tab. You'll have to re-download the files.

How To Make I/F for a Bigmap

To calibrate the images for I/F, use ISIS. Need both the IMG and LBL file from the PDS.

Get calibrated cube.

ciss2isis from=N1569840861_1.LBL to=N1569840861_1.cubspiceinit from=N1569840861_1.cub WEB=TRUEcisscal from=N1569840861_1.cub to=N1569840861_1-cal.cub

Turn float values of I/F into something 16-bit signed integer ready by multiplying by 32767 (i.e. 2^16/2 - 1)

algebra from=N1569840861_1-cal.cub to=N1569840861_1-mul.cub OPERATOR=UNARY A=32767

Now make it so SPC reads it like a normal DAT

isis2raw from=N1569840861_1-mul.cub to=N1569840861.DAT BITTYPE=S16BIT STRETCH=NONE ENDIAN=MSB STORAGEORDER=BSQ

Need to update the upper threshold in a bogus SUMFILE (make sure you copy it somewhere else before running the below!). Bob sets it to 4095, and we want it to be 32767. Testing has shown MOSIAC (and therefore rawMOSAIC) don't use the lower threshold. If you find a situation where it is using the lower threshold, you'll have to change that value to 0 (or 1).

sed -i.bak 's/ 4095 / 32767 /' *.SUM

Use 1/32767 for scaling term when using rawMOSIAC

<rand> Tethys$ ../bin/rawMosaic Enter 6 character map nameLEADEQ Scaling Factor (multiply)0.0000305185094759972 Offset (constant to add, 0 for if other for phase)0 # NameLEADEQ # Scaling: New = 3.05185094E-05 * val + 0.00000000 # Images actually used: 1 # I/F scaling, no extra term