Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test camera model #95

Merged
merged 6 commits into from
Aug 22, 2018
Merged

Test camera model #95

merged 6 commits into from
Aug 22, 2018

Conversation

AstroKEW78
Copy link
Contributor

added focal length tests

double col = imagePt.samp - (m_ccdCenter[0] - 0.5);
double row = imagePt.line - (m_ccdCenter[1] - 0.5);
double col = imagePt.samp - (m_ccdCenter[0]);
double row = imagePt.line - (m_ccdCenter[1]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could have sworn this was already merged by #91 weird

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I bet that upstream was not pulled and merged, so we are seeing both.

isdFile.close();
}
};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code copy and paste will be removed once Fixtures.h files gets merged.

class FrameSensorModel : public ::testing::Test {
protected:

UsgsAstroFrameSensorModel *sensorModel;

csm::Isd isd;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be removed

void SetUp() override {
sensorModel = NULL;
std::ifstream isdFile("data/simpleFramerISD.json");
json jsonIsd = json::parse(isdFile);
csm::Isd isd;
//csm::Isd isd;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be reverted.

Copy link
Collaborator

@jlaura jlaura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks really good.

@@ -57,14 +80,14 @@ class FrameSensorModel : public ::testing::Test {

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can yank this comment, since this is fixed.

// Focal Length Tests:
TEST_F(FrameIsdTest, FL500_OffBody4) {
isd.clearParams("focal_length");
isd.addParam("focal_length","500.0");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This super nit picky. Can we use a single variable for the key? std::string key = "focal_length"? This will make refactoring later easier and is better form I think to help maintain these.

double col = imagePt.samp - (m_ccdCenter[0] - 0.5);
double row = imagePt.line - (m_ccdCenter[1] - 0.5);
double col = imagePt.samp - (m_ccdCenter[0]);
double row = imagePt.line - (m_ccdCenter[1]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I bet that upstream was not pulled and merged, so we are seeing both.

"USGS_ASTRO_FRAME_SENSOR_MODEL");

UsgsAstroFrameSensorModel* sensorModel = dynamic_cast<UsgsAstroFrameSensorModel *>(model);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these repeated instantiations look good. We can refactor out once parameterized tests are working the way we want them to.

@AstroKEW78 AstroKEW78 merged commit a99be16 into DOI-USGS:master Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants