lro_drivers — LRO Driver Classes

The ale.drivers.lro_drivers module

New in version 0.1.0.

class ale.drivers.lro_drivers.LroLrocNacIsisLabelIsisSpiceDriver(file, num_ephem=909, num_quats=909, props={}, parsed_label=None)

Bases: LineScanner, IsisSpice, IsisLabel, Driver

property additional_preroll

Returns the addition preroll defined in an IAK.

Returns

: float

Returns the additional preroll.

property additive_line_error

Returns the additive line error defined in an IAK.

Returns

: float

Returns the additive line error.

property constant_time_offset

Returns the constant time offset defined in an IAK.

Returns

: float

Returns the constant time offset.

property detector_center_sample

The center of the CCD in detector pixels ISIS uses 0.5 based CCD samples, so we need to convert to 0 based.

Returns

float :

The center sample of the CCD

property ephemeris_start_time

The starting ephemeris time for LRO is computed by taking the LRO:SPACECRAFT_CLOCK_PREROLL_COUNT, as defined in the label, and adding offsets that were taken from an IAK.

Returns

: double

Starting ephemeris time of the image

property exposure_duration

Takes the exposure_duration defined in a parent class and adds offsets taken from an IAK.

: float

Returns the exposure duration in seconds.

property instrument_id

The short text name for the instrument

Returns an instrument id uniquely identifying the instrument. Used to acquire instrument codes from Spice Lib bods2c routine.

Returns

str

The short text name for the instrument

property multiplicative_line_error

Returns the multiplicative line error defined in an IAK.

Returns

: float

Returns the multiplicative line error.

property odtk

The coefficients for the distortion model

Returns

: list

Radial distortion coefficients. There is only one coefficient for LROC NAC l/r

property sampling_factor

Returns the summing factor from the PDS3 label that is defined by the CROSSTRACK_SUMMING. For example a return value of 2 indicates that 2 lines and 2 samples (4 pixels) were summed and divided by 4 to produce the output pixel value.

Returns

: int

Number of samples and lines combined from the original data to produce a single pixel in this image

property sensor_model_version

Returns ISIS instrument sensor model version number

Returns

: int

ISIS sensor model version

property spacecraft_direction

Returns the x axis of the first velocity vector relative to the spacecraft. This indicates if the craft is moving forwards or backwards.

From LROC Frame Kernel: lro_frames_2014049_v01.tf “+X axis is in the direction of the velocity vector half the year. The other half of the year, the +X axis is opposite the velocity vector”

The returned velocity is also slightly off from the spacecraft velocity due to the sensor being attached to the craft with wax.

Returns

directiondouble

X value of the first velocity relative to the spacecraft bus

property usgscsm_distortion_model

The distortion model name with its coefficients

LRO LROC NAC does not use the default distortion model so we need to overwrite the method packing the distortion model into the ISD.

Returns

: dict

Returns a dict with the model name : dict of the coefficients

class ale.drivers.lro_drivers.LroLrocNacIsisLabelNaifSpiceDriver(file, num_ephem=909, num_quats=909, props={}, parsed_label=None)

Bases: LineScanner, NaifSpice, IsisLabel, Driver

property additional_preroll

Returns the addition preroll defined in an IAK.

Returns

: float

Returns the additional preroll.

property additive_line_error

Returns the additive line error defined in an IAK.

Returns

: float

Returns the additive line error.

property constant_time_offset

Returns the constant time offset defined in an IAK.

Returns

: float

Returns the constant time offset.

property detector_center_sample

The center of the CCD in detector pixels ISIS uses 0.5 based CCD samples, so we need to convert to 0 based.

Returns

float :

The center sample of the CCD

property ephemeris_start_time

The starting ephemeris time for LRO is computed by taking the LRO:SPACECRAFT_CLOCK_PREROLL_COUNT, as defined in the label, and adding offsets that were taken from an IAK.

Returns

: double

Starting ephemeris time of the image

property exposure_duration

Takes the exposure_duration defined in a parent class and adds offsets taken from an IAK.

: float

Returns the exposure duration in seconds.

property focal2pixel_lines

Expects ikid to be defined. This must be the integer Naif id code of the instrument. For LROC NAC this is flipped depending on the spacecraft direction.

Returns

: list<double>

focal plane to detector lines

property instrument_id

The short text name for the instrument

Returns an instrument id uniquely identifying the instrument. Used to acquire instrument codes from Spice Lib bods2c routine.

Returns

str

The short text name for the instrument

property light_time_correction

Returns the type of light time correction and abberation correction to use in NAIF calls.

LROC is specifically set to not use light time correction because it is so close to the surface of the moon that light time correction to the center of the body is incorrect.

Returns

: str

The light time and abberation correction string for use in NAIF calls. See https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/abcorr.html for the different options available.

property multiplicative_line_error

Returns the multiplicative line error defined in an IAK.

Returns

: float

Returns the multiplicative line error.

property odtk

The coefficients for the distortion model

Returns

: list

Radial distortion coefficients. There is only one coefficient for LROC NAC l/r

property sampling_factor

Returns the summing factor from the PDS3 label that is defined by the CROSSTRACK_SUMMING. For example a return value of 2 indicates that 2 lines and 2 samples (4 pixels) were summed and divided by 4 to produce the output pixel value.

Returns

: int

Number of samples and lines combined from the original data to produce a single pixel in this image

property sensor_model_version

Returns ISIS instrument sensor model version number

Returns

: int

ISIS sensor model version

property spacecraft_direction

Returns the x axis of the first velocity vector relative to the spacecraft. This indicates of the craft is moving forwards or backwards.

From LROC Frame Kernel: lro_frames_2014049_v01.tf “+X axis is in the direction of the velocity vector half the year. The other half of the year, the +X axis is opposite the velocity vector”

Hence we rotate the first velocity vector into the sensor reference frame, but the X component of that vector is inverted compared to the spacecraft so a +X indicates backwards and -X indicates forwards

The returned velocity is also slightly off from the spacecraft velocity due to the sensor being attached to the craft with wax.

Returns

directiondouble

X value of the first velocity relative to the sensor

property usgscsm_distortion_model

The distortion model name with its coefficients

LRO LROC NAC does not use the default distortion model so we need to overwrite the method packing the distortion model into the ISD.

Returns

: dict

Returns a dict with the model name : dict of the coefficients

class ale.drivers.lro_drivers.LroLrocNacPds3LabelNaifSpiceDriver(file, num_ephem=909, num_quats=909, props={}, parsed_label=None)

Bases: LineScanner, NaifSpice, Pds3Label, Driver

Driver for reading LROC NACL, NACR (not WAC, it is a push frame) labels. Requires a Spice mixin to acquire additional ephemeris and instrument data located exclusively in SPICE kernels, A PDS3 label, and the LineScanner and Driver bases.

property additional_preroll

Returns the addition preroll defined in an IAK.

Returns

: float

Returns the additional preroll.

property additive_line_error

Returns the additive line error defined in an IAK.

Returns

: float

Returns the additive line error.

property constant_time_offset

Returns the constant time offset defined in an IAK.

Returns

: float

Returns the constant time offset.

property detector_center_sample

The center of the CCD in detector pixels ISIS uses 0.5 based CCD samples, so we need to convert to 0 based.

Returns

float :

The center sample of the CCD

property ephemeris_start_time

The starting ephemeris time for LRO is computed by taking the LRO:SPACECRAFT_CLOCK_PREROLL_COUNT, as defined in the label, and adding offsets that were taken from an IAK.

Returns

: double

Starting ephemeris time of the image

property exposure_duration

Takes the exposure_duration defined in a parent class and adds offsets taken from an IAK.

Returns

: float

Returns the exposure duration in seconds.

property focal2pixel_lines

Expects ikid to be defined. This must be the integer Naif id code of the instrument. For LROC NAC this is flipped depending on the spacecraft direction.

Returns

: list<double>

focal plane to detector lines

property instrument_id

The short text name for the instrument

Returns an instrument id uniquely identifying the instrument. Used to acquire instrument codes from Spice Lib bods2c routine.

Returns

str

The short text name for the instrument

property light_time_correction

Returns the type of light time correction and abberation correction to use in NAIF calls.

LROC is specifically set to not use light time correction because it is so close to the surface of the moon that light time correction to the center of the body is incorrect.

Returns

: str

The light time and abberation correction string for use in NAIF calls. See https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/abcorr.html for the different options available.

property multiplicative_line_error

Returns the multiplicative line error defined in an IAK.

Returns

: float

Returns the multiplicative line error.

property odtk

The coefficients for the distortion model

Returns

: list

Radial distortion coefficients. There is only one coefficient for LROC NAC l/r

property sampling_factor

Returns the summing factor from the PDS3 label that is defined by the CROSSTRACK_SUMMING. For example a return value of 2 indicates that 2 lines and 2 samples (4 pixels) were summed and divided by 4 to produce the output pixel value.

Returns

: int

Number of samples and lines combined from the original data to produce a single pixel in this image

property sensor_model_version

Returns ISIS instrument sensor model version number

Returns

: int

ISIS sensor model version

property spacecraft_direction

Returns the x axis of the first velocity vector relative to the spacecraft. This indicates of the craft is moving forwards or backwards.

From LROC Frame Kernel: lro_frames_2014049_v01.tf “+X axis is in the direction of the velocity vector half the year. The other half of the year, the +X axis is opposite the velocity vector”

Hence we rotate the first velocity vector into the sensor reference frame, but the X component of that vector is inverted compared to the spacecraft so a +X indicates backwards and -X indicates forwards

The returned velocity is also slightly off from the spacecraft velocity due to the sensor being attached to the craft with wax.

Returns

directiondouble

X value of the first velocity relative to the sensor

property spacecraft_name

Spacecraft name used in various SPICE calls to acquire ephemeris data. LROC NAC img PDS3 labels do not the have SPACECRAFT_NAME keyword, so we override it here to use the label_pds3 property for instrument_host_id

Returns

: str

Spacecraft name

property usgscsm_distortion_model

The distortion model name with its coefficients

LRO LROC NAC does not use the default distortion model so we need to overwrite the method packing the distortion model into the ISD.

Returns

: dict

Returns a dict with the model name : dict of the coefficients

class ale.drivers.lro_drivers.LroLrocWacIsisLabelIsisSpiceDriver(file, num_ephem=909, num_quats=909, props={}, parsed_label=None)

Bases: PushFrame, IsisLabel, IsisSpice, RadialDistortion, Driver

property detector_center_line

The center of the CCD in detector pixels Expects fikid to be defined. This should be the integer Naif ID code for the filter.

Returns

list :

The center of the CCD formatted as line, sample

property detector_center_sample

The center of the CCD in detector pixels Expects fikid to be defined. This should be the integer Naif ID code for the filter.

Returns

list :

The center of the CCD formatted as line, sample

property fikid

Naif ID code of the filter dependent instrument codes.

Expects ikid to be defined. This should be the integer Naif ID code for the instrument.

Returns

: int

Naif ID code used in calculating focal length

property filter_number

Return the filter number from the cub label

Returns

: int

The filter number

property focal_length

The focal length of the instrument Expects naif_keywords to be defined. This should be a dict containing Naif keywords from the label. Expects fikid to be defined. This should be the integer Naif ID code for the filter.

Returns

float :

The focal length in millimeters

property instrument_id

Returns an instrument id for uniquely identifying the instrument, but often also used to be piped into Spice Kernels to acquire IKIDs. Therefore they expect the same ID the Spice expects in bods2c calls. Expects instrument_id to be defined in the IsisLabel mixin. This should be a string of the form ‘WAC-UV’ or ‘WAC-VIS’

Returns

: str

instrument id

property odtk

The coefficients for the distortion model

Returns

: list

Radial distortion coefficients.

property pixel2focal_x

Expects fikid to be defined. This must be the integer Naif id code of the filter

Returns

: list<double> detector to focal plane x

property pixel2focal_y

Expects fikid to be defined. This must be the integer Naif id code of the filter

Returns

: list<double> detector to focal plane y

property sensor_model_version

Returns ISIS instrument sensor model version number

Returns

: int

ISIS sensor model version

property sensor_name

Returns the name of the instrument

Returns

: str

Name of the sensor

class ale.drivers.lro_drivers.LroLrocWacIsisLabelNaifSpiceDriver(file, num_ephem=909, num_quats=909, props={}, parsed_label=None)

Bases: PushFrame, IsisLabel, NaifSpice, RadialDistortion, Driver

Driver for Lunar Reconnaissance Orbiter WAC ISIS cube

property detector_center_line

Returns the center detector line. Expects ikid to be defined. This should be an integer containing the Naif Id code of the instrument.

Returns

: float

Detector line of the principal point

property detector_center_sample

Returns the center detector sample. Expects ikid to be defined. This should be an integer containing the Naif Id code of the instrument.

Returns

: float

Detector sample of the principal point

property detector_start_line

Filter-specific starting line

Returns

: int

Zero based Detector line corresponding to the first image line

property ephemeris_start_time

Returns the ephemeris start time of the image. Expects spacecraft_id to be defined. This should be the integer Naif ID code for the spacecraft.

Returns

: float

ephemeris start time of the image

property fikid

Naif ID code of the filter dependent instrument codes.

Expects ikid to be defined. This should be the integer Naif ID code for the instrument.

Returns

: int

Naif ID code used in calculating focal length

property filter_number

Return the filter number from the cub label

Returns

: int

The filter number

property focal2pixel_lines

Expects fikid to be defined. This must be the integer Naif id code of the filter

Returns

: list<double>

focal plane to detector lines

property focal2pixel_samples

Expects fikid to be defined. This must be the integer Naif id code of the filter

Returns

: list<double>

focal plane to detector samples

property focal_length

Returns the focal length of the sensor Expects fikid to be defined. This must be the integer Naif id code of the filter.

Returns

: float

focal length

property framelet_height

Return the number of lines in a framelet.

Returns

: int

The number of lines in a framelet

property framelets_flipped

Returns

: boolean

True if framelets are flipped, else false

property instrument_id

Returns an instrument id for uniquely identifying the instrument, but often also used to be piped into Spice Kernels to acquire IKIDs. Therefore they expect the same ID the Spice expects in bods2c calls. Expects instrument_id to be defined in the IsisLabel mixin. This should be a string of the form ‘WAC-UV’ or ‘WAC-VIS’

Returns

: str

instrument id

property naif_keywords

Updated set of naif keywords containing the NaifIkCode for the specific WAC filter used when taking the image.

Returns

: dict

Dictionary of keywords and values that ISIS creates and attaches to the label

property num_frames

Number of frames in the image

Returns

: int

Number of frames in the image

property num_lines_overlap

Returns

: int

How many many lines of a framelet overlap with neighboring framelets.

property odtk

The coefficients for the distortion model

Returns

: list

Radial distortion coefficients.

property pixel2focal_x

Expects fikid to be defined. This must be the integer Naif id code of the filter

Returns

: list<double> detector to focal plane x

property pixel2focal_y

Expects fikid to be defined. This must be the integer Naif id code of the filter

Returns

: list<double> detector to focal plane y

property sampling_factor

Returns the summing factor from the PDS3 label. For example a return value of 2 indicates that 2 lines and 2 samples (4 pixels) were summed and divided by 4 to produce the output pixel value.

Returns

: int

Number of samples and lines combined from the original data to produce a single pixel in this image

property sensor_model_version

Returns the ISIS camera version

Returns

: int

Camera version number

property sensor_name

Returns

: String

The name of the spacecraft

class ale.drivers.lro_drivers.LroMiniRfIsisLabelNaifSpiceDriver(file, num_ephem=909, num_quats=909, props={}, parsed_label=None)

Bases: Radar, NaifSpice, IsisLabel, Driver

property ephemeris_start_time

Returns the start ephemeris time for the image.

Returns

: float

start time

property ephemeris_stop_time

Returns the stop ephemeris time for the image.

Returns

: float

stop time

property instrument_id

The short text name for the instrument

Returns an instrument id uniquely identifying the instrument. Used to acquire instrument codes from Spice Lib bods2c routine.

Returns

str

The short text name for the instrument

property line_exposure_duration

Line exposure duration in seconds. The sum of the burst and the delay for the return.

Returns

: double

scaled pixel width

property look_direction

Direction of the look (left or right)

Returns

: string

left or right

property range_conversion_coefficients

Range conversion coefficients

Returns

: List

range conversion coefficients

property range_conversion_times

Times, in et, associated with range conversion coefficients

Returns

: List

times for range conversion coefficients

property scaled_pixel_width

Returns the scaled pixel width

Returns

: double

scaled pixel width

property sensor_frame_id

Returns the Naif ID code for the sensor reference frame We replace this with the target frame ID because the sensor operates entirely in the target reference frame

Returns

: int

Naif ID code for the sensor frame

property wavelength

Returns the wavelength in meters used for image acquisition.

Returns

: double

Wavelength in meters used to create an image