-
Notifications
You must be signed in to change notification settings - Fork 21
Processing MRO CTX images with CSM
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:
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.
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.
Run the spiceinit application on the ingested cube to gather all of the required sensor model parameters.
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)
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.