@@ -47,6 +50,7 @@ Group = Mapping
LongitudeDirection = PositiveEastLongitudeDomain = 360
PixelResolution = 505.3668 <meters/pixel>
+ ObliquePixelResolution = 791.251 <meters/pixel>
Scale = 84.2676 <pixels/degree>
MinPixelResolution = 483.45317995544 <meters>
MaxPixelResolution = 527.28051834369 <meters>
@@ -106,6 +110,11 @@ End
Updated to use new Target class. References Mantis tickets #775 and #1114.
+
+ Updated to use upated Camera/CameraPointInfo classes which include improved approximations
+ to Pixel/Detector/Line/Sample resolutions, as well as providing the ability for developers
+ to order the fields in CSV/Pvl output. References #476"
+
diff --git a/isis/src/base/apps/phocube/phocube.cpp b/isis/src/base/apps/phocube/phocube.cpp
index 5a4e691f229cdd41fd571161b82beaef869604b0..8d26d05d2fe11be316d91593ea07e59b44f995e1 100644
--- a/isis/src/base/apps/phocube/phocube.cpp
+++ b/isis/src/base/apps/phocube/phocube.cpp
@@ -34,6 +34,7 @@ bool pixelResolution;
bool lineResolution;
bool sampleResolution;
bool detectorResolution;
+bool obliqueDetectorResolution;
bool northAzimuth;
bool sunAzimuth;
bool spacecraftAzimuth;
@@ -119,6 +120,7 @@ void IsisMain() {
lineResolution = false;
sampleResolution = false;
detectorResolution = false;
+ obliqueDetectorResolution = false;
sunAzimuth = false;
spacecraftAzimuth = false;
offnadirAngle = false;
@@ -141,6 +143,7 @@ void IsisMain() {
if ((lineResolution = ui.GetBoolean("LINERESOLUTION"))) nbands++;
if ((sampleResolution = ui.GetBoolean("SAMPLERESOLUTION"))) nbands++;
if ((detectorResolution = ui.GetBoolean("DETECTORRESOLUTION"))) nbands++;
+ if ((obliqueDetectorResolution = ui.GetBoolean("OBLIQUEDETECTORRESOLUTION"))) nbands++;
if ((sunAzimuth = ui.GetBoolean("SUNAZIMUTH"))) nbands++;
if ((spacecraftAzimuth = ui.GetBoolean("SPACECRAFTAZIMUTH"))) nbands++;
if ((offnadirAngle = ui.GetBoolean("OFFNADIRANGLE"))) nbands++;
@@ -193,6 +196,7 @@ void IsisMain() {
if (lineResolution) name += "Line Resolution";
if (sampleResolution) name += "Sample Resolution";
if (detectorResolution) name += "Detector Resolution";
+ if (obliqueDetectorResolution) name += "Oblique Detector Resolution";
if (northAzimuth) name += "North Azimuth";
if (sunAzimuth) name += "Sun Azimuth";
if (spacecraftAzimuth) name += "Spacecraft Azimuth";
@@ -365,6 +369,10 @@ void phocube(Buffer &out) {
out[index] = cam->DetectorResolution();
index += 64 * 64;
}
+ if(obliqueDetectorResolution) {
+ out[index] = cam->ObliqueDetectorResolution();
+ index += 64 * 64;
+ }
if(northAzimuth) {
out[index] = cam->NorthAzimuth();
index += 64 * 64;
diff --git a/isis/src/base/apps/phocube/phocube.xml b/isis/src/base/apps/phocube/phocube.xml
index 64bef127a69733e59e26db2895f29e85c5039279..c11aef79d3d90ee2961f290088a884c9bad16066 100644
--- a/isis/src/base/apps/phocube/phocube.xml
+++ b/isis/src/base/apps/phocube/phocube.xml
@@ -1,6 +1,8 @@
-
+
Creates photometric and geometric information bands for an image cube
@@ -80,28 +82,32 @@
The following options are available for Level1 images that contain a camera model:
-
DN
-
PHASE
-
EMISSION
-
INCIDENCE
-
LOCALEMISSION
-
LOCALINCIDENCE
-
LATITUDE
-
LONGITUDE
-
PIXELRESOLUTION
-
LINERESOLUTION
-
SAMPLERESOLUTION
-
DETECTORRESOLUTION
-
NORTHAZIMUTH
-
SUNAZIMUTH
-
SPACECRAFTAZIMUTH
-
OFFNADIRANGLE
-
SUBSPACECRAFTGROUNDAZIMUTH
-
SUBSOLARGROUNDAZIMUTH
+
+
DN
+
EMISSION
+
INCIDENCE
+
PHASE
+
OFFNADIRANGLE
+
+
LOCALEMISSION
+
LOCALINCIDENCE
+
+
LATITUDE
+
LONGITUDE
+
DETECTORRESOLUTION
+
OBLIQUEDETECTORRESOLUTION
+
PIXELRESOLUTION
+
LINERESOLUTION
+
SAMPLERESOLUTION
+
NORTHAZIMUTH
+
SUNAZIMUTH
+
SPACECRAFTAZIMUTH
+
SUBSPACECRAFTGROUNDAZIMUTH
+
SUBSOLARGROUNDAZIMUTH
MORPHOLOGY
-
ALBEDO
-
RADEC
-
BODYFIXED
+
ALBEDO
+
RADEC (Right Ascension, Declination )
+
BODYFIXED
The following options are available for Level2 images:
@@ -287,8 +293,13 @@
Added Ra/Dec and Body Fixed Coordinates options to help create new camera models and help
- with mission team operations. References #2277."
+ with mission team operations. References #2277.
+
+
+ Added an ObliqueDetectorResolution band. This is an improvement over the previous DetectorResolution
+ function (particularly for images taken near the limb of the target). References #476, #4100.
+
@@ -369,6 +380,7 @@
LINERESOLUTIONSAMPLERESOLUTIONDETECTORRESOLUTION
+ OBLIQUEDETECTORRESOLUTIONSUNAZIMUTHSPACECRAFTAZIMUTHOFFNADIRANGLE
@@ -532,6 +544,20 @@
in millimeters.
+
+
+ boolean
+ FALSE
+ Create an oblique detector resolution band
+
+ If this parameter is true, the Oblique Detector Resolution will be
+ computed for every pixel and placed in a band in the output cube. The
+ output cube labels will contain "Oblique Detector Resolution" in the BandBin
+ group, in band sequence of the output file. ObliqueDetectorResolution is
+ in millimeters.
+
+
+
booleanFALSE
diff --git a/isis/src/base/apps/phocube/tsts/allbands/Makefile b/isis/src/base/apps/phocube/tsts/allbands/Makefile
index 20cf96c70c0bd91b36d7bcca255733dfd194bf0f..38711ba743ee08717f4d13b986c05ca82154aee8 100644
--- a/isis/src/base/apps/phocube/tsts/allbands/Makefile
+++ b/isis/src/base/apps/phocube/tsts/allbands/Makefile
@@ -20,6 +20,7 @@ commands:
lineresolution=true \
sampleresolution=true \
detectorresolution=true \
+ obliquedetectorresolution=true \
northazimuth=true \
sunazimuth=true \
spacecraftazimuth=true \
diff --git a/isis/src/base/objs/Application/Application.cpp b/isis/src/base/objs/Application/Application.cpp
index 7913b33b4cab2a3bf1fa016224c1649b861a02f4..01c062cd370d2720457a8e16f2e174a812e18360 100644
--- a/isis/src/base/objs/Application/Application.cpp
+++ b/isis/src/base/objs/Application/Application.cpp
@@ -132,6 +132,7 @@ namespace Isis {
QString xmlfile = f.expanded();
p_ui = new UserInterface(xmlfile, argc, argv);
+
if (!p_ui->IsInteractive()) {
// Get the starting wall clock time
p_datetime = DateTime(&p_startTime);
@@ -139,9 +140,15 @@ namespace Isis {
if (p_applicationForceGuiApp) {
new QApplication(argc, argv);
+ // When QApplication is initialized, it will reset the locale to the shells locale. As a result
+ // the locale needs to be reset after QApplications initialization.
+ setlocale(LC_ALL, "en_US");
}
else {
new QCoreApplication(argc, argv);
+ // When QCoreApplication is initialized, it will reset the locale to the shells locale. As a result
+ // the locale needs to be reset after QCoreApplications initialization.
+ setlocale(LC_ALL, "en_US");
}
QCoreApplication::setApplicationName(FileName(p_appName).baseName());
diff --git a/isis/src/base/objs/Application/Application.h b/isis/src/base/objs/Application/Application.h
index 3e8beadf20945f9d1c65b9f28e9a853975e7d6f5..5064ab4f492d075bcf0983b0db6895bbece08f1c 100644
--- a/isis/src/base/objs/Application/Application.h
+++ b/isis/src/base/objs/Application/Application.h
@@ -108,6 +108,8 @@ namespace Isis {
* Also needed to define a compiler directive,
* USE_GUI_QAPP, to bypass a problem the Macs have
* with using QApplication. References #575.
+ * @history 2016-08-15 Adam Paquette - Reset locale after QApplication or
+ * QCoreApplication are instantiated. Fixes #3908.
*/
class Application : public Environment {
public:
diff --git a/isis/src/base/objs/Camera/Camera.cpp b/isis/src/base/objs/Camera/Camera.cpp
index c864cf3566e1c24d807a990585c85359d9627b0b..7b6ce249baee2ce390f53b56756a7ca206f49af9 100644
--- a/isis/src/base/objs/Camera/Camera.cpp
+++ b/isis/src/base/objs/Camera/Camera.cpp
@@ -22,10 +22,11 @@
*/
#include "Camera.h"
+
+#include
#include
#include
#include
-#include
#include
#include
@@ -61,10 +62,10 @@
using namespace std;
namespace Isis {
+
/**
- * Constructs the Camera object
- *
- * @param lab Pvl label used to create the Camera object
+ * @brief Constructs the Camera object.
+ * @param cube The Pvl label from the cube is used to create the Camera object.
*/
Camera::Camera(Cube &cube) : Sensor(cube) {
m_instrumentNameLong = "Unknown";
@@ -153,15 +154,13 @@ namespace Isis {
}
}
-
/**
- * Sets the sample/line values of the image to get the lat/lon values
- *
- * @param sample Sample coordinate of the cube
- * @param line Line coordinate of the cube
+ * @brief Sets the sample/line values of the image to get the lat/lon values.
*
- * @return @b bool Returns true if the image was set successfully and false if it
- * was not
+ * @param sample Sample coordinate of the cube.
+ * @param line Line coordinate of the cube.
+ * @return @b bool Returns True if the image was set successfully and Talse if it
+ * was not.
*/
bool Camera::SetImage(const double sample, const double line) {
p_childSample = sample;
@@ -275,7 +274,6 @@ namespace Isis {
return false;
}
-
/**
* Sets the lat/lon values to get the sample/line values
*
@@ -416,9 +414,10 @@ namespace Isis {
}
}
else { // ring plane
- // UniversalLongitude should return azimuth (ring longitude) in this case TODO: when we make the change
- // to real azimuths this value may need to be adjusted or code changed in the shapemodel or
- // surfacepoint class.
+ // UniversalLongitude should return azimuth (ring longitude) in this case
+ // TODO:
+ // when we make the change to real azimuths this value may need to be adjusted or
+ // code changed in the shapemodel or surfacepoint class.
if (p_projection->SetUniversalGround(LocalRadius().meters(), UniversalLongitude())) {
p_childSample = p_projection->WorldX();
p_childLine = p_projection->WorldY();
@@ -438,14 +437,14 @@ namespace Isis {
/**
- * Sets the lat/lon/radius values to get the sample/line values
+ * @brief Sets the lat/lon/radius values to get the sample/line values
*
* @param latitude Latitude coordinate of the cube
* @param longitude Longitude coordinate of the cube
* @param radius Radius coordinate of the cube
*
- * @return @b bool Returns true if the Universal Ground was set successfully
- * and false if it was not
+ * @return @b bool Returns True if the Universal Ground was set successfully
+ * and False if it was not
*/
bool Camera::SetUniversalGround(const double latitude, const double longitude,
const double radius) {
@@ -460,8 +459,114 @@ namespace Isis {
return false;
}
+
+
+ /**
+ * @description This function provides an improved estimate of the detector resolution (in meters)
+ * when the target is near the limb. It does this by calculating the determinant of an affine
+ * transformation. The area element of one pixel projected onto the surface at Nadir looks
+ * like a square with sides of length = Detector Resolution. The detector resolution is the
+ * value returned by the original function. An affine projective transformation of this
+ * area element as one would see if it was on the limb instead of looking straight down, appears
+ * like a skewed parallelogram.
+ *
+ * The determinant of the transformation matrix taking the Nadir-area element into
+ * some parallelogram near the limb of a planet measures the change in area for the
+ * transformation when we are off-Nadir. The sqare-root of the area of this parallelogram
+ * gives us the resolution.
+ *
+ *The calculation is straightforward. Any affine transformation with a strictly positive
+ *determinant that is not a similarity transformation has a unique decomposition
+ *(See Theorem 2.1 in Reference #1):
+ *
+ *
+ *
+ *
+ * @f{eqnarray*}
+ *
+ * A = \[\left[\begin{array}{cc} a & b \\
+ * c & d \end{array} \right]\] =
+ *
+ * H_{\lambda}R_1(\psi)T_tR_2(\phi) = \lambda
+ * \[ \left[\begin{array}{cc} cos(\psi) & -sin(\psi) \\
+ * sin(\psi) & cos(\psi) \end{array} \right]\]
+ * \[ \left[\begin{array}{cc} t & 0 \\
+ * 0 & 1 \end{array} \right]\]
+ * \[ \left[\begin{array}{cc} cos(\phi) & -sin(\phi) \\
+ * sin(\phi) & cos(\phi) \end{array} \right]\]
+ *
+ * @f}
+ *
+ * Where:
+ *
+ * @f$ t = \frac{1}{cos(\theta)}},\;\;\theta = \text{Emmission\;\; Angle}@f$
+ * and @f$\lambda = \text{zoom\;\;factor} = 1@f$
+ *
+ * The determinant of A is:
+ *
+ * @f[ |A| = \lambda t = \frac{\lambda}{cos(\theta)} = \frac{1}{\cos(\theta)} @f]
+ *
+ * This is because the two rotation matrices in this decomposition have determinants equal to 1.
+ *
+ * Let @f$ n = \text{Detector\;\;Resolution} @f$
+ *
+ * Then:
+ *
+ * @f[ Area = n^2 |A| =\frac{n^2}{cos(\theta)}@f]
+ *
+ * And:
+ *
+ * @f[ \text{Local\;\;Detector\;\; Resolution} = \frac{n}{\sqrt{cos(\theta)}} @f]
+ *
+ *
+ * This method returns the Local Detector Resolution if the Look Vector intersects the target
+ * and if @f$ 0 \leq \theta < \frac{\pi}{2} @f$ and -1.0 otherwise.
+ *
+ *
+ *
+ *
+ * Reference 1: J-M Morel and G. Yu, "Asift: A new framework for fully affine
+ * invariant image comparison," SIAM Journal on Imaging Sciences
+ * 2(2), pp. 438-469, 2009
+ *
+ *
+ * @return @b double
+ */
+ double Camera::ObliqueDetectorResolution(){
+
+
+ if(HasSurfaceIntersection()){
+
+
+ double thetaRad;
+ double sB[3];
+ instrumentPosition(sB);
+ double pB[3];
+ Coordinate(pB);
+ double a = sB[0] - pB[0];
+ double b = sB[1] - pB[1];
+ double c = sB[2] - pB[2];
+ double rho = sqrt(a * a + b * b + c * c) * 1000.0;
+
+ thetaRad = EmissionAngle()*DEG2RAD;
+
+ if (thetaRad < HALFPI) {
+
+ double nadirResolution = rho/(p_focalLength/p_pixelPitch);
+ return nadirResolution/sqrt(cos(thetaRad));
+
+ }
+ return Isis::Null;
+
+ }
+
+ return Isis::Null;
+
+ }
+
+
/**
- * Returns the detector resolution at the current position
+ * @brief Returns the detector resolution at the current position in meters.
*
* @return @b double The detector resolution
*/
@@ -480,17 +585,31 @@ namespace Isis {
return Isis::Null;
}
+
/**
- * Returns the sample resolution at the current position
+ * @brief Returns the sample resolution at the current position in meters.
*
* @return @b double The sample resolution
*/
double Camera::SampleResolution() {
+
return DetectorResolution() * p_detectorMap->SampleScaleFactor();
}
/**
- * Returns the line resolution at the current position
+ * @brief Returns the oblique sample resolution at the current position in m. This gives
+ * a more accurate estimate of the sample resolution at oblique angles.
+ *
+ * @return @b double The sample resolution
+ */
+ double Camera::ObliqueSampleResolution() {
+
+ return ObliqueDetectorResolution() * p_detectorMap->SampleScaleFactor();
+ }
+
+
+ /**
+ * @brief Returns the line resolution at the current position in meters.
*
* @return @b double The line resolution
*/
@@ -498,9 +617,22 @@ namespace Isis {
return DetectorResolution() * p_detectorMap->LineScaleFactor();
}
+
/**
- * Returns the pixel resolution at the current position in m/pix
+ * @brief Returns the oblique line resolution at the current position in meters. This
+ * provides a more accurate estimate of the line resolution at oblique
+ * angles.
*
+ * @return @b double The line resolution
+ */
+ double Camera::ObliqueLineResolution() {
+
+ return ObliqueDetectorResolution() * p_detectorMap->LineScaleFactor();
+ }
+
+
+ /**
+ * @brief Returns the pixel resolution at the current position in meters/pixel.
* @return @b double The pixel resolution
*/
double Camera::PixelResolution() {
@@ -511,8 +643,24 @@ namespace Isis {
return (lineRes + sampRes) / 2.0;
}
+
+ /**
+ * @brief Returns the oblique pixel resolution at the current position in meters/pixel. This
+ * provides a more accurate estimate of the pixel resolution at oblique angles.
+ *
+ * @return @b double The pixel resolution
+ */
+ double Camera::ObliquePixelResolution() {
+ double lineRes = ObliqueLineResolution();
+ double sampRes = ObliqueSampleResolution();
+ if (lineRes < 0.0) return Isis::Null;
+ if (sampRes < 0.0) return Isis::Null;
+ return (lineRes + sampRes) / 2.0;
+ }
+
+
/**
- * Returns the lowest/worst resolution in the entire image
+ * @brief Returns the lowest/worst resolution in the entire image
*
* @return @b double The lowest/worst resolution in the image
*/
@@ -521,8 +669,9 @@ namespace Isis {
return p_maxres;
}
+
/**
- * Returns the highest/best resolution in the entire image
+ * @brief Returns the highest/best resolution in the entire image
*
* @return @b double The highest/best resolution in the entire image
*/
@@ -531,8 +680,31 @@ namespace Isis {
return p_minres;
}
+
+ /**
+ * @brief Returns the lowest/worst oblique resolution in the entire image
+ *
+ * @return @b double The lowest/worst oblique resolution in the image
+ */
+ double Camera::LowestObliqueImageResolution() {
+ GroundRangeResolution();
+ return p_minobliqueres;
+ }
+
+
/**
- * Computes the ground range and min/max resolution
+ * @brief Returns the highest/best oblique resolution in the entire image
+ *
+ * @return @b double The highest/best oblique resolution in the entire image
+ */
+ double Camera::HighestObliqueImageResolution() {
+ GroundRangeResolution();
+ return p_maxobliqueres;
+ }
+
+
+ /**
+ * @brief Computes the ground range and min/max resolution
*/
void Camera::GroundRangeResolution() {
// Software adjustment is needed if we get here -- call RingRangeResolution instead
@@ -560,6 +732,8 @@ namespace Isis {
p_maxlon180 = -DBL_MAX;
p_minres = DBL_MAX;
p_maxres = -DBL_MAX;
+ p_minobliqueres = DBL_MAX;
+ p_maxobliqueres = -DBL_MAX;
// See if we have band dependence and loop for the appropriate number of bands
int eband = p_bands;
@@ -591,6 +765,13 @@ namespace Isis {
if (res < p_minres) p_minres = res;
if (res > p_maxres) p_maxres = res;
}
+ // Determine min/max oblique resolution
+ double obliqueres = ObliquePixelResolution();
+ if (obliqueres > 0.0) {
+ if (obliqueres < p_minobliqueres) p_minobliqueres = obliqueres;
+ if (obliqueres > p_maxobliqueres) p_maxobliqueres = obliqueres;
+
+ }
if ((line != 1) && (line != p_lines + 1)) break;
}
} // end loop through samples
@@ -619,6 +800,14 @@ namespace Isis {
if (res < p_minres) p_minres = res;
if (res > p_maxres) p_maxres = res;
}
+
+ // Determine min/max oblique resolution
+ double obliqueres = ObliquePixelResolution();
+ if (obliqueres > 0.0) {
+ if (obliqueres < p_minobliqueres) p_minobliqueres = obliqueres;
+ if (obliqueres > p_maxobliqueres) p_maxobliqueres = obliqueres;
+
+ }
break;
}
}
@@ -648,6 +837,13 @@ namespace Isis {
if (res < p_minres) p_minres = res;
if (res > p_maxres) p_maxres = res;
}
+
+ double obliqueres = ObliquePixelResolution();
+ if (obliqueres > 0.0) {
+ if (obliqueres < p_minobliqueres) p_minobliqueres = obliqueres;
+ if (obliqueres > p_maxobliqueres) p_maxobliqueres = obliqueres;
+
+ }
}
}
} // end valid local (subspacecraft) radius
@@ -738,7 +934,9 @@ namespace Isis {
// Checks for invalid lat/lon ranges
-// if(p_minlon == DBL_MAX || p_minlat == DBL_MAX || p_maxlon == -DBL_MAX || p_maxlat == -DBL_MAX) {
+// if(p_minlon == DBL_MAX || p_minlat == DBL_MAX || p_maxlon == -DBL_MAX
+// || p_maxlat == -DBL_MAX)
+// {
// string message = "Camera missed planet or SPICE data off.";
// throw IException(IException::Unknown, message, _FILEINFO_);
// }
@@ -746,7 +944,7 @@ namespace Isis {
/**
- * Analogous to above GroundRangeResolution method. Computes the ring range
+ * @brief Analogous to above GroundRangeResolution method. Computes the ring range
* and min/max resolution
*/
void Camera::ringRangeResolution() {
@@ -916,7 +1114,8 @@ namespace Isis {
}
// Checks for invalid radius/lon ranges
- if (p_minRingRadius == DBL_MAX || p_minRingRadius == DBL_MAX || p_minRingLongitude == DBL_MAX || p_maxRingLongitude == -DBL_MAX) {
+ if (p_minRingRadius == DBL_MAX || p_minRingRadius == DBL_MAX
+ || p_minRingLongitude == DBL_MAX || p_maxRingLongitude == -DBL_MAX) {
string message = "RingPlane ShapeModel - Camera missed plane or SPICE data off.";
throw IException(IException::Unknown, message, _FILEINFO_);
}
@@ -1152,7 +1351,8 @@ namespace Isis {
* @param pvl Pvl to write mapping group to
*/
void Camera::basicRingMapping(Pvl &pvl) {
- if (target()->shape()->name() != "Plane") { // If we get here and we don't have a plane, throw an error
+ if (target()->shape()->name() != "Plane") {
+ // If we get here and we don't have a plane, throw an error
IString msg = "A ring plane projection has been requested on an image whose shape is not a ring plane. ";
msg += "Rerun spiceinit with shape=RINGPLANE. ";
throw IException(IException::User, msg, _FILEINFO_);
@@ -1189,6 +1389,8 @@ namespace Isis {
SetPixelPitch(Spice::getDouble(key));
}
+
+
/**
* Sets the right ascension declination
*
@@ -1456,6 +1658,8 @@ namespace Isis {
// angle (in radians)
incidence = Angle(vsep_c(unitizedSurfSunVect, normal),
Angle::Radians);
+
+
}
@@ -1466,12 +1670,13 @@ namespace Isis {
* @param maxra Maximum right ascension value
* @param mindec Minimum declination value
* @param maxdec Maximum declination value
- *
* @return @b bool Returns true if the range computation was successful and false
* if it was not
*/
bool Camera::RaDecRange(double &minra, double &maxra,
double &mindec, double &maxdec) {
+
+
bool computed = p_pointComputed;
double originalSample = Sample();
double originalLine = Line();
@@ -1611,6 +1816,7 @@ namespace Isis {
* @return @b double The resutant RaDec resolution
*/
double Camera::RaDecResolution() {
+
bool computed = p_pointComputed;
double originalSample = Sample();
double originalLine = Line();
@@ -1687,7 +1893,6 @@ namespace Isis {
return ComputeAzimuth(LocalRadius(lat, lon), lat, lon);
}
-
/**
* Return the Spacecraft Azimuth
*
@@ -1701,7 +1906,6 @@ namespace Isis {
return ComputeAzimuth(LocalRadius(lat, lon), lat, lon);
}
-
/**
* Computes the image azimuth value from your current position (origin) to a point of interest
* specified by the lat/lon input to this method. (NOTE: This azimuth is different from a Ground
@@ -1952,7 +2156,6 @@ namespace Isis {
return azimuth;
}
-
/**
* Return the off nadir angle in degrees.
*
@@ -1978,7 +2181,6 @@ namespace Isis {
return c;
}
-
/**
* Computes and returns the ground azimuth between the ground point and
* another point of interest, such as the subspacecraft point or the
@@ -2106,7 +2308,6 @@ namespace Isis {
p_distortionMap = map;
}
-
/**
* Sets the Focal Plane Map. This object will take ownership of the focal plane
* map pointer.
@@ -2121,7 +2322,6 @@ namespace Isis {
p_focalPlaneMap = map;
}
-
/**
* Sets the Detector Map. This object will take ownership of the detector map
* pointer.
@@ -2136,7 +2336,6 @@ namespace Isis {
p_detectorMap = map;
}
-
/**
* Sets the Ground Map. This object will take ownership of the ground map
* pointer.
@@ -2151,7 +2350,6 @@ namespace Isis {
p_groundMap = map;
}
-
/**
* Sets the Sky Map. This object will take ownership of the sky map pointer.
*
@@ -2165,7 +2363,6 @@ namespace Isis {
p_skyMap = map;
}
-
/**
* This loads the spice cache big enough for this image. The default cache size
* is the number of lines in the cube if the ephemeris time changes in the
@@ -2261,7 +2458,6 @@ namespace Isis {
return ephemerisTimes;
}
-
/**
* This method calculates the spice cache size. This method finds the number
* of lines in the beta cube and adds 1, since we need at least 2 points for
@@ -2346,7 +2542,6 @@ namespace Isis {
p_geometricTilingEndSize = endSize;
}
-
/**
* This will get the geometric tiling hint; these values are typically used for
* ProcessRubberSheet::SetTiling(...).
@@ -2380,7 +2575,6 @@ namespace Isis {
return true;
}
-
/**
* Checks to see if the camera object has a projection
*
@@ -2389,8 +2583,7 @@ namespace Isis {
*/
bool Camera::HasProjection() {
return p_projection != 0;
- }
-
+ }
/**
* Virtual method that checks if the band is independent
@@ -2402,7 +2595,6 @@ namespace Isis {
return true;
}
-
/**
* Returns the reference band
*
@@ -2412,7 +2604,6 @@ namespace Isis {
return p_referenceBand;
}
-
/**
* Checks to see if the Camera object has a reference band
*
@@ -2423,7 +2614,6 @@ namespace Isis {
return p_referenceBand != 0;
}
-
/**
* Virtual method that sets the band number
*
@@ -2433,7 +2623,6 @@ namespace Isis {
p_childBand = band;
}
-
/**
* Returns the current sample number
*
@@ -2443,7 +2632,6 @@ namespace Isis {
return p_childSample;
}
-
/**
* Returns the current band
*
@@ -2453,7 +2641,6 @@ namespace Isis {
return p_childBand;
}
-
/**
* Returns the current line number
*
@@ -2462,8 +2649,6 @@ namespace Isis {
double Camera::Line() {
return p_childLine;
}
-
-
/**
* Returns the resolution of the camera
*
@@ -2474,6 +2659,8 @@ namespace Isis {
}
+
+
/**
* Returns the focal length
*
@@ -2483,7 +2670,6 @@ namespace Isis {
return p_focalLength;
}
-
/**
* Returns the pixel pitch
*
@@ -2493,7 +2679,6 @@ namespace Isis {
return p_pixelPitch;
}
-
/**
* Returns the pixel ifov offsets from center of pixel, which defaults to the
* (pixel pitch * summing mode ) / 2. If an instrument has a non-square ifov, it must implement
@@ -2525,7 +2710,6 @@ namespace Isis {
return p_samples;
}
-
/**
* Returns the number of lines in the image
*
@@ -2535,7 +2719,6 @@ namespace Isis {
return p_lines;
}
-
/**
* Returns the number of bands in the image
*
@@ -2545,7 +2728,6 @@ namespace Isis {
return p_bands;
}
-
/**
* Returns the number of lines in the parent alphacube
*
@@ -2555,7 +2737,6 @@ namespace Isis {
return p_alphaCube->AlphaLines();
}
-
/**
* Returns the number of samples in the parent alphacube
*
@@ -2564,8 +2745,6 @@ namespace Isis {
int Camera::ParentSamples() const {
return p_alphaCube->AlphaSamples();
}
-
-
/**
* Returns a pointer to the CameraDistortionMap object
*
@@ -2575,7 +2754,6 @@ namespace Isis {
return p_distortionMap;
}
-
/**
* Returns a pointer to the CameraFocalPlaneMap object
*
@@ -2585,7 +2763,6 @@ namespace Isis {
return p_focalPlaneMap;
}
-
/**
* Returns a pointer to the CameraDetectorMap object
*
@@ -2595,7 +2772,6 @@ namespace Isis {
return p_detectorMap;
}
-
/**
* Returns a pointer to the CameraGroundMap object
*
@@ -2605,7 +2781,6 @@ namespace Isis {
return p_groundMap;
}
-
/**
* Returns a pointer to the CameraSkyMap object
*
@@ -2794,3 +2969,5 @@ namespace Isis {
// end namespace isis
}
+
+
diff --git a/isis/src/base/objs/Camera/Camera.h b/isis/src/base/objs/Camera/Camera.h
index 4f1721c52a929ea043463ccb4dcfb192520ef7cb..1942cd7a730b9f3d1ab09775b91cbfd215b0dfff 100644
--- a/isis/src/base/objs/Camera/Camera.h
+++ b/isis/src/base/objs/Camera/Camera.h
@@ -213,15 +213,15 @@ namespace Isis {
* @history 2015-10-16 Ian Humphrey - Added protected members for spacecraft and instrument
* names as well as public member getters. Updated unit test.
* References #2335.
- * @history 2015-09-01 Ian Humphrey and Makayla Shepherd - Modified unit test to override
- * Sensor's pure virtual methods.
- * @history 2015-10-16 Ian Humphrey - Added protected members for spacecraft and instrument
- * names as well as public member getters. Updated unit test.
- * References #2335.
* @history 2016-06-27 Kelvin Rodriguez - Added member function to compute celestial north
* clock angle. References #2365
* @history 2016-08-01 Curtis Rose - Changed return values of resolutions from -1 to Isis::Null.
* Fixes #2065.
+ * @history 2016-08-16 Tyler Wilson - Added ObliqueDectectorResolution,ObliqueLineResolution,
+ * ObliqueSampleResolution, and ObliquePixelResolution functions
+ * which give greatly improved approximations compared to their
+ * non-oblique counterpart functions when the Look vector is pointing
+ * off nadir and near the limb. Fixes #476. References #4100.
*/
class Camera : public Sensor {
@@ -267,9 +267,17 @@ namespace Isis {
double SampleResolution();
double DetectorResolution();
+ double ObliqueDetectorResolution();
+ double ObliqueSampleResolution();
+ double ObliqueLineResolution();
+ double ObliquePixelResolution();
+
+
virtual double resolution();
double LowestImageResolution();
double HighestImageResolution();
+ double LowestObliqueImageResolution();
+ double HighestObliqueImageResolution();
void BasicMapping(Pvl &map);
void basicRingMapping(Pvl &map);
@@ -288,7 +296,6 @@ namespace Isis {
bool RaDecRange(double &minra, double &maxra,
double &mindec, double &maxdec);
-
double RaDecResolution();
CameraDistortionMap *DistortionMap();
@@ -483,6 +490,8 @@ namespace Isis {
double p_maxlon; //!< The maximum longitude
double p_minres; //!< The minimum resolution
double p_maxres; //!< The maximum resolution
+ double p_minobliqueres; //!< The minimum oblique resolution
+ double p_maxobliqueres; //!< The maximum oblique resolution
double p_minlon180; //!< The minimum longitude in the 180 domain
double p_maxlon180; //!< The maximum longitude in the 180 domain
bool p_groundRangeComputed; /**!< Flag showing if ground range
@@ -520,7 +529,7 @@ namespace Isis {
AlphaCube *p_alphaCube; //!< A pointer to the AlphaCube
double p_childSample; //!< Sample value for child
double p_childLine; //!< Line value for child
- int p_childBand; //!< Band value for child. Should be the virtual band not original band.
+ int p_childBand; //!< Band value for child
CameraDistortionMap *p_distortionMap; //!< A pointer to the DistortionMap
CameraFocalPlaneMap *p_focalPlaneMap; //!< A pointer to the FocalPlaneMap
CameraDetectorMap *p_detectorMap; //!< A pointer to the DetectorMap
@@ -540,3 +549,5 @@ namespace Isis {
};
#endif
+
+
diff --git a/isis/src/base/objs/Camera/Camera.truth b/isis/src/base/objs/Camera/Camera.truth
index e680927f06eb983b4eca184b4205946b6c01aa56..b16d59eb45570fdd7ac01600d91c7349151efdfb 100644
--- a/isis/src/base/objs/Camera/Camera.truth
+++ b/isis/src/base/objs/Camera/Camera.truth
@@ -47,9 +47,13 @@ Line: 962
GroundRange: 0
IntersectsLongitudeDomain: 0
PixelResolution: 628
+ObliquePixelResolution: 685
LineResolution: 628
+ObliqueLineResolution: 685
SampleResolution: 628
+ObliqueSampleResolution: 685
DetectorResolution: 157
+ObliqueDetectorResolution: 171
LowestImageResolution: 2047
HighestImageResolution: 430
Calling BasicMapping (pvl)...
diff --git a/isis/src/base/objs/Camera/unitTest.cpp b/isis/src/base/objs/Camera/unitTest.cpp
index cbfe7d5c623875cf1d7621f7f0db37e1ea391c27..cc71c20dcb03a325815628f530b6df696202845f 100644
--- a/isis/src/base/objs/Camera/unitTest.cpp
+++ b/isis/src/base/objs/Camera/unitTest.cpp
@@ -50,8 +50,8 @@ using namespace Isis;
* (i.e. non-DEM) shape model. References #2243.
* @history 2015-10-16 Ian Humphrey - Updated to test spacecraft and instrument name methods.
* References #2335.
- *
- *
+ * @history 2016-08-19 Tyler Wilson - Updated to test ObliquePixel/ObliqueLine/ObliqueSample
+ * and ObliqueDetector resolutions. References #476.
* testcoverage 2015-04-30 - 43.262% scope, 61.561% line, 87.5% function
*/
@@ -162,9 +162,15 @@ int main() {
}
cout << "PixelResolution: " << c->PixelResolution() << endl;
+ cout << "ObliquePixelResolution: " << c->ObliquePixelResolution() << endl;
cout << "LineResolution: " << c->LineResolution() << endl;
+ cout << "ObliqueLineResolution: " << c->ObliqueLineResolution() << endl;
cout << "SampleResolution: " << c->SampleResolution() << endl;
+ cout << "ObliqueSampleResolution: " << c->ObliqueSampleResolution() << endl;
cout << "DetectorResolution: " << c->DetectorResolution() << endl;
+ cout << "ObliqueDetectorResolution: " << c->ObliqueDetectorResolution() << endl;
+
+
cout << "LowestImageResolution: " << setprecision(4)
<< c->LowestImageResolution() << endl;
cout << "HighestImageResolution: " << setprecision(3)
@@ -628,3 +634,4 @@ int main() {
IException(e, IException::Unknown, msg, _FILEINFO_).print();
}
}
+
diff --git a/isis/src/base/objs/CameraPointInfo/CameraPointInfo.cpp b/isis/src/base/objs/CameraPointInfo/CameraPointInfo.cpp
index 6190b70f7838b24e2a8a88784f49022cf8ad3142..56394ce690fd7c707a1dadb3de31cb82f5bde669 100644
--- a/isis/src/base/objs/CameraPointInfo/CameraPointInfo.cpp
+++ b/isis/src/base/objs/CameraPointInfo/CameraPointInfo.cpp
@@ -55,8 +55,14 @@ namespace Isis {
m_usedCubes->SetNumOpenCubes(50);
m_currentCube = NULL;
m_camera = NULL;
+ m_csvOutput = false;
}
+ void CameraPointInfo::SetCSVOutput(bool csvOutput) {
+
+ m_csvOutput = csvOutput;
+
+ }
/**
* Destructor, deletes CubeManager object used.
@@ -71,9 +77,9 @@ namespace Isis {
/**
- * SetCube opens the given cube in a CubeManager.
- * The CubeManager is for effeciency when working with control
- * nets where cubes are accesed multiple times.
+ * SetCube opens the given cube in a CubeManager.
+ * The CubeManager is for effeciency when working with control
+ * nets where cubes are accesed multiple times.
*
* @param cubeFileName A cube file name.
*/
@@ -90,10 +96,10 @@ namespace Isis {
* @param sample A sample coordinate in or almost in the cube.
* @param line A line coordinate in or almost in the cube.
* @param allowOutside Indicates whether to allow extrapolation.
- * @param allowErrors Indicates whether to allow the program to
+ * @param allowErrors Indicates whether to allow the program to
* throw an error if a problem occurs.
*
- * @return @b PvlGroup* The pertinent data from the Camera class on the point.
+ * @return @b PvlGroup* The pertinent data from the Camera class on the point.
* Ownership is passed to caller.
*/
PvlGroup *CameraPointInfo::SetImage(const double sample, const double line,
@@ -108,18 +114,18 @@ namespace Isis {
/**
- * SetCenter sets the image coordinates to the center of the image.
- *
+ * SetCenter sets the image coordinates to the center of the image.
+ *
* @param allowOutside Indicates whether to allow extrapolation.
- * @param allowErrors Indicates whether to allow the program to
+ * @param allowErrors Indicates whether to allow the program to
* throw an error if a problem occurs.
*
- * @return @b PvlGroup* The pertinent data from the Camera class on the point.
+ * @return @b PvlGroup* The pertinent data from the Camera class on the point.
* Ownership is passed to caller.
*/
PvlGroup *CameraPointInfo::SetCenter(const bool allowOutside, const bool allowErrors) {
if (CheckCube()) {
- bool passed = m_camera->SetImage(m_currentCube->sampleCount() / 2.0,
+ bool passed = m_camera->SetImage(m_currentCube->sampleCount() / 2.0,
m_currentCube->lineCount() / 2.0);
return GetPointInfo(passed, allowOutside, allowErrors);
}
@@ -134,14 +140,14 @@ namespace Isis {
*
* @param sample A sample coordinate in or almost in the cube.
* @param allowOutside Indicates whether to allow extrapolation.
- * @param allowErrors Indicates whether to allow the program to
+ * @param allowErrors Indicates whether to allow the program to
* throw an error if a problem occurs.
- *
- * @return @b PvlGroup* The pertinent data from the Camera class on the point.
+ *
+ * @return @b PvlGroup* The pertinent data from the Camera class on the point.
* Ownership is passed to caller.
*/
PvlGroup *CameraPointInfo::SetSample(const double sample,
- const bool allowOutside,
+ const bool allowOutside,
const bool allowErrors) {
if (CheckCube()) {
bool passed = m_camera->SetImage(sample, m_currentCube->lineCount() / 2.0);
@@ -158,10 +164,10 @@ namespace Isis {
*
* @param line A line coordinate in or almost in the cube.
* @param allowOutside Indicates whether to allow extrapolation.
- * @param allowErrors Indicates whether to allow the program to
+ * @param allowErrors Indicates whether to allow the program to
* throw an error if a problem occurs.
- *
- * @return @b PvlGroup* The pertinent data from the Camera class on the point.
+ *
+ * @return @b PvlGroup* The pertinent data from the Camera class on the point.
* Ownership is passed to caller.
*/
PvlGroup *CameraPointInfo::SetLine(const double line,
@@ -183,10 +189,10 @@ namespace Isis {
* @param latitude A latitude coordinate in or almost in the cube
* @param longitude A longitude coordinate in or almost in the cube
* @param allowOutside Indicates whether to allow extrapolation.
- * @param allowErrors Indicates whether to allow the program to
+ * @param allowErrors Indicates whether to allow the program to
* throw an error if a problem occurs.
*
- * @return @b PvlGroup* The pertinent data from the Camera class on the point.
+ * @return @b PvlGroup* The pertinent data from the Camera class on the point.
* Ownership is passed to caller.
*/
PvlGroup *CameraPointInfo::SetGround(const double latitude, const double longitude,
@@ -218,65 +224,130 @@ namespace Isis {
/**
* GetPointInfo builds the PvlGroup containing all the important
- * information derived from the Camera.
- *
+ * information derived from the Camera.
+ *
* @param passed Indicates whether the call to SetImage() was successful.
* @param allowOutside Indicates whether to allow extrapolation.
- * @param allowErrors Indicates whether to allow the program to
+ * @param allowErrors Indicates whether to allow the program to
* throw an error if a problem occurs.
*
- * @return @b PvlGroup* Data taken directly from the Camera and
+ * @return @b PvlGroup* Data taken directly from the Camera and
* derived from Camera information.
* Ownership is passed to caller.
*/
PvlGroup *CameraPointInfo::GetPointInfo(bool passed, bool allowOutside, bool allowErrors) {
PvlGroup *gp = new PvlGroup("GroundPoint");
+
+ //Outputting in PVL format
+ if(!m_csvOutput)
{
- gp->addKeyword(PvlKeyword("Filename"));
- gp->addKeyword(PvlKeyword("Sample"));
- gp->addKeyword(PvlKeyword("Line"));
- gp->addKeyword(PvlKeyword("PixelValue"));
- gp->addKeyword(PvlKeyword("RightAscension"));
- gp->addKeyword(PvlKeyword("Declination"));
- gp->addKeyword(PvlKeyword("PlanetocentricLatitude"));
- gp->addKeyword(PvlKeyword("PlanetographicLatitude"));
- gp->addKeyword(PvlKeyword("PositiveEast360Longitude"));
- gp->addKeyword(PvlKeyword("PositiveEast180Longitude"));
- gp->addKeyword(PvlKeyword("PositiveWest360Longitude"));
- gp->addKeyword(PvlKeyword("PositiveWest180Longitude"));
- gp->addKeyword(PvlKeyword("BodyFixedCoordinate"));
- gp->addKeyword(PvlKeyword("LocalRadius"));
- gp->addKeyword(PvlKeyword("SampleResolution"));
- gp->addKeyword(PvlKeyword("LineResolution"));
- gp->addKeyword(PvlKeyword("SpacecraftPosition"));
- gp->addKeyword(PvlKeyword("SpacecraftAzimuth"));
- gp->addKeyword(PvlKeyword("SlantDistance"));
- gp->addKeyword(PvlKeyword("TargetCenterDistance"));
- gp->addKeyword(PvlKeyword("SubSpacecraftLatitude"));
- gp->addKeyword(PvlKeyword("SubSpacecraftLongitude"));
- gp->addKeyword(PvlKeyword("SpacecraftAltitude"));
- gp->addKeyword(PvlKeyword("OffNadirAngle"));
- gp->addKeyword(PvlKeyword("SubSpacecraftGroundAzimuth"));
- gp->addKeyword(PvlKeyword("SunPosition"));
- gp->addKeyword(PvlKeyword("SubSolarAzimuth"));
- gp->addKeyword(PvlKeyword("SolarDistance"));
- gp->addKeyword(PvlKeyword("SubSolarLatitude"));
- gp->addKeyword(PvlKeyword("SubSolarLongitude"));
- gp->addKeyword(PvlKeyword("SubSolarGroundAzimuth"));
- gp->addKeyword(PvlKeyword("Phase"));
- gp->addKeyword(PvlKeyword("Incidence"));
- gp->addKeyword(PvlKeyword("Emission"));
- gp->addKeyword(PvlKeyword("NorthAzimuth"));
- gp->addKeyword(PvlKeyword("EphemerisTime"));
- gp->addKeyword(PvlKeyword("UTC"));
- gp->addKeyword(PvlKeyword("LocalSolarTime"));
- gp->addKeyword(PvlKeyword("SolarLongitude"));
- gp->addKeyword(PvlKeyword("LookDirectionBodyFixed"));
- gp->addKeyword(PvlKeyword("LookDirectionJ2000"));
- gp->addKeyword(PvlKeyword("LookDirectionCamera"));
- if (allowErrors) gp->addKeyword(PvlKeyword("Error"));
+ gp->addKeyword(PvlKeyword("Filename"));
+ gp->addKeyword(PvlKeyword("Sample"));
+ gp->addKeyword(PvlKeyword("Line"));
+ gp->addKeyword(PvlKeyword("PixelValue"));
+ gp->addKeyword(PvlKeyword("RightAscension"));
+ gp->addKeyword(PvlKeyword("Declination"));
+ gp->addKeyword(PvlKeyword("PlanetocentricLatitude"));
+ gp->addKeyword(PvlKeyword("PlanetographicLatitude"));
+ gp->addKeyword(PvlKeyword("PositiveEast360Longitude"));
+ gp->addKeyword(PvlKeyword("PositiveEast180Longitude"));
+ gp->addKeyword(PvlKeyword("PositiveWest360Longitude"));
+ gp->addKeyword(PvlKeyword("PositiveWest180Longitude"));
+ gp->addKeyword(PvlKeyword("BodyFixedCoordinate"));
+ gp->addKeyword(PvlKeyword("LocalRadius"));
+ gp->addKeyword(PvlKeyword("SampleResolution"));
+ gp->addKeyword(PvlKeyword("LineResolution"));
+ gp->addKeyword(PvlKeyword("ObliqueDetectorResolution"));
+ gp->addKeyword(PvlKeyword("ObliquePixelResolution"));
+ gp->addKeyword(PvlKeyword("ObliqueLineResolution"));
+ gp->addKeyword(PvlKeyword("ObliqueSampleResolution"));
+ gp->addKeyword(PvlKeyword("SpacecraftPosition"));
+ gp->addKeyword(PvlKeyword("SpacecraftAzimuth"));
+ gp->addKeyword(PvlKeyword("SlantDistance"));
+ gp->addKeyword(PvlKeyword("TargetCenterDistance"));
+ gp->addKeyword(PvlKeyword("SubSpacecraftLatitude"));
+ gp->addKeyword(PvlKeyword("SubSpacecraftLongitude"));
+ gp->addKeyword(PvlKeyword("SpacecraftAltitude"));
+ gp->addKeyword(PvlKeyword("OffNadirAngle"));
+ gp->addKeyword(PvlKeyword("SubSpacecraftGroundAzimuth"));
+ gp->addKeyword(PvlKeyword("SunPosition"));
+ gp->addKeyword(PvlKeyword("SubSolarAzimuth"));
+ gp->addKeyword(PvlKeyword("SolarDistance"));
+ gp->addKeyword(PvlKeyword("SubSolarLatitude"));
+ gp->addKeyword(PvlKeyword("SubSolarLongitude"));
+ gp->addKeyword(PvlKeyword("SubSolarGroundAzimuth"));
+ gp->addKeyword(PvlKeyword("Phase"));
+ gp->addKeyword(PvlKeyword("Incidence"));
+ gp->addKeyword(PvlKeyword("Emission"));
+ gp->addKeyword(PvlKeyword("NorthAzimuth"));
+ gp->addKeyword(PvlKeyword("EphemerisTime"));
+ gp->addKeyword(PvlKeyword("UTC"));
+ gp->addKeyword(PvlKeyword("LocalSolarTime"));
+ gp->addKeyword(PvlKeyword("SolarLongitude"));
+ gp->addKeyword(PvlKeyword("LookDirectionBodyFixed"));
+ gp->addKeyword(PvlKeyword("LookDirectionJ2000"));
+ gp->addKeyword(PvlKeyword("LookDirectionCamera"));
+
+ if (allowErrors) gp->addKeyword(PvlKeyword("Error"));
}
+ else {
+
+ gp->addKeyword(PvlKeyword("Filename"));
+ gp->addKeyword(PvlKeyword("Sample"));
+ gp->addKeyword(PvlKeyword("Line"));
+ gp->addKeyword(PvlKeyword("PixelValue"));
+ gp->addKeyword(PvlKeyword("RightAscension"));
+ gp->addKeyword(PvlKeyword("Declination"));
+ gp->addKeyword(PvlKeyword("PlanetocentricLatitude"));
+ gp->addKeyword(PvlKeyword("PlanetographicLatitude"));
+ gp->addKeyword(PvlKeyword("PositiveEast360Longitude"));
+ gp->addKeyword(PvlKeyword("PositiveEast180Longitude"));
+ gp->addKeyword(PvlKeyword("PositiveWest360Longitude"));
+ gp->addKeyword(PvlKeyword("PositiveWest180Longitude"));
+ gp->addKeyword(PvlKeyword("BodyFixedCoordinate"));
+ gp->addKeyword(PvlKeyword("LocalRadius"));
+ gp->addKeyword(PvlKeyword("SampleResolution"));
+ gp->addKeyword(PvlKeyword("LineResolution"));
+ gp->addKeyword(PvlKeyword("SpacecraftPosition"));
+ gp->addKeyword(PvlKeyword("SpacecraftAzimuth"));
+ gp->addKeyword(PvlKeyword("SlantDistance"));
+ gp->addKeyword(PvlKeyword("TargetCenterDistance"));
+ gp->addKeyword(PvlKeyword("SubSpacecraftLatitude"));
+ gp->addKeyword(PvlKeyword("SubSpacecraftLongitude"));
+ gp->addKeyword(PvlKeyword("SpacecraftAltitude"));
+ gp->addKeyword(PvlKeyword("OffNadirAngle"));
+ gp->addKeyword(PvlKeyword("SubSpacecraftGroundAzimuth"));
+ gp->addKeyword(PvlKeyword("SunPosition"));
+ gp->addKeyword(PvlKeyword("SubSolarAzimuth"));
+ gp->addKeyword(PvlKeyword("SolarDistance"));
+ gp->addKeyword(PvlKeyword("SubSolarLatitude"));
+ gp->addKeyword(PvlKeyword("SubSolarLongitude"));
+ gp->addKeyword(PvlKeyword("SubSolarGroundAzimuth"));
+ gp->addKeyword(PvlKeyword("Phase"));
+ gp->addKeyword(PvlKeyword("Incidence"));
+ gp->addKeyword(PvlKeyword("Emission"));
+ gp->addKeyword(PvlKeyword("NorthAzimuth"));
+ gp->addKeyword(PvlKeyword("EphemerisTime"));
+ gp->addKeyword(PvlKeyword("UTC"));
+ gp->addKeyword(PvlKeyword("LocalSolarTime"));
+ gp->addKeyword(PvlKeyword("SolarLongitude"));
+ gp->addKeyword(PvlKeyword("LookDirectionBodyFixed"));
+ gp->addKeyword(PvlKeyword("LookDirectionJ2000"));
+ gp->addKeyword(PvlKeyword("LookDirectionCamera"));
+ gp->addKeyword(PvlKeyword("ObliqueDetectorResolution"));
+ gp->addKeyword(PvlKeyword("ObliquePixelResolution"));
+ gp->addKeyword(PvlKeyword("ObliqueLineResolution"));
+ gp->addKeyword(PvlKeyword("ObliqueSampleResolution"));
+ if (allowErrors) gp->addKeyword(PvlKeyword("Error"));
+
+
+
+
+ }
+
+
+
bool noErrors = passed;
QString error = "";
if (!m_camera->HasSurfaceIntersection()) {
@@ -330,7 +401,7 @@ namespace Isis {
double pB[3], spB[3], sB[3];
QString utc;
double ssplat, ssplon, sslat, sslon, ocentricLat, ographicLat, pe360Lon, pw360Lon;
-
+
{
gp->findKeyword("FileName").setValue(m_currentCube->fileName());
gp->findKeyword("Sample").setValue(toString(m_camera->Sample()));
@@ -346,14 +417,14 @@ namespace Isis {
// Convert lat to planetographic
Distance radii[3];
m_camera->radii(radii);
- ographicLat = TProjection::ToPlanetographic(ocentricLat,
- radii[0].kilometers(),
+ ographicLat = TProjection::ToPlanetographic(ocentricLat,
+ radii[0].kilometers(),
radii[2].kilometers());
gp->findKeyword("PlanetographicLatitude").setValue(toString(ographicLat), "DEGREE");
-
+
pe360Lon = m_camera->UniversalLongitude();
gp->findKeyword("PositiveEast360Longitude").setValue(toString(pe360Lon), "DEGREE");
-
+
//Convert lon to -180 - 180 range
gp->findKeyword("PositiveEast180Longitude").setValue(toString(
TProjection::To180Domain(pe360Lon)), "DEGREE");
@@ -365,7 +436,7 @@ namespace Isis {
//Convert pwlon to -180 - 180 range
gp->findKeyword("PositiveWest180Longitude").setValue(
toString( TProjection::To180Domain(pw360Lon)), "DEGREE");
-
+
m_camera->Coordinate(pB);
gp->findKeyword("BodyFixedCoordinate").addValue(toString(pB[0]), "km");
gp->findKeyword("BodyFixedCoordinate").addValue(toString(pB[1]), "km");
@@ -373,19 +444,28 @@ namespace Isis {
gp->findKeyword("LocalRadius").setValue(toString(
m_camera->LocalRadius().meters()), "meters");
-
gp->findKeyword("SampleResolution").setValue(toString(
m_camera->SampleResolution()), "meters/pixel");
gp->findKeyword("LineResolution").setValue(toString(
m_camera->LineResolution()), "meters/pixel");
+ gp->findKeyword("ObliqueDetectorResolution").setValue(
+ toString(m_camera->ObliqueDetectorResolution()),"meters");
+ gp->findKeyword("ObliqueLineResolution").setValue(
+ toString(m_camera->ObliqueLineResolution()),"meters");
+ gp->findKeyword("ObliqueSampleResolution").setValue(
+ toString(m_camera->ObliqueSampleResolution()),"meters");
+ gp->findKeyword("ObliquePixelResolution").setValue(
+ toString(m_camera->ObliquePixelResolution()), "meters/pix");
+
+
//body fixed
m_camera->instrumentPosition(spB);
gp->findKeyword("SpacecraftPosition").addValue(toString(spB[0]), "km");
gp->findKeyword("SpacecraftPosition").addValue(toString(spB[1]), "km");
gp->findKeyword("SpacecraftPosition").addValue(toString(spB[2]), "km");
gp->findKeyword("SpacecraftPosition").addComment("Spacecraft Information");
-
+
double spacecraftAzi = m_camera->SpacecraftAzimuth();
if (Isis::IsValidPixel(spacecraftAzi)) {
gp->findKeyword("SpacecraftAzimuth").setValue(toString(spacecraftAzi), "DEGREE");
@@ -405,7 +485,7 @@ namespace Isis {
m_camera->SpacecraftAltitude()), "km");
gp->findKeyword("OffNadirAngle").setValue(toString(
m_camera->OffNadirAngle()), "DEGREE");
- double subspcgrdaz = m_camera->GroundAzimuth(m_camera->UniversalLatitude(),
+ double subspcgrdaz = m_camera->GroundAzimuth(m_camera->UniversalLatitude(),
m_camera->UniversalLongitude(),
ssplat, ssplon);
gp->findKeyword("SubSpacecraftGroundAzimuth").setValue(
@@ -416,7 +496,7 @@ namespace Isis {
gp->findKeyword("SunPosition").addValue(toString(sB[1]), "km");
gp->findKeyword("SunPosition").addValue(toString(sB[2]), "km");
gp->findKeyword("SunPosition").addComment("Sun Information");
-
+
double sunAzi = m_camera->SunAzimuth();
if (Isis::IsValidPixel(sunAzi)) {
gp->findKeyword("SubSolarAzimuth").setValue(toString(sunAzi), "DEGREE");
@@ -430,7 +510,7 @@ namespace Isis {
m_camera->subSolarPoint(sslat, sslon);
gp->findKeyword("SubSolarLatitude").setValue(toString(sslat), "DEGREE");
gp->findKeyword("SubSolarLongitude").setValue(toString(sslon), "DEGREE");
- double subsolgrdaz = m_camera->GroundAzimuth(m_camera->UniversalLatitude(),
+ double subsolgrdaz = m_camera->GroundAzimuth(m_camera->UniversalLatitude(),
m_camera->UniversalLongitude(),
sslat, sslon);
gp->findKeyword("SubSolarGroundAzimuth").setValue(
@@ -442,7 +522,7 @@ namespace Isis {
m_camera->IncidenceAngle()), "DEGREE");
gp->findKeyword("Emission").setValue(toString(
m_camera->EmissionAngle()), "DEGREE");
-
+
double northAzi = m_camera->NorthAzimuth();
if (Isis::IsValidPixel(northAzi)) {
gp->findKeyword("NorthAzimuth").setValue(toString(northAzi), "DEGREE");
@@ -487,22 +567,23 @@ namespace Isis {
}
- /**
+ /**
* Retrieves a pointer to the camera.
- *
- * @return @b Camera* A pointer to the Camera.
+ *
+ * @return @b Camera* A pointer to the Camera.
*/
Camera *CameraPointInfo::camera() {
return m_camera;
}
- /**
+ /**
* Retrieves a pointer to the current cube.
- *
- * @return @b Cube* A pointer to the current cube.
+ *
+ * @return @b Cube* A pointer to the current cube.
*/
Cube *CameraPointInfo::cube() {
return m_currentCube;
}
}
+
diff --git a/isis/src/base/objs/CameraPointInfo/CameraPointInfo.h b/isis/src/base/objs/CameraPointInfo/CameraPointInfo.h
index a9df9a9eaf27ab1f5795460e08ad74471cd965c1..63a53f652d8e060c168dc1d00abf7145e6d39fd7 100644
--- a/isis/src/base/objs/CameraPointInfo/CameraPointInfo.h
+++ b/isis/src/base/objs/CameraPointInfo/CameraPointInfo.h
@@ -33,12 +33,12 @@ namespace Isis {
/**
- * @brief CameraPointInfo provides quick access to the majority of information avaliable from a
+ * @brief CameraPointInfo provides quick access to the majority of information avaliable from a
* camera on a point.
*
- * CameraPointInfo provides the functionality which was a part of campt in class form. This
+ * CameraPointInfo provides the functionality which was a part of campt in class form. This
* functionality is access to the majoirty of information avaliable on any given point on an
- * image. The main difference is the use of a CubeManager within CameraPointInfo for effeciency
+ * image. The main difference is the use of a CubeManager within CameraPointInfo for effeciency
* when working with control nets and the opening of cubes several times.
*
* @author 2009-08-25 Mackenzie Boyd
@@ -77,7 +77,18 @@ namespace Isis {
* @history 2015-10-01 Jeannie Backer - Made improvements to documentation and brought code
* closer to ISIS coding standards. References #1438
* @history 2016-07-11 Curtis Rose - Added units to a few of the outputs. References #3979.
- */
+ * @history 2016-08-16 Tyler Wilson - Modified the GetPointInfo function to allow
+ * developers to specify which order CameraPointInfo fields
+ * are output for different file formats (PVL or CSV).
+ * This is managed by setting the m_csvOutput flag via
+ * the public member function SetCSVOutput. PVL is the
+ * default output format, as m_csvOuput is set to false in
+ * the constructor. The reason for this is to not to break any
+ * scripts processors might be running when outputting files in
+ * csv format. Column order is important in this case.
+ * References #476,#4100.
+ *
+ **/
class CameraPointInfo {
public:
@@ -85,6 +96,7 @@ namespace Isis {
virtual ~CameraPointInfo();
void SetCube(const QString &cubeFileName);
+ void SetCSVOutput(bool csvOutput);
PvlGroup *SetImage(const double sample, const double line,
const bool outside = false, const bool error = false);
PvlGroup *SetCenter(const bool outside = false, const bool error = false);
@@ -105,7 +117,9 @@ namespace Isis {
CubeManager *m_usedCubes;
Cube *m_currentCube;
Camera *m_camera;
+ bool m_csvOutput;
};
};
#endif
+
diff --git a/isis/src/base/objs/CameraPointInfo/CameraPointInfo.truth b/isis/src/base/objs/CameraPointInfo/CameraPointInfo.truth
index 21b2839b51ad72269ecdae0a7a45df2c5a9f0889..11c5dfed9067881b2cbda0515cc86bcc6b2eb5f6 100644
--- a/isis/src/base/objs/CameraPointInfo/CameraPointInfo.truth
+++ b/isis/src/base/objs/CameraPointInfo/CameraPointInfo.truth
@@ -15,6 +15,10 @@ Group = GroundPoint
LocalRadius = 1737400.0
SampleResolution = 187.48511798825
LineResolution = 187.48511798825
+ ObliqueDetectorResolution = 187.48933248321
+ ObliquePixelResolution = 187.48933248321
+ ObliqueLineResolution = 187.48933248321
+ ObliqueSampleResolution = 187.48933248321
# Spacecraft Information
SpacecraftPosition = (216.76438021037, 54.256829538645,
@@ -73,6 +77,10 @@ Group = GroundPoint
LocalRadius = 1737400.0
SampleResolution = 187.50339379912
LineResolution = 187.50339379912
+ ObliqueDetectorResolution = 187.52061363579
+ ObliquePixelResolution = 187.52061363579
+ ObliqueLineResolution = 187.52061363579
+ ObliqueSampleResolution = 187.52061363579
# Spacecraft Information
SpacecraftPosition = (216.76438021037, 54.256829538645,
diff --git a/isis/src/base/objs/CameraStatistics/CameraStatistics.cpp b/isis/src/base/objs/CameraStatistics/CameraStatistics.cpp
index dfc288eccf25406c9bda4fef3da978d572ebca27..a99a427cdea426fcc82fe3d55b2a745c2fa77326 100644
--- a/isis/src/base/objs/CameraStatistics/CameraStatistics.cpp
+++ b/isis/src/base/objs/CameraStatistics/CameraStatistics.cpp
@@ -93,6 +93,13 @@ namespace Isis {
m_latStat = new Statistics();
m_lonStat = new Statistics();
m_resStat = new Statistics();
+
+
+ m_obliqueResStat = new Statistics();
+ m_obliqueSampleResStat = new Statistics();
+ m_obliqueLineResStat = new Statistics();
+
+
m_sampleResStat = new Statistics();
m_lineResStat = new Statistics();
m_aspectRatioStat = new Statistics();
@@ -157,6 +164,25 @@ namespace Isis {
delete m_resStat;
m_resStat = NULL;
}
+
+
+ if (m_obliqueLineResStat != NULL) {
+ delete m_obliqueLineResStat;
+ m_obliqueLineResStat = NULL;
+
+ }
+
+ if (m_obliqueSampleResStat != NULL) {
+ delete m_obliqueSampleResStat;
+ m_obliqueSampleResStat = NULL;
+
+ }
+
+ if (m_obliqueResStat != NULL) {
+ delete m_obliqueResStat;
+ m_obliqueResStat = NULL;
+ }
+
if (m_sampleResStat != NULL) {
delete m_sampleResStat;
m_sampleResStat = NULL;
@@ -209,6 +235,14 @@ namespace Isis {
if(cam->HasSurfaceIntersection()) {
m_latStat->AddData(cam->UniversalLatitude());
m_lonStat->AddData(cam->UniversalLongitude());
+
+
+ m_obliqueResStat->AddData(cam->ObliquePixelResolution());
+ m_obliqueSampleResStat->AddData(cam->ObliqueSampleResolution());
+ m_obliqueLineResStat->AddData(cam->ObliqueLineResolution());
+
+
+
m_resStat->AddData(cam->PixelResolution());
m_sampleResStat->AddData(cam->SampleResolution());
m_lineResStat->AddData(cam->LineResolution());
@@ -219,7 +253,7 @@ namespace Isis {
m_localRaduisStat->AddData(cam->LocalRadius().meters());
// if IsValid
m_northAzimuthStat->AddData(cam->NorthAzimuth());
-
+
// if resolution not equal to -1.0
double aspectRatio = cam->LineResolution() / cam->SampleResolution();
m_aspectRatioStat->AddData(aspectRatio);
@@ -253,7 +287,7 @@ namespace Isis {
/**
* Constructs a Pvl object from the values in the various statistics objects.
* The general format will look as follows:
- *
+ *
* @code
* Group = User Parameters
* Filename (not provided for constructor w/ Camera but not filename)
@@ -344,6 +378,37 @@ namespace Isis {
pLon += constructKeyword("LongitudeAverage", m_lonStat->Average());
pLon += constructKeyword("LongitudeStandardDeviation", m_lonStat->StandardDeviation());
+ PvlGroup pObliqueSampleRes("ObliqueSampleResolution");
+ pObliqueSampleRes += constructKeyword("ObliqueSampleResolutionMinimum",
+ m_obliqueSampleResStat->Minimum(), "meters/pixel");
+ pObliqueSampleRes += constructKeyword("ObliqueSampleResolutionMaximum",
+ m_obliqueSampleResStat->Maximum(),"meters/pixel");
+ pObliqueSampleRes += constructKeyword("ObliqueSampleResolutionAverage",
+ m_obliqueSampleResStat->Average(),"meters/pixel");
+ pObliqueSampleRes += constructKeyword("ObliqueSampleResolutionStandardDeviation",
+ m_obliqueSampleResStat->StandardDeviation(), "meters/pixel");
+
+ PvlGroup pObliqueLineRes("ObliqueLineResolution");
+ pObliqueLineRes += constructKeyword("ObliqueLineResolutionMinimum", m_obliqueLineResStat->Minimum(),
+ "meters/pixel");
+ pObliqueLineRes += constructKeyword("ObliqueLineResolutionMaximum", m_obliqueLineResStat->Maximum(),
+ "meters/pixel");
+ pObliqueLineRes += constructKeyword("ObliqueLineResolutionAverage", m_obliqueLineResStat->Average(),
+ "meters/pixel");
+ pObliqueLineRes += constructKeyword("ObliqueLineResolutionStandardDeviation",
+ m_obliqueLineResStat->StandardDeviation(), "meters/pixel");
+
+ PvlGroup pObliqueResolution("ObliqueResolution");
+ pObliqueResolution += constructKeyword("ObliqueResolutionMinimum", m_obliqueResStat->Minimum(),
+ "meters/pixel");
+ pObliqueResolution += constructKeyword("ObliqueResolutionMaximum", m_obliqueResStat->Maximum(),
+ "meters/pixel");
+ pObliqueResolution += constructKeyword("ObliqueResolutionAverage", m_obliqueResStat->Average(),
+ "meters/pixel");
+ pObliqueResolution += constructKeyword("ObliqueResolutionStandardDeviation",
+ m_obliqueResStat->StandardDeviation(), "meters/pixel");
+
+
PvlGroup pSampleRes("SampleResolution");
pSampleRes += constructKeyword("SampleResolutionMinimum", m_sampleResStat->Minimum(),
"meters/pixel");
@@ -433,6 +498,11 @@ namespace Isis {
returnPvl.addGroup(pSampleRes);
returnPvl.addGroup(pLineRes);
returnPvl.addGroup(pResolution);
+
+ returnPvl.addGroup(pObliqueSampleRes);
+ returnPvl.addGroup(pObliqueLineRes);
+ returnPvl.addGroup(pObliqueResolution);
+
returnPvl.addGroup(pAspectRatio);
returnPvl.addGroup(pPhase);
returnPvl.addGroup(pEmission);
diff --git a/isis/src/base/objs/CameraStatistics/CameraStatistics.h b/isis/src/base/objs/CameraStatistics/CameraStatistics.h
index fb540d2d1aa76655202b1e6d72a95bb827c5fe9c..12ff7f53d25e856c572adfe7b2fee4161a16b6d6 100644
--- a/isis/src/base/objs/CameraStatistics/CameraStatistics.h
+++ b/isis/src/base/objs/CameraStatistics/CameraStatistics.h
@@ -49,9 +49,11 @@ namespace Isis {
*
* @internal
* @history 2011-06-14 Travis Addair - Extracted logic from "camstats"
- * application to create this class.
+ * application to create this class.
+ * @history 2016-08-17 Tyler Wilson - Added Statistics objects for
+ * ObliquePixelResolution,ObliqueSampleResolution, and
+ * ObliqueLineResolution. References #476, #4100.
*/
-
class CameraStatistics {
public:
CameraStatistics(QString filename, int sinc, int linc);
@@ -87,6 +89,7 @@ namespace Isis {
};
+
/**
* Accessor method for inspecting the statistics gathered on the
* Pixel Resolutions of the input Camera.
@@ -98,6 +101,41 @@ namespace Isis {
};
+
+ /**
+ * Accessor method for inspecting the statistics gathered on the
+ * oblique pixel resolutions of the input Camera.
+ *
+ * @return Statistics * Constant pointer to oblique pixel resolution statistics
+ */
+ const Statistics * getObliqueResStat() const {
+ return m_obliqueResStat;
+ };
+
+ /**
+ * Accessor method for inspecting the statistics gathered on the
+ * oblique sample resolutions of the input Camera.
+ *
+ * @return Statistics * Constant pointer to oblique sample resolution statistics
+ */
+ const Statistics * getObliqueSampleResStat() const {
+ return m_obliqueSampleResStat;
+ };
+
+
+
+ /**
+ * Accessor method for inspecting the statistics gathered on the
+ * oblique line resolution of the input Camera.
+ *
+ * @return Statistics * Constant pointer to oblique line resolution statistics
+ */
+ const Statistics * getObliqueLineResStat() const {
+ return m_obliqueLineResStat;
+ };
+
+
+
/**
* Accessor method for inspecting the statistics gathered on the
* Sample Resolutions of the input Camera.
@@ -206,6 +244,13 @@ namespace Isis {
Statistics *m_latStat; //!< Universal latitude statistics.
Statistics *m_lonStat; //!< Universal longitude statistics.
+
+
+
+ Statistics *m_obliqueResStat; //!< Oblique pixel resolution statistics.
+ Statistics *m_obliqueSampleResStat; //!< Oblique sample resolution statistics.
+ Statistics *m_obliqueLineResStat; //!< Oblique line resolution statistics.
+
Statistics *m_resStat; //!< Pixel resolution statistics.
Statistics *m_sampleResStat; //!< Sample resolution statistics.
Statistics *m_lineResStat; //!< Line resolution statistics.
@@ -220,3 +265,4 @@ namespace Isis {
};
#endif
+
diff --git a/isis/src/base/objs/CameraStatistics/CameraStatistics.truth b/isis/src/base/objs/CameraStatistics/CameraStatistics.truth
index ac0d219fcab6b0cefc30dbf31c51d63f6b300b7d..413624756888abfbca8b5e9e06cce57a2e1113a5 100644
--- a/isis/src/base/objs/CameraStatistics/CameraStatistics.truth
+++ b/isis/src/base/objs/CameraStatistics/CameraStatistics.truth
@@ -36,6 +36,24 @@ Resolution:
ResolutionAverage = 245.015
ResolutionStandardDeviation = 0.181039
+ObliqueSampleResolution:
+ ObliqueSampleResolutionMinimum = 244.735
+ ObliqueSampleResolutionMaximum = 246.319
+ ObliqueSampleResolutionAverage = 245.205
+ ObliqueSampleResolutionStandardDeviation = 0.304432
+
+ObliqueLineResolution:
+ ObliqueLineResolutionMinimum = 244.735
+ ObliqueLineResolutionMaximum = 246.319
+ ObliqueLineResolutionAverage = 245.205
+ ObliqueLineResolutionStandardDeviation = 0.304432
+
+ObliqueResolution:
+ ObliqueResolutionMinimum = 244.735
+ ObliqueResolutionMaximum = 246.319
+ ObliqueResolutionAverage = 245.205
+ ObliqueResolutionStandardDeviation = 0.304432
+
AspectRatio:
AspectRatioMinimum = 1
AspectRatioMaximun = 1
diff --git a/isis/src/base/objs/Gui/Gui.cpp b/isis/src/base/objs/Gui/Gui.cpp
index da58ddf03c9996a16926fd60c2958881a27ec9c5..57eb94e5e3463419856c7016bc2b5fe202001027 100644
--- a/isis/src/base/objs/Gui/Gui.cpp
+++ b/isis/src/base/objs/Gui/Gui.cpp
@@ -78,6 +78,9 @@ namespace Isis {
// Create the application
new QApplication(argc, argv);
+ // When QApplication is initialized, it will reset the locale to the shells locale. As a result
+ // the locale needs to be reset after QApplications initialization.
+ std::setlocale(LC_ALL, "en_US");
QCoreApplication::setApplicationName(FileName(argv[0]).baseName());
QApplication::setQuitOnLastWindowClosed(true);
diff --git a/isis/src/base/objs/Gui/Gui.h b/isis/src/base/objs/Gui/Gui.h
index 6a9824abce3e29c3c35957df7811cec9bf9f27cf..44f38b51d15adce74a0dcf39b800be2b18c65438 100644
--- a/isis/src/base/objs/Gui/Gui.h
+++ b/isis/src/base/objs/Gui/Gui.h
@@ -78,7 +78,9 @@ namespace Isis {
* also update exclusions for boolean widgets. References
* #1452.
* @history 2016-06-28 Adam Paquette - Modified UpdateHistory to appropriately
- * retrieve lists from the history pvl
+ * retrieve lists from the history pvl.
+ * @history 2016-08-15 Adam Paquette - Reset locale after QApplication is
+ * instantiated. Fixes #3908.
*/
class Gui : public QMainWindow {
diff --git a/isis/src/base/objs/ProcessByTile/unitTest.cpp b/isis/src/base/objs/ProcessByTile/unitTest.cpp
index 9e076b3a42762a49f0fbb9d3acc215e0ef38dc40..c45f22f4b77a30da7542f8bc2e411d7c4e3a2fe6 100644
--- a/isis/src/base/objs/ProcessByTile/unitTest.cpp
+++ b/isis/src/base/objs/ProcessByTile/unitTest.cpp
@@ -177,11 +177,11 @@ void IsisMain() {
p.EndProcess();
p.Finalize();
- //Isis::Cube cube;
- //cube.open("$temporary/isisProcessByTile_01");
- //cube.close(true);
- //cube.open("$temporary/isisProcessByTile_02");
- //cube.close(true);
+ Isis::Cube cube;
+ cube.open("$temporary/isisProcessByTile_01");
+ cube.close(true);
+ cube.open("$temporary/isisProcessByTile_02");
+ cube.close(true);
}
void inPlaceFunction(Isis::Buffer &in){
diff --git a/isis/src/base/objs/RadarGroundMap/RadarGroundMap.cpp b/isis/src/base/objs/RadarGroundMap/RadarGroundMap.cpp
index 2533bbb439d53a5a52cff728ba7fe6a604932f6e..5587c882e3c71a847482355ba001f176da2b1fc5 100644
--- a/isis/src/base/objs/RadarGroundMap/RadarGroundMap.cpp
+++ b/isis/src/base/objs/RadarGroundMap/RadarGroundMap.cpp
@@ -328,6 +328,8 @@ namespace Isis {
if(dp < 0.0 && p_lookDirection == Radar::Right) return false;
if(dp == 0.0) return false;
+
+
// Compute body fixed look direction
std::vector lookB;
lookB.resize(3);
@@ -336,7 +338,7 @@ namespace Isis {
lookB[2] = X[2] - Xsc[2];
std::vector lookJ = bodyFrame->J2000Vector(lookB);
- SpiceRotation *cameraFrame = p_camera->instrumentRotation();
+ SpiceRotation *cameraFrame = p_camera->instrumentRotation(); //this is the pointer to the camera's SpiceRotation/instrumentatrotation object
std::vector lookC = cameraFrame->ReferenceVector(lookJ);
SpiceDouble unitLookC[3];
@@ -346,7 +348,10 @@ namespace Isis {
p_focalPlaneX = p_slantRange * 1000.0 / p_rangeSigma; // km to meters and scaled to focal plane
p_focalPlaneY = 0.0;
p_camera->target()->shape()->setSurfacePoint(surfacePoint); // Added 2-11-2013 by DAC
- return true;
+
+ // set the sensor's ground point and also makes it possible to calculate m_ra & m_dec
+
+ return p_camera->Sensor::SetGround(surfacePoint, true);
}
}
diff --git a/isis/src/base/objs/RadarGroundMap/RadarGroundMap.h b/isis/src/base/objs/RadarGroundMap/RadarGroundMap.h
index 8f95a72ee3038e178ed289ca9aa863ac4b944b3d..f7980a25383231a9a1741672793c7f9a82e3cfc1 100644
--- a/isis/src/base/objs/RadarGroundMap/RadarGroundMap.h
+++ b/isis/src/base/objs/RadarGroundMap/RadarGroundMap.h
@@ -101,7 +101,9 @@ namespace Isis {
* @history 2012-07-06 Debbie A. Cook, Updated Spice members to be more compliant with Isis
* coding standards. References #972.
* @history 2013-02-11 Debbie A. Cook, Fixed SetGround method by adding call to set the surface point
- in the ShapeModel so that photometric angles can be calculated. References #775
+ * in the ShapeModel so that photometric angles can be calculated. References #775
+ * @history 2016-07-19 Kristin Berry, Updated SetGround to call p_camera->Sensor::SetGround so that
+ * RA, DEC values will be set on level 2 images. References #2400.
*/
class RadarGroundMap : public CameraGroundMap {
public:
diff --git a/isis/src/base/objs/RadarSlantRangeMap/RadarSlantRangeMap.cpp b/isis/src/base/objs/RadarSlantRangeMap/RadarSlantRangeMap.cpp
index adc35683db81b0c285c8a3497b414d6abd0f7a39..012334777525788fba58a6a70c23d664ff04f5c4 100644
--- a/isis/src/base/objs/RadarSlantRangeMap/RadarSlantRangeMap.cpp
+++ b/isis/src/base/objs/RadarSlantRangeMap/RadarSlantRangeMap.cpp
@@ -26,6 +26,8 @@
#include "iTime.h"
#include "PvlSequence.h"
+using namespace std;
+
namespace Isis {
/** Radar ground to slant range map constructor
*
@@ -50,12 +52,13 @@ namespace Isis {
// allow for solving for coordinates that are slightly outside of
// the actual image area. Use S=-0.25*p_camera->Samples() and
// S=1.25*p_camera->Samples().
- p_initialMinGroundRangeGuess = (-0.25 * p_camera->Samples() - 1.0)
- * groundRangeResolution;
- p_initialMaxGroundRangeGuess = (1.25 * p_camera->Samples() - 1.0)
- * groundRangeResolution;
+ // The above approach works nicely for a level 1 image but the
+ // sensor model at level2 doesn't have access to the level 1
+ // number of samples. Instead, we will calculate initial guesses
+ // on the fly in SetUndistortedFocalPlane.
p_tolerance = 0.1; // Default tolerance is a tenth of a meter
p_maxIterations = 30;
+
}
/** Set the ground range and compute a slant range
@@ -85,20 +88,92 @@ namespace Isis {
if(p_et != p_camera->time().Et()) ComputeA();
- // Evaluate the ground range at the 2 extremes of the image
double slant = p_undistortedFocalPlaneX;
+ // First trap the case where no iteration is needed. Since this occurs at
+ // the first pixel of the image, it's a real possibility to encounter.
+ if (fabs(slant-p_a[0]) < p_tolerance) {
+ p_focalPlaneX = 0.0;
+ p_focalPlaneY = 0.0;
+ return true;
+ }
+ // Now calculate two guesses by the first and second iterations of
+ // Newton's method, where the zeroth iteration is at ground range = 0.
+ // The nature of the slant range function is such that, in the region
+ // of validity (including all image data) the Newton approximations are
+ // always too high, but the second one is within a few meters. We therefore
+ // add 10 m of “windage” to it to bracket the root.
+ // Performing a third Newton iteration would give a satisfactory solution in
+ // the data area but raises the problem of trapping errors outside this region
+ // where the polynomial is not so well behaved.
+ // Use the “min” variables temporarily to hold the first approximation
+ p_initialMinGroundRangeGuess = (slant - p_a[0]) / p_a[1];
double minGroundRangeGuess = slant - (p_a[0] + p_initialMinGroundRangeGuess *
- (p_a[1] + p_initialMinGroundRangeGuess * (p_a[2] +
- p_initialMinGroundRangeGuess * p_a[3])));
+ (p_a[1] + p_initialMinGroundRangeGuess * (p_a[2] + p_initialMinGroundRangeGuess * p_a[3])));
+ // Now the max is the second approximation
+ p_initialMaxGroundRangeGuess = p_initialMinGroundRangeGuess + minGroundRangeGuess /
+ (p_a[1] + p_initialMinGroundRangeGuess * (2.0 * p_a[2] + p_initialMinGroundRangeGuess *
+ 3.0 * p_a[3]));
double maxGroundRangeGuess = slant - (p_a[0] + p_initialMaxGroundRangeGuess *
(p_a[1] + p_initialMaxGroundRangeGuess * (p_a[2] +
p_initialMaxGroundRangeGuess * p_a[3])));
+ // Finally, apply the “windage” to bracket the root.
+ p_initialMinGroundRangeGuess = p_initialMaxGroundRangeGuess - 10.0;
+ minGroundRangeGuess = slant - (p_a[0] + p_initialMinGroundRangeGuess *
+ (p_a[1] + p_initialMinGroundRangeGuess * (p_a[2] + p_initialMinGroundRangeGuess * p_a[3])));
+
+ // If both guesses are on the same side of zero, we need to expand the bracket range
+ // to include a zero-crossing.
+ if ((minGroundRangeGuess < 0.0 && maxGroundRangeGuess < 0.0) ||
+ (minGroundRangeGuess > 0.0 && maxGroundRangeGuess > 0.0)) {
+ int maxBracketIters = 10;
+
+ float xMin = p_initialMinGroundRangeGuess;
+ float xMax = p_initialMaxGroundRangeGuess;
+
+ float funcMin = minGroundRangeGuess;
+ float funcMax = maxGroundRangeGuess;
+
+ for (int j=0; j= 0.0) || (funcMin >= 0.0 && funcMax <= 0.0)){
+ p_initialMinGroundRangeGuess = xMin;
+ p_initialMaxGroundRangeGuess = xMax;
+ minGroundRangeGuess = funcMin;
+ maxGroundRangeGuess = funcMax;
+ break;
+ }
+ }
+ }
+
// If the ground range guesses at the 2 extremes of the image are equal
// or they have the same sign, then the ground range cannot be solved for.
+ // The only case where they are equal should be at zero, which we already trapped.
if((minGroundRangeGuess == maxGroundRangeGuess) ||
(minGroundRangeGuess < 0.0 && maxGroundRangeGuess < 0.0) ||
- (minGroundRangeGuess > 0.0 && maxGroundRangeGuess > 0.0)) return false;
+ (minGroundRangeGuess > 0.0 && maxGroundRangeGuess > 0.0)) {
+ return false;
+ }
// Use Wijngaarden/Dekker/Brent algorithm to find a root of the function:
// g(groundRange) = slantRange - (p_a[0] + groundRange * (p_a[1] +
diff --git a/isis/src/base/objs/RadarSlantRangeMap/RadarSlantRangeMap.h b/isis/src/base/objs/RadarSlantRangeMap/RadarSlantRangeMap.h
index cab974cfc2623f8d2288bbf7a080411d002cdd93..0844c5424ae3453103e3d4bb9abe584e1f94782d 100644
--- a/isis/src/base/objs/RadarSlantRangeMap/RadarSlantRangeMap.h
+++ b/isis/src/base/objs/RadarSlantRangeMap/RadarSlantRangeMap.h
@@ -55,7 +55,13 @@ namespace Isis {
* known range coefficients.
* @history 2012-07-06 Debbie A. Cook, Updated Spice members to be more compliant with Isis
* coding standards. References #972.
- *
+ * @history 2016-02-24 Randy Kirk and Janet Barrett - Fixed an issue that caused
+ * the sensor model for LRO and Chandrayaan's MiniRF to not be able to
+ * calculate and report lat/lon in the LXB mode. References #2400.
+ * @history 2016-08-01 Kristin Berry - Added the ability to extend the range of the initial root
+ * bracket in SetUndistortedFocalPlan if the initial range was too narrow.
+ * Also added RAs & DECs to the camera model.References #2400.
+ *
*/
class RadarSlantRangeMap : public CameraDistortionMap {
public:
diff --git a/isis/src/chandrayaan1/objs/Chandrayaan1M3Camera/Chandrayaan1M3Camera.h b/isis/src/chandrayaan1/objs/Chandrayaan1M3Camera/Chandrayaan1M3Camera.h
index ea549da0403d5168d5c60f0ab4f73beb4df8f4b4..bd0002c79dc68e2f6f0d3a8b226409be93b392da 100644
--- a/isis/src/chandrayaan1/objs/Chandrayaan1M3Camera/Chandrayaan1M3Camera.h
+++ b/isis/src/chandrayaan1/objs/Chandrayaan1M3Camera/Chandrayaan1M3Camera.h
@@ -41,6 +41,8 @@ namespace Isis {
* @history 2015-10-16 Ian Humphrey - Removed declarations of spacecraft and instrument
* members and methods and removed implementation of these methods
* since Camera now handles this. References #2335.
+ * @history 2016-08-01 Kristin Berry - Added to unitTest to test camera model performance on
+ * level 2 cubes and to test RA/DEC values. References #2400.
*/
class Chandrayaan1M3Camera : public LineScanCamera {
public:
diff --git a/isis/src/chandrayaan1/objs/Chandrayaan1M3Camera/Chandrayaan1M3Camera.truth b/isis/src/chandrayaan1/objs/Chandrayaan1M3Camera/Chandrayaan1M3Camera.truth
index 243651cc89c76733e1e5b60176eefc9c47f0e7d2..1f851a4ecc8964b6201e2b79fc96ed4fb72b5461 100644
--- a/isis/src/chandrayaan1/objs/Chandrayaan1M3Camera/Chandrayaan1M3Camera.truth
+++ b/isis/src/chandrayaan1/objs/Chandrayaan1M3Camera/Chandrayaan1M3Camera.truth
@@ -32,3 +32,10 @@ DeltaLine = 0.000000000
For center pixel position ...
Latitude OK
Longitude OK
+RightAscension = 242.182569911
+Declination = -84.617919659
+
+Testing a Level-2 CH1 cube:
+
+For a central pixel position ...
+SetImage succeeded.
diff --git a/isis/src/chandrayaan1/objs/Chandrayaan1M3Camera/unitTest.cpp b/isis/src/chandrayaan1/objs/Chandrayaan1M3Camera/unitTest.cpp
index 892e96cf24ec52ff98d765b991e74d66accbf5be..b02c9b545410c0a9246816fa627a9836089b2fb8 100644
--- a/isis/src/chandrayaan1/objs/Chandrayaan1M3Camera/unitTest.cpp
+++ b/isis/src/chandrayaan1/objs/Chandrayaan1M3Camera/unitTest.cpp
@@ -101,6 +101,30 @@ int main(void) {
else {
cout << setprecision(16) << "Longitude off by: " << cam->UniversalLongitude() - knownLon << endl;
}
+
+ cout << "RightAscension = " << cam->RightAscension() << endl;
+ cout << "Declination = " << cam->Declination() << endl;
+
+ // Test a Level-2 image
+ cout << endl << "Testing a Level-2 CH1 cube: " << endl << endl;
+
+ Cube c2("$chandrayaan1/testData/CH1_xBandLvl2.cub", "r");
+ Camera *cam2 = CameraFactory::Create(c2);
+
+ // Just test the center pixel to make sure the Camera still works on Level-2
+ // images
+
+ cout << "For a central pixel position ..." << endl;
+ samp = 2000;
+ line = 2500;
+
+ if (!cam2->SetImage(samp, line)) {
+ cout << "ERROR" << endl;
+ return 0;
+ }
+ else {
+ cout << "SetImage succeeded." << endl;
+ }
}
catch (IException &e) {
e.print();
diff --git a/isis/src/control/apps/cnettable/cnettable.cpp b/isis/src/control/apps/cnettable/cnettable.cpp
index 9c793d11b55309a662687afce04b4a4d9e4b14c8..ff0302477119a61d13987a1d336b1f7a5e67f5fe 100644
--- a/isis/src/control/apps/cnettable/cnettable.cpp
+++ b/isis/src/control/apps/cnettable/cnettable.cpp
@@ -1,5 +1,6 @@
#include "Isis.h"
+
#include "CameraPointInfo.h"
#include "ControlMeasure.h"
#include "ControlMeasureLogData.h"
@@ -20,6 +21,7 @@
#include "SurfacePoint.h"
#include "TextFile.h"
#include "UserInterface.h"
+//#include "LocalPointInfo.h"
#include
#include
@@ -84,7 +86,9 @@ void IsisMain() {
}
PvlGroup * grp = NULL;
+
CameraPointInfo camPoint;
+ camPoint.SetCSVOutput(true);
outside = ui.GetBoolean("ALLOWOUTSIDE");
errors = ui.GetBoolean("ALLOWERRORS");
diff --git a/isis/src/control/apps/cnettable/cnettable.xml b/isis/src/control/apps/cnettable/cnettable.xml
index 25c2b5f65edc50dd25d422f092b2888d59ae51b6..03717ef93da2f4ca6dc4dc8f42cd8e8b274851e6 100644
--- a/isis/src/control/apps/cnettable/cnettable.xml
+++ b/isis/src/control/apps/cnettable/cnettable.xml
@@ -1,6 +1,7 @@
-
+
Application to get Excel compatible statistics
@@ -125,6 +126,11 @@
Updated truth data due to modifications, printing NULL instead of N/A. References #1659.
+
+ Updated application truth data due to modifications in CameraPointInfo class.
+ References #476.
+
+
diff --git a/isis/src/docsys/Object/build/isisDoxyDefs.doxydef b/isis/src/docsys/Object/build/isisDoxyDefs.doxydef
index 6456f030850b7d020b68f0a4ffc95f5a478802b7..2d1a824c3a9d22bd6c3f01f553c5e4275c7a557c 100644
--- a/isis/src/docsys/Object/build/isisDoxyDefs.doxydef
+++ b/isis/src/docsys/Object/build/isisDoxyDefs.doxydef
@@ -97,7 +97,8 @@
* @history 2008-05-19 steven lambright - Fixed Mission End Group Tag
* @history 2008-05-19 steven lambright - Fixed Bad Namespace Documentation
* @history 2013-03-27 Jeannie Backer - Added NEAR Shoemaker mission. References #1248.
- *
+ * @history 2016-08-25 Marjorie Hahn - Added OSIRIS-REx mission. References #4300.
+ *
* @todo Develop two different pages for API vs. Programmer
* documentation. 2004-11-03
* @todo Make "std" namespace invisible... probably not gonna happen
@@ -390,7 +391,6 @@
*
*/
-
// MRO
/**
* \defgroup MarsReconnaissanceOrbiter Mars Reconnaissance Orbiter
@@ -439,7 +439,6 @@
*
*/
-
// New Horizons
/**
* \defgroup NewHorizons New Horizons
@@ -447,15 +446,28 @@
* These objects provide functionality for manipulating data from the
* New Horizons mission. New Horizons is part of NASA's New Frontiers
* Program.
- * New Horizons launced January 19, 2006 and is expected to spend five months studying
+ * New Horizons launched January 19, 2006 and is expected to spend five months studying
* Pluto durring the summer of 2015.
*
* Mission site: http://www.nasa.gov/mission_pages/newhorizons/main/#.VA4QY8NuH4I
*
+ */
+
+ // OSIRIS-REx
+ /**
+ * \defgroup OSIRIS-REx OSIRIS-REx
+ *
+ * These objects provide functionality for manipulating data from the
+ * OSIRIS-REx asteroid sample return mission. The 2016 OSIRIS-REx mission's
+ * key objectives include mapping out the asteroid Bennu's surface, analyzing
+ * a sample of Bennu's regolith, documenting the sample site, calculating Bennu's
+ * orbit deviation, and comparing observations made at the asteroid to observations
+ * made on Earth.
+ *
+ * Mission site: http://www.asteroidmission.org/
*
*/
-
-
+
// VIKING
/**
* \defgroup Viking Viking
@@ -491,8 +503,6 @@
*
*/
-
-
// LUNAR ORBITER
/**
* \defgroup LunarOrbiter Lunar Orbiter
@@ -517,9 +527,6 @@
*
*/
-
-
-
/* @} end of Missions group */
diff --git a/isis/src/docsys/Schemas/Application/application.xsd b/isis/src/docsys/Schemas/Application/application.xsd
index a28ab7c826b46c9ff1f6cc9d9cadccaaf2bd062c..1de901fd90d6a14fd57f4dbd6a902cf40a7766a7 100644
--- a/isis/src/docsys/Schemas/Application/application.xsd
+++ b/isis/src/docsys/Schemas/Application/application.xsd
@@ -35,6 +35,9 @@
2016-03-29 Kristin Berry - Added missionItem_type enummeration for Rosetta.
+
+ 2016-08-25 Marjorie Hahn - Added missionItem_type enummeration for OSIRIS-REx.
+ XML file describing an Isis application
@@ -449,6 +452,7 @@
+
diff --git a/isis/src/docsys/Schemas/Application/documentation/index.html b/isis/src/docsys/Schemas/Application/documentation/index.html
index 21e830dd7560bf4711b4e2fe4991a0cb539667a8..905e7f9324d5b0086a5222d2898f52f175a2ff2c 100644
--- a/isis/src/docsys/Schemas/Application/documentation/index.html
+++ b/isis/src/docsys/Schemas/Application/documentation/index.html
@@ -431,7 +431,23 @@
facets
-
enumeration
Cassini
enumeration
Clementine
enumeration
Mariner
enumeration
Galileo
enumeration
Lunar Orbiter
enumeration
Lunar Reconnaissance Orbiter
enumeration
Mars Reconnaissance Orbiter
enumeration
Mars Global Surveyor
enumeration
Mars Odyssey
enumeration
Mars Exploration Rover
enumeration
Messenger
enumeration
Small Missions for Advanced Research and Technology 1
enumeration
Voyager
enumeration
Viking
+
+
enumeration
Cassini
+
enumeration
Clementine
+
enumeration
Mariner
+
enumeration
Galileo
+
enumeration
Lunar Orbiter
+
enumeration
Lunar Reconnaissance Orbiter
+
enumeration
Mars Reconnaissance Orbiter
+
enumeration
Mars Global Surveyor
+
enumeration
Mars Odyssey
+
enumeration
Mars Exploration Rover
+
enumeration
Messenger
+
enumeration
OSIRIS-REx
+
enumeration
Small Missions for Advanced Research and Technology 1
+
enumeration
Voyager
+
enumeration
Viking
+
annotation
@@ -3337,7 +3353,23 @@
facets
-
enumeration
Cassini
enumeration
Clementine
enumeration
Mariner
enumeration
Galileo
enumeration
Lunar Orbiter
enumeration
Lunar Reconnaissance Orbiter
enumeration
Mars Reconnaissance Orbiter
enumeration
Mars Global Surveyor
enumeration
Mars Odyssey
enumeration
Mars Exploration Rover
enumeration
Messenger
enumeration
Small Missions for Advanced Research and Technology 1
enumeration
Voyager
enumeration
Viking
+
+
enumeration
Cassini
+
enumeration
Clementine
+
enumeration
Mariner
+
enumeration
Galileo
+
enumeration
Lunar Orbiter
+
enumeration
Lunar Reconnaissance Orbiter
+
enumeration
Mars Reconnaissance Orbiter
+
enumeration
Mars Global Surveyor
+
enumeration
Mars Odyssey
+
enumeration
Mars Exploration Rover
+
enumeration
Messenger
+
enumeration
OSIRIS-REx
+
enumeration
Small Missions for Advanced Research and Technology 1
+
enumeration
Voyager
+
enumeration
Viking
+
annotation
@@ -3361,6 +3393,7 @@
<xs:enumeration value="Mars Odyssey"/> <xs:enumeration value="Mars Exploration Rover"/> <xs:enumeration value="Messenger"/>
+ <xs:enumeration value="OSIRIS-REx"/> <xs:enumeration value="Small Missions for Advanced Research and Technology 1"/> <xs:enumeration value="Voyager"/> <xs:enumeration value="Viking"/>
diff --git a/isis/src/docsys/documents/Glossary/Glossary.xml b/isis/src/docsys/documents/Glossary/Glossary.xml
index 91f7967b2826433e0cfc388b545472cf3395fc6e..b4423e5d667db2dbe03f568899f3db59959a5254 100644
--- a/isis/src/docsys/documents/Glossary/Glossary.xml
+++ b/isis/src/docsys/documents/Glossary/Glossary.xml
@@ -310,7 +310,7 @@
-
+
The emission angle (EMA) is the angle between the spacecraft and a
vector drawn perpendicular to the planet's surface (surface normal).
Using SPICE, ISIS applications compute this angle from the ellipsoid.
@@ -344,24 +344,112 @@
-
+
The ground distance in meters from the left edge to the right edge
of a pixel.
-
- The ground distance in meters from the top edge to the bottom edge
- of a pixel.
+
+ The ground distance (in meters) from the left edge to the right edge
+ of a pixel. This value is based on the oblique detector resolution
+ estimate, rather than the detector resolution and is more accurate
+ (particularly for off-nadir images).
-
- The ground distance in meters from the left edge to the right edge
+
+
+
+ The ground distance (in meters) from the top edge to the bottom edge
of a pixel.
-
- The size of the detector on the focal plane for each pixel.
-
+
+ The ground distance (in meters) from the top edge to the bottom edge
+ of a pixel. This value is based on the oblique detector resolution
+ estimate, rather than the detector resolution and is more
+ accurate (particularly for off-nadir images).
+
+
+
+
+
+
+ The ground distance (in meters) from the left edge to the right edge
+ of a pixel.
+
+
+
+ The ground distance (in meters) from the left edge to the right edge
+ of a pixel. This value is based on the oblique detector resolution
+ estimate, rather than the detector resolution and is more
+ accurate (particularly for off-nadir images).
+
+
+
+
+
+ The ground distance in meters from the left edge to the right edge of a detector. If the
+ lines and samples are not being summed and averaged, this value is equal to the pixel resolution.
+ The formula for estimating this value works well if the image is taken near nadir, but
+ the accuracy falls off rapidly the farther off-nadir the image is taken. For an estimate that
+ handles off-nadir images with higher accuracy, one should use oblique detector resolution.
+
+
+
+ This provides an improved estimate to the standard detector resolution when the image is taken at an oblique
+ angle. It returns the square-root of the area of the projection of the detector onto the body of the target (in units of meters).
+ If the image is taken at nadir, this is the ground distance between the left and right edge of the detector, because the
+ detector's projection is a square. For off-nadir images, the projection has a trapezoidal shape.
+ In Figure 1A below, an image of the Dufay X crater that was taken near nadir is displayed. Figure 1B is a
+ color map showing the relative difference between the oblique detector resolution, and the original detector resolution as a function
+ of the emission angle. For small emission angles (near nadir) the relative difference between the two estimates
+ is very small. For larger emission angles (off-nadir), the relative difference between the
+ two estimates increases rapidly. Figure 2A is an image of the Carlini crater group taken at an oblique angle. Figure 2B is a color plot
+ of the relative difference between the two estimates showing a minimum value of approximately 50% between the two when the
+ emission angles off-nadir are in the range 65-75 degrees.
+
+
+
+
+
+
+
+ Fig 1A: A cropped view of Apollo image AS16-M-0025 centered on the Dufay X crater. The spacecraft
+ was very close to nadir when the image was taken.
+
+
+
+
+
+
+
+ Fig 2A: A cropped view of Apollo image AS15-M-1556 centered on the Carlini crater group.
+ This photo was taken at an oblique angle.
+
+
+
+
+
+
+
+
+
+ Fig 1B: Relative percentage difference between resolution estimates for
+ a nadir image (see Fig. 1A).
+
+
+
+
+
+
+ Fig 2B: Relative percentage difference between resolution estimates for
+ an oblique image (see Fig. 2A).
+
+
+
+
+
+
Irradiance/SolarFlux. Unit of DN values for a reference distance of
diff --git a/isis/src/docsys/documents/Glossary/assets/carlini_craters.png b/isis/src/docsys/documents/Glossary/assets/carlini_craters.png
new file mode 100644
index 0000000000000000000000000000000000000000..8fd94695029a4d91689de32cbd9eeaac60774529
Binary files /dev/null and b/isis/src/docsys/documents/Glossary/assets/carlini_craters.png differ
diff --git a/isis/src/docsys/documents/Glossary/assets/dufayx.png b/isis/src/docsys/documents/Glossary/assets/dufayx.png
new file mode 100644
index 0000000000000000000000000000000000000000..fab269193f2a20803d09432a9b7104c05644406a
Binary files /dev/null and b/isis/src/docsys/documents/Glossary/assets/dufayx.png differ
diff --git a/isis/src/docsys/documents/Glossary/assets/nadir.png b/isis/src/docsys/documents/Glossary/assets/nadir.png
new file mode 100644
index 0000000000000000000000000000000000000000..5f84f7bc9c63b42ffad0f57fdb3f2f4dd2f4f14d
Binary files /dev/null and b/isis/src/docsys/documents/Glossary/assets/nadir.png differ
diff --git a/isis/src/docsys/documents/Glossary/assets/nadir40pct.png b/isis/src/docsys/documents/Glossary/assets/nadir40pct.png
new file mode 100644
index 0000000000000000000000000000000000000000..0c488dc856772ec5cb6c1826f298bcf4a8441aca
Binary files /dev/null and b/isis/src/docsys/documents/Glossary/assets/nadir40pct.png differ
diff --git a/isis/src/docsys/documents/Glossary/assets/oblique.png b/isis/src/docsys/documents/Glossary/assets/oblique.png
new file mode 100644
index 0000000000000000000000000000000000000000..d34d8f497c8cdff962449ce16aff6816cea1403e
Binary files /dev/null and b/isis/src/docsys/documents/Glossary/assets/oblique.png differ
diff --git a/isis/src/docsys/documents/Glossary/assets/oblique40pct.png b/isis/src/docsys/documents/Glossary/assets/oblique40pct.png
new file mode 100644
index 0000000000000000000000000000000000000000..cad5f4dcb24f38d42310fcbf85ae260f1c79c212
Binary files /dev/null and b/isis/src/docsys/documents/Glossary/assets/oblique40pct.png differ
diff --git a/isis/src/lro/objs/MiniRF/MiniRF.h b/isis/src/lro/objs/MiniRF/MiniRF.h
index a9d1d57634bb87d54d2aca1c38db2753c846837b..ad07a18ed0a762ea8a4bc4ba401b83c768fb6928 100644
--- a/isis/src/lro/objs/MiniRF/MiniRF.h
+++ b/isis/src/lro/objs/MiniRF/MiniRF.h
@@ -62,6 +62,8 @@ namespace Isis {
* @history 2015-10-16 Ian Humphrey - Removed declarations of spacecraft and instrument
* members and methods and removed implementation of these methods
* since Camera now handles this. References #2335.
+ * @history 2016-08-01 Kristin Berry - Added to unitTest to test camera model performance on
+ * level 2 cubes and to test RA/DEC values. References #2400.
*/
class MiniRF : public RadarCamera {
public:
diff --git a/isis/src/lro/objs/MiniRF/MiniRF.truth b/isis/src/lro/objs/MiniRF/MiniRF.truth
index 27c57266b8943eec5146028b5dfa4a0f4a9c369f..2f68a4f633ef1a0d67e1f71d68be58b3a8598903 100644
--- a/isis/src/lro/objs/MiniRF/MiniRF.truth
+++ b/isis/src/lro/objs/MiniRF/MiniRF.truth
@@ -22,6 +22,9 @@ For center pixel position ...
Latitude OK
Longitude OK
+RightAscension = 144.785941008
+Declination = -46.290650078
+
Testing name methods ...
Spacecraft Name Long: Chandrayaan 1
@@ -38,3 +41,8 @@ Instrument Name Short: Mini-RF
Kernel ID error messages:
**USER ERROR** Cannot generate CK for MiniRF.
**USER ERROR** Cannot generate CK for MiniRF.
+
+Testing a Level-2 cube:
+
+For a central pixel position ...
+SetImage succeeded.
diff --git a/isis/src/lro/objs/MiniRF/unitTest.cpp b/isis/src/lro/objs/MiniRF/unitTest.cpp
index c840cf67a43f323de2ec5eceb6135c2328f08557..9b51dfa52c273dfa9abfcc5121519006a253c7bb 100644
--- a/isis/src/lro/objs/MiniRF/unitTest.cpp
+++ b/isis/src/lro/objs/MiniRF/unitTest.cpp
@@ -36,7 +36,7 @@ int main(void) {
Isis::Preference::Preferences(true);
cout << "Unit Test for MiniRFCamera..." << endl;
- // try {
+ try {
// These should be lat/lon at center of image. To obtain these numbers for a new cube/camera,
// set both the known lat and known lon to zero and copy the unit test output "Latitude off by: "
// and "Longitude off by: " values directly into these variables.
@@ -86,6 +86,9 @@ int main(void) {
cout << setprecision(16) << "Longitude off by: " << cam->UniversalLongitude() - knownLon << endl;
}
+ cout << endl << "RightAscension = " << cam->RightAscension() << endl;
+ cout << "Declination = " << cam->Declination() << endl;
+
Cube c2("$lro/testData/LSZ_04970_1CD_XKU_71S272_V1.reduced.cub", "r");
Camera *cam2 = CameraFactory::Create(c2);
@@ -103,19 +106,56 @@ int main(void) {
// Test kernel ID messages
cout << endl << "Kernel ID error messages: " << endl;
- try{ cam->CkFrameId(); }
- catch (IException e){ e.print(); }
- try{ cam->CkReferenceId(); }
- catch (IException e){ e.print(); }
- try{ cam->SpkTargetId(); }
- catch (IException e){ e.print(); }
- try{ cam->SpkReferenceId(); }
- catch (IException e){ e.print(); }
-
- // }
-// catch(Isis::IException &e) {
-// e.print();
-// }
+ try{
+ cam->CkFrameId();
+ }
+ catch(IException e){
+ e.print();
+ }
+ try{
+ cam->CkReferenceId();
+ }
+ catch (IException e){
+ e.print();
+ }
+ try{
+ cam->SpkTargetId();
+ }
+ catch (IException e){
+ e.print();
+ }
+ try{
+ cam->SpkReferenceId();
+ }
+ catch (IException e){
+ e.print();
+ }
+
+ // Test a Level-2 image
+ cout << endl << "Testing a Level-2 cube: " << endl << endl;
+
+ Cube c3("$lro/testData/LSB_00291_1CD_XIU_89S206_V1_c2m.cub", "r");
+ Camera *cam3 = CameraFactory::Create(c3);
+
+ // Just test the center pixel to make sure the Camera still works on Level-2
+ // images
+
+ cout << "For a central pixel position ..." << endl;
+ samp = 2014;
+ line = 1026;
+
+ if (!cam3->SetImage(samp, line)) {
+ cout << "ERROR" << endl;
+ return 0;
+ }
+ else {
+ cout << "SetImage succeeded." << endl;
+ }
+
+ }
+ catch(Isis::IException &e) {
+ e.print();
+ }
}
void TestLineSamp(Isis::Camera *cam, double samp, double line) {
diff --git a/isis/src/mex/apps/hrsc2isis/tsts/phobos/Makefile b/isis/src/mex/apps/hrsc2isis/tsts/phobos/Makefile
new file mode 100644
index 0000000000000000000000000000000000000000..b385add6c4287a4aa1774dc4c6fcd02cdc27f50f
--- /dev/null
+++ b/isis/src/mex/apps/hrsc2isis/tsts/phobos/Makefile
@@ -0,0 +1,6 @@
+APPNAME = hrsc2isis
+
+include $(ISISROOT)/make/isismake.tsts
+
+commands:
+ $(APPNAME) FROM=$(INPUT)/h7926_0009_s22.img TO=$(OUTPUT)/truth.cub > /dev/null;
diff --git a/isis/src/mro/apps/hicolormos/hicolormos.xml b/isis/src/mro/apps/hicolormos/hicolormos.xml
index cb0f63c2bbcdfd5e743612ae5575e3caa370b06e..b2137423b9a5f996b57281d2b57ff1793b326908 100644
--- a/isis/src/mro/apps/hicolormos/hicolormos.xml
+++ b/isis/src/mro/apps/hicolormos/hicolormos.xml
@@ -2,33 +2,43 @@
- Create a color mosaic of a HiRISE cubes from an observation and update labels required by hirdrgen.
+ Create a color mosaic of HiRISE cubes and update labels (required by hirdrgen).
-
- ** The output from this program is required by hirdrgen **
- If the final product wil not be an RDR, mapmos or automos can be used to produce a mosaic.
- This program produces a mosaic and adds keywords to the label group "Mosaic" that are required
- by hirdrgen.
-
- The input cubes to this program must be from the same observation, stacked by hicubeit, and
- map projected.
-
- the CCDs of the HiRISE instrument are arranged in a way that color products can only be produced in two
- positions of the CCD array. The CCDs that overlap for a color product are RED4, IR10, and
- BG12 or RED5, IR11, and BG13. The program hicubeit is used to stack the individual CCDs into
- a multi band cube. The output from hicubeit is the required input for hicolormos. The from1 and
- from2 parameters allow these two CCD stacks to be input. The program hicolormos can also be run
- with only the from1 parameter.
-
- A new label group, that is required by hirdrgen, called "Mosaic" is added to the image labels of
- the output cube. The original label blob is also propagated from the from1 input file.
-
+
+ This program, hicolormos, produces a mosaic and adds keywords to the "Mosaic" label group of an
+ ISIS cube. You need only input a FROM1 parameter, a TO parameter, and select a PRIORITY. The
+ FROM2 parameter is not required to run the hicolormos application. Although the new group
+ called Mosaic is added, the OriginalLabel blob is also propagated from the FROM1 input file to
+ the TO output file.
+
+ Here are a few points to keep in mind:
+
+
+
+
+ The output from hicubeit (used to stack individual CCDs into a multi band cube) is required as
+ input for hicolormos and the output of hicolormos is used as input to hirdrgen.
+
+
+ The input cubes to this program must be from the same observation, stacked by hicubeit, and
+ map projected.
+
+
+ The input file cannot be a RDR file or be the output file created by mapmos or automos.
+
+
+
+ The CCDs of the HiRISE instrument are arranged such that color products can only be produced in two
+ positions within the CCD array. The CCDs that overlap for a color product are RED4, IR10, and
+ BG12 or RED5, IR11, and BG13. The data from two selected bands are input using the FROM1 and FROM2
+ parameters.
+
- processing sequence for color products that will become RDRs
- Slither - match the blue-green and/or the infer-red to the red CCD.
+ Here is a quick look at the Processing sequence for color products that will become RDRs
+ slither - match the blue-green and/or the infered to the red CCD. hicubeit - stack the matching CCDs to make a three band cube. cam2map - project the cube. hicolormos requiers a map projected cube. hicolormos - mosaic files and add keywords to the mosaic group.
@@ -42,10 +52,10 @@
- Original version,
+ Original version.
- Changed OriginalLabel name to IsisCube
+ Changed OriginalLabel name to IsisCube.
Added keywords SubSolarAzimuth, NorthAzimuth, and SpecialProcessingFlag to mosaic group in output labels.
@@ -53,16 +63,19 @@
Fixed a bug, needed to add traverse when looking for PVL group archive.
-
- Added code to get the avg line and sample for gathering camera infomation if using the avg latitude and longitude fails.
- We contine to use the latitude and logitude so that we are backwards compatible. We added this new code because
- the camera could not find an itersect for some images (polar) if we used projection latitude and longitude to "setGround".
+
+ Added code to get the avg. line and sample for gathering camera infomation if using the avg latitude and longitude fails.
+ We continue to use the latitude and longitude so that we are backwards compatible. We added this new code because
+ the camera could not find an intersect for some images (polar) if we used projection latitude and longitude to "setGround".
Updated Spice members to be more compliant with Isis coding standards. References #972.
- Changed to use TProjection instead of Projection. References #775
+ Changed to use TProjection instead of Projection. References #775.
+
+
+ Minor spelling/capitalization corrections in the documentation. Fixes #4019.
@@ -75,8 +88,8 @@
First input file
- The first file that will be added to a color mosaic. This file is also used to propagate
- the Original label blob. This file must be the output file from hicubeit and map projected.
+ The first file that will be added to a color mosaic. This file is also used to propagate
+ the OriginalLabel blob. This file must be the output file from hicubeit and must be map projected.
*.cub
@@ -87,11 +100,11 @@
inputNone
- Second input file. this file is not required.
+ Second input file (This file is not required)
- This is the second cube that will be added to a color masaic. This file should be the output
- from hicubeit and map projected. This input file is not required.
+ This is the second cube that will be added to a color mosaic. This file should be the output
+ from hicubeit and map-projected. (This input file is not required)
*.cub
@@ -102,11 +115,11 @@
cubeoutput
- The name of the output cube
+ The name of the output cube.
- This is the name that will be given to the output cube. this cube is a mosaic of the two
- from files and has the new group "mosaic' added.
+ This is the name that will be given to the output cube. This cube is a mosaic of the two
+ FROM files and has the new group "Mosaic" added.
*.cub
@@ -118,24 +131,24 @@
ONTOP
- The priority of pixel placement
+ The priority of pixel placement.
- This parameter is used to select one of two ways to masaic the
+ This parameter is used to select one of two ways to mosaic the
pixels in areas of overlap.
diff --git a/isis/version b/isis/version
index cee04090a62f3b404b6b256ed62aa07bbd8f92b7..c865bab580c59d4c503d25ca1defa505e7fdf47b 100644
--- a/isis/version
+++ b/isis/version
@@ -1,5 +1,5 @@
-3.4.13.0 # Public version number
-2016-03-15 # Version date
+3.5.00.0 # Public version number
+2017-01-25 # Version date
v006 # 3rd party libraries version
beta # release stage (alpha, beta, stable)