User Documentation

Getting Started
Learn More
Explore in Detail
Get Inspired

Contributor Documentation

Getting Started
Learn More
Explore in Detail
Get Inspired

Quick Links

Software Manual
API Reference

Documentation Versions


Technical Documents

ISIS Application Documentation


Printer Friendly View | TOC | Home

Import NEAR MSI files into ISIS format

Overview Parameters Example 1


This program will import raw images, acquired from the Near Earth Asteroid Rendezvous - Shoemaker (NEAR Shoemaker) mission's Multispectral Imager (MSI) instrument, to ISIS data file format. The raw image must be in FITS (Flexible Image Transport) format and have a PDS label file that points to the location of the FITS image. You must input either the label file or the FITS file for the "TO" input parameter. Projected images are not supported. Please note if the FITS file is given, the label file must exist in the same directory or the program will throw an error. This program will verify that the input files are valid by checking the following label keyword values. An error will be thrown if any of these criteria are not met.
  • LINE_SAMPLES = 537
  • LINES = 244
The output cube- successfully imported into ISIS goes through the following processes:
  • Convert the raw FITS image data to an ISIS cube.
  • Save the labels from the input PDS label file to the output ISIS cube. Note that FITS labels are not transferred.
  • Enlarge the image from 537 samples x 244 lines to 537 x 412 using the user-specified interpolation algorithm. Defaults to cubic convolution.
  • Flip the image vertically, i.e. across the horizontal axis.
  • Trim 33 pixels from the top, bottom, left and right sides. These pixels along the borders will be set to nulls.

Image Trimming

Shortly after orbit insertion around Eros, the NEAR spacecraft experienced a failed burn that contaminated the MSI instrument with hydrazine. The NEAR/MSI team developed a preliminary remediation [1] of the blur effect of the contamination using FFTs to correct the point spread function (PSF). A residual side effect of this correction was degradation of ~33 pixels on all edges of the images. As a result, by default, NEAR/MSI images are trimmed 33 pixels around all edges after import. MSI images requiring trmming of these data are of the form m0132069107f4_2p_iof_dbl.img.

Additional remediation work of the PSF function used to correct MSI images was performed by Golish [2] that resulted in an enhanced PDF correction that did not introduce edge-artifacts as was seen in [1]. The TRIM parameter was added to optionally retain the 33 pixels around the image edges when the dataset from [2] is used. File names that do not require trimming are of the form m0132069107f4_2p_iof_gbl.img (note the gbl).

Note the images produced by Golish [2] have already been expanded. So msi2isis was altered to check for the expanded size (in lines only) to allow for the full frame to be ingested. In this case, the intermediate step to interpolate in the line dimension to expand the the number of lines from 244 to 412 is not needed and excluded from ingestion processing. All other (label) checks were left to complete the validation of the input files.


1. Li, H., et al. (2002) Preliminary Remediation of Scattered Light in NEAR MSI Images. Icarus 155, 244-252. https://doi.org/10.1006/icar.2001.6745

2. Golish, D.R., et al. (2021) Improved Remediation of NEAR MSI Images of Asteroid (433) Eros. LPSC LII, Abstract #1682.


Related Objects and Documents



Jeannie Backer2013-03-27 Original version of msi2isis. References #1248.
Kristin Berry2014-05-19 Updated to add labels from the input PDS label file to the output ISIS cube. References #2088.
Kris Becker2019-08-15 Correct SpacecraftClockStartCount/SpacecraftClockStopCount values to be compatible with NAIF SCLK kernels that enables use in the camera model. Save original values in new keywords prepended with "Original".
Kris Becker2021-02-19 Added the TRIM parameter to optionally trim data around the edges of some MSI images due to degradation resulting from remediation of the PSF.

Parameter Groups


Name Description
FROM Input NEAR MSI file to be converted to an ISIS cube
TO Output ISIS cube filename

Scaling Parameters

Name Description
INTERPType of interpolation for enlarge process

Trimming Parameters

Name Description
TRIMTrim all image border edges

Files: FROM


Name of the input NEAR MSI image file to be imported into ISIS format. You may enter the label or the image file. If the image file is given, the program will search in the same directory for a label file with the same base name as the image file base name.

Type filename
File Mode input
Filter *.lbl *.fit *.fits
Close Window

Files: TO


Name of the ISIS output cube file that has been imported, enlarged, flipped, and trimmed.

Type cube
File Mode output
Filter *.cub
Close Window

Scaling Parameters: INTERP


This is the type of interpolation to be performed on the input when the image is enlarged from 537 samples x 244 lines to 537 samples x 412 lines.

Type string
Option List:
Option Brief Description
CUBICCONVOLUTIONCubic Convolution interpolation Each output pixel is set to the value calculated by a cubic convolution interpolation of the calculated input pixel.
NEARESTNEIGHBORNearest Neighbor Each output pixel is set to the pixel nearest the calculated input pixel.
BILINEARBi-Linear interpolation Each output pixel is set to the value calculated by a bi-linear interpolation of the calculated input pixel.
Close Window

Trimming Parameters: TRIM


This parameter is provided to turn off trimming 33 pixels from the edge of images. When TRIM=TRUE, 33 pixels on all sides of the expanded image are set to NULL but not removed. The source of this degradation is image edge-effects created from the remediation of hydrazine contamination of the MSI filters. If TRIM=FALSE, no pixels around the edge of the images are NULLed. This is useful to retain image edges that originate from several alternative archive sources [2].

Type boolean
Default true
Close Window

Example 1

Usage of this import application


This example shows how to import an MSI fits file to the ISIS cube format using the label file.

Command Line

msi2isis from=msi_raw_file.lbl to=imported.cub
The command line arguments to import a file to cube format.

GUI Screenshot

GUI Example

The application's GUI

Example with parameters set to import MSI raw image to a cube.

Input Image

Raw image

Original image

Parameter Name: FROM

Example of raw NEAR MSI image without the enlarge, flip, and trim processes performed by msi2isis.

Output Image

Imported cube

Imported NEAR MSI cube

Parameter Name: TO

Example of imported NEAR MSI image with the enlarge, flip, and trim processes applied.