Skip to content

Processing MRO CTX images with CSM

Jesse Mapel edited this page Oct 30, 2019 · 1 revision

Due to issues with the data in the MRO CTX PDS3 archives, we do not recommend you use the images off the PDS directly. There are calibration pixels at the beginning and end of each line along with potentially missing lines that will result in contamination of your image data. Below is the recommended way to process MRO CTX data:

Step 1: Ingest into ISIS

Ingest the MRO CTX PDS3 image into an ISIS cube using the mroctx2isis application. This will solve the problems with the raw PDS images by removing calibration pixels and filling any potentially missing lines with no data.

Step 1b: Optional Calibration

If you would like to calibrate the data you can run the ISIS calibration applications ctxcal and ctxevenodd. This step is optional, but may help with down stream processing.

Step 2: spiceinit the ISIS Cube

Run the spiceinit application on the ingested cube to gather all of the required sensor model parameters.

Step 3: Create a USGSCSM ISD with ALE

Run the following code snippet with ALE to create a USGSCSM ISD for the image.

import os
import ale

cube_file = "path/to/your/cube/file.cub"
usgscsm_str = ale.loads(cube_file, formatter="usgscsm", verbose=False)

usgscsm_isd = os.path.splitext(cube_file)[0] + '.json'
with open(usgscsm_isd, 'w') as isd_file:
    isd_file.write(usgscsm_str)

Step 4: Load the Image into your SET

You are now ready to use your image in a CSM SET. In order for USGSCSM to find the ISD file, then it must be immediately next to your cube file.