selene_drivers — Selene Driver Classes

The ale.drivers.selene_drivers module

New in version 0.8.1.

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

Bases: LineScanner, NaifSpice, IsisLabel, KaguyaSeleneDistortion, Driver

property base_band

Which band the bands are registered to.

Returns

base_bandstr

The base band of the instrument

property boresight_x

Returns the x focal plane coordinate of the boresight. Expects ikid to be defined. This should be the NAIF integer ID for the sensor.

Returns

: float

Boresight focal plane x coordinate

property boresight_y

Returns the y focal plane coordinate of the boresight. Expects ikid to be defined. This should be the NAIF integer ID for the sensor.

Returns

: float

Boresight focal plane x coordinate

property detector_center_line

Returns the center detector line of the detector. Expects tc_id to be defined. This should be a string of the form LISM_MI1 or LISM_MI2.

We subtract 0.5 from the center line because as per the IK: Center of the first pixel is defined as “1.0”.

Returns

: int

The detector line of the principle point

property detector_center_sample

Returns the center detector sample of the detector. Expects tc_id to be defined. This should be a string of the form LISM_MI1 or LISM_MI2.

We subtract 0.5 from the center sample because as per the IK: Center of the first pixel is defined as “1.0”.

Returns

: int

The detector sample of the principle 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 of the spacecraft.

Returns

: float

ephemeris start time of the image

property ephemeris_stop_time

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

Returns

: float

ephemeris start time of the image

property focal2pixel_lines

Calculated using 1/pixel pitch Expects ikid to be defined. This should be the NAIF integer ID code for the sensor.

Returns

: list

focal plane to detector lines

property focal2pixel_samples

Calculated using 1/pixel pitch Expects ikid to be defined. This should be the NAIF integer ID code for the sensor.

Returns

: list

focal plane to detector samples

property instrument_id

Id takes the form of LISM_<BASE_BAND> where <BASE_BAND> is which band the bands were registered to.

Returns

: str

instrument id

property line_exposure_duration

Returns Line Exposure Duration

Kaguya has an unintuitive key for this called CORRECTED_SAMPLING_INTERVAL. The original LINE_EXPOSURE_DURATION PDS3 keys is often incorrect and cannot be trusted.

Returns

: float

Line exposure duration

property sensor_frame_id

Returns the sensor frame id. Depends on the instrument that was used to capture the image.

Returns

: int

Sensor frame id

property sensor_model_version

Returns ISIS instrument sensor model version number

Returns

: int

ISIS sensor model version

property spacecraft_clock_start_count

The original SC_CLOCK_START_COUNT key is often incorrect and cannot be trusted. Therefore we get this information from CORRECTED_SC_CLOCK_START_COUNT

Returns

: float

spacecraft clock start count in seconds

property spacecraft_clock_stop_count

The original SC_CLOCK_START_COUNT key is often incorrect and cannot be trusted. Therefore we get this information from CORRECTED_SC_CLOCK_STOP_COUNT

Returns

: float

spacecraft clock start count in seconds

spacecraft_direction()

Gets the moving direction of the spacecraft from the label, where -1 is moving as intended and 1 is moving inverted.

Returns

: int

Moving direction of the spacecraft

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

Bases: LineScanner, Pds3Label, NaifSpice, KaguyaSeleneDistortion, Driver

Driver for a PDS3 Kaguya Multiband Imager (Mi) images. Specifically level2b2 Vis and Nir images.

NOTES

  • Kaguaya has adjusted values for some of its keys, usually suffixed with CORRECTED_. These corrected values should always be preferred over the original values.

property base_band

Which band the bands are registered to.

property boresight_x

Returns the x focal plane coordinate of the boresight. Expects ikid to be defined. This should be the NAIF integer ID for the sensor.

Returns

: float

Boresight focal plane x coordinate

property boresight_y

Returns the y focal plane coordinate of the boresight. Expects ikid to be defined. This should be the NAIF integer ID for the sensor.

Returns

: float

Boresight focal plane x coordinate

property detector_center_line

Returns the center detector line of the detector. Expects ikid to be defined. This should be the NAIF integer ID code for the sensor.

We subtract 0.5 from the center line because as per the IK: Center of the first pixel is defined as “1.0”.

Returns

: int

The detector line of the principle point

property detector_center_sample

Returns the center detector sample of the detector. Expects ikid to be defined. This should be the NAIF integer ID code for the sensor.

We subtract 0.5 from the center sample because as per the IK: Center of the first pixel is defined as “1.0”.

Returns

: int

The detector sample of the principle 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 of the spacecraft.

Returns

: float

ephemeris start time of the image

property focal2pixel_lines

Calculated using 1/pixel pitch Expects ikid to be defined. This should be the NAIF integer ID code for the sensor.

Returns

: list

focal plane to detector lines

property focal2pixel_samples

Calculated using 1/pixel pitch Expects ikid to be defined. This should be the NAIF integer ID code for the sensor.

Returns

: list

focal plane to detector samples

property focal_length

Returns camera focal length Expects ikid to be defined. This should be the NAIF ID for the base band.

Returns

: float

Camera focal length

property instrument_id

Id takes the form of LISM_<BASE_BAND> where <BASE_BAND> is which band the bands were registered to.

Returns

: str

instrument id

property line_exposure_duration

Returns Line Exposure Duration

Kaguya has an unintuitive key for this called CORRECTED_SAMPLING_INTERVAL. The original LINE_EXPOSURE_DURATION PDS3 keys is often incorrect and cannot be trusted.

Returns

: float

Line exposure duration

property sensor_frame_id

Returns the sensor frame id. Depends on the instrument that was used to capture the image.

Returns

: int

Sensor frame id

property sensor_model_version

Returns

: int

ISIS sensor model version

property spacecraft_clock_start_count

The original SC_CLOCK_START_COUNT key is often incorrect and cannot be trusted. Therefore we get this information from CORRECTED_SC_CLOCK_START_COUNT

Returns

: float

spacecraft clock start count in seconds

property spacecraft_clock_stop_count

The original SC_CLOCK_STOP_COUNT key is often incorrect and cannot be trusted. Therefore we get this information from CORRECTED_SC_CLOCK_STOP_COUNT

Returns

: float

spacecraft clock stop count in seconds

property spacecraft_name

Returns “MISSION_NAME” as a proxy for spacecraft_name.

No NAIF code exists for the spacecraft name ‘SELENE-M.’ The NAIF code exists only for ‘SELENE’ or ‘KAGUYA’ – ‘SELENE’ is captured as ‘MISSION_NAME’

Returns

: str

mission name

property utc_start_time

Returns corrected utc start time.

If no corrected form is found, defaults to the form specified in parent class.

Returns

: str

Start time of the image in UTC YYYY-MM-DDThh:mm:ss[.fff]

property utc_stop_time

Returns corrected utc start time.

If no corrected form is found, defaults to the form specified in parent class.

Returns

: str

Stop time of the image in UTC YYYY-MM-DDThh:mm:ss[.fff]

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

Bases: LineScanner, IsisLabel, IsisSpice, KaguyaSeleneDistortion, Driver

property boresight_x

Returns the x focal plane coordinate of the boresight. Expects ikid to be defined. This should be the NAIF integer ID for the sensor.

Returns

: float

Boresight focal plane x coordinate

property boresight_y

Returns the y focal plane coordinate of the boresight. Expects ikid to be defined. This should be the NAIF integer ID for the sensor.

Returns

: float

Boresight focal plane x coordinate

property detector_start_line

Returns

: int

Zero based Detector line corresponding to the first image line

property detector_start_sample

Returns

: int

Zero based Detector sample corresponding to the first image sample

property instrument_id

Returns the short name of the instrument

Returns

: str

instrument id

property sensor_model_version

Returns the ISIS camera version

Returns

: int

Camera version number

property spacecraft_name

Returns the name of the spacecraft Returns ——- : str Full name of the spacecraft

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

Bases: LineScanner, Pds3Label, NaifSpice, KaguyaSeleneDistortion, Driver

Driver for a PDS3 Kaguya Terrain Camera (TC) images. Specifically level2b0 mono and stereo images.

NOTES

  • Kaguya has adjusted values for some of its keys, usually suffixed with CORRECTED_. These corrected values should always be preferred over the original values.

  • The Kaguya TC doesn’t use a generic Distortion Model, uses on unique to the TC. Therefore, methods normally in the Distortion classes are reimplemented here.

property boresight_x

Returns the x focal plane coordinate of the boresight. Expects ikid to be defined. This should be the NAIF integer ID for the sensor.

Returns

: float

Boresight focal plane x coordinate

property boresight_y

Returns the y focal plane coordinate of the boresight. Expects ikid to be defined. This should be the NAIF integer ID for the sensor.

Returns

: float

Boresight focal plane x coordinate

property detector_center_line

Returns the center detector line of the detector. Expects tc_id to be defined. This should be a string of the form LISM_TC1 or LISM_TC2.

We subtract 0.5 from the center line because as per the IK: Center of the first pixel is defined as “1.0”.

Returns

: int

The detector line of the principle point

property detector_center_sample

Returns the center detector sample of the detector. Expects tc_id to be defined. This should be a string of the form LISM_TC1 or LISM_TC2.

We subtract 0.5 from the center sample because as per the IK: Center of the first pixel is defined as “1.0”.

Returns

: int

The detector sample of the principle point

property detector_start_line

Returns

: int

Zero based Detector line corresponding to the first image line

property detector_start_sample

Returns starting detector sample

Starting sample varies from swath mode (either FULL, NOMINAL or HALF).

From Kaguya IK kernel:

Sensor

Start Pixel

End Pixel (+dummy)

NAIF ID

LISM_TC1

1

4096

-131351

LISM_TC2

1

4096

-131371

LISM_TC1_WDF (Double DCT Full)

1

4096

-131352

LISM_TC1_WTF (Double Through Full)

1

1600

-131353

LISM_TC1_SDF (Single DCT Full)

1

4096

-131354

LISM_TC1_STF (Single Through Full)

1

3208

-131355

LISM_TC1_WDN (Double DCT Nominal)

297

3796(+4)

-131356

LISM_TC1_WTN (Double Through Nominal)

297

1896

-131357

LISM_TC1_SDN (Single DCT Nominal)

297

3796(+4)

-131358

LISM_TC1_STN (Single Through Nominal)

297

3504

-131359

LISM_TC1_WDH (Double DCT Half)

1172

2921(+2)

-131360

LISM_TC1_WTH (Double Through Half)

1172

2771

-131361

LISM_TC1_SDH (Single DCT Half)

1172

2921(+2)

-131362

LISM_TC1_STH (Single Through Half)

1172

2923

-131363

LISM_TC1_SSH (Single SP_support Half)

1172

2921

-131364

LISM_TC2_WDF (Double DCT Full)

1

4096

-131372

LISM_TC2_WTF (Double Through Full)

1

1600

-131373

LISM_TC2_SDF (Single DCT Full)

1

4096

-131374

LISM_TC2_STF (Single Through Full)

1

3208

-131375

LISM_TC2_WDN (Double DCT Nominal)

297

3796(+4)

-131376

LISM_TC2_WTN (Double Through Nominal)

297

1896

-131377

LISM_TC2_SDN (Single DCT Nominal)

297

3796(+4)

-131378

LISM_TC2_STN (Single Through Nominal)

297

3504

-131379

LISM_TC2_WDH (Double DCT Half)

1172

2921(+2)

-131380

LISM_TC2_WTH (Double Through Half)

1172

2771

-131381

LISM_TC2_SDH (Single DCT Half)

1172

2921(+2)

-131382

LISM_TC2_STH (Single Through Half)

1172

2923

-131383

LISM_TC2_SSH (Single SP_support Half)

1172

2921

-131384

Returns

: int

Detector sample corresponding to the first image sample

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 of the spacecraft.

Returns

: float

ephemeris start time of the image

property exposure_duration

Returns Line Exposure Duration

Kaguya TC has an unintuitive key for this called CORRECTED_SAMPLING_INTERVAL. The original LINE_EXPOSURE_DURATION PDS3 keys is often incorrect and cannot be trusted.

Returns

: float

Line exposure duration

property focal2pixel_lines

Calculated using 1/pixel pitch Expects tc_id to be defined. This should be a string of the form LISM_TC1 or LISM_TC2.

Returns

: list

focal plane to detector lines

property focal2pixel_samples

Calculated using 1/pixel pitch Expects tc_id to be defined. This should be a string of the form LISM_TC1 or LISM_TC2.

Returns

: list

focal plane to detector samples

property focal_length

Returns camera focal length Expects tc_id to be defined. This should be a string of the form LISM_TC1 or LISM_TC2.

Returns

: float

Camera focal length

property ikid

Returns ikid of LISM_TC1 or LISM_TC2, depending which camera was used for capturing the image.

Some keys are stored in the IK kernel under a general ikid for TC1/TC2 presumably because they are not affected by the additional parameters encoded in the ikid returned by self.ikid. This method exists for those gdpool calls.

Expects instrument_id to be defined in the Pds3Label mixin. This should be a string containing either TC1 or TC2

Returns

: int

ikid of LISM_TC1 or LISM_TC2

property instrument_host_name

Returns the name of the instrument host. Kaguya/SELENE labels do not have an explicit instrument host name in the pvl, so we use the spacecraft name.

Returns

: str

Spacecraft name as a proxy for instrument host name.

property instrument_id

Id takes the form of LISM_<INSTRUMENT_ID>_<SD><COMPRESS><SWATH> where

INSTRUMENT_ID = TC1/TC2 SD = S/D short for single or double, which in turn means whether the label belongs to a mono or stereo image.

COMPRESS = D/T short for DCT or through, we assume image has been decompressed already

SWATCH = swatch mode, different swatch modes have different FOVs

Returns

: str

instrument id

property sensor_frame_id

Returns the sensor frame id. Depends on the instrument that was used to capture the image.

Returns

: int

Sensor frame id

property sensor_model_version

Returns

: int

ISIS sensor model version

property spacecraft_clock_start_count

The original SC_CLOCK_START_COUNT key is often incorrect and cannot be trusted. Therefore we get this information from CORRECTED_SC_CLOCK_START_COUNT

Returns

: float

spacecraft clock start count in seconds

property spacecraft_clock_stop_count

The original SC_CLOCK_STOP_COUNT key is often incorrect and cannot be trusted. Therefore we get this information from CORRECTED_SC_CLOCK_STOP_COUNT

Returns

: float

spacecraft clock stop count in seconds

property spacecraft_direction

Gets the moving direction of the spacecraft from the label, where -1 is moving as intended and 1 is moving inverted.

Returns

: int

Moving direction of the spacecraft

property spacecraft_name

Returns “MISSION_NAME” as a proxy for spacecraft_name.

No NAIF code exists for the spacecraft name ‘SELENE-M.’ The NAIF code exists only for ‘SELENE’ or ‘KAGUYA’ – ‘SELENE’ is captured as ‘MISSION_NAME’

Returns

: str

mission name

property utc_start_time

Returns corrected utc start time.

If no corrected form is found, defaults to the form specified in parent class.

Returns

: str

Start time of the image in UTC YYYY-MM-DDThh:mm:ss[.fff]

property utc_stop_time

Returns corrected utc start time.

If no corrected form is found, defaults to the form specified in parent class.

Returns

: str

Stop time of the image in UTC YYYY-MM-DDThh:mm:ss[.fff]