Here is a list of processes unique to Mercury. Update as needed, and at some point compile into a coherent set of procedures.

Collect calibrated I/F images

You can use the PDS link here or other location.

Get the DOY, and down the I/F calibrated cube. (ex. CN0221023175M_IF_5.IMG)

Instructions for making I/F cubes of Mercury

processCalMessenger

Using processCalMessenger.c does not currently (30 July 2020) need an SPC directory. All input and output files just need to be in the directory from which the program is executed.

Note: You'll need to prescreen the images for 512 by 512 and 1024 by 1024. There are separate programs for image size.

processCalMessenger

processCalMessenger512

Required Input Files

<I/F image name>.IMG

<SPC SUMFILE name>.SUM (12 characters: first letter E or C, 10 digit ephemeris time, filter letter)

Example:

CN0221023170M_IF_5.IMG

N0221023170M.SUM

Output Files

Creates new SUMFILE and IMAGEFILE. The output name drops the first character of the input name, and replaces it with a "C".

Example:

C0221023170M.DAT

C0221023170M.SUM

process_calibrated.log

Usage

e.processCalMessenger <PDS calibrated name>.IMG

Ex: e.processCalMessenger CN0221023170M_IF_5.IMG

Wrappers for ingesting calibrated images for I/F

Setup

Create the folder CDR_Images in the cube directory and fill with calibrated I/F IMG files

Update the directory calls in the shell wrapper.

Note that you need to update the processCalMessenger call for 512 images. Can get the 512 images by running...

head -246 *.IMG | grep LINES

processCalMessengerForIoverF.sh (ignore the tmp and newSUM variables since they aren't used)

Usage

input list will be the spc names (i.e. N0108826727M)

sh bin/processCalMessengerForIoverF.sh 1024List

Processing and End State

Shell will copy spc SUMFILE from the designated SPC directory into CDR_Images

Runs processCalMessenger and save INIT and updates process_calibrated.log

Delete old spc SUMFILE when finished, and move new SUMFILES and DAT files to "working" directory where I/F cubes will be generated.

Note1: Some of the older ingested images into the Mercury directory use a different SPC naming scheme. For these, process as normal, but copy the SUMFILE to the "working" directory and modify the filename and name in the first line Note2: If you have errors when you run (i.e. some ingested images use a different naming scheme), make sure you modify process_calibrated.log after you've fixed the errors. process_calibrated.log will be used later by rawMosaic, and you don't want old information to be read.

rawMosaic

As of 14 Aug 2020

The upper threshold generated by processCalMessenger in the output SUMFILE is not that expected by rawMosaic. You'll need to modify the upper threshold in the C_.SUM before running rawMosaic. Change the 4095 to 65535 using the following command.

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

Very Important! : Since the filename of the image has changed, update INIT_LITHOS.TXT to have a distortion matrix entry for the new image names.

Then, run as normal to generate I/F ascii file. Put the new image name into MOSAIC.TXT, enter the bigmap name, the scale factor for the image comes from process_calibrated.log, and the offset is 0 (zero).

Wrapper for rawMosaic

Setup

Update the directory calls in the shell wrapper

Update samples and lines values for this bigmap

rawMOSAICIoverF.sh

Usage

To be run from "working" directory

Input bigmap name and list of SUMFILES (i.e. N0108826727M)

sh ../bin/rawMOSAICIoverF.sh RAB201 ../spcDeborahList

Processing and End State

Runs rawMosaic

Creates directories with SUMFILES name one directory up

Runs ascii2isis and puts cub and txt file in appropriate directory

Wrapper for t.phasei

Setup

Go to the working directory. Uses the "C" SUMFILE but writes to the "SPC Name" locations.

Update cubDir in the shell wrapper

Update samples and lines values for this bigmap (i.e. the variable named DTMsize)

aeiFromSPC.sh

Usage

sh ../bin/aeiFromSPC.sh ../spcDeborahList RAB201

Processing and End State

Runs t.phasei (v1.2 as of 14 May 2021)

Runs ascii2isis and moves a, e, and i to proper directory

Wrapper to package everything into a single cub

Setup

Go to cube directory (i.e. the cubesRaditladiA, NOT the individual image name directories)

Update bigmap name, directory, and version

cubeIt.sh

Usage

sh bin/cubeIt.sh spcDeborahList

Processing and End State

Combines 4 cubes into 1 cube in each directory