# Instrument Models¶

## Supported Instruments¶

• MER
• Pancam
• MSL
• Mastcam
• Cassini
• Imaging Science Subsystem (ISS)

## get_wavelength¶

Get the wavelength from an image’s label

instrument_models.get_wavelength.get_wavelength(label, unit)[source]

Get the filter wavelength from the label of an image

See Supported Instruments for full list of supported missions and instruments. If the instrument is not supported, get_wavelength() will return nan.

Parameters: label (pvl.PVLModule) – Image’s label unit (str [nm]) – The wavelength unit. Best practice for unit to exist in pdsspect.pdsspect_image_set.ImageStamp.accepted_units wavelength – The filter wavelenth from the image rounded to 3 decimal places. If image does not have a wavelength or the instrument is not supported, wavelength with be nan float
instrument_models.get_wavelength.is_pancam(label)[source]

Determine if label is for a Pancam image

Parameters: label (pvl.PVLModule) – Image’s label is_pancam – True if label is from a Pancam image, False otherwise bool
instrument_models.get_wavelength.is_mastcam(label)[source]

Determine if label is for a Mastcam image

Parameters: label (pvl.PVLModule) – Image’s label is_mastcam – True if label is from a Mastcam image, False otherwise bool
instrument_models.get_wavelength.is_instrument(func)[source]

Wrapper for instrument determining functions

Tries the function, if there is a TypeError, then return False. The TypeError will occur when the label’s get() method returns None

## instrument¶

Provide base class for all instrument models

class instrument_models.instrument.InstrumentBase(label)[source]

Abstract Base Class for all instrument models

Parameters: label (pvl.PVLModule) – Image’s label
label

pvl.PVLModule – Image’s label

get_wavelength(unit, *args, **kwargs)[source]

Abstract method to get the image’s wavelength

Parameters: unit (str [nm]) – The wavelength unit. Best practice for unit to exist in pdsspect.pdsspect_image_set.ImageStamp.accepted_units wavelength – The image’s filter wavelength float

## mastcam¶

class instrument_models.mastcam.Mastcam(label)[source]

Model to get the filter wavelength of a Mastcam image

See Mastcam Multispectral Imaging on the Mars Science Laboratory Rover: Wavelength Coverage and Imaging Strategies at the Gale Crater Field Site for more details on Mastcam’s filter wavelengths

group

strINSTRUMENT_STATE_PARMS

wavelength_key1

strCENTER_FILTER_WAVELENGTH

wavelength_key2

strFILTER_CENTER_WAVELENGTH

get_wavelength(unit='nm')[source]

Get the wavelength from mastcam image

Parameters: unit (str [nm]) – The wavelength unit. Best practice for unit to exist in pdsspect.pdsspect_image_set.ImageStamp.accepted_units wavelength – Filter wavelength of the mastcam image float

## pancam¶

class instrument_models.pancam.Pancam(label)[source]

Model to get the filter wavelength of a Patcam image

See Pancam for more details on Pancam’s filter wavelengths.

pancam_left

strPANCAM_LEFT

pancam_right

strPANCAM_RIGHT

unit

strnm

left_filters

dict – Key is the filter number and the value is the wavelength for PancamL

right_filters

dict – Key is the filter number and the value is the wavelength for PancamR

camera

bool – Images camera. Should either be left_filters or right_filters

filter_num

int – The images filter number

get_wavelength(unit='nm')[source]

Get the filter wavelength from the image

Parameters: unit (str [nm]) – The wavelength unit. Best practice for unit to exist in pdsspect.pdsspect_image_set.ImageStamp.accepted_units wavelength – The image’s filter wavelength float
is_left

bool – True if image is from Pancam Left

is_right

bool – True if image is from Pancam Right

## cassini_iss¶

class instrument_models.cassini_iss.CassiniISS(label)[source]

Model to get the filter wavelength from Cassini ISS image

See Cassini Imaging Science Subsystem (ISS) Data User’s Guide (Page 149) for table of filter name and corresponding wavelengths. We use the effective wavelength rather than the center wavelength.wavelength

NA_filters

dict – Dictionary of the ISS Narrow Angle Camera filter names and wavelengths

Key is the two filternames and the value is the wavelength in nm

WA_filters

dict – Dictionary of the ISS Wide Angle Camera filter names and wavelengths

Key is the two filternames and the value is the wavelength in nm

unit

str – The default unit is nm

filter_name

str – The image’s filter names joined by a comma and space

For example, in the label the filtername appears as ("CL1","UV3") and so filter_name returns 'CL1, UV3'

get_wavelength(unit='nm')[source]

Get the image’s filter wavelength

Parameters: unit (str [nm]) – The desired wavelength of the unit wavelength – The image’s filter wavelength rounded to 3 decimal places float
is_NA

boolTrue if image is from Narrow Angle Camera

is_WA

boolTrue if image is from Wide Angle Camera