mro_drivers
— MRO Driver Classes¶
The ale.drivers.mro_drivers
module
New in version 0.1.0.
- class ale.drivers.mro_drivers.MroCrismIsisLabelNaifSpiceDriver(file, num_ephem=909, num_quats=909, props={}, parsed_label=None)¶
Bases:
LineScanner
,IsisLabel
,NaifSpice
,NoDistortion
,Driver
Driver for reading Crism ISIS labels.
- property ephemeris_start_time¶
Returns the starting ephemeris time of the image. Expects spacecraft_id to be defined. NAIF code -74999 was obtained from ISIS Crism camera model. Expects spacecraft_clock_start_count to be defined. This must be a string containing the start clock count of the spacecraft
Returns¶
- : double
Starting ephemeris time of the image
- property ephemeris_stop_time¶
Returns the ephemeris stop time of the image. Expects spacecraft_id to be defined. NAIF code -74999 was obtained from ISIS Crism camera model. Expects spacecraft_clock_stop_count to be defined. This must be a string containing the stop clock count of the spacecraft
Returns¶
- : double
Ephemeris stop time of the image
- 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. Expects instrument_id to be defined in the IsisLabel mixin. This should be a string of the form ‘CRISM’
Returns¶
- : str
instrument id
- property line_exposure_duration¶
Line exposure duration calculated by the ephemeris time divided by the number of lines.
Returns¶
- : float
Returns the line exposure duration in seconds.
- property sensor_frame_id¶
Returns the Naif ID code for the sensor reference frame. This is the frame of the OsirisRex instrument itself, and is not dependent on filter.
Returns¶
- : int
Naif ID code for the sensor frame
- class ale.drivers.mro_drivers.MroCtxIsisLabelIsisSpiceDriver(file, num_ephem=909, num_quats=909, props={}, parsed_label=None)¶
Bases:
LineScanner
,IsisLabel
,IsisSpice
,RadialDistortion
,Driver
- 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 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¶
ISIS doesn’t propergate this to the ingested cube label, so hard-code it.
- class ale.drivers.mro_drivers.MroCtxIsisLabelNaifSpiceDriver(file, num_ephem=909, num_quats=909, props={}, parsed_label=None)¶
Bases:
LineScanner
,IsisLabel
,NaifSpice
,RadialDistortion
,Driver
Driver for reading CTX ISIS labels.
- 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¶
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 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. Expects instrument_id to be defined in the IsisLabel mixin. This should be a string of the form ‘CTX’
Returns¶
- : str
instrument id
- property sensor_model_version¶
The ISIS Sensor model number for HiRise in ISIS. This is likely just 1
Returns¶
- : int
ISIS sensor model version
- property sensor_name¶
ISIS doesn’t propergate this to the ingested cube label, so hard-code it.
- class ale.drivers.mro_drivers.MroCtxPds3LabelNaifSpiceDriver(file, num_ephem=909, num_quats=909, props={}, parsed_label=None)¶
Bases:
LineScanner
,Pds3Label
,NaifSpice
,RadialDistortion
,Driver
Driver for reading CTX PDS3 labels. Requires a Spice mixin to acquire additional ephemeris and instrument data located exclusively in spice kernels.
- 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 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. Expects instrument_id to be defined in the Pds3Label mixin. This should be a string of the form ‘CONTEXT CAMERA’ or ‘CTX’
Returns¶
- : str
instrument id
- class ale.drivers.mro_drivers.MroHiRiseIsisLabelNaifSpiceDriver(file, num_ephem=909, num_quats=909, props={}, parsed_label=None)¶
Bases:
LineScanner
,IsisLabel
,NaifSpice
,RadialDistortion
,Driver
Driver for reading HiRise ISIS labels.
- property ccd_ikid¶
Computes the CCD ikid to get the necessary naifkeywords for Isis.
Returns¶
- : int
CCD ikid
- property detector_center_line¶
Returns the center detector line. This is a placeholder for use within Isis. Since Isis does not use much of the ISD this value allows the as accurate ISD for use in Isis but will be inaccurate for USGSCSM.
Returns¶
- : float
Detector sample of the principal point
- property detector_center_sample¶
Returns the center detector sample. This is a placeholder for use within Isis. Since Isis does not use much of the ISD this value allows the as accurate ISD for use in Isis but will be inaccurate for USGSCSM.
Returns¶
- : float
Detector line of the principal point
- property ephemeris_start_time¶
Computes the ephemeris_start_time of the image based on infomation from the ISIS camera model.
Returns¶
- : float
Starting ephemeris time of the image
- property exposure_duration¶
Returns the computed exposure duration based on the exposure duration computed in the ISIS HiRise camera model.
Returns¶
- : float
The exposure duration of the image
- 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. Expects instrument_id to be defined in the IsisLabel mixin. This should be a string of the form ‘CTX’
Returns¶
- : str
instrument id
- property naif_keywords¶
Adds all naifkeywords that contain the ccd_ikid to the already populated naif keywords
Returns¶
- : dict
Dictionary of keywords and values that ISIS creates and attaches to the label
- property sensor_frame_id¶
Hard coded sensor_frame_id based on the Isis HiRise camera model.
Returns¶
- : int
The sensor frame id
- property sensor_name¶
ISIS doesn’t propergate this to the ingested cube label, so hard-code it.
- class ale.drivers.mro_drivers.MroMarciIsisLabelNaifSpiceDriver(file, num_ephem=909, num_quats=909, props={}, parsed_label=None)¶
Bases:
LineScanner
,IsisLabel
,NaifSpice
,NoDistortion
,Driver
- property base_ikid¶
Returns the Naif ID code for the instrument Expects the instrument_id to be defined. This must be a string containing the short name of the instrument.
Returns¶
- : int
Naif ID used to for identifying the instrument in Spice kernels
- compute_marci_time(line)¶
Computes the marci time based on the line given. Original code taken from the ISIS Marci Camera/PushFrameCameraDetectorMap.
Returns¶
- : list
List of times associated with the bands of the image
- property detector_center_line¶
Returns the center detector line. This is a placeholder for use within Isis. Since Isis does not use much of the ISD this value allows the as accurate ISD for use in Isis but will be inaccurate for USGSCSM.
Returns¶
- : float
Detector sample of the principal point
- property detector_center_sample¶
Returns the center detector sample. This is a placeholder for use within Isis. Since Isis does not use much of the ISD this value allows the as accurate ISD for use in Isis but will be inaccurate for USGSCSM.
Returns¶
- : float
Detector line of the principal point
- property ephemeris_start_time¶
Returns the starting ephemeris time of the image. Generated based on the returns from compute_marci_time, and whether the image is flipped or not.
Returns¶
- : double
Starting ephemeris time of the image
- property ephemeris_stop_time¶
Returns the ending ephemeris time of the image. Generated based on the returns from compute_marci_time, and whether the image is flipped or not.
Returns¶
- : double
Starting ephemeris time of the image
- property flipped_framelets¶
Gets the keyword from the ISIS label to determine if the data is flipped or not
Returns¶
- : bool
True if flipped and False if not flipped
- property focal2pixel_lines¶
Expects base_ikid to be defined. This must be the integer Naif id code of the instrument
Returns¶
- : list<double>
focal plane to detector lines
- property focal2pixel_samples¶
Expects base_ikid to be defined. This must be the integer Naif id code of the instrument
Returns¶
- : list<double>
focal plane to detector samples
- 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 all naifkeywords that contain the base_ikid to the already populated naif keywords
Returns¶
- : dict
Dictionary of keywords and values that ISIS creates and attaches to the label
- property sensor_name¶
ISIS doesn’t propergate this to the ingested cube label, so hard-code it.