Skip to content
Snippets Groups Projects
Commit 4eaec628 authored by Trent Hare's avatar Trent Hare Committed by Jesse Mapel
Browse files

In support of a domain code review, fix spelling errors

To support a domain code review, this commit largely addresses minor spelling issues in the code's comments. There are a few exceptions listed below.

- ale\base\type_sensor.py : typo fixed in the code line [181](https://github.com/USGS-Astrogeology/ale/blob/ce3a77cb5fb5749bbc67e0e8bd8a82235cb395c5/ale/base/type_sensor.py#L181)
- ale\drivers\co_drivers.py : apparent value typo in line [75](https://github.com/USGS-Astrogeology/ale/blob/ce3a77cb5fb5749bbc67e0e8bd8a82235cb395c5/ale/drivers/co_drivers.py#L75). please validate update.
- ale\util.py : internal only to the script, the function named "case_sensative" was updated to correct misspelling
- tests\pytests\test_cassini_drivers.py : internal only to the script (and test_util.py), the function named "read_detatched_table" was updated to correct misspelling
- tests\pytests\test_lro_drivers.py : unnecessary semicolon was removed.
- tests\pytests\test_util.py see _test_cassini_drivers.py_ for same update above.
parent 290eefbe
No related branches found
No related tags found
No related merge requests found
Showing
with 79 additions and 79 deletions
...@@ -21,7 +21,7 @@ text)](https://creativecommons.org/publicdomain/zero/1.0/legalcode). ...@@ -21,7 +21,7 @@ text)](https://creativecommons.org/publicdomain/zero/1.0/legalcode).
### No Copyright ### No Copyright
The authors have associated their contributions to the ISIS project The authors have associated their contributions to the ALE project
with this deed, and have dedicated the work to the public domain with this deed, and have dedicated the work to the public domain
by waiving all of their rights to the work worldwide under copyright by waiving all of their rights to the work worldwide under copyright
law, including all related and neighboring rights, to the extent law, including all related and neighboring rights, to the extent
......
...@@ -54,7 +54,7 @@ make ...@@ -54,7 +54,7 @@ make
``` ```
Keep in mind that you will need to clone the repository with the `--recursive` flag in order to Keep in mind that you will need to clone the repository with the `--recursive` flag in order to
retrieve the gtest submodule for testing. If you have already cloned without the `--recusive` flag, retrieve the gtest submodule for testing. If you have already cloned without the `--recursive` flag,
running the following command will retrieve the gtest submodule manually: running the following command will retrieve the gtest submodule manually:
```bash ```bash
git submodule update --init --recursive git submodule update --init --recursive
......
...@@ -251,7 +251,7 @@ class Driver(): ...@@ -251,7 +251,7 @@ class Driver():
------- -------
: list : list
3 element list containing affine transformation coefficient. 3 element list containing affine transformation coefficient.
The elements are as follows: constant, x coefficent, y coeffecient The elements are as follows: constant, x coefficient, y coefficient
""" """
raise NotImplementedError raise NotImplementedError
...@@ -262,7 +262,7 @@ class Driver(): ...@@ -262,7 +262,7 @@ class Driver():
------- -------
: list : list
3 element list containing affine transformation coefficients. 3 element list containing affine transformation coefficients.
The elements are as follows: constant, x coefficent, y coeffecient The elements are as follows: constant, x coefficient, y coefficient
""" """
raise NotImplementedError raise NotImplementedError
...@@ -272,7 +272,7 @@ class Driver(): ...@@ -272,7 +272,7 @@ class Driver():
Returns Returns
------- -------
: list : list
3 element list containing coefficience for the pixels to focal plane 3 element list containing coefficients for the pixels to focal plane
transformation. The elements are as follows: constant, sample, line transformation. The elements are as follows: constant, sample, line
""" """
raise NotImplementedError raise NotImplementedError
...@@ -283,7 +283,7 @@ class Driver(): ...@@ -283,7 +283,7 @@ class Driver():
Returns Returns
------- -------
: : list : : list
3 element list containing coefficience for the pixels to focal plane 3 element list containing coefficients for the pixels to focal plane
transformation. The elements are as follows: constant, sample, line transformation. The elements are as follows: constant, sample, line
""" """
raise NotImplementedError raise NotImplementedError
......
...@@ -290,7 +290,7 @@ class IsisSpice(): ...@@ -290,7 +290,7 @@ class IsisSpice():
The hex encoded image start time computed from the The hex encoded image start time computed from the
spacecraft clock count spacecraft clock count
Expects naif_keywords to be defined. This should be a dict containing Expects naif_keywords to be defined. This should be a dict containing
Naif keyworkds from the label. Naif keywords from the label.
Returns Returns
------- -------
...@@ -403,7 +403,7 @@ class IsisSpice(): ...@@ -403,7 +403,7 @@ class IsisSpice():
The line component of the affine transformation The line component of the affine transformation
from focal plane coordinates to centered ccd pixels from focal plane coordinates to centered ccd pixels
Expects naif_keywords to be defined. This should be a dict containing Expects naif_keywords to be defined. This should be a dict containing
Naif keyworkds from the label. Naif keywords from the label.
Expects ikid to be defined. This should be the integer Naif ID code Expects ikid to be defined. This should be the integer Naif ID code
for the instrument. for the instrument.
...@@ -421,7 +421,7 @@ class IsisSpice(): ...@@ -421,7 +421,7 @@ class IsisSpice():
The sample component of the affine transformation The sample component of the affine transformation
from focal plane coordinates to centered ccd pixels from focal plane coordinates to centered ccd pixels
Expects naif_keywords to be defined. This should be a dict containing Expects naif_keywords to be defined. This should be a dict containing
Naif keyworkds from the label. Naif keywords from the label.
Expects ikid to be defined. This should be the integer Naif ID code Expects ikid to be defined. This should be the integer Naif ID code
for the instrument. for the instrument.
...@@ -464,7 +464,7 @@ class IsisSpice(): ...@@ -464,7 +464,7 @@ class IsisSpice():
""" """
The focal length of the instrument The focal length of the instrument
Expects naif_keywords to be defined. This should be a dict containing Expects naif_keywords to be defined. This should be a dict containing
Naif keyworkds from the label. Naif keywords from the label.
Expects ikid to be defined. This should be the integer Naif ID code Expects ikid to be defined. This should be the integer Naif ID code
for the instrument. for the instrument.
...@@ -480,7 +480,7 @@ class IsisSpice(): ...@@ -480,7 +480,7 @@ class IsisSpice():
""" """
The triaxial radii of the target body The triaxial radii of the target body
Expects naif_keywords to be defined. This should be a dict containing Expects naif_keywords to be defined. This should be a dict containing
Naif keyworkds from the label. Naif keywords from the label.
Returns Returns
------- -------
......
...@@ -45,7 +45,7 @@ class NaifSpice(): ...@@ -45,7 +45,7 @@ class NaifSpice():
the path to a directory that contains directories whose naming the path to a directory that contains directories whose naming
convention matches the PDS Kernel Archives format, convention matches the PDS Kernel Archives format,
`shortMissionName-versionInfo`. The directory corresponding to the `shortMissionName-versionInfo`. The directory corresponding to the
driver's mission will be searched for the approriate meta kernel to driver's mission will be searched for the appropriate meta kernel to
load. load.
See Also See Also
...@@ -78,7 +78,7 @@ class NaifSpice(): ...@@ -78,7 +78,7 @@ class NaifSpice():
@property @property
def light_time_correction(self): def light_time_correction(self):
""" """
Returns the type of light time correciton and abberation correction to Returns the type of light time correction and abberation correction to
use in NAIF calls. Expects ikid to be defined. This must be the integer use in NAIF calls. Expects ikid to be defined. This must be the integer
Naif id code of the instrument. Naif id code of the instrument.
...@@ -147,7 +147,7 @@ class NaifSpice(): ...@@ -147,7 +147,7 @@ class NaifSpice():
Returns Returns
------- -------
: int : int
Naif ID used to for indentifying the instrument in Spice kernels Naif ID used to for identifying the instrument in Spice kernels
""" """
return spice.bods2c(self.instrument_id) return spice.bods2c(self.instrument_id)
...@@ -169,7 +169,7 @@ class NaifSpice(): ...@@ -169,7 +169,7 @@ class NaifSpice():
def target_id(self): def target_id(self):
""" """
Returns the Naif ID code for the target body Returns the Naif ID code for the target body
Expects target_name to be defined. This must be a string containig the name Expects target_name to be defined. This must be a string containing the name
of the target body. of the target body.
Returns Returns
...@@ -317,7 +317,7 @@ class NaifSpice(): ...@@ -317,7 +317,7 @@ class NaifSpice():
Returns a tuple with information detailing the sun position at the time Returns a tuple with information detailing the sun position at the time
of the image. Expects center_ephemeris_time to be defined. This must be of the image. Expects center_ephemeris_time to be defined. This must be
a floating point number containing the average of the start and end ephemeris time. a floating point number containing the average of the start and end ephemeris time.
Expects reference frame to be defined. This must be a sring containing the name of Expects reference frame to be defined. This must be a string containing the name of
the target reference frame. Expects target_name to be defined. This must be the target reference frame. Expects target_name to be defined. This must be
a string containing the name of the target body. a string containing the name of the target body.
...@@ -350,7 +350,7 @@ class NaifSpice(): ...@@ -350,7 +350,7 @@ class NaifSpice():
of the image. Expects ephemeris_time to be defined. This must be a floating point number of the image. Expects ephemeris_time to be defined. This must be a floating point number
containing the ephemeris time. Expects spacecraft_name to be defined. This must be a containing the ephemeris time. Expects spacecraft_name to be defined. This must be a
string containing the name of the spacecraft containing the sensor. Expects string containing the name of the spacecraft containing the sensor. Expects
reference_frame to be defined. This must be a sring containing the name of reference_frame to be defined. This must be a string containing the name of
the target reference frame. Expects target_name to be defined. This must be the target reference frame. Expects target_name to be defined. This must be
a string containing the name of the target body. a string containing the name of the target body.
......
...@@ -163,9 +163,9 @@ class Pds3Label(): ...@@ -163,9 +163,9 @@ class Pds3Label():
@property @property
def target_name(self): def target_name(self):
""" """
Returns a target name unquely identifying what an observation was capturing. Returns a target name uniquely identifying what an observation was capturing.
This is most often a body name (e.g., Mars, Moon, Europa). This value is often This is most often a body name (e.g., Mars, Moon, Europa). This value is often
use to acquire Ephermis data from SPICE files; therefore it should be the same use to acquire Ephemeris data from SPICE files; therefore it should be the same
name spicelib expects in bodvrd calls. name spicelib expects in bodvrd calls.
Returns Returns
......
...@@ -159,7 +159,7 @@ class Radar(): ...@@ -159,7 +159,7 @@ class Radar():
@property @property
def wavelength(self): def wavelength(self):
""" """
Returns the wavelength used for image acquistion. Returns the wavelength used for image acquisition.
Returns Returns
------- -------
...@@ -178,7 +178,7 @@ class Radar(): ...@@ -178,7 +178,7 @@ class Radar():
: double : double
Exposure duration for a line Exposure duration for a line
""" """
raise NotImplmentedError raise NotImplementedError
@property @property
......
...@@ -60,7 +60,7 @@ def load(label, props={}, formatter='ale', verbose=False): ...@@ -60,7 +60,7 @@ def load(label, props={}, formatter='ale', verbose=False):
This function opens up the label file and attempts to produce an ISD in the This function opens up the label file and attempts to produce an ISD in the
format specified using the supplied properties. Drivers are tried sequentially format specified using the supplied properties. Drivers are tried sequentially
until an ISD is successfully created. Drivers that use external ephemeris until an ISD is successfully created. Drivers that use external ephemeris
data are tested before drivers that use attached epehemeris data. data are tested before drivers that use attached ephemeris data.
Parameters Parameters
---------- ----------
......
...@@ -72,7 +72,7 @@ nac_filter_to_focal_length = { ...@@ -72,7 +72,7 @@ nac_filter_to_focal_length = {
("IRP0","MT2"):2002.72, ("IRP0","MT2"):2002.72,
("IRP0","MT3"):2002.72, ("IRP0","MT3"):2002.72,
("P120","BL2"):2002.11, ("P120","BL2"):2002.11,
("P120","CB1"):002.28, ("P120","CB1"):2002.28,
("P120","GRN"):2002.38, ("P120","GRN"):2002.38,
("P120","IR1"):2002.39, ("P120","IR1"):2002.39,
("P120","MT1"):2002.54, ("P120","MT1"):2002.54,
...@@ -119,7 +119,7 @@ class CassiniIssPds3LabelNaifSpiceDriver(Framer, Pds3Label, NaifSpice, RadialDis ...@@ -119,7 +119,7 @@ class CassiniIssPds3LabelNaifSpiceDriver(Framer, Pds3Label, NaifSpice, RadialDis
@property @property
def instrument_id(self): def instrument_id(self):
""" """
Returns an instrument id for unquely identifying the instrument, but often Returns an instrument id for uniquely identifying the instrument, but often
also used to be piped into Spice Kernels to acquire instrument kernel (IK) NAIF IDs. also used to be piped into Spice Kernels to acquire instrument kernel (IK) NAIF IDs.
Therefore they use the same NAIF ID asin bods2c calls. Expects instrument_id to be Therefore they use the same NAIF ID asin bods2c calls. Expects instrument_id to be
defined from a mixin class. This should return a string containing either 'ISSNA' or defined from a mixin class. This should return a string containing either 'ISSNA' or
...@@ -213,7 +213,7 @@ class CassiniIssPds3LabelNaifSpiceDriver(Framer, Pds3Label, NaifSpice, RadialDis ...@@ -213,7 +213,7 @@ class CassiniIssPds3LabelNaifSpiceDriver(Framer, Pds3Label, NaifSpice, RadialDis
# number, so the order doesn't matter # number, so the order doesn't matter
def detector_center_line(self): def detector_center_line(self):
""" """
Dectector center based on ISIS's corrected values. Detector center based on ISIS's corrected values.
Returns Returns
------- -------
...@@ -227,7 +227,7 @@ class CassiniIssPds3LabelNaifSpiceDriver(Framer, Pds3Label, NaifSpice, RadialDis ...@@ -227,7 +227,7 @@ class CassiniIssPds3LabelNaifSpiceDriver(Framer, Pds3Label, NaifSpice, RadialDis
# number, so the order doesn't matter # number, so the order doesn't matter
def detector_center_sample(self): def detector_center_sample(self):
""" """
Dectector center based on ISIS's corrected values. Detector center based on ISIS's corrected values.
Returns Returns
------- -------
...@@ -253,7 +253,7 @@ class CassiniIssPds3LabelNaifSpiceDriver(Framer, Pds3Label, NaifSpice, RadialDis ...@@ -253,7 +253,7 @@ class CassiniIssPds3LabelNaifSpiceDriver(Framer, Pds3Label, NaifSpice, RadialDis
""" """
NAC uses multiple filter pairs, each filter combination has a different focal length. NAC uses multiple filter pairs, each filter combination has a different focal length.
NAIF's Cassini kernels do not contain focal lengths for NAC filters and NAIF's Cassini kernels do not contain focal lengths for NAC filters and
so we aquired updated NAC filter data from ISIS's IAK kernel. so we acquired updated NAC filter data from ISIS's IAK kernel.
""" """
# default focal defined by IK kernel # default focal defined by IK kernel
...@@ -365,7 +365,7 @@ class CassiniIssIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, NoDistort ...@@ -365,7 +365,7 @@ class CassiniIssIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, NoDistort
""" """
Returns the middle exposure time for the image in ephemeris seconds. Returns the middle exposure time for the image in ephemeris seconds.
This is overriden because the ISIS ISSNAC and ISSWAC sensor models use the This is overridden because the ISIS ISSNAC and ISSWAC sensor models use the
label utc times so the converted times are not available in the label utc times so the converted times are not available in the
NaifKeywords. Instead we get it from the tables. NaifKeywords. Instead we get it from the tables.
......
...@@ -58,8 +58,8 @@ class DawnFcPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, Driver): ...@@ -58,8 +58,8 @@ class DawnFcPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, Driver):
@property @property
def target_name(self): def target_name(self):
""" """
Returns an target name for unquely identifying the instrument, but often Returns an target name for uniquely identifying the instrument, but often
piped into Spice Kernels to acquire Ephermis data from Spice. Therefore they piped into Spice Kernels to acquire Ephemeris data from Spice. Therefore they
the same ID the Spice expects in bodvrd calls. In this case, vesta images the same ID the Spice expects in bodvrd calls. In this case, vesta images
have a number in front of them like "4 VESTA" which needs to be simplified have a number in front of them like "4 VESTA" which needs to be simplified
to "VESTA" for spice. Expects target_name to be defined in the Pds3Label mixin. to "VESTA" for spice. Expects target_name to be defined in the Pds3Label mixin.
...@@ -168,7 +168,7 @@ class DawnFcPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, Driver): ...@@ -168,7 +168,7 @@ class DawnFcPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, Driver):
def detector_center_sample(self): def detector_center_sample(self):
""" """
Returns center detector sample acquired from Spice Kernels. Returns center detector sample acquired from Spice Kernels.
Expects ikid to be defined. This should be the integer Naid ID code for Expects ikid to be defined. This should be the integer Naif ID code for
the instrument. the instrument.
We have to add 0.5 to the CCD Center because the Dawn IK defines the We have to add 0.5 to the CCD Center because the Dawn IK defines the
...@@ -186,7 +186,7 @@ class DawnFcPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, Driver): ...@@ -186,7 +186,7 @@ class DawnFcPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, Driver):
def detector_center_line(self): def detector_center_line(self):
""" """
Returns center detector line acquired from Spice Kernels. Returns center detector line acquired from Spice Kernels.
Expects ikid to be defined. This should be the integer Naid ID code for Expects ikid to be defined. This should be the integer Naif ID code for
the instrument. the instrument.
We have to add 0.5 to the CCD Center because the Dawn IK defines the We have to add 0.5 to the CCD Center because the Dawn IK defines the
......
...@@ -171,7 +171,7 @@ class IdealLsIsisLabelIsisSpiceDriver(LineScanner, IsisSpice, IsisLabel, NoDisto ...@@ -171,7 +171,7 @@ class IdealLsIsisLabelIsisSpiceDriver(LineScanner, IsisSpice, IsisLabel, NoDisto
""" """
The focal length of the instrument The focal length of the instrument
Expects naif_keywords to be defined. This should be a dict containing Expects naif_keywords to be defined. This should be a dict containing
Naif keyworkds from the label. Naif keywords from the label.
Returns Returns
------- -------
......
...@@ -28,7 +28,7 @@ class JunoJunoCamIsisLabelNaifSpiceDriver(Framer, IsisLabel, NaifSpice, NoDistor ...@@ -28,7 +28,7 @@ class JunoJunoCamIsisLabelNaifSpiceDriver(Framer, IsisLabel, NaifSpice, NoDistor
def ephemeris_start_time(self): def ephemeris_start_time(self):
""" """
Junos camera is split into stacked frames where an image is made Junos camera is split into stacked frames where an image is made
of sets of RGBM chuncks. We need to account for these chuncks since of sets of RGBM chunks. We need to account for these chunks since
ISIS produces some number of cubes N where N = M*4. ISIS produces some number of cubes N where N = M*4.
Computation obtained from JunoCamera.cpp Computation obtained from JunoCamera.cpp
......
...@@ -17,7 +17,7 @@ from ale.base.type_sensor import LineScanner, Radar ...@@ -17,7 +17,7 @@ from ale.base.type_sensor import LineScanner, Radar
class LroLrocPds3LabelNaifSpiceDriver(LineScanner, NaifSpice, Pds3Label, Driver): class LroLrocPds3LabelNaifSpiceDriver(LineScanner, NaifSpice, Pds3Label, Driver):
""" """
Driver for reading LROC NACL, NACR (not WAC, it is a push frame) labels. Requires a Spice mixin to Driver for reading LROC NACL, NACR (not WAC, it is a push frame) labels. Requires a Spice mixin to
acquire addtional ephemeris and instrument data located exclusively in SPICE kernels, A PDS3 label, acquire additional ephemeris and instrument data located exclusively in SPICE kernels, A PDS3 label,
and the LineScanner and Driver bases. and the LineScanner and Driver bases.
""" """
...@@ -102,7 +102,7 @@ class LroLrocPds3LabelNaifSpiceDriver(LineScanner, NaifSpice, Pds3Label, Driver) ...@@ -102,7 +102,7 @@ class LroLrocPds3LabelNaifSpiceDriver(LineScanner, NaifSpice, Pds3Label, Driver)
@property @property
def light_time_correction(self): def light_time_correction(self):
""" """
Returns the type of light time correciton and abberation correction to Returns the type of light time correction and abberation correction to
use in NAIF calls. use in NAIF calls.
LROC is specifically set to not use light time correction because it is LROC is specifically set to not use light time correction because it is
...@@ -221,7 +221,7 @@ class LroLrocPds3LabelNaifSpiceDriver(LineScanner, NaifSpice, Pds3Label, Driver) ...@@ -221,7 +221,7 @@ class LroLrocPds3LabelNaifSpiceDriver(LineScanner, NaifSpice, Pds3Label, Driver)
Returns Returns
------- -------
: float : float
Returns the additionl preroll. Returns the additional preroll.
""" """
return 1024.0 return 1024.0
...@@ -343,7 +343,7 @@ class LroLrocIsisLabelNaifSpiceDriver(LineScanner, NaifSpice, IsisLabel, Driver) ...@@ -343,7 +343,7 @@ class LroLrocIsisLabelNaifSpiceDriver(LineScanner, NaifSpice, IsisLabel, Driver)
@property @property
def light_time_correction(self): def light_time_correction(self):
""" """
Returns the type of light time correciton and abberation correction to Returns the type of light time correction and abberation correction to
use in NAIF calls. use in NAIF calls.
LROC is specifically set to not use light time correction because it is LROC is specifically set to not use light time correction because it is
...@@ -462,7 +462,7 @@ class LroLrocIsisLabelNaifSpiceDriver(LineScanner, NaifSpice, IsisLabel, Driver) ...@@ -462,7 +462,7 @@ class LroLrocIsisLabelNaifSpiceDriver(LineScanner, NaifSpice, IsisLabel, Driver)
Returns Returns
------- -------
: float : float
Returns the additionl preroll. Returns the additional preroll.
""" """
return 1024.0 return 1024.0
...@@ -659,7 +659,7 @@ class LroLrocIsisLabelIsisSpiceDriver(LineScanner, IsisSpice, IsisLabel, Driver) ...@@ -659,7 +659,7 @@ class LroLrocIsisLabelIsisSpiceDriver(LineScanner, IsisSpice, IsisLabel, Driver)
Returns Returns
------- -------
: float : float
Returns the additionl preroll. Returns the additional preroll.
""" """
return 1024.0 return 1024.0
...@@ -728,7 +728,7 @@ class LroMiniRfIsisLabelNaifSpiceDriver(Radar, NaifSpice, IsisLabel, Driver): ...@@ -728,7 +728,7 @@ class LroMiniRfIsisLabelNaifSpiceDriver(Radar, NaifSpice, IsisLabel, Driver):
@property @property
def wavelength(self): def wavelength(self):
""" """
Returns the wavelength in meters used for image acquistion. Returns the wavelength in meters used for image acquisition.
Returns Returns
------- -------
......
...@@ -40,7 +40,7 @@ class MessengerMdisIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, NoDist ...@@ -40,7 +40,7 @@ class MessengerMdisIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, NoDist
Naif ID code used in calculating focal length Naif ID code used in calculating focal length
Expects filter_number to be defined. This should be an integer containing Expects filter_number to be defined. This should be an integer containing
the filter number from the pds3 label. the filter number from the pds3 label.
Expects ikid to be defined. This should be the integer Naid ID code for Expects ikid to be defined. This should be the integer Naif ID code for
the instrument. the instrument.
Returns Returns
...@@ -59,7 +59,7 @@ class MessengerMdisIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, NoDist ...@@ -59,7 +59,7 @@ class MessengerMdisIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, NoDist
@property @property
def instrument_id(self): def instrument_id(self):
""" """
Returns an instrument id for unquely identifying the instrument, but often Returns an instrument id for uniquely identifying the instrument, but often
also used to be piped into Spice Kernels to acquire IKIDs. Therefore they also used to be piped into Spice Kernels to acquire IKIDs. Therefore they
the same ID the Spice expects in bods2c calls. the same ID the Spice expects in bods2c calls.
Expects instrument_id to be defined in the Pds3Label mixin. This should Expects instrument_id to be defined in the Pds3Label mixin. This should
...@@ -75,7 +75,7 @@ class MessengerMdisIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, NoDist ...@@ -75,7 +75,7 @@ class MessengerMdisIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, NoDist
class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortion, Driver): class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortion, Driver):
""" """
Driver for reading MDIS PDS3 labels. Requires a Spice mixin to acquire addtional Driver for reading MDIS PDS3 labels. Requires a Spice mixin to acquire additional
ephemeris and instrument data located exclusively in spice kernels. ephemeris and instrument data located exclusively in spice kernels.
""" """
...@@ -99,7 +99,7 @@ class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortio ...@@ -99,7 +99,7 @@ class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortio
Naif ID code used in calculating focal length Naif ID code used in calculating focal length
Expects filter_number to be defined. This should be an integer containing Expects filter_number to be defined. This should be an integer containing
the filter number from the pds3 label. the filter number from the pds3 label.
Expects ikid to be defined. This should be the integer Naid ID code for Expects ikid to be defined. This should be the integer Naif ID code for
the instrument. the instrument.
Returns Returns
...@@ -118,7 +118,7 @@ class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortio ...@@ -118,7 +118,7 @@ class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortio
@property @property
def instrument_id(self): def instrument_id(self):
""" """
Returns an instrument id for unquely identifying the instrument, but often Returns an instrument id for uniquely identifying the instrument, but often
also used to be piped into Spice Kernels to acquire IKIDs. Therefore they also used to be piped into Spice Kernels to acquire IKIDs. Therefore they
the same ID the Spice expects in bods2c calls. the same ID the Spice expects in bods2c calls.
Expects instrument_id to be defined in the Pds3Label mixin. This should Expects instrument_id to be defined in the Pds3Label mixin. This should
...@@ -155,9 +155,9 @@ class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortio ...@@ -155,9 +155,9 @@ class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortio
""" """
Computes Focal Length from Kernels Computes Focal Length from Kernels
MDIS has tempature dependant focal lengh and coefficients need to MDIS has temperature dependant focal length and coefficients need to
be acquired from IK Spice kernels (coeff describe focal length as a be acquired from IK Spice kernels (coeff describe focal length as a
function of tempature). Focal plane temps are acquired from a PDS3 label. function of temperature). Focal plane temps are acquired from a PDS3 label.
Returns Returns
------- -------
...@@ -177,7 +177,7 @@ class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortio ...@@ -177,7 +177,7 @@ class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortio
def detector_center_sample(self): def detector_center_sample(self):
""" """
Returns center detector sample acquired from Spice Kernels. Returns center detector sample acquired from Spice Kernels.
Expects ikid to be defined. This should be the integer Naid ID code for Expects ikid to be defined. This should be the integer Naif ID code for
the instrument. the instrument.
NOTE: This value is defined in an ISIS iak as 512.5, but we subtract 0.5 from the NOTE: This value is defined in an ISIS iak as 512.5, but we subtract 0.5 from the
...@@ -194,7 +194,7 @@ class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortio ...@@ -194,7 +194,7 @@ class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortio
def detector_center_line(self): def detector_center_line(self):
""" """
Returns center detector line acquired from Spice Kernels. Returns center detector line acquired from Spice Kernels.
Expects ikid to be defined. This should be the integer Naid ID code for Expects ikid to be defined. This should be the integer Naif ID code for
the instrument. the instrument.
NOTE: This value is defined in an ISIS iak as 512.5, but we subtract 0.5 from the NOTE: This value is defined in an ISIS iak as 512.5, but we subtract 0.5 from the
...@@ -252,7 +252,7 @@ class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortio ...@@ -252,7 +252,7 @@ class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortio
class MessengerMdisIsisLabelNaifSpiceDriver(IsisLabel, NaifSpice, Framer, NoDistortion, Driver): class MessengerMdisIsisLabelNaifSpiceDriver(IsisLabel, NaifSpice, Framer, NoDistortion, Driver):
""" """
Driver for reading MDIS ISIS3 Labels. These are Labels that have been ingested Driver for reading MDIS ISIS3 Labels. These are Labels that have been ingested
into ISIS from PDS EDR images. Any SPCIE data attached by the spiceinit application into ISIS from PDS EDR images. Any SPICE data attached by the spiceinit application
will be ignored. will be ignored.
""" """
@property @property
...@@ -331,7 +331,7 @@ class MessengerMdisIsisLabelNaifSpiceDriver(IsisLabel, NaifSpice, Framer, NoDist ...@@ -331,7 +331,7 @@ class MessengerMdisIsisLabelNaifSpiceDriver(IsisLabel, NaifSpice, Framer, NoDist
Naif ID code used in calculating focal length Naif ID code used in calculating focal length
Expects filter_number to be defined. This should be an integer containing Expects filter_number to be defined. This should be an integer containing
the filter number from the pds3 label. the filter number from the pds3 label.
Expects ikid to be defined. This should be the integer Naid ID code for Expects ikid to be defined. This should be the integer Naif ID code for
the instrument. the instrument.
Returns Returns
...@@ -351,9 +351,9 @@ class MessengerMdisIsisLabelNaifSpiceDriver(IsisLabel, NaifSpice, Framer, NoDist ...@@ -351,9 +351,9 @@ class MessengerMdisIsisLabelNaifSpiceDriver(IsisLabel, NaifSpice, Framer, NoDist
""" """
Computes Focal Length from Kernels Computes Focal Length from Kernels
MDIS has tempature dependant focal lengh and coefficients need to MDIS has temperature dependant focal length and coefficients need to
be acquired from IK Spice kernels (coeff describe focal length as a be acquired from IK Spice kernels (coeff describe focal length as a
function of tempature). Focal plane temps are acquired from a PDS3 label. function of temperature). Focal plane temps are acquired from a PDS3 label.
Returns Returns
------- -------
...@@ -372,7 +372,7 @@ class MessengerMdisIsisLabelNaifSpiceDriver(IsisLabel, NaifSpice, Framer, NoDist ...@@ -372,7 +372,7 @@ class MessengerMdisIsisLabelNaifSpiceDriver(IsisLabel, NaifSpice, Framer, NoDist
def detector_center_sample(self): def detector_center_sample(self):
""" """
Returns center detector sample acquired from Spice Kernels Returns center detector sample acquired from Spice Kernels
Expects ikid to be defined. This should be the integer Naid ID code for Expects ikid to be defined. This should be the integer Naif ID code for
the instrument. the instrument.
We subtract 0.5 from the ISIS center sample because ISIS detector We subtract 0.5 from the ISIS center sample because ISIS detector
...@@ -390,7 +390,7 @@ class MessengerMdisIsisLabelNaifSpiceDriver(IsisLabel, NaifSpice, Framer, NoDist ...@@ -390,7 +390,7 @@ class MessengerMdisIsisLabelNaifSpiceDriver(IsisLabel, NaifSpice, Framer, NoDist
def detector_center_line(self): def detector_center_line(self):
""" """
Returns center detector line acquired from Spice Kernels Returns center detector line acquired from Spice Kernels
Expects ikid to be defined. This should be the integer Naid ID code for Expects ikid to be defined. This should be the integer Naif ID code for
the instrument. the instrument.
We subtract 0.5 from the ISIS center line because ISIS detector We subtract 0.5 from the ISIS center line because ISIS detector
...@@ -416,7 +416,7 @@ class MessengerMdisIsisLabelNaifSpiceDriver(IsisLabel, NaifSpice, Framer, NoDist ...@@ -416,7 +416,7 @@ class MessengerMdisIsisLabelNaifSpiceDriver(IsisLabel, NaifSpice, Framer, NoDist
@property @property
def pixel_size(self): def pixel_size(self):
""" """
Overriden because the MESSENGER IK uses PIXEL_PITCH and the units Overridden because the MESSENGER IK uses PIXEL_PITCH and the units
are already millimeters are already millimeters
Returns Returns
......
...@@ -113,7 +113,7 @@ class MexHrscPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, RadialDistor ...@@ -113,7 +113,7 @@ class MexHrscPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, RadialDistor
Returns Returns
------- -------
: int : int
Naif ID used to for indentifying the instrument in Spice kernels Naif ID used to for identifying the instrument in Spice kernels
""" """
return spice.bods2c("MEX_HRSC_HEAD") return spice.bods2c("MEX_HRSC_HEAD")
...@@ -125,7 +125,7 @@ class MexHrscPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, RadialDistor ...@@ -125,7 +125,7 @@ class MexHrscPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, RadialDistor
Expects filter_number to be defined. This should be an integer containing Expects filter_number to be defined. This should be an integer containing
the filter number from the pds3 label. the filter number from the pds3 label.
Expects ikid to be defined. This should be the integer Naid ID code for Expects ikid to be defined. This should be the integer Naif ID code for
the instrument. the instrument.
Returns Returns
...@@ -210,7 +210,7 @@ class MexHrscPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, RadialDistor ...@@ -210,7 +210,7 @@ class MexHrscPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, RadialDistor
def focal2pixel_lines(self): def focal2pixel_lines(self):
""" """
Expects fikid to be defined. This must be the integer Naif id code of Expects fikid to be defined. This must be the integer Naif id code of
the filter-sepcific instrument. the filter-specific instrument.
NOTE: These values are pulled from ISIS iak kernels. NOTE: These values are pulled from ISIS iak kernels.
...@@ -226,7 +226,7 @@ class MexHrscPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, RadialDistor ...@@ -226,7 +226,7 @@ class MexHrscPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, RadialDistor
def focal2pixel_samples(self): def focal2pixel_samples(self):
""" """
Expects fikid to be defined. This must be the integer Naif id code of Expects fikid to be defined. This must be the integer Naif id code of
the filter-sepcific instrument. the filter-specific instrument.
NOTE: These values are pulled from ISIS iak kernels. NOTE: These values are pulled from ISIS iak kernels.
...@@ -311,7 +311,7 @@ class MexHrscPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, RadialDistor ...@@ -311,7 +311,7 @@ class MexHrscPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, RadialDistor
stored in the image data. stored in the image data.
In the image, every line has an entry. This method goes through In the image, every line has an entry. This method goes through
and removes conescutive lines with the same exposure duration. and removes consecutive lines with the same exposure duration.
There are also potentially missing lines in the image which this There are also potentially missing lines in the image which this
method accounts for. method accounts for.
...@@ -346,7 +346,7 @@ class MexHrscPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, RadialDistor ...@@ -346,7 +346,7 @@ class MexHrscPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, RadialDistor
Returns the exposure durations taken from the binary image data. Returns the exposure durations taken from the binary image data.
For HRSC, the exposure durations are imbedded in the binary data of the image. For HRSC, the exposure durations are imbedded in the binary data of the image.
The expsoure durations start at the 9th byte of the line/record and are 4 bytes long. The exposure durations start at the 9th byte of the line/record and are 4 bytes long.
Returns Returns
------- -------
...@@ -556,7 +556,7 @@ class MexHrscIsisLabelNaifSpiceDriver(LineScanner, IsisLabel, NaifSpice, RadialD ...@@ -556,7 +556,7 @@ class MexHrscIsisLabelNaifSpiceDriver(LineScanner, IsisLabel, NaifSpice, RadialD
@property @property
def times_table(self): def times_table(self):
""" """
Returns EphermisTime, ExposureTime, and LinesStart informtation which was stored as Returns EphemerisTime, ExposureTime, and LinesStart informtation which was stored as
binary information in the ISIS cube. binary information in the ISIS cube.
Returns Returns
...@@ -609,7 +609,7 @@ class MexHrscIsisLabelNaifSpiceDriver(LineScanner, IsisLabel, NaifSpice, RadialD ...@@ -609,7 +609,7 @@ class MexHrscIsisLabelNaifSpiceDriver(LineScanner, IsisLabel, NaifSpice, RadialD
Returns Returns
------- -------
: int : int
Naif ID used to for indentifying the instrument in Spice kernels Naif ID used to for identifying the instrument in Spice kernels
""" """
return spice.bods2c("MEX_HRSC_HEAD") return spice.bods2c("MEX_HRSC_HEAD")
...@@ -683,7 +683,7 @@ class MexSrcPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, RadialDistortion, ...@@ -683,7 +683,7 @@ class MexSrcPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, RadialDistortion,
Returns Returns
------- -------
: int : int
Naif ID used to for indentifying the instrument in Spice kernels Naif ID used to for identifying the instrument in Spice kernels
""" """
return spice.bods2c("MEX_HRSC_SRC") return spice.bods2c("MEX_HRSC_SRC")
......
...@@ -110,7 +110,7 @@ class MroCtxIsisLabelNaifSpiceDriver(LineScanner, IsisLabel, NaifSpice, RadialDi ...@@ -110,7 +110,7 @@ class MroCtxIsisLabelNaifSpiceDriver(LineScanner, IsisLabel, NaifSpice, RadialDi
def ephemeris_stop_time(self): def ephemeris_stop_time(self):
""" """
ISIS doesn't preserve the spacecraft stop count that we can use to get ISIS doesn't preserve the spacecraft stop count that we can use to get
the ephemeris stop time of the image, so compute the epehemris stop time the ephemeris stop time of the image, so compute the ephemeris stop time
from the start time and the exposure duration. from the start time and the exposure duration.
""" """
return self.ephemeris_start_time + self.exposure_duration * self.image_lines return self.ephemeris_start_time + self.exposure_duration * self.image_lines
...@@ -168,7 +168,7 @@ class MroCtxIsisLabelNaifSpiceDriver(LineScanner, IsisLabel, NaifSpice, RadialDi ...@@ -168,7 +168,7 @@ class MroCtxIsisLabelNaifSpiceDriver(LineScanner, IsisLabel, NaifSpice, RadialDi
class MroCtxPds3LabelNaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, RadialDistortion, Driver): class MroCtxPds3LabelNaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, RadialDistortion, Driver):
""" """
Driver for reading CTX PDS3 labels. Requires a Spice mixin to acquire addtional Driver for reading CTX PDS3 labels. Requires a Spice mixin to acquire additional
ephemeris and instrument data located exclusively in spice kernels. ephemeris and instrument data located exclusively in spice kernels.
""" """
......
...@@ -17,8 +17,8 @@ class KaguyaTcPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, Driver): ...@@ -17,8 +17,8 @@ class KaguyaTcPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, Driver):
NOTES NOTES
----- -----
* Kaguaya has adjusted values for some of its keys, usually suffixed with `CORRECTED_`. * Kaguya has adjusted values for some of its keys, usually suffixed with `CORRECTED_`.
These corrected values should always be preffered over the original values. 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. * 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. Therefore, methods normally in the Distortion classes are reimplemented here.
...@@ -119,7 +119,7 @@ class KaguyaTcPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, Driver): ...@@ -119,7 +119,7 @@ class KaguyaTcPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, Driver):
for capturing the image. for capturing the image.
Some keys are stored in the IK kernel under a general ikid for TC1/TC2 Some keys are stored in the IK kernel under a general ikid for TC1/TC2
presumably because they are not affected by the addtional parameters encoded in 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. 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 Expects instrument_id to be defined in the Pds3Label mixin. This should be
...@@ -328,7 +328,7 @@ class KaguyaTcPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, Driver): ...@@ -328,7 +328,7 @@ class KaguyaTcPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, Driver):
""" """
# It's a list, but only sometimes. # It's a list, but only sometimes.
# seems to depend on whether you are using the original zipped archives or # seems to depend on whether you are using the original zipped archives or
# if its downloaded from Jaxa's image search: # if its downloaded from JAXA's image search:
# (https://darts.isas.jaxa.jp/planet/pdap/selene/product_search.html#) # (https://darts.isas.jaxa.jp/planet/pdap/selene/product_search.html#)
try: try:
return self.label['CORRECTED_SAMPLING_INTERVAL'][0].value * 0.001 # Scale to seconds return self.label['CORRECTED_SAMPLING_INTERVAL'][0].value * 0.001 # Scale to seconds
...@@ -782,7 +782,7 @@ class KaguyaMiPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, Driver): ...@@ -782,7 +782,7 @@ class KaguyaMiPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, Driver):
""" """
# It's a list, but only sometimes. # It's a list, but only sometimes.
# seems to depend on whether you are using the original zipped archives or # seems to depend on whether you are using the original zipped archives or
# if its downloaded from Jaxa's image search: # if its downloaded from JAXA's image search:
# (https://darts.isas.jaxa.jp/planet/pdap/selene/product_search.html#) # (https://darts.isas.jaxa.jp/planet/pdap/selene/product_search.html#)
try: try:
return self.label['CORRECTED_SAMPLING_INTERVAL'][0].value * 0.001 # Scale to seconds return self.label['CORRECTED_SAMPLING_INTERVAL'][0].value * 0.001 # Scale to seconds
...@@ -1130,7 +1130,7 @@ class KaguyaMiIsisLabelNaifSpiceDriver(LineScanner, NaifSpice, IsisLabel, Driver ...@@ -1130,7 +1130,7 @@ class KaguyaMiIsisLabelNaifSpiceDriver(LineScanner, NaifSpice, IsisLabel, Driver
""" """
# It's a list, but only sometimes. # It's a list, but only sometimes.
# seems to depend on whether you are using the original zipped archives or # seems to depend on whether you are using the original zipped archives or
# if its downloaded from Jaxa's image search: # if its downloaded from JAXA's image search:
# (https://darts.isas.jaxa.jp/planet/pdap/selene/product_search.html#) # (https://darts.isas.jaxa.jp/planet/pdap/selene/product_search.html#)
try: try:
return self.label['IsisCube']['Instrument']['CorrectedSamplingInterval'][0].value * 0.001 # Scale to seconds return self.label['IsisCube']['Instrument']['CorrectedSamplingInterval'][0].value * 0.001 # Scale to seconds
......
...@@ -30,7 +30,7 @@ class VikingIsisLabelNaifSpiceDriver(Framer, IsisLabel, NaifSpice, Driver): ...@@ -30,7 +30,7 @@ class VikingIsisLabelNaifSpiceDriver(Framer, IsisLabel, NaifSpice, Driver):
@property @property
def instrument_id(self): def instrument_id(self):
""" """
Overriden to check that the instrument ID is correct Overridden to check that the instrument ID is correct
Returns Returns
------- -------
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{ {
"name": "ale", "name": "ale",
"organization": "U.S. Geological Survey", "organization": "U.S. Geological Survey",
"description": "GitHub respository for the Abstraction Layer for Ephemerides package", "description": "GitHub repository for the Abstraction Layer for Ephemerides package",
"version": "0.8.7", "version": "0.8.7",
"status": "Production", "status": "Production",
......
...@@ -33,10 +33,10 @@ def test_load_isis(): ...@@ -33,10 +33,10 @@ def test_load_isis():
label_file = get_image_label("N1702360370_1", label_type="isis3") label_file = get_image_label("N1702360370_1", label_type="isis3")
compare_dict = get_isd("cassiniiss_isis") compare_dict = get_isd("cassiniiss_isis")
def read_detatched_table(table_label, cube): def read_detached_table(table_label, cube):
return get_table_data("N1702360370_1", table_label["Name"]) return get_table_data("N1702360370_1", table_label["Name"])
with patch('ale.base.data_isis.read_table_data', side_effect=read_detatched_table): with patch('ale.base.data_isis.read_table_data', side_effect=read_detached_table):
isd_str = ale.loads(label_file) isd_str = ale.loads(label_file)
isd_obj = json.loads(isd_str) isd_obj = json.loads(isd_str)
print(json.dumps(isd_obj, indent=2)) print(json.dumps(isd_obj, indent=2))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment