Skip to content

Commit

Permalink
Rename BundleObservation classes (#4518)
Browse files Browse the repository at this point in the history
* rename BundleObservation classes

* omit changes to sip wrappers
  • Loading branch information
tgiroux authored and jessemapel committed Jun 17, 2021
1 parent 34aa246 commit c9c69ab
Show file tree
Hide file tree
Showing 24 changed files with 2,123 additions and 2,122 deletions.
18 changes: 9 additions & 9 deletions isis/src/control/objs/BundleAdjust/BundleAdjust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ find files of those names at the top level of this repository. **/

// Isis lib
#include "Application.h"
#include "AbstractBundleObservation.h"
#include "BundleObservation.h"
#include "IsisBundleObservation.h"
#include "BundleObservationSolveSettings.h"
#include "BundleResults.h"
#include "BundleSettings.h"
Expand Down Expand Up @@ -426,7 +426,7 @@ namespace Isis {
}

// TODO ISIS vs. CSM (addNewIsisObservation?)
AbstractBundleObservationQsp observation =
BundleObservationQsp observation =
m_bundleObservations.addNew(image, observationNumber, instrumentId, m_bundleSettings);

if (!observation) {
Expand Down Expand Up @@ -455,7 +455,7 @@ namespace Isis {
BundleMeasureQsp measure = bundleControlPoint->at(j);
QString cubeSerialNumber = measure->cubeSerialNumber();

AbstractBundleObservationQsp observation =
BundleObservationQsp observation =
m_bundleObservations.observationByCubeSerialNumber(cubeSerialNumber);
BundleImageQsp image = observation->imageByCubeSerialNumber(cubeSerialNumber);

Expand Down Expand Up @@ -1414,7 +1414,7 @@ namespace Isis {
}
}
else {
AbstractBundleObservationQsp observation;
BundleObservationQsp observation;

// get parameter weights for this observation
if (m_bundleSettings->solveTargetBody()) {
Expand Down Expand Up @@ -1860,7 +1860,7 @@ namespace Isis {
std::cout << "Computing partials for [" << measure.cubeSerialNumber() << "] in [" << point.id() << "]." << std::endl;

Camera *measureCamera = measure.camera();
AbstractBundleObservationQsp observation = measure.parentBundleObservation();
BundleObservationQsp observation = measure.parentBundleObservation();

int numImagePartials = observation->numberParameters();

Expand Down Expand Up @@ -1962,7 +1962,7 @@ namespace Isis {
// Update spice for each BundleObservation
int numObservations = m_bundleObservations.size();
for (int i = 0; i < numObservations; i++) {
AbstractBundleObservationQsp observation = m_bundleObservations.at(i);
BundleObservationQsp observation = m_bundleObservations.at(i);

int numParameters = observation->numberParameters();

Expand All @@ -1971,7 +1971,7 @@ namespace Isis {
if (m_bundleSettings->solveTargetBody()) {
// TODO: needs to be updated for ISIS vs. CSM CSM has no updateBodyRotation]
// TODO: this is no good.
QSharedPointer<BundleObservation> isisObservation = qSharedPointerDynamicCast<BundleObservation>(observation);
QSharedPointer<IsisBundleObservation> isisObservation = qSharedPointerDynamicCast<IsisBundleObservation>(observation);
isisObservation->updateBodyRotation();
}

Expand Down Expand Up @@ -2082,7 +2082,7 @@ namespace Isis {

// add vtpv from constrained image parameters
for (int i = 0; i < m_bundleObservations.size(); i++) {
AbstractBundleObservationQsp observation = m_bundleObservations.at(i);
BundleObservationQsp observation = m_bundleObservations.at(i);

// get weight and correction vector for this observation
const LinearAlgebra::Vector &weights = observation->parameterWeights();
Expand Down Expand Up @@ -2554,7 +2554,7 @@ namespace Isis {
}
// save adjusted image sigmas
else {
AbstractBundleObservationQsp observation;
BundleObservationQsp observation;
if (m_bundleSettings->solveTargetBody()) {
observation = m_bundleObservations.at(i-1);
}
Expand Down
2 changes: 1 addition & 1 deletion isis/src/control/objs/BundleAdjust/unitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ These have partial coverage
void BundleAdjust::init(Progress *progress) {
(image==false) for BundleImage* image = new BundleImage(camera, serialNumber, fileName);
QString msg = "In BundleAdjust::init(): image " + fileName + "is null" + "\n";
(observation==false) for BundleObservation *observation = m_bundleObservations.addNew(image, observationNumber, instrumentId, m_bundleSettings);
(observation==false) for IsisBundleObservation *observation = m_bundleObservations.addNew(image, observationNumber, instrumentId, m_bundleSettings);
QString msg = "In BundleAdjust::init(): observation " + observationNumber + "is null" + "\n";


Expand Down
2 changes: 1 addition & 1 deletion isis/src/control/objs/BundleResults/unitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ find files of those names at the top level of this repository. **/
#include <QXmlInputSource>

#include "BundleControlPoint.h"
#include "BundleObservation.h"
#include "IsisBundleObservation.h"
#include "BundleObservationVector.h"
#include "BundleResults.h"
#include "Camera.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ namespace Isis {
* than the other headers. The number of TWIST headers will be the same
* as each of the other angle headers. Fixes #4557.
*/
bool BundleSolutionInfo::outputImagesCSVHeader(std::ofstream &fpOut, AbstractBundleObservationQsp observation) {
bool BundleSolutionInfo::outputImagesCSVHeader(std::ofstream &fpOut, BundleObservationQsp observation) {

if (!fpOut) {
return false;
Expand Down Expand Up @@ -1126,7 +1126,7 @@ namespace Isis {
return false;
}

QList<AbstractBundleObservationQsp> observations =
QList<BundleObservationQsp> observations =
m_statisticsResults->observations().observationsByInstId(instrumentIds[i]);

int nObservations = observations.size();
Expand All @@ -1136,7 +1136,7 @@ namespace Isis {


for (int j = 0; j < nObservations; j++ ) {
AbstractBundleObservationQsp observation = observations[j];
BundleObservationQsp observation = observations[j];

if(!observation) {
continue;
Expand Down Expand Up @@ -1214,7 +1214,7 @@ namespace Isis {
m_txtBundleOutputFilename = ofname;

char buf[4096];
AbstractBundleObservationQsp observation;
BundleObservationQsp observation;

int nObservations = m_statisticsResults->observations().size();

Expand Down
4 changes: 2 additions & 2 deletions isis/src/control/objs/BundleSolutionInfo/BundleSolutionInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ find files of those names at the top level of this repository. **/
#include <QObject>
#include <QString>

#include "AbstractBundleObservation.h"
#include "BundleObservation.h"
#include "BundleSettings.h"
#include "SurfacePoint.h"

Expand Down Expand Up @@ -196,7 +196,7 @@ namespace Isis {
QString name() const;


bool outputImagesCSVHeader(std::ofstream &fpOut, AbstractBundleObservationQsp observations);
bool outputImagesCSVHeader(std::ofstream &fpOut, BundleObservationQsp observations);
bool outputHeader(std::ofstream &fpOut);
bool outputText();
bool outputImagesCSV();
Expand Down
2 changes: 1 addition & 1 deletion isis/src/control/objs/BundleSolutionInfo/unitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ find files of those names at the top level of this repository. **/
#include <QXmlInputSource>

#include "BundleControlPoint.h"
#include "BundleObservation.h"
#include "IsisBundleObservation.h"
#include "BundleObservationVector.h"
#include "BundleResults.h"
#include "BundleSettings.h"
Expand Down
Loading

0 comments on commit c9c69ab

Please sign in to comment.