Skip to content
Snippets Groups Projects
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
Branches
Tags
No related merge requests found
Showing
with 206 additions and 49 deletions
:mod:`hayabusa2_drivers` --- Hayabusa2 Driver Classes
=====================================================
The :mod:`ale.drivers.hayabusa2_drivers` module
.. versionadded:: 0.8.1
.. automodule:: ale.drivers.hayabusa2_drivers
:synopsis:
:members:
:show-inheritance:
:mod:`python` --- Input/Output Algorithms
============================================
:mod:`python` --- Driver Interfaces
===================================
.. autofunction:: ale.drivers.load
.. toctree::
base
cassini_driver
co_driver
dawn_driver
hayabusa2_driver
isis_ideal_driver
juno_driver
lro_driver
mdis_driver
mess_driver
mex_driver
mro_driver
nh_driver
ody_driver
selene_driver
tgo_driver
viking_driver
voyager_driver
util
.. autofunction:: ale.drivers.__init__.load
:mod:`isis_ideal_drivers` --- ISIS Ideal Camera Driver Classes
==============================================================
The :mod:`ale.drivers.isis_ideal_drivers` module
.. versionadded:: 0.8.1
.. automodule:: ale.drivers.isis_ideal_drivers
:synopsis:
:members:
:show-inheritance:
:mod:`juno_drivers` --- Juno Driver Classes
===========================================
The :mod:`ale.drivers.juno_drivers` module
.. versionadded:: 0.8.1
.. automodule:: ale.drivers.juno_drivers
:synopsis:
:members:
:show-inheritance:
:mod:`lro_driver` --- LRO Driver Classes
============================================
:mod:`lro_drivers` --- LRO Driver Classes
=========================================
The :mod:`ale.drivers.lro_driver` module
The :mod:`ale.drivers.lro_drivers` module
.. versionadded:: 0.1.0
......
:mod:`mdis_driver` --- MDIS Driver Classes
:mod:`mess_drivers` --- MDIS Driver Classes
============================================
The :mod:`ale.drivers.mess_drivers` module
......
:mod:`mex_drivers` --- Mars Express Driver Classes
==================================================
The :mod:`ale.drivers.mex_drivers` module
.. versionadded:: 0.8.1
.. automodule:: ale.drivers.mex_drivers
:synopsis:
:members:
:show-inheritance:
:mod:`mro_driver` --- MRO Driver Classes
:mod:`mro_drivers` --- MRO Driver Classes
============================================
The :mod:`ale.drivers.mro_drivers` module
......
:mod:`nh_drivers` --- New Horizons Driver Classes
=================================================
The :mod:`ale.drivers.nh_drivers` module
.. versionadded:: 0.8.1
.. automodule:: ale.drivers.nh_drivers
:synopsis:
:members:
:show-inheritance:
:mod:`ody_drivers` --- Odyssey Driver Classes
=============================================
The :mod:`ale.drivers.ody_drivers` module
.. versionadded:: 0.8.1
.. automodule:: ale.drivers.ody_drivers
:synopsis:
:members:
:show-inheritance:
:mod:`selene_drivers` --- Selene Driver Classes
================================================
The :mod:`ale.drivers.selene_drivers` module
.. versionadded:: 0.8.1
.. automodule:: ale.drivers.selene_drivers
:synopsis:
:members:
:show-inheritance:
:mod:`tgo_drivers` --- Trace Gas Oribiter Driver Classes
========================================================
The :mod:`ale.drivers.tgo_drivers` module
.. versionadded:: 0.8.1
.. automodule:: ale.drivers.tgo_drivers
:synopsis:
:members:
:show-inheritance:
:mod:`viking_drivers` --- Viking Driver Classes
===============================================
The :mod:`ale.drivers.viking_drivers` module
.. versionadded:: 0.8.1
.. automodule:: ale.drivers.viking_drivers
:synopsis:
:members:
:show-inheritance:
:mod:`voyager_drivers` --- Voyager Driver Classes
=================================================
The :mod:`ale.drivers.voyager_drivers` module
.. versionadded:: 0.8.1
.. automodule:: ale.drivers.voyager_drivers
:synopsis:
:members:
:show-inheritance:
......@@ -24,6 +24,7 @@ namespace ale {
/**
* Linearly interpolate between two values.
*
* @param x The first value.
* @param y The second value.
* @param t The distance to interpolate. 0 is x and 1 is y.
......@@ -32,6 +33,7 @@ namespace ale {
/**
* Linearly interpolate between two vectors.
*
* @param x The first vectors.
* @param y The second vectors.
* @param t The distance to interpolate. 0 is x and 1 is y.
......@@ -42,6 +44,7 @@ namespace ale {
/**
* Compute the index of the first time to use when interpolating at a given time.
*
* @param times The ordered vector of times to search. Must have at least 2 times.
* @param interpTime The time to search for the interpolation index of.
* @return int The index of the time that comes before interpTime. If there is
......
......@@ -29,9 +29,23 @@ namespace ale {
std::string loads(std::string filename, std::string props="", std::string formatter="usgscsm", bool verbose=true);
/**
* Load all of the metadata fro an image into a JSON ISD.
* Load all of the metadata for an image into a JSON ISD.
* This method is a convenience wrapper around the loads method that parses the
* string output of loads into a JSON object.
*
* @param filename The filename of the image to load metadata for
* @param props A JSON formatted properties string to pass to the Python drivers.
* Users can specify certain properties that the drivers will use.
* Currently kernels and nadir properties are allowed. See the
* data_naif driver mix-in for details.
* @param formatter A string specifying the format of the output ISD string.
* Currently supported formatters are isis, usgscsm, and ale.
* The isis and usgscsm formatters will be deprecated in the future.
* @param verbose A flag to output what the load function is attempting to do.
* If set to true, information about the drivers load attempts
* to use will be output to standard out.
*
* @returns A string containing a JSON formatted ISD for the image.
*/
nlohmann::json load(std::string filename, std::string props="", std::string formatter="usgscsm", bool verbose=true);
}
......
......@@ -18,20 +18,24 @@ namespace ale {
* Construct a default identity rotation.
*/
Rotation();
/**
* Construct a rotation from a quaternion
*
* @param w The scalar component of the quaternion.
* @param x The x value of the vector component of the quaternion.
* @param y The y value of the vector component of the quaternion.
* @param z The z value of the vector component of the quaternion.
*/
Rotation(double w, double x, double y, double z);
/**
* Construct a rotation from a rotation matrix.
*
* @param matrix The rotation matrix in row-major order.
*/
Rotation(const std::vector<double>& matrix);
/**
* Construct a rotation from a set of Euler angle rotations.
*
......@@ -40,6 +44,7 @@ namespace ale {
* 0 is X, 1 is Y, and 2 is Z.
*/
Rotation(const std::vector<double>& angles, const std::vector<int>& axes);
/**
* Construct a rotation from a rotation about an axis.
*
......@@ -63,12 +68,14 @@ namespace ale {
* @return The rotation as a scalar-first quaternion (w, x, y, z).
*/
std::vector<double> toQuaternion() const;
/**
* The rotation as a rotation matrix.
*
* @return The rotation as a rotation matrix in row-major order.
*/
std::vector<double> toRotationMatrix() const;
/**
* Create a state rotation matrix from the rotation and an angula velocity.
*
......@@ -77,6 +84,7 @@ namespace ale {
* @return The state rotation matrix in row-major order.
*/
std::vector<double> toStateRotationMatrix(const Vec3d &av) const;
/**
* The rotation as Euler angles.
*
......@@ -85,6 +93,7 @@ namespace ale {
* @return The rotations about the axes in radians.
*/
std::vector<double> toEuler(const std::vector<int>& axes) const;
/**
* The rotation as a rotation about an axis.
*
......@@ -104,16 +113,19 @@ namespace ale {
Vec3d operator()(const Vec3d &av) const;
State operator()(const State &state, const Vec3d& av = Vec3d(0.0, 0.0, 0.0)) const;
/**
* Get the inverse rotation.
*/
Rotation inverse() const;
/**
* Chain this rotation with another rotation.
*
* Rotations are sequenced right to left.
*/
Rotation operator*(const Rotation& rightRotation) const;
/**
* Interpolate between this rotation and another rotation.
*
......
......@@ -18,7 +18,14 @@ ale::Isd::Isd(std::string isd_file) {
starting_ephemeris_time = getStartingTime(isd);
center_ephemeris_time = getCenterTime(isd);
try {
line_scan_rate = getLineScanRate(isd);
} catch (...) {
// Framers do not deal with line scan rates
// This is assuming that we may be dealing with a framer rather than
// a malformed ISD
line_scan_rate = {{}};
}
detector_sample_summing = getSampleSumming(isd);
detector_line_summing = getLineSumming(isd);
......
......@@ -148,8 +148,7 @@ std::vector<std::vector<double>> getLineScanRate(json isd) {
lines.push_back(scanRate.get<std::vector<double>>());
}
} catch (...) {
throw std::runtime_error("Could not parse the integration start lines in "
"the integration time table.");
throw std::runtime_error("Could not parse the line scan rate from the isd.");
}
return lines;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment