Commit f0f0b9f0 authored by acpaquette's avatar acpaquette Committed by Jesse Mapel
Browse files

Docs! (#365)

* File renames

* Small spacing consistencies for doc strings

* Fixes doc build warnings for lro_drivers

* Large documentation update. Adds a bunch of new doc pages and fixes various doc strings within the code base.

* Small change to the formatter and error message

* Potential fix to account for framers in the ISD object

* Changed angular_velocity keyword in ISDS to angular_velocities

* Updated ISD test with new expected error message
parent 72e490a1
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -61,6 +61,16 @@ def load(label, props={}, formatter='ale', verbose=False):
    ----------
    label : str
               String path to the given label file

    props : dict
            A dictionary of optional keywords/parameters for use in driver
            loading

    formatter : str
                Formatted output to expect from the driver

    verbose : bool
              If True, displays error messages from driver loading
    """
    if isinstance(formatter, str):
        formatter = __formatters__[formatter]
+46 −45
Original line number Diff line number Diff line
@@ -456,6 +456,7 @@ class LroLrocIsisLabelNaifSpiceDriver(LineScanner, NaifSpice, IsisLabel, Driver)
    def additional_preroll(self):
        """
        Returns the addition preroll defined in an IAK.

        Returns
        -------
        : float
+5 −5
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ class NewHorizonsLorriIsisLabelNaifSpiceDriver(Framer, IsisLabel, NaifSpice, Dri
        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
@@ -51,4 +52,3 @@ class NewHorizonsLorriIsisLabelNaifSpiceDriver(Framer, IsisLabel, NaifSpice, Dri
          Naif Integer ID code for the instrument
        """
        return self.label['IsisCube']['Kernels']['NaifFrameCode']
+65 −39
Original line number Diff line number Diff line
@@ -63,8 +63,11 @@ class KaguyaTcPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, Driver):

        INSTRUMENT_ID = TC1/TC2
        SD = S/D short for single or double, which in turn means whether the
             the label belongs to a mono or stereo image.
        COMPRESS = D/T short for DCT or through, we assume image has been decompressed already
        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
@@ -395,40 +398,65 @@ class KaguyaTcPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, Driver):

        From Kaguya IK kernel:
        
                                                     End
                                               Start Pixel
        Sensor                                 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

        +-----------------------------------------+--------------+----------------------+---------+
        | 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
        -------
@@ -822,5 +850,3 @@ class KaguyaMiPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, Driver):
          ISIS sensor model version
        """
        return 1

+2 −2
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ def to_isd(driver):
    instrument_pointing['ck_table_original_size'] = len(time_dependent_rotation.times)
    instrument_pointing['ephemeris_times'] = time_dependent_rotation.times
    instrument_pointing['quaternions'] = time_dependent_rotation.quats[:, [3, 0, 1, 2]]
    instrument_pointing['angular_velocity'] = time_dependent_rotation.av
    instrument_pointing['angular_velocities'] = time_dependent_rotation.av

    # reference frame should be the last frame in the chain
    instrument_pointing["reference_frame"] = instrument_pointing['time_dependent_frames'][-1]
@@ -121,7 +121,7 @@ def to_isd(driver):
        body_rotation['ck_table_original_size'] = len(time_dependent_rotation.times)
        body_rotation['ephemeris_times'] = time_dependent_rotation.times
        body_rotation['quaternions'] = time_dependent_rotation.quats[:, [3, 0, 1, 2]]
        body_rotation['angular_velocity'] = time_dependent_rotation.av
        body_rotation['angular_velocities'] = time_dependent_rotation.av

    if source_frame != target_frame:
        # Reverse the frame order because ISIS orders frames as
Loading