Isis 3 Programmer Reference
BundleSettings.h
1#ifndef BundleSettings_h
2#define BundleSettings_h
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12// Qt library
13#include <QList>
14#include <QPair>
15#include <QSharedPointer>
16#include <QString>
17#include <QXmlStreamReader>
18
19
20
21// ISIS library
22#include "BundleTargetBody.h"
23#include "BundleObservationSolveSettings.h"
24#include "MaximumLikelihoodWFunctions.h"
25#include "SpecialPixel.h"
26#include "SurfacePoint.h"
27
28class QDataStream;
29class QUuid;
30class QXmlStreamWriter;
31
32
33using namespace Isis;
34
35namespace Isis {
36 class FileName;
37 class Project;
38 class PvlObject;
39
125 public:
126
127 //=====================================================================//
128 //================ constructors, destructor, operators ================//
129 //=====================================================================//
131 BundleSettings(const BundleSettings &other);
134
135 void setValidateNetwork(bool validate);
136 bool validateNetwork() const;
137
138
139 //=====================================================================//
140 //============================ Solve options ==========================//
141 //=====================================================================//
142
143 // mutators
144 void setSolveOptions(bool solveObservationMode = false,
145 bool updateCubeLabel = false,
146 bool errorPropagation = false,
147 bool solveRadius = false,
154 double multiplier = 1.0);
155 void setObservationSolveOptions(QList<BundleObservationSolveSettings> obsSolveSettingsList);
156 void setCreateInverseMatrix(bool createMatrix);
157
158 // accessors
161 bool createInverseMatrix() const;
162 bool solveObservationMode() const;
163 bool solveRadius() const;
164 bool updateCubeLabel() const;
165 bool errorPropagation() const;
166 bool outlierRejection() const;
167 double outlierRejectionMultiplier() const;
168// These sigmas are either for planetocentric lat/lon/radius or body-fixed x/y/z
169 double globalPointCoord1AprioriSigma() const;
170 double globalPointCoord2AprioriSigma() const;
171 double globalPointCoord3AprioriSigma() const;
172
173 int numberSolveSettings() const;
176 QList<BundleObservationSolveSettings> observationSolveSettings() const;
177
178
179 //=====================================================================//
180 //======================- Convergence Criteria ========================//
181 //=====================================================================//
182
192
193
194 static ConvergenceCriteria stringToConvergenceCriteria(QString criteria);
195 static QString convergenceCriteriaToString(ConvergenceCriteria criteria);
196 void setConvergenceCriteria(ConvergenceCriteria criteria,
197 double threshold,
198 int maximumIterations);
199 ConvergenceCriteria convergenceCriteria() const;
200 double convergenceCriteriaThreshold() const;
202
203 //=====================================================================//
204 //================ Parameter Uncertainties (Weighting) ================//
205 //=====================================================================//
206 // mutators
207// void setGlobalLatitudeAprioriSigma(double sigma);
208// void setGlobalLongitudeAprioriSigma(double sigma);
209// void setGlobalRadiiAprioriSigma(double sigma);
210
211
212 //=====================================================================//
213 //=============== Maximum Likelihood Estimation Options ===============//
214 //=====================================================================//
215
234
235
237 double cQuantile);
238 QList< QPair< MaximumLikelihoodWFunctions::Model, double > >
240
241 //=====================================================================//
242 //========================= Self Calibration ==========================//
243 //=====================================================================//
244
245
246 //=====================================================================//
247 //============================== Target Body ==========================//
248 //=====================================================================//
249 // Note targeBody information is not currently serialized.
252// bool solveTargetBodyPolePosition() const;
253// static TargetRadiiSolveMethod stringToTargetRadiiOption(QString option);
254// static QString targetRadiiOptionToString(TargetRadiiSolveMethod targetRadiiSolveMethod);
255 int numberTargetBodyParameters() const;
256 bool solveTargetBody() const;
257 bool solvePoleRA() const;
258 bool solvePoleRAVelocity() const;
259 bool solvePoleDec() const;
260 bool solvePoleDecVelocity() const;
261 bool solvePM() const;
262 bool solvePMVelocity() const;
263 bool solvePMAcceleration() const;
264 bool solveTriaxialRadii() const;
265 bool solveMeanRadius() const;
266// void BundleSettings::setTargetBodySolveOptions(bool solveTargetBodyPolePosition,
267
268
269 //=====================================================================//
270 //================== Output Options ??? (from Jigsaw only)=============//
271 //=====================================================================//
273 void setSCPVLFilename(QString SCParamFilename);
274 QString outputFilePrefix() const;
275 void setCubeList(QString fileName);
276 QString cubeList() const;
277 QString SCPVLFilename() const;
278
279 void save(QXmlStreamWriter &stream, const Project *project) const;
280
281 void readBundleSettings(QXmlStreamReader *xmlReader);
282
283 private:
284 void init();
285
296
298 QString m_cubeList;
309 // Parameter Uncertainties (Weighting)
313
314 // QList of observation solve settings
315 QList<BundleObservationSolveSettings> m_observationSolveSettings;
316
317 // Convergence Criteria
327 // Maximum Likelihood Estimation Options
335 QList< QPair< MaximumLikelihoodWFunctions::Model, double > > m_maximumLikelihood;
336
337 // Self Calibration
338
339 // Target Body
343 // Control Points
348 // Output Options
352 };
353 // typedefs
355 typedef QSharedPointer<BundleSettings> BundleSettingsQsp;
356
357
358};
359
360Q_DECLARE_METATYPE(Isis::BundleSettingsQsp);
361
362#endif
This class is used to modify and manage solve settings for 1 to many BundleObservations.
Container class for BundleAdjustment settings.
bool m_createInverseMatrix
Indicates whether to create the inverse matrix file.
double globalPointCoord2AprioriSigma() const
Retrieves the global a priori sigma for 2nd coordinate of points for this bundle.
bool validateNetwork() const
This method is used to determine whether to validate the network before the bundle adjustment.
int convergenceCriteriaMaximumIterations() const
Retrieves the maximum number of iterations allowed to solve the bundle adjustment.
MaximumLikelihoodModel
This enum defines the options for maximum likelihood estimation.
@ Chen
Use a Chen maximum likelihood model.
@ Welsch
Use a Welsch maximum likelihood model.
@ NoMaximumLikelihoodEstimator
Do not use a maximum likelihood model.
@ Huber
Use a Huber maximum likelihood model.
@ ModifiedHuber
Use a modified Huber maximum likelihood model.
bool m_solveRadius
Indicates whether to solve for point radii.
BundleSettings & operator=(const BundleSettings &other)
Assignment operator to allow proper copying of the 'other' BundleSettings object to this one.
double globalPointCoord3AprioriSigma() const
Retrieves the global a priori sigma 3rd coordinate of points for this bundle.
void addMaximumLikelihoodEstimatorModel(MaximumLikelihoodWFunctions::Model model, double cQuantile)
Add a maximum likelihood estimator (MLE) model to the bundle adjustment.
BundleSettings()
Constructs a BundleSettings object.
QString m_outputFilePrefix
The prefix for all output files.
bool m_solveObservationMode
Indicates whether to solve for observation mode.
SurfacePoint::CoordinateType controlPointCoordTypeBundle() const
Indicates the control point coordinate type for the actual bundle adjust.
bool errorPropagation() const
This method is used to determine whether this bundle adjustment will perform error propagation.
void setConvergenceCriteria(ConvergenceCriteria criteria, double threshold, int maximumIterations)
Set the convergence criteria options for the bundle adjustment.
bool solvePMVelocity() const
This method is used to determine whether the bundle adjustment will solve for target body prime merid...
double m_globalPointCoord2AprioriSigma
The global a priori sigma for longitude or Y.
void save(QXmlStreamWriter &stream, const Project *project) const
This method is used to write a BundleSettings object in an XML format.
ConvergenceCriteria
This enum defines the options for the bundle adjustment's convergence.
@ Sigma0
The value of sigma0 will be used to determine that the bundle adjustment has converged.
@ ParameterCorrections
All parameter corrections will be used to determine that the bundle adjustment has converged.
BundleTargetBodyQsp bundleTargetBody() const
Retrieves a pointer to target body information for the bundle adjustment.
void setCreateInverseMatrix(bool createMatrix)
Turn the creation of the inverse correlation matrix file on or off.
bool solveMeanRadius() const
This method is used to determine whether the bundle adjustment will solve for target body mean radius...
bool solveRadius() const
This method is used to determine whether this bundle adjustment will solve for radius.
void init()
Set Default vales for a BundleSettings object.
bool solveTriaxialRadii() const
This method is used to determine whether the bundle adjustment will solve for target body triaxial ra...
BundleTargetBodyQsp m_bundleTargetBody
A pointer to the target body settings and information.
ConvergenceCriteria m_convergenceCriteria
Enumeration used to indicate what criteria to use to determine bundle adjustment convergence.
double m_globalPointCoord3AprioriSigma
The global a priori sigma for radius or Z.
bool solvePMAcceleration() const
This method is used to determine whether the bundle adjustment will solve for target body prime merid...
QList< BundleObservationSolveSettings > observationSolveSettings() const
Retrieves solve settings for the observation corresponding to the given index.
void setBundleTargetBody(BundleTargetBodyQsp bundleTargetBody)
Sets the target body for the bundle adjustment.
int numberTargetBodyParameters() const
This method is used to determine whether the bundle adjustment will solve for target body pole positi...
QString outputFilePrefix() const
Retrieve the output file prefix.
double globalPointCoord1AprioriSigma() const
Retrieves global a priori sigma for 1st coordinate of points for this bundle.
bool updateCubeLabel() const
This method is used to determine whether this bundle adjustment will update the cube labels.
double m_convergenceCriteriaThreshold
Tolerance value corresponding to the selected convergence criteria.
double m_outlierRejectionMultiplier
The multiplier value for outlier rejection.
bool outlierRejection() const
This method is used to determine whether outlier rejection will be performed on this bundle adjustmen...
void setOutputFilePrefix(QString outputFilePrefix)
Set the output file prefix for the bundle adjustment.
bool solvePoleRA() const
This method is used to determine whether the bundle adjustment will solve for target body pole right ...
bool solvePoleDecVelocity() const
This method is used to determine whether the bundle adjustment will solve for target body pole declin...
static QString convergenceCriteriaToString(ConvergenceCriteria criteria)
Converts the given BundleSettings::ConvergenceCriteria enumeration to a string.
void setValidateNetwork(bool validate)
Sets the internal flag to indicate whether to validate the network before the bundle adjustment.
~BundleSettings()
Destroys the BundleSettings object.
static ConvergenceCriteria stringToConvergenceCriteria(QString criteria)
Converts the given string value to a BundleSettings::ConvergenceCriteria enumeration.
SurfacePoint::CoordinateType m_cpCoordTypeReports
Indicates the coordinate type for outputting control points in reports.
bool m_outlierRejection
Indicates whether to perform automatic outlier detection/rejection.
bool m_errorPropagation
Indicates whether to perform error propagation.
bool createInverseMatrix() const
Indicates if the settings will allow the inverse correlation matrix to be created.
bool solvePoleRAVelocity() const
This method is used to determine whether the bundle adjustment will solve for target body pole right ...
QString cubeList() const
BundleSettings::cubeList.
QList< QPair< MaximumLikelihoodWFunctions::Model, double > > m_maximumLikelihood
Model and C-Quantile for each of the three maximum likelihood estimations.
void setOutlierRejection(bool outlierRejection, double multiplier=1.0)
Set the outlier rejection options for the bundle adjustment.
ConvergenceCriteria convergenceCriteria() const
Retrieves the convergence criteria to be used to solve the bundle adjustment.
QList< QPair< MaximumLikelihoodWFunctions::Model, double > > maximumLikelihoodEstimatorModels() const
Retrieves the list of maximum likelihood estimator (MLE) models with their corresponding C-Quantiles.
bool solvePoleDec() const
This method is used to determine whether the bundle adjustment will solve for target body pole declin...
bool m_validateNetwork
Indicates whether the network should be validated.
double m_globalPointCoord1AprioriSigma
The global a priori sigma for latitude or X.
int numberSolveSettings() const
Retrieves the number of observation solve settings.
void setSolveOptions(bool solveObservationMode=false, bool updateCubeLabel=false, bool errorPropagation=false, bool solveRadius=false, SurfacePoint::CoordinateType coordTypeBundle=SurfacePoint::Latitudinal, SurfacePoint::CoordinateType coordTypeReports=SurfacePoint::Latitudinal, double globalPointCoord1AprioriSigma=Isis::Null, double globalPointCoord2AprioriSigma=Isis::Null, double globalPointCoord3AprioriSigma=Isis::Null)
Set the solve options for the bundle adjustment.
SurfacePoint::CoordinateType controlPointCoordTypeReports() const
Indicates the control point coordinate type for reports.
bool solvePM() const
This method is used to determine whether the bundle adjustment will solve for target body prime merid...
void setCubeList(QString fileName)
BundleSettings::setCubeList.
bool m_updateCubeLabel
Indicates whether to update cubes.
double convergenceCriteriaThreshold() const
Retrieves the convergence threshold to be used to solve the bundle adjustment.
void setObservationSolveOptions(QList< BundleObservationSolveSettings > obsSolveSettingsList)
Add the list of solve options for each observation.
bool solveObservationMode() const
This method is used to determine whether this bundle adjustment will solve for observation mode.
int m_convergenceCriteriaMaximumIterations
Maximum number of iterations before quitting the bundle adjustment if it has not yet converged to the...
bool solveTargetBody() const
This method is used to determine whether the bundle adjustment will solve for target body.
double outlierRejectionMultiplier() const
Retrieves the outlier rejection multiplier for the bundle adjustment.
bool m_solveTargetBody
Indicates whether to solve for target body.
SurfacePoint::CoordinateType m_cpCoordTypeBundle
Indicates the coordinate type used for control points in the bundle adjustment.
File name manipulation and expansion.
Definition FileName.h:100
Model
The supported maximum likelihood estimation models.
The main project for ipce.
Definition Project.h:287
Contains Pvl Groups and Pvl Objects.
Definition PvlObject.h:61
CoordinateType
Defines the coordinate typ, units, and coordinate index for some of the output methods.
@ Latitudinal
Planetocentric latitudinal (lat/lon/rad) coordinates.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
QSharedPointer< BundleSettings > BundleSettingsQsp
Definition for a BundleSettingsQsp, a shared pointer to a BundleSettings object.
const double Null
Value for an Isis Null pixel.
bool validate(const NaifVertex &v)
Verifies that the given NaifVector or NaifVertex is 3 dimensional.
This struct is needed to write the m_maximumLikelihood variable as an HDF5 table.
unsigned int indexFieldValue
The index of the TableRecord.???
QString nameFieldValue
The model name of the TableRecord.???
double quantileFieldValue
The quantile of the TableRecord.???