Example result:
@@ -142,7 +142,7 @@
--------------------
a*(frameTemp) + b
- Where:
+ Where:
'a' and 'b' are band dependent constants, read in from a file.
AND
frameTemp = (WAC EndTemperatureFpa - WAC BeginTemperatureFpa)/WAC NumFramelets * frame + WAC BeginTemperatureFpa
@@ -151,13 +151,13 @@
- The DN level in an uncalibrated image is the sum of the true signal from the scene,
+ The DN level in an uncalibrated image is the sum of the true signal from the scene,
the bias, the dark current, and random noise in all 3 components. The random noise in
the true signal and dark current is called shot noise and the random noise in the bias
is called read noise. The true signal, bias, and dark current are defined as mean
- values so that if the random noise were averaged down to insignificance by taking a
- very large number of images and averaging them, the resulting image would be the true
- scene, bias, and dark current with no systematic error. That implies the statistical
+ values so that if the random noise were averaged down to insignificance by taking a
+ very large number of images and averaging them, the resulting image would be the true
+ scene, bias, and dark current with no systematic error. That implies the statistical
distribution of the random noise has an average of zero, and therefore the random noise
has both positive and negative values, except for the trivial case of zero random noise.
@@ -208,27 +208,30 @@
Original version
- Updated use of deprecated methods (use ProcessCube instead
- of Start/EndProcess). Updated documentation/comments.
+ Updated use of deprecated methods (use ProcessCube instead
+ of Start/EndProcess). Updated documentation/comments.
Optimized/cleaned up code in Calibrate, GetDark, and GetMask.
- Changed the algorithm for finding dark files in GetDark.
- GetDark will now find the two closest available dark file
+ Changed the algorithm for finding dark files in GetDark.
+ GetDark will now find the two closest available dark file
temperatures matching the input WAC cube. Then, it will find
- the dark file at each temperature with the time closest to the
- WAC time. This should prevent failed calibrations from missing
+ the dark file at each temperature with the time closest to the
+ WAC time. This should prevent failed calibrations from missing
darks.
Fixed an error which would apply band 1 corrections to a
- single passed in band, even if that band was not band 1.
+ single passed in band, even if that band was not band 1.
Implemented a temperature based correction to lrowaccal.
- This correction requires constants which are read from a
+ This correction requires constants which are read from a
pvl file. A file other than the default can be passed in
via an argument. The correction may also be turned off via
an argument.
+
+ Added ability to get the sun distance from the camera.
+
@@ -271,13 +274,13 @@
Calibrate using a dark file.
- Calibrate using a correction based off of a dark file. Please see the Dark Correction
- section at the beginning of this document for a detailed explanation of how the
+ Calibrate using a correction based off of a dark file. Please see the Dark Correction
+ section at the beginning of this document for a detailed explanation of how the
correction is applied
- DarkFile
-
+
filename
- Default
@@ -285,14 +288,14 @@
Dark file used for calibration.
- Dark file used for calibration. The default is to use the dark file with the closest
+ Dark file used for calibration. The default is to use the dark file with the closest
time and temperature to the WAC image being calibrated. See the Dark Correction section
at the beginning of this document for a detailed explanation of how dark files are
chosen.
-
+
boolean
@@ -305,7 +308,7 @@
- FlatfieldFile
-
+
filename
- Default
@@ -318,7 +321,7 @@
-
+
boolean
@@ -327,15 +330,15 @@
Do radiometric calibration.
- Perform a radiometric calibration on the input cub. This type of this correction is
- defined by the RadiometricType parameter.
+ Perform a radiometric calibration on the input cub. This type of this correction is
+ defined by the RadiometricType parameter.
- RadiometricType
- RadiometricFile
-
+
string
@@ -358,7 +361,7 @@
-
+
filename
- Default
@@ -366,12 +369,12 @@
Radiometric constants file used for calibration.
- Radiometric constants file used for calibration. The default is to use the system
+ Radiometric constants file used for calibration. The default is to use the system
defined file with the highest version.
-
+
boolean
@@ -380,22 +383,22 @@
- This option will apply a special pixel mask to the input cub. The default is to use the
- system defined mask file with the matching WAC mode and closest Temperature to the input
- cub. Please see the main documentation for a detailed description of the
- Special Pixel Mask correction.
+ This option will apply a special pixel mask to the input cub. The default is to use the
+ system defined mask file with the matching WAC mode and closest Temperature to the input
+ cub. Please see the main documentation for a detailed description of the
+ Special Pixel Mask correction.
- SpecialPixelsFile
-
+
filename
- Default
- This option will apply a special pixel mask to the cub. The default is to use the system
- defined mask file with the matching WAC mode and closest Temperature to the input cub.
- Please see the main documentation for a detailed description of the
- Special Pixel Mask correction.
+ This option will apply a special pixel mask to the cub. The default is to use the system
+ defined mask file with the matching WAC mode and closest Temperature to the input cub.
+ Please see the main documentation for a detailed description of the
+ Special Pixel Mask correction.
@@ -427,6 +430,6 @@
-
+
diff --git a/isis/src/lro/apps/lrowaccal/main.cpp b/isis/src/lro/apps/lrowaccal/main.cpp
index fa31a5d07f..dd55a3540f 100644
--- a/isis/src/lro/apps/lrowaccal/main.cpp
+++ b/isis/src/lro/apps/lrowaccal/main.cpp
@@ -205,43 +205,53 @@ void IsisMain () {
if (g_iof) {
responsivity = radPvl["IOF"];
- for (int i = 0; i < bands.size(); i++)
+ for (int i = 0; i < bands.size(); i++) {
g_iofResponsivity.push_back(toDouble(responsivity[toInt(bands[i]) - 1]));
+ }
try {
+ Camera *cam;
+ cam = icube->camera();
iTime startTime((QString) inst["StartTime"]);
- double etStart = startTime.Et();
- // Get the distance between the Moon and the Sun at the given time in
- // Astronomical Units (AU)
- QString bspKernel1 = p.MissionData("lro", "/kernels/tspk/moon_pa_de421_1900-2050.bpc", false);
- QString bspKernel2 = p.MissionData("lro", "/kernels/tspk/de421.bsp", false);
- NaifStatus::CheckErrors();
- furnsh_c(bspKernel1.toLatin1().data());
- NaifStatus::CheckErrors();
- furnsh_c(bspKernel2.toLatin1().data());
- NaifStatus::CheckErrors();
- QString pckKernel1 = p.MissionData("base", "/kernels/pck/pck?????.tpc", true);
- QString pckKernel2 = p.MissionData("lro", "/kernels/pck/moon_080317.tf", false);
- QString pckKernel3 = p.MissionData("lro", "/kernels/pck/moon_assoc_me.tf", false);
- NaifStatus::CheckErrors();
- furnsh_c(pckKernel1.toLatin1().data());
- NaifStatus::CheckErrors();
- furnsh_c(pckKernel2.toLatin1().data());
- NaifStatus::CheckErrors();
- furnsh_c(pckKernel3.toLatin1().data());
- NaifStatus::CheckErrors();
- double sunpos[6], lt;
- spkezr_c("sun", etStart, "MOON_ME", "LT+S", "MOON", sunpos, <);
- g_solarDistance = vnorm_c(sunpos) / KM_PER_AU;
- unload_c(bspKernel1.toLatin1().data());
- unload_c(bspKernel2.toLatin1().data());
- unload_c(pckKernel1.toLatin1().data());
- unload_c(pckKernel2.toLatin1().data());
- unload_c(pckKernel3.toLatin1().data());
+ cam->setTime(startTime);
+ g_solarDistance = cam->sunToBodyDist() / KM_PER_AU;
}
- catch (IException &e) {
- QString msg = "Can not find necessary SPICE kernels for converting to IOF";
- throw IException(e, IException::User, msg, _FILEINFO_);
+ catch(IException &e) {
+ try {
+ iTime startTime((QString) inst["StartTime"]);
+ double etStart = startTime.Et();
+ // Get the distance between the Moon and the Sun at the given time in
+ // Astronomical Units (AU)
+ QString bspKernel1 = p.MissionData("lro", "/kernels/tspk/moon_pa_de421_1900-2050.bpc", false);
+ QString bspKernel2 = p.MissionData("lro", "/kernels/tspk/de421.bsp", false);
+ NaifStatus::CheckErrors();
+ furnsh_c(bspKernel1.toLatin1().data());
+ NaifStatus::CheckErrors();
+ furnsh_c(bspKernel2.toLatin1().data());
+ NaifStatus::CheckErrors();
+ QString pckKernel1 = p.MissionData("base", "/kernels/pck/pck?????.tpc", true);
+ QString pckKernel2 = p.MissionData("lro", "/kernels/pck/moon_080317.tf", false);
+ QString pckKernel3 = p.MissionData("lro", "/kernels/pck/moon_assoc_me.tf", false);
+ NaifStatus::CheckErrors();
+ furnsh_c(pckKernel1.toLatin1().data());
+ NaifStatus::CheckErrors();
+ furnsh_c(pckKernel2.toLatin1().data());
+ NaifStatus::CheckErrors();
+ furnsh_c(pckKernel3.toLatin1().data());
+ NaifStatus::CheckErrors();
+ double sunpos[6], lt;
+ spkezr_c("sun", etStart, "MOON_ME", "LT+S", "MOON", sunpos, <);
+ g_solarDistance = vnorm_c(sunpos) / KM_PER_AU;
+ unload_c(bspKernel1.toLatin1().data());
+ unload_c(bspKernel2.toLatin1().data());
+ unload_c(pckKernel1.toLatin1().data());
+ unload_c(pckKernel2.toLatin1().data());
+ unload_c(pckKernel3.toLatin1().data());
+ }
+ catch (IException &e) {
+ QString msg = "Can not find necessary SPICE kernels for converting to IOF";
+ throw IException(e, IException::User, msg, _FILEINFO_);
+ }
}
}
else {
diff --git a/isis/src/lro/apps/lrowaccal/tsts/wac-mono/Makefile b/isis/src/lro/apps/lrowaccal/tsts/wac-mono/Makefile
index 5c5d66b1a2..a8da2b4483 100644
--- a/isis/src/lro/apps/lrowaccal/tsts/wac-mono/Makefile
+++ b/isis/src/lro/apps/lrowaccal/tsts/wac-mono/Makefile
@@ -8,3 +8,5 @@ commands:
to=$(OUTPUT)/${FILE}.vis.odd.cal.cub > /dev/null;
$(APPNAME) from=$(INPUT)/${FILE}.vis.even.cub \
to=$(OUTPUT)/${FILE}.vis.even.cal.cub > /dev/null;
+ $(APPNAME) from=$(INPUT)/${FILE}.vis.even.spice.cub \
+ to=$(OUTPUT)/${FILE}.vis.even.spice.cal.cub > /dev/null;