nh_drivers — New Horizons Driver Classes

The ale.drivers.nh_drivers module

New in version 0.8.1.

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

Bases: LineScanner, IsisLabel, NaifSpice, NoDistortion, Driver

Driver for reading New Horizons LEISA ISIS3 Labels.

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 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 ephemeris_stop_time

ISIS doesn’t preserve the spacecraft stop count that we can use to get the ephemeris stop time of the image, so compute the ephemeris stop time from the start time and the exposure duration.

property exposure_duration

The exposure duration of the image, in seconds

Returns

: float

Exposure duration in seconds

property ikid

Overridden to grab the ikid from the Isis Cube since there is no way to obtain this value with a spice bods2c call. Isis sets this value during ingestion, based on the original fits file.

Returns

: int

Naif ID used to for identifying the instrument in Spice kernels

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 the same ID the Spice expects in bods2c calls.

Returns

: str

instrument id

property sensor_model_version

Returns

: int

ISIS sensor model version

property sensor_name

Returns the name of the instrument. Need to over-ride isis_label because InstrumentName is not defined in the ISIS label for NH Leisa cubes.

Returns

: str Name of the sensor

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

Bases: Framer, IsisLabel, NaifSpice, NoDistortion, Driver

Driver for reading New Horizons LORRI ISIS3 Labels. These are Labels that have been ingested into ISIS from PDS EDR images but have not been spiceinit’d yet.

property detector_center_line

The center of the CCD in detector pixels Expects ikid to be defined. this should be the integer Naif ID code for the instrument.

Returns

list :

The center of the CCD formatted as line, sample

property detector_center_sample

The center of the CCD in detector pixels Expects ikid to be defined. this should be the integer Naif ID code for the instrument.

Returns

list :

The center of the CCD formatted as line, sample

property ephemeris_stop_time

Returns the sum of the starting ephemeris time and the exposure duration. Expects ephemeris start time and exposure duration to be defined. These should be double precision numbers containing the ephemeris start and exposure duration of the image.

Returns

: double

Ephemeris stop time for an image

property frame_chain

Returns

FrameNode

The root node of the frame tree. This will always be the J2000 reference frame.

property ikid

Overridden to grab the ikid from the Isis Cube since there is no way to obtain this value with a spice bods2c call. Isis sets this value during ingestion, based on the original fits file.

For LORRI, there are two options associated with different binning modes: 1x1 binning: -98301 4x4 binning: -98302

Returns

: integer

Naif Integer ID code for the instrument

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 the same ID the Spice expects in bods2c calls.

Returns

: str

instrument id

property sensor_name

Returns the name of the instrument

Returns

: str

Name of the sensor

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

Bases: Framer, IsisLabel, NaifSpice, LegendreDistortion, Driver

Driver for reading New Horizons MVIC ISIS3 Labels. These are Labels that have been ingested into ISIS from PDS EDR images but have not been spiceinit’d yet.

property detector_center_line

Returns detector center line. This information is found in ik/nh_ralph_v100.ti, which is not loaded as an ik.

property detector_center_sample

Returns detector center line. This information is found in ik/nh_ralph_v100.ti, which is not loaded as an ik.

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 ephemeris_stop_time

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

Returns

: float

ephemeris stop time of the image

property ephemeris_time

Returns an array of times between the start/stop ephemeris times based on the number of lines in the image. Expects ephemeris start/stop times to be defined. These should be floating point numbers containing the start and stop times of the images. Expects image_lines to be defined. This should be an integer containing the number of lines in the image.

Returns

: ndarray

ephemeris times split based on image lines

property ikid

Overridden to grab the ikid from the Isis Cube since there is no way to obtain this value with a spice bods2c call. Isis sets this value during ingestion, based on the original fits file. Returns ——- : integer

Naif Integer ID code for the instrument

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 the same ID the Spice expects in bods2c calls. Returns ——- : str

instrument id

property instrument_name

The name of the instrument. This is not included in the .fit label, but is present in the .lbl file, so it is not present in ISIS conversion, and it must be hard-coded. Returns ——- : str

Name of the instrument

property naif_keywords

Adds base NH instrument distortion, which is shared among all instruments on NH. Returns ——- : dict

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

property odtx

Returns the x coefficient for the optical distortion model Expects ikid to be defined. This must be the integer Naif id code of the instrument Returns ——- : list

Optical distortion x coefficients

property odty

Returns the y coefficient for the optical distortion model. Expects ikid to be defined. This must be the integer Naif id code of the instrument Returns ——- : list

Optical distortion y coefficients

property parent_id

The base naif id of the spacecraft. For New Horizons, this is -98000. Required for distortion coefficients, which are not unique to instruments, but are instead shared by all instruments on the spacecraft + residuals. Returns ——- : int

Naif id of the spacecraft

property sensor_model_version

Returns instrument model version Returns ——- : int

ISIS sensor model version

property sensor_name

Returns the name of the instrument Returns ——- : str

Name of the sensor

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

Bases: LineScanner, IsisLabel, NaifSpice, LegendreDistortion, Driver

Driver for reading New Horizons MVIC TDI ISIS3 Labels. These are Labels that have been ingested into ISIS from PDS EDR images but have not been spiceinit’d yet.

property detector_center_line

Returns the center detector line. This is currently defaulted to 0 as it is unused in ISIS

Returns

: float

Detector line of the principal point

property detector_center_sample

Returns the center detector sample. This is currently defaulted to 0 as it is unused in ISIS

Returns

: float

Detector sample of the principal point

property exposure_duration

Returns the exposure duration for MVIC TDI cameras

Returns

: float

The exposure duration

property ikid

Read the ikid from the cube label

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 the same ID the Spice expects in bods2c calls.

Returns

: str

instrument id

property naif_keywords

Adds base NH instrument distortion, which is shared among all instruments on NH.

Returns

: dict

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

property odtx

Returns the x coefficient for the optical distortion model Expects ikid to be defined. This must be the integer Naif id code of the instrument Returns ——- : list

Optical distortion x coefficients

property odty

Returns the y coefficient for the optical distortion model. Expects ikid to be defined. This must be the integer Naif id code of the instrument Returns ——- : list

Optical distortion y coefficients

property parent_id

The base naif id of the spacecraft. For New Horizons, this is -98000. Required for distortion coefficients, which are not unique to instruments, but are instead shared by all instruments on the spacecraft + residuals. Returns ——- : int

Naif id of the spacecraft

property sensor_model_version

Returns

: int

ISIS sensor model version

property sensor_name

Returns the name of the instrument

Returns

: str

Name of the sensor