Skip to content

Commit

Permalink
Merge branch 'dev' into jigsaw_test_mini
Browse files Browse the repository at this point in the history
  • Loading branch information
krlberry authored Oct 28, 2020
2 parents 8f7ffca + 72da4da commit 85fe569
Show file tree
Hide file tree
Showing 18 changed files with 2,653 additions and 97 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* [Installing Older Versions of ISIS](README.md#Installing-older-versions-of-ISIS)

## Requests for Comment
The ISIS project uses a Request for Comment (RFC) model whereby major potential changes to the code base, data area, or binary delivery process are proposed, iterated on by any interested parties, and potentially adopted. Right now, RFCs are being housed in this repository's [wiki](https://github.com/USGS-Astrogeology/ISIS3/wiki) with associated discussions occurring on [astrodiscuss](astrodiscuss.usgs.gov).
The ISIS project uses a Request for Comment (RFC) model whereby major potential changes to the code base, data area, or binary delivery process are proposed, iterated on by any interested parties, and potentially adopted. Right now, RFCs are being housed in this repository's [wiki](https://github.com/USGS-Astrogeology/ISIS3/wiki) with associated discussions occurring on [astrodiscuss](https://astrodiscuss.usgs.gov).

Current open RFCs:
* [Migration of ISIS Data to Git](https://github.com/USGS-Astrogeology/ISIS3/wiki/RFC4---Migration-of-ISIS-Data-to-Git)
Expand Down
4 changes: 0 additions & 4 deletions isis/src/apollo/apps/apollo2isis/tsts/Makefile

This file was deleted.

6 changes: 0 additions & 6 deletions isis/src/apollo/apps/apollo2isis/tsts/default/Makefile

This file was deleted.

11 changes: 0 additions & 11 deletions isis/src/base/objs/Constants/Constants.truth

This file was deleted.

30 changes: 0 additions & 30 deletions isis/src/base/objs/Constants/unitTest.cpp

This file was deleted.

1 change: 1 addition & 0 deletions isis/src/base/objs/Spice/Spice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ namespace Isis {
m_usingAle = true;
}
catch(...) {

// Backup to stadnard ISIS implementation
if (noTables) {
load(kernels["TargetPosition"], noTables);
Expand Down
8 changes: 8 additions & 0 deletions isis/src/control/apps/jigsaw/jigsaw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ namespace Isis {
gp += PvlKeyword("Status", "Camera pointing NOT updated");
}
if (log) {
Pvl summary;
std::istringstream iss (bundleAdjustment->iterationSummaryGroup().toStdString());
iss >> summary;

for (auto grpIt = summary.beginGroup(); grpIt!= summary.endGroup(); grpIt++) {
log->addGroup(*grpIt);
}

log->addGroup(gp);
}
delete bundleSolution;
Expand Down
43 changes: 0 additions & 43 deletions isis/src/control/apps/jigsaw/tsts/camsolveAll/Makefile

This file was deleted.

11 changes: 9 additions & 2 deletions isis/src/control/objs/BundleAdjust/BundleAdjust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3062,9 +3062,13 @@ namespace Isis {
std::ostringstream ostr;
ostr << summaryGroup << std::endl;
m_iterationSummary += QString::fromStdString( ostr.str() );
if (m_printSummary) {

if (m_printSummary && iApp != NULL) {
Application::Log(summaryGroup);
}
else {
std::cout << summaryGroup << std::endl;
}
}


Expand Down Expand Up @@ -3110,7 +3114,10 @@ namespace Isis {
* -Wformat-security warning during the build.
*/
void BundleAdjust::outputBundleStatus(QString status) {
if (QCoreApplication::applicationName() != "ipce") {
if (iApp == NULL) { // in a function call
printf("%s", status.toStdString().c_str());
}
else if (QCoreApplication::applicationName() != "ipce") {
printf("%s", status.toStdString().c_str());
}
}
Expand Down
29 changes: 29 additions & 0 deletions isis/tests/ConstantsTests.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include "Constants.h"
#include <gtest/gtest.h>

TEST (ConstantsTests, TestPi){
ASSERT_NEAR(Isis::PI, 3.141592653589793, .000000000000001);
}


TEST (ConstantsTests, TestHalfPi){
ASSERT_NEAR(Isis::PI/2, 1.570796326794897, .000000000000001);
}

TEST (ConstantsTests, TestE){
ASSERT_NEAR(Isis::E, 2.718281828459045, .000000000000001);
}

TEST (ConstantsTests, TestDeg2Rad){
ASSERT_NEAR(Isis::DEG2RAD, 0.0174532925199433, .000000000000001);
ASSERT_EQ(Isis::DEG2RAD * 180, Isis::PI);
}

TEST (ConstantsTests, TestRad2Deg){
ASSERT_NEAR(Isis::RAD2DEG, 57.29577951308232, .000000000000001);
ASSERT_EQ(Isis::RAD2DEG * Isis::PI/2, 90);
}

TEST (ConstantsTests, TestBigInt){
ASSERT_EQ(sizeof(Isis::BigInt), 8);
}
47 changes: 47 additions & 0 deletions isis/tests/Fixtures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,53 @@ namespace Isis {
}
}

void ObservationPair::SetUp() {
FileName labelPathL = FileName("data/observationPair/observationImageL.pvl");
FileName labelPathR = FileName("data/observationPair/observationImageR.pvl");

isdPathL = new FileName("data/observationPair/observationImageL.isd");
isdPathR = new FileName("data/observationPair/observationImageR.isd");

cubeL = new Cube();
cubeR = new Cube();

cubeLPath = tempDir.path() + "/observationPairL.cub";
cubeRPath = tempDir.path() + "/observationPairR.cub";

cubeL->fromIsd(cubeLPath, labelPathL, *isdPathL, "rw");
cubeR->fromIsd(cubeRPath, labelPathR, *isdPathR, "rw");

cubeList = new FileList();
cubeList->append(cubeL->fileName());
cubeList->append(cubeR->fileName());

cubeListFile = tempDir.path() + "/cubes.lis";
cubeList->write(cubeListFile);

cnetPath = "data/observationPair/observationPair.net";
network = new ControlNet();
network->ReadControl(cnetPath);
}


void ObservationPair::TearDown() {
delete cubeList;
delete network;

if (cubeL) {
delete cubeL;
}

if (cubeR) {
delete cubeR;
}

delete isdPathL;
delete isdPathR;

}


void MroCube::setInstrument(QString ikid, QString instrumentId, QString spacecraftName) {
PvlGroup &kernels = testCube->label()->findObject("IsisCube").findGroup("Kernels");
kernels.findKeyword("NaifFrameCode").setValue(ikid);
Expand Down
22 changes: 22 additions & 0 deletions isis/tests/Fixtures.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,28 @@ namespace Isis {
FileList *cubeList;
QString cubeListFile;
QString controlNetPath;

void SetUp() override;
void TearDown() override;
}

class ObservationPair : public TempTestingFiles {
protected:

Cube *cubeL;
Cube *cubeR;

QString cubeLPath;
QString cubeRPath;

FileName *isdPathL;
FileName *isdPathR;

FileList *cubeList;
QString cubeListFile;

ControlNet *network;
QString cnetPath;

void SetUp() override;
void TearDown() override;
Expand Down
Loading

0 comments on commit 85fe569

Please sign in to comment.