Loading isis/src/control/apps/deltack/tsts/singlePoint/Makefile +0 −1 Original line number Diff line number Diff line Loading @@ -31,4 +31,3 @@ commands: > $(OUTPUT)/residuals.csv $(RM) bundleout.txt > /dev/null; $(RM) residuals.csv > /dev/null; $(RM) print.prt > /dev/null; isis/src/control/apps/jigsaw/tsts/heldList/Makefile 0 → 100644 +45 −0 Original line number Diff line number Diff line APPNAME = jigsaw # This test exercises the bundle adjustment of one image each from the MOC-WA camera and Viking Orbiter-1 B Camera. # oldsparse method with held image option; solving for position. # The "cat t_bundleout.txt" command in these tests uses sed to do the following (in order): # 1. remove cube filename paths # 2. remove net filename paths # 3. remove digits beyond the fifth decimal place of decimal numbers # 4. remove date and time # # 2014-07-23 JWB - Changed method from oldsparse to default (sparse). # Commented out references to bundleout_images.csv. Removed default parameters. include $(ISISROOT)/make/isismake.tsts commands: $(CP) $(INPUT)/*.cub $(OUTPUT) > /dev/null; $(LS) -1 $(OUTPUT)/*.cub > $(OUTPUT)/cub.lis; $(LS) -1 $(OUTPUT)/e0400710.lev1.cub > $(OUTPUT)/held.lis; $(APPNAME) fromlist=$(OUTPUT)/cub.lis \ heldlist=$(OUTPUT)/held.lis \ cnet=$(INPUT)/mocVik.net \ onet=$(OUTPUT)/case2OutNet.net \ update=yes \ sigma0=1.e-5 \ maxits=10 \ spsolve=position > /dev/null; cat bundleout.txt | grep -v "Run Time:" | grep -v "Elapsed Time:" \ | perl -pe 's/(^|,|: )([^,:]+\/)([^,\/:]*\.)(net|cub)/\1\3\4/g' 2>/dev/null \ | sed 's/\([0-9][0-9]*\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9]\)\([0-9][0-9]*\)/\1/g' \ | sed s/`date +%Y-%m-%dT`\[0-2\]\[0-9\]:\[0-5\]\[0-9\]:\[0-5\]\[0-9\]/date/ \ > $(OUTPUT)/bundleout.txt cat residuals.csv \ | perl -pe 's/(^|,|: )([^,:]+\/)([^,\/:]*\.)(net|cub)/\1\3\4/g' 2>/dev/null \ > $(OUTPUT)/residuals.csv # cat bundleout_images.csv \ # | perl -pe 's/(^|,|: )([^,:]+\/)([^,\/:]*\.)(net|cub)/\1\3\4/g' 2>/dev/null \ # > $(OUTPUT)/bundleout_images.csv # $(RM) bundleout_images.csv > /dev/null; $(RM) residuals.csv > /dev/null; $(MV) bundleout_points.csv $(OUTPUT)/bundleout_points.csv > /dev/null; $(RM) $(OUTPUT)/cub.lis $(OUTPUT)/held.lis $(OUTPUT)/case2OutNet.bin print.prt > /dev/null; $(RM) bundleout.txt print.prt > /dev/null cathist from=$(OUTPUT)/vik.cub > $(OUTPUT)/vik.pvl; cathist from=$(OUTPUT)/e0400710.lev1.cub > $(OUTPUT)/e0400710.lev1.cub.pvl; isis/src/control/objs/BundleAdjust/BundleAdjust.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -4145,7 +4145,7 @@ namespace Isis { } if (m_bundleSettings->createResidualsFile()) { // outputResiduals(); outputResiduals(); } return true; Loading Loading @@ -4390,7 +4390,6 @@ namespace Isis { fp_out << buf; */ fp_out << buf; if (m_bundleSettings->solveTargetBody()) { sprintf(buf, "\n\nINPUT: TARGET BODY OPTIONS\n==============================\n"); fp_out << buf; Loading isis/src/control/objs/BundleSettings/BundleSettings.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -715,20 +715,20 @@ namespace Isis { if (m_outlierRejection) { pvl += PvlKeyword("OutlierMultiplier", toString(outlierRejectionMultiplier())); } if ( !IsNullPixel(globalLatitudeAprioriSigma()) ) { if ( !IsSpecial(globalLatitudeAprioriSigma()) ) { pvl += PvlKeyword("GlobalLatitudeAprioriSigma", toString(globalLatitudeAprioriSigma())); } else { pvl += PvlKeyword("GlobalLatitudeAprioriSigma", "None"); } if (!IsNullPixel(globalLongitudeAprioriSigma())) { if (!IsSpecial(globalLongitudeAprioriSigma())) { pvl += PvlKeyword("GlobalLongitudeAprioriSigma", toString(globalLongitudeAprioriSigma())); } else { pvl += PvlKeyword("GlobalLongitudeAprioriSigma", "None"); } if (m_solveRadius) { if ( !IsNullPixel(globalLongitudeAprioriSigma()) ) { if ( !IsSpecial(globalLongitudeAprioriSigma()) ) { pvl += PvlKeyword("GlobalRadiiAprioriSigma", toString(globalRadiusAprioriSigma())); } else { Loading Loading @@ -810,19 +810,19 @@ namespace Isis { stream.writeEndElement(); stream.writeStartElement("aprioriSigmas"); if (IsNullPixel(globalLatitudeAprioriSigma())) { if (IsSpecial(globalLatitudeAprioriSigma())) { stream.writeAttribute("latitude", "N/A"); } else { stream.writeAttribute("latitude", toString(globalLatitudeAprioriSigma())); } if (IsNullPixel(globalLongitudeAprioriSigma())) { if (IsSpecial(globalLongitudeAprioriSigma())) { stream.writeAttribute("longitude", "N/A"); } else { stream.writeAttribute("longitude", toString(globalLongitudeAprioriSigma())); } if (IsNullPixel(globalRadiusAprioriSigma())) { if (IsSpecial(globalRadiusAprioriSigma())) { stream.writeAttribute("radius", "N/A"); } else { Loading isis/src/control/objs/BundleUtilities/BundleControlPoint.cpp +155 −91 Original line number Diff line number Diff line Loading @@ -13,8 +13,11 @@ namespace Isis { /** * Constructs a BundleControlPoint object from a ControlPoint. Only the * non-ignored measures are added to the BundleControlPoint. * * @param controlPoint * @param controlPoint Pointer to a ControlPoint that will be used to * construct this BundleControlPoint. */ BundleControlPoint::BundleControlPoint(ControlPoint *controlPoint) { m_controlPoint = controlPoint; Loading @@ -32,16 +35,26 @@ namespace Isis { // initialize to 0.0 m_corrections.clear(); m_aprioriSigmas.clear(); m_adjustedSigmas.clear(); m_weights.clear(); m_nicVector.clear(); // initialize to Null for consistency with other bundle classes... m_aprioriSigmas.clear(); m_aprioriSigmas[0] = Isis::Null; m_aprioriSigmas[1] = Isis::Null; m_aprioriSigmas[2] = Isis::Null; m_adjustedSigmas.clear(); m_adjustedSigmas[0] = Isis::Null; m_adjustedSigmas[1] = Isis::Null; m_adjustedSigmas[2] = Isis::Null; } /** * Copy constructor. Constructs a BundleControlPoint object from an existing * BundleControlPoint. * * @param src * @param src The BundleControlPoint to be copied. */ BundleControlPoint::BundleControlPoint(const BundleControlPoint &src) { copy(src); Loading @@ -49,7 +62,7 @@ namespace Isis { /** * destructor * Destructor for BundleControlPoint. */ BundleControlPoint::~BundleControlPoint() { qDeleteAll(*this); Loading @@ -58,8 +71,9 @@ namespace Isis { /** * Copies given BundleControlPoint to this BundleControlPoint. * * @param src * @param src The BundleControlPoint to be copied. */ void BundleControlPoint::copy(const BundleControlPoint &src) { Loading @@ -83,10 +97,12 @@ namespace Isis { /** * Creates a BundleMeasure from the given ControlMeasure and appends it to * this BundleControlPoint's measure list. * * @param controlMeasure * @param controlMeasure The ControlMeasure to be converted. * * @return @b BundleMeasure* * @return @b BundleMeasure* A pointer to the new BundleMeasure. */ BundleMeasure *BundleControlPoint::addMeasure(ControlMeasure *controlMeasure) { Loading @@ -99,8 +115,9 @@ namespace Isis { /** * Sets the adjusted surface point for this BundleControlPoint. * * @param surfacePoint * @param surfacePoint The surface point to be set. */ void BundleControlPoint::setAdjustedSurfacePoint(SurfacePoint surfacePoint) { m_controlPoint->SetAdjustedSurfacePoint(surfacePoint); Loading @@ -108,9 +125,11 @@ namespace Isis { /** * Sets the weights using the given BundleSettings QSharedPointer and a * conversion value for meters to radians. * * @param settings * @param metersToRadians * @param settings A QSharedPointer to BundleSettings object. * @param metersToRadians A double precision conversion factor. */ void BundleControlPoint::setWeights(const BundleSettingsQsp settings, double metersToRadians) { Loading @@ -124,25 +143,26 @@ namespace Isis { m_weights[0] = 1.0e+50; m_weights[1] = 1.0e+50; m_weights[2] = 1.0e+50; // m_aprioriSigmas = 0.0 ??? // m_aprioriSigmas = Isis::Null by default } if (m_controlPoint->GetType() == ControlPoint::Free) { if ( globalLatitudeAprioriSigma > 0.0 ) { if (!IsSpecial(globalLatitudeAprioriSigma)) { m_aprioriSigmas[0] = globalLatitudeAprioriSigma; d = globalLatitudeAprioriSigma*metersToRadians; m_weights[0] = 1.0/(d*d); } // else m_aprioriSigmas = m_weights = 0.0 ??? if ( globalLongitudeAprioriSigma > 0.0 ) { } // else m_aprioriSigma = Isis::Null // m_weights = 0.0 if (!IsSpecial(globalLongitudeAprioriSigma)) { m_aprioriSigmas[1] = globalLongitudeAprioriSigma; d = globalLongitudeAprioriSigma*metersToRadians; m_weights[1] = 1.0/(d*d); } // else m_aprioriSigmas = m_weights = 0.0 ??? } // else m_aprioriSigma = Isis::Null // m_weights = 0.0 if (!settings->solveRadius()) { // m_aprioriSigmas = 0.0 ??? m_weights[2] = 1.0e+50; } else { if ( globalRadiusAprioriSigma > 0.0 ) { if (!IsSpecial(globalRadiusAprioriSigma)) { m_aprioriSigmas[2] = globalRadiusAprioriSigma; d = globalRadiusAprioriSigma*0.001; m_weights[2] = 1.0/(d*d); Loading @@ -154,24 +174,25 @@ namespace Isis { m_aprioriSigmas[0] = m_controlPoint->GetAprioriSurfacePoint().GetLatSigmaDistance().meters(); m_weights[0] = m_controlPoint->GetAprioriSurfacePoint().GetLatWeight(); } else if ( globalLatitudeAprioriSigma > 0.0 ) { else if (!IsSpecial(globalLatitudeAprioriSigma)) { m_aprioriSigmas[0] = globalLatitudeAprioriSigma; d = globalLatitudeAprioriSigma*metersToRadians; m_weights[0] = 1.0/(d*d); } // else not constrained and global sigma is Null, then m_aprioriSigmas = m_weights = 0.0 ??? } // else not constrained and global sigma is Null, then m_aprioriSigmas = Isis::Null // m_weights = 0.0 if ( m_controlPoint->IsLongitudeConstrained() ) { m_aprioriSigmas[1] = m_controlPoint->GetAprioriSurfacePoint().GetLonSigmaDistance().meters(); m_weights[1] = m_controlPoint->GetAprioriSurfacePoint().GetLonWeight(); } else if ( globalLongitudeAprioriSigma > 0.0 ) { else if (!IsSpecial(globalLongitudeAprioriSigma)) { m_aprioriSigmas[1] = globalLongitudeAprioriSigma; d = globalLongitudeAprioriSigma*metersToRadians; m_weights[1] = 1.0/(d*d); } // else not constrained and global sigma is Null, then m_aprioriSigmas = m_weights = 0.0 ??? } // else not constrained and global sigma is Null, then m_aprioriSigmas = Isis::Null // m_weights = 0.0 if (!settings->solveRadius()) { // m_aprioriSigmas = 0.0 ??? m_weights[2] = 1.0e+50; } else { Loading @@ -179,20 +200,21 @@ namespace Isis { m_aprioriSigmas[2] = m_controlPoint->GetAprioriSurfacePoint().GetLocalRadiusSigma().meters(); m_weights[2] = m_controlPoint->GetAprioriSurfacePoint().GetLocalRadiusWeight(); } else if ( globalRadiusAprioriSigma > 0.0 ) { else if (!IsSpecial(globalRadiusAprioriSigma)) { m_aprioriSigmas[2] = globalRadiusAprioriSigma; d = globalRadiusAprioriSigma*0.001; m_weights[2] = 1.0/(d*d); } // else not constrained and global sigma is Null, then m_aprioriSigmas = m_weights = 0.0 ??? } // else not constrained and global sigma is Null, then m_aprioriSigmas = Isis::Null // m_weights = 0.0 } } } /** * Accessor for the raw ControlPoint object used for this BundleControlPoint. * * * @return @b ControlPoint* * @return @b ControlPoint* A pointer to the raw ControlPoint. */ ControlPoint *BundleControlPoint::rawControlPoint() const { return m_controlPoint; Loading @@ -200,9 +222,9 @@ namespace Isis { /** * Method used to determine whether this control point is rejected. * * * @return @b bool * @return @b bool Indicates whether this control point is rejected. */ bool BundleControlPoint::isRejected() const { return m_controlPoint->IsRejected(); Loading @@ -210,9 +232,9 @@ namespace Isis { /** * Accesses number of measures associated with this BundleControlPoint. * * * @return @b int * @return @b int The number of measures for this point. */ int BundleControlPoint::numberMeasures() const { return m_controlPoint->GetNumMeasures(); Loading @@ -220,9 +242,9 @@ namespace Isis { /** * Accesses the adjusted SurfacePoint associated with this BundleControlPoint. * * * @return @b SurfacePoint * @return @b SurfacePoint The adjusted surface point. */ SurfacePoint BundleControlPoint::getAdjustedSurfacePoint() const { return m_controlPoint->GetAdjustedSurfacePoint(); Loading @@ -230,9 +252,9 @@ namespace Isis { /** * Accesses the Point ID associated with this BundleControlPoint. * * * @return @b QString * @return @b QString The ID for this point. */ QString BundleControlPoint::getId() const { return m_controlPoint->GetId(); Loading @@ -241,9 +263,11 @@ namespace Isis { // ??? why bounded vector ??? can we use linear algebra vector ??? /** * Accesses the 3 dimensional ordered vector of correction values associated * with latitude, longitude, and radius. * * * @return @b boost::numeric::ublas::bounded_vector<double,3>& * @return @b boost::numeric::ublas::bounded_vector<double,3>& The vector of * correction values. */ boost::numeric::ublas::bounded_vector< double, 3 > &BundleControlPoint::corrections() { return m_corrections; Loading @@ -251,9 +275,11 @@ namespace Isis { /** * Accesses the 3 dimenstional ordered vector of apriori sigmas (apriori * latitude, apriori longitude, apriori radius). * * * @return @b boost::numeric::ublas::bounded_vector<double,3>& * @return @b boost::numeric::ublas::bounded_vector<double,3>& The vector of * apriori sigmas. */ boost::numeric::ublas::bounded_vector< double, 3 > &BundleControlPoint::aprioriSigmas() { return m_aprioriSigmas; Loading @@ -262,9 +288,11 @@ namespace Isis { /** * Accesses the 3 dimenstional ordered vector of adjusted sigmas (adjusted * latitude, adjusted longitude, adjusted radius). * * * @return @b boost::numeric::ublas::bounded_vector<double,3>& * @return @b boost::numeric::ublas::bounded_vector<double,3>& The vector of * adjusted sigmas. */ boost::numeric::ublas::bounded_vector< double, 3 > &BundleControlPoint::adjustedSigmas() { return m_adjustedSigmas; Loading @@ -272,9 +300,11 @@ namespace Isis { /** * Accesses the 3 dimensional ordered vector of weight values associated * with latitude, longitude, and radius. * * * @return @b boost::numeric::ublas::bounded_vector<double,3>& * @return @b boost::numeric::ublas::bounded_vector<double,3>& The vector of * weight values. */ boost::numeric::ublas::bounded_vector< double, 3 > &BundleControlPoint::weights() { return m_weights; Loading @@ -282,9 +312,9 @@ namespace Isis { /** * Accesses the 3 dimensional ordered NIC vector. * * * @return @b boost::numeric::ublas::bounded_vector<double,3>& * @return @b boost::numeric::ublas::bounded_vector<double,3>& The NIC vector. */ boost::numeric::ublas::bounded_vector<double, 3> &BundleControlPoint::nicVector() { return m_nicVector; Loading @@ -292,9 +322,9 @@ namespace Isis { /** * Accesses the CholMod matrix associated with this BundleControlPoint. * * * @return @b SparseBlockRowMatrix& * @return @b SparseBlockRowMatrix& The CholMod row matrix. */ SparseBlockRowMatrix &BundleControlPoint::cholmod_QMatrix() { return m_cholmod_QMatrix; Loading @@ -302,10 +332,14 @@ namespace Isis { /** * Formats an output summary string for this BundleControlPoint. This string * includes ID, point type, number of rays from non-rejected measures, * residual RMS, adjusted latitude and longitude (in degrees), adjusted radius * (in km), and the adjusted sigmas (for latitude, longitude and radius). * * @param errorPropagation * @param errorPropagation Indicates whether error propagation was selected. * * @return @b QString * @return @b QString The formatted output summary string. */ QString BundleControlPoint::formatBundleOutputSummaryString(bool errorPropagation) const { Loading Loading @@ -336,11 +370,13 @@ namespace Isis { /** * Formats an detailed output string table for this BundleControlPoint. * * @param errorPropagation * @param RTM * @param errorPropagation Indicates whether error propagation was selected. * @param RTM Conversion factor from meters to radians. Used to convert the * latitude and longitude corrections to meters. * * @return @b QString * @return @b QString The formatted output detailed string. */ QString BundleControlPoint::formatBundleOutputDetailString(bool errorPropagation, double RTM) const { Loading Loading @@ -424,16 +460,18 @@ namespace Isis { /** * Formats the given double precision value using the specified field width * and precision. If the given value is special, then "Null" is returned. * * @param value * @param fieldWidth * @param precision * @param value The double value to be formattted. * @param fieldWidth The return string's field width. * @param precision The precision of the given double value to be saved off. * * @return @b QString * @return @b QString The formatted value, as a string. */ QString BundleControlPoint::formatValue(double value, int fieldWidth, int precision) const { QString output; IsNullPixel(value) ? IsSpecial(value) ? output = QString("%1").arg("Null", fieldWidth) : output = QString("%1").arg(value, fieldWidth, 'f', precision); return output; Loading @@ -441,18 +479,21 @@ namespace Isis { /** * Formats the apriori sigma value indicated by the given type code. If no * sigma was set, then the string "N/A" will be returned. * * @param type * @param fieldWidth * @param precision * @param type Integer code that indicates which apriori sigma value will be * formatted. Latitude=0, Longitude=1, Radius=2. * @param fieldWidth The return string's field width. * @param precision The precision of the double to be saved off. * * @return @b QString * @return @b QString The formatted value, as a string. */ QString BundleControlPoint::formatAprioriSigmaString(int type, int fieldWidth, int precision) const { QString aprioriSigmaStr; double sigma = m_aprioriSigmas[type]; if (sigma == 0) { // if globalAprioriSigma <= 0 (including Isis::NUll), then m_aprioriSigmas = 0 if (IsSpecial(sigma)) { // if globalAprioriSigma <= 0 (including Isis::NUll), then m_aprioriSigmas = Null aprioriSigmaStr = QString("%1").arg("N/A", fieldWidth); } else { Loading @@ -463,11 +504,14 @@ namespace Isis { /** * Formats the apriori latitude sigma value. * * @param fieldWidth The return string's field width. * @param precision The precision of the double to be saved off. * * @param fieldWidth * @param precision * @return @b QString The formatted apriori latitude sigma value, as a string. * * @return @b QString * @see formatAprioriSigmaString() */ QString BundleControlPoint::formatLatitudeAprioriSigmaString(int fieldWidth, int precision) const { Loading @@ -476,11 +520,14 @@ namespace Isis { /** * Formats the apriori longitude sigma value. * * @param fieldWidth The return string's field width. * @param precision The precision of the double to be saved off. * * @param fieldWidth * @param precision * @return @b QString The formatted apriori longitude sigma value, as a string. * * @return @b QString * @see formatAprioriSigmaString() */ QString BundleControlPoint::formatLongitudeAprioriSigmaString(int fieldWidth, int precision) const { Loading @@ -489,11 +536,14 @@ namespace Isis { /** * Formats the apriori radius sigma value. * * @param fieldWidth * @param precision * @param fieldWidth The return string's field width. * @param precision The precision of the double to be saved off. * * @return @b QString * @return @b QString The formatted apriori radius sigma value, as a string. * * @see formatAprioriSigmaString() */ QString BundleControlPoint::formatRadiusAprioriSigmaString(int fieldWidth, int precision) const { return formatAprioriSigmaString(2, fieldWidth, precision); Loading @@ -501,13 +551,18 @@ namespace Isis { /** * Formats the adjusted sigma value indicated by the given type code. If error * propagation is false or the selected sigma type was set to Null, then only * "N/A" will be returned. * * @param type Integer code that indicates which apriori sigma value will be * formatted. Latitude=0, Longitude=1, Radius=2. * @param fieldWidth The return string's field width. * @param precision The precision of the double to be saved off. * @param errorPropagation Indicates whether error propagation was selected. * * @param type * @param fieldWidth * @param precision * @param errorPropagation * @return @b QString The formatted value, as a string. * * @return @b QString */ QString BundleControlPoint::formatAdjustedSigmaString(int type, int fieldWidth, int precision, bool errorPropagation) const { Loading @@ -527,7 +582,7 @@ namespace Isis { if (type == 2) { sigma = m_controlPoint->GetAdjustedSurfacePoint().GetLocalRadiusSigma().meters(); } if (IsNullPixel(sigma)) { if (IsSpecial(sigma)) { adjustedSigmaStr = QString("%1").arg("N/A",fieldWidth); } else { Loading @@ -540,12 +595,16 @@ namespace Isis { /** * Formats the adjusted latitude sigma value. * * @param fieldWidth The return string's field width. * @param precision The precision of the double to be saved off. * @param errorPropagation Indicates whether error propagation was selected. * * @param fieldWidth * @param precision * @param errorPropagation * @return @b QString The formatted adjusted latitude sigma value, as a * string. * * @return @b QString * @see formatAdjustedSigmaString() */ QString BundleControlPoint::formatLatitudeAdjustedSigmaString(int fieldWidth, int precision, bool errorPropagation) const { Loading @@ -554,12 +613,16 @@ namespace Isis { /** * Formats the adjusted longitude sigma value. * * @param fieldWidth * @param precision * @param errorPropagation * @param fieldWidth The return string's field width. * @param precision The precision of the double to be saved off. * @param errorPropagation Indicates whether error propagation was selected. * * @return @b QString * @return @b QString The formatted adjusted longitude sigma value, as a * string. * * @see formatAdjustedSigmaString() */ QString BundleControlPoint::formatLongitudeAdjustedSigmaString(int fieldWidth, int precision, bool errorPropagation) const { Loading @@ -567,15 +630,16 @@ namespace Isis { } // TODO: what do we do if we're not solving for radius, how do we know that here????????????????? // TODO: sigma is not == 0.0, if not solving for radius it's like something crazy e-22 /** * Formats the adjusted radius sigma value. * * @param fieldWidth The return string's field width. * @param precision The precision of the double to be saved off. * @param errorPropagation Indicates whether error propagation was selected. * * @param fieldWidth * @param precision * @param errorPropagation * @return @b QString The formatted adjusted radius sigma value, as a string. * * @return @b QString * @see formatAdjustedSigmaString() */ QString BundleControlPoint::formatRadiusAdjustedSigmaString(int fieldWidth, int precision, bool errorPropagation) const { Loading Loading
isis/src/control/apps/deltack/tsts/singlePoint/Makefile +0 −1 Original line number Diff line number Diff line Loading @@ -31,4 +31,3 @@ commands: > $(OUTPUT)/residuals.csv $(RM) bundleout.txt > /dev/null; $(RM) residuals.csv > /dev/null; $(RM) print.prt > /dev/null;
isis/src/control/apps/jigsaw/tsts/heldList/Makefile 0 → 100644 +45 −0 Original line number Diff line number Diff line APPNAME = jigsaw # This test exercises the bundle adjustment of one image each from the MOC-WA camera and Viking Orbiter-1 B Camera. # oldsparse method with held image option; solving for position. # The "cat t_bundleout.txt" command in these tests uses sed to do the following (in order): # 1. remove cube filename paths # 2. remove net filename paths # 3. remove digits beyond the fifth decimal place of decimal numbers # 4. remove date and time # # 2014-07-23 JWB - Changed method from oldsparse to default (sparse). # Commented out references to bundleout_images.csv. Removed default parameters. include $(ISISROOT)/make/isismake.tsts commands: $(CP) $(INPUT)/*.cub $(OUTPUT) > /dev/null; $(LS) -1 $(OUTPUT)/*.cub > $(OUTPUT)/cub.lis; $(LS) -1 $(OUTPUT)/e0400710.lev1.cub > $(OUTPUT)/held.lis; $(APPNAME) fromlist=$(OUTPUT)/cub.lis \ heldlist=$(OUTPUT)/held.lis \ cnet=$(INPUT)/mocVik.net \ onet=$(OUTPUT)/case2OutNet.net \ update=yes \ sigma0=1.e-5 \ maxits=10 \ spsolve=position > /dev/null; cat bundleout.txt | grep -v "Run Time:" | grep -v "Elapsed Time:" \ | perl -pe 's/(^|,|: )([^,:]+\/)([^,\/:]*\.)(net|cub)/\1\3\4/g' 2>/dev/null \ | sed 's/\([0-9][0-9]*\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9]\)\([0-9][0-9]*\)/\1/g' \ | sed s/`date +%Y-%m-%dT`\[0-2\]\[0-9\]:\[0-5\]\[0-9\]:\[0-5\]\[0-9\]/date/ \ > $(OUTPUT)/bundleout.txt cat residuals.csv \ | perl -pe 's/(^|,|: )([^,:]+\/)([^,\/:]*\.)(net|cub)/\1\3\4/g' 2>/dev/null \ > $(OUTPUT)/residuals.csv # cat bundleout_images.csv \ # | perl -pe 's/(^|,|: )([^,:]+\/)([^,\/:]*\.)(net|cub)/\1\3\4/g' 2>/dev/null \ # > $(OUTPUT)/bundleout_images.csv # $(RM) bundleout_images.csv > /dev/null; $(RM) residuals.csv > /dev/null; $(MV) bundleout_points.csv $(OUTPUT)/bundleout_points.csv > /dev/null; $(RM) $(OUTPUT)/cub.lis $(OUTPUT)/held.lis $(OUTPUT)/case2OutNet.bin print.prt > /dev/null; $(RM) bundleout.txt print.prt > /dev/null cathist from=$(OUTPUT)/vik.cub > $(OUTPUT)/vik.pvl; cathist from=$(OUTPUT)/e0400710.lev1.cub > $(OUTPUT)/e0400710.lev1.cub.pvl;
isis/src/control/objs/BundleAdjust/BundleAdjust.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -4145,7 +4145,7 @@ namespace Isis { } if (m_bundleSettings->createResidualsFile()) { // outputResiduals(); outputResiduals(); } return true; Loading Loading @@ -4390,7 +4390,6 @@ namespace Isis { fp_out << buf; */ fp_out << buf; if (m_bundleSettings->solveTargetBody()) { sprintf(buf, "\n\nINPUT: TARGET BODY OPTIONS\n==============================\n"); fp_out << buf; Loading
isis/src/control/objs/BundleSettings/BundleSettings.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -715,20 +715,20 @@ namespace Isis { if (m_outlierRejection) { pvl += PvlKeyword("OutlierMultiplier", toString(outlierRejectionMultiplier())); } if ( !IsNullPixel(globalLatitudeAprioriSigma()) ) { if ( !IsSpecial(globalLatitudeAprioriSigma()) ) { pvl += PvlKeyword("GlobalLatitudeAprioriSigma", toString(globalLatitudeAprioriSigma())); } else { pvl += PvlKeyword("GlobalLatitudeAprioriSigma", "None"); } if (!IsNullPixel(globalLongitudeAprioriSigma())) { if (!IsSpecial(globalLongitudeAprioriSigma())) { pvl += PvlKeyword("GlobalLongitudeAprioriSigma", toString(globalLongitudeAprioriSigma())); } else { pvl += PvlKeyword("GlobalLongitudeAprioriSigma", "None"); } if (m_solveRadius) { if ( !IsNullPixel(globalLongitudeAprioriSigma()) ) { if ( !IsSpecial(globalLongitudeAprioriSigma()) ) { pvl += PvlKeyword("GlobalRadiiAprioriSigma", toString(globalRadiusAprioriSigma())); } else { Loading Loading @@ -810,19 +810,19 @@ namespace Isis { stream.writeEndElement(); stream.writeStartElement("aprioriSigmas"); if (IsNullPixel(globalLatitudeAprioriSigma())) { if (IsSpecial(globalLatitudeAprioriSigma())) { stream.writeAttribute("latitude", "N/A"); } else { stream.writeAttribute("latitude", toString(globalLatitudeAprioriSigma())); } if (IsNullPixel(globalLongitudeAprioriSigma())) { if (IsSpecial(globalLongitudeAprioriSigma())) { stream.writeAttribute("longitude", "N/A"); } else { stream.writeAttribute("longitude", toString(globalLongitudeAprioriSigma())); } if (IsNullPixel(globalRadiusAprioriSigma())) { if (IsSpecial(globalRadiusAprioriSigma())) { stream.writeAttribute("radius", "N/A"); } else { Loading
isis/src/control/objs/BundleUtilities/BundleControlPoint.cpp +155 −91 Original line number Diff line number Diff line Loading @@ -13,8 +13,11 @@ namespace Isis { /** * Constructs a BundleControlPoint object from a ControlPoint. Only the * non-ignored measures are added to the BundleControlPoint. * * @param controlPoint * @param controlPoint Pointer to a ControlPoint that will be used to * construct this BundleControlPoint. */ BundleControlPoint::BundleControlPoint(ControlPoint *controlPoint) { m_controlPoint = controlPoint; Loading @@ -32,16 +35,26 @@ namespace Isis { // initialize to 0.0 m_corrections.clear(); m_aprioriSigmas.clear(); m_adjustedSigmas.clear(); m_weights.clear(); m_nicVector.clear(); // initialize to Null for consistency with other bundle classes... m_aprioriSigmas.clear(); m_aprioriSigmas[0] = Isis::Null; m_aprioriSigmas[1] = Isis::Null; m_aprioriSigmas[2] = Isis::Null; m_adjustedSigmas.clear(); m_adjustedSigmas[0] = Isis::Null; m_adjustedSigmas[1] = Isis::Null; m_adjustedSigmas[2] = Isis::Null; } /** * Copy constructor. Constructs a BundleControlPoint object from an existing * BundleControlPoint. * * @param src * @param src The BundleControlPoint to be copied. */ BundleControlPoint::BundleControlPoint(const BundleControlPoint &src) { copy(src); Loading @@ -49,7 +62,7 @@ namespace Isis { /** * destructor * Destructor for BundleControlPoint. */ BundleControlPoint::~BundleControlPoint() { qDeleteAll(*this); Loading @@ -58,8 +71,9 @@ namespace Isis { /** * Copies given BundleControlPoint to this BundleControlPoint. * * @param src * @param src The BundleControlPoint to be copied. */ void BundleControlPoint::copy(const BundleControlPoint &src) { Loading @@ -83,10 +97,12 @@ namespace Isis { /** * Creates a BundleMeasure from the given ControlMeasure and appends it to * this BundleControlPoint's measure list. * * @param controlMeasure * @param controlMeasure The ControlMeasure to be converted. * * @return @b BundleMeasure* * @return @b BundleMeasure* A pointer to the new BundleMeasure. */ BundleMeasure *BundleControlPoint::addMeasure(ControlMeasure *controlMeasure) { Loading @@ -99,8 +115,9 @@ namespace Isis { /** * Sets the adjusted surface point for this BundleControlPoint. * * @param surfacePoint * @param surfacePoint The surface point to be set. */ void BundleControlPoint::setAdjustedSurfacePoint(SurfacePoint surfacePoint) { m_controlPoint->SetAdjustedSurfacePoint(surfacePoint); Loading @@ -108,9 +125,11 @@ namespace Isis { /** * Sets the weights using the given BundleSettings QSharedPointer and a * conversion value for meters to radians. * * @param settings * @param metersToRadians * @param settings A QSharedPointer to BundleSettings object. * @param metersToRadians A double precision conversion factor. */ void BundleControlPoint::setWeights(const BundleSettingsQsp settings, double metersToRadians) { Loading @@ -124,25 +143,26 @@ namespace Isis { m_weights[0] = 1.0e+50; m_weights[1] = 1.0e+50; m_weights[2] = 1.0e+50; // m_aprioriSigmas = 0.0 ??? // m_aprioriSigmas = Isis::Null by default } if (m_controlPoint->GetType() == ControlPoint::Free) { if ( globalLatitudeAprioriSigma > 0.0 ) { if (!IsSpecial(globalLatitudeAprioriSigma)) { m_aprioriSigmas[0] = globalLatitudeAprioriSigma; d = globalLatitudeAprioriSigma*metersToRadians; m_weights[0] = 1.0/(d*d); } // else m_aprioriSigmas = m_weights = 0.0 ??? if ( globalLongitudeAprioriSigma > 0.0 ) { } // else m_aprioriSigma = Isis::Null // m_weights = 0.0 if (!IsSpecial(globalLongitudeAprioriSigma)) { m_aprioriSigmas[1] = globalLongitudeAprioriSigma; d = globalLongitudeAprioriSigma*metersToRadians; m_weights[1] = 1.0/(d*d); } // else m_aprioriSigmas = m_weights = 0.0 ??? } // else m_aprioriSigma = Isis::Null // m_weights = 0.0 if (!settings->solveRadius()) { // m_aprioriSigmas = 0.0 ??? m_weights[2] = 1.0e+50; } else { if ( globalRadiusAprioriSigma > 0.0 ) { if (!IsSpecial(globalRadiusAprioriSigma)) { m_aprioriSigmas[2] = globalRadiusAprioriSigma; d = globalRadiusAprioriSigma*0.001; m_weights[2] = 1.0/(d*d); Loading @@ -154,24 +174,25 @@ namespace Isis { m_aprioriSigmas[0] = m_controlPoint->GetAprioriSurfacePoint().GetLatSigmaDistance().meters(); m_weights[0] = m_controlPoint->GetAprioriSurfacePoint().GetLatWeight(); } else if ( globalLatitudeAprioriSigma > 0.0 ) { else if (!IsSpecial(globalLatitudeAprioriSigma)) { m_aprioriSigmas[0] = globalLatitudeAprioriSigma; d = globalLatitudeAprioriSigma*metersToRadians; m_weights[0] = 1.0/(d*d); } // else not constrained and global sigma is Null, then m_aprioriSigmas = m_weights = 0.0 ??? } // else not constrained and global sigma is Null, then m_aprioriSigmas = Isis::Null // m_weights = 0.0 if ( m_controlPoint->IsLongitudeConstrained() ) { m_aprioriSigmas[1] = m_controlPoint->GetAprioriSurfacePoint().GetLonSigmaDistance().meters(); m_weights[1] = m_controlPoint->GetAprioriSurfacePoint().GetLonWeight(); } else if ( globalLongitudeAprioriSigma > 0.0 ) { else if (!IsSpecial(globalLongitudeAprioriSigma)) { m_aprioriSigmas[1] = globalLongitudeAprioriSigma; d = globalLongitudeAprioriSigma*metersToRadians; m_weights[1] = 1.0/(d*d); } // else not constrained and global sigma is Null, then m_aprioriSigmas = m_weights = 0.0 ??? } // else not constrained and global sigma is Null, then m_aprioriSigmas = Isis::Null // m_weights = 0.0 if (!settings->solveRadius()) { // m_aprioriSigmas = 0.0 ??? m_weights[2] = 1.0e+50; } else { Loading @@ -179,20 +200,21 @@ namespace Isis { m_aprioriSigmas[2] = m_controlPoint->GetAprioriSurfacePoint().GetLocalRadiusSigma().meters(); m_weights[2] = m_controlPoint->GetAprioriSurfacePoint().GetLocalRadiusWeight(); } else if ( globalRadiusAprioriSigma > 0.0 ) { else if (!IsSpecial(globalRadiusAprioriSigma)) { m_aprioriSigmas[2] = globalRadiusAprioriSigma; d = globalRadiusAprioriSigma*0.001; m_weights[2] = 1.0/(d*d); } // else not constrained and global sigma is Null, then m_aprioriSigmas = m_weights = 0.0 ??? } // else not constrained and global sigma is Null, then m_aprioriSigmas = Isis::Null // m_weights = 0.0 } } } /** * Accessor for the raw ControlPoint object used for this BundleControlPoint. * * * @return @b ControlPoint* * @return @b ControlPoint* A pointer to the raw ControlPoint. */ ControlPoint *BundleControlPoint::rawControlPoint() const { return m_controlPoint; Loading @@ -200,9 +222,9 @@ namespace Isis { /** * Method used to determine whether this control point is rejected. * * * @return @b bool * @return @b bool Indicates whether this control point is rejected. */ bool BundleControlPoint::isRejected() const { return m_controlPoint->IsRejected(); Loading @@ -210,9 +232,9 @@ namespace Isis { /** * Accesses number of measures associated with this BundleControlPoint. * * * @return @b int * @return @b int The number of measures for this point. */ int BundleControlPoint::numberMeasures() const { return m_controlPoint->GetNumMeasures(); Loading @@ -220,9 +242,9 @@ namespace Isis { /** * Accesses the adjusted SurfacePoint associated with this BundleControlPoint. * * * @return @b SurfacePoint * @return @b SurfacePoint The adjusted surface point. */ SurfacePoint BundleControlPoint::getAdjustedSurfacePoint() const { return m_controlPoint->GetAdjustedSurfacePoint(); Loading @@ -230,9 +252,9 @@ namespace Isis { /** * Accesses the Point ID associated with this BundleControlPoint. * * * @return @b QString * @return @b QString The ID for this point. */ QString BundleControlPoint::getId() const { return m_controlPoint->GetId(); Loading @@ -241,9 +263,11 @@ namespace Isis { // ??? why bounded vector ??? can we use linear algebra vector ??? /** * Accesses the 3 dimensional ordered vector of correction values associated * with latitude, longitude, and radius. * * * @return @b boost::numeric::ublas::bounded_vector<double,3>& * @return @b boost::numeric::ublas::bounded_vector<double,3>& The vector of * correction values. */ boost::numeric::ublas::bounded_vector< double, 3 > &BundleControlPoint::corrections() { return m_corrections; Loading @@ -251,9 +275,11 @@ namespace Isis { /** * Accesses the 3 dimenstional ordered vector of apriori sigmas (apriori * latitude, apriori longitude, apriori radius). * * * @return @b boost::numeric::ublas::bounded_vector<double,3>& * @return @b boost::numeric::ublas::bounded_vector<double,3>& The vector of * apriori sigmas. */ boost::numeric::ublas::bounded_vector< double, 3 > &BundleControlPoint::aprioriSigmas() { return m_aprioriSigmas; Loading @@ -262,9 +288,11 @@ namespace Isis { /** * Accesses the 3 dimenstional ordered vector of adjusted sigmas (adjusted * latitude, adjusted longitude, adjusted radius). * * * @return @b boost::numeric::ublas::bounded_vector<double,3>& * @return @b boost::numeric::ublas::bounded_vector<double,3>& The vector of * adjusted sigmas. */ boost::numeric::ublas::bounded_vector< double, 3 > &BundleControlPoint::adjustedSigmas() { return m_adjustedSigmas; Loading @@ -272,9 +300,11 @@ namespace Isis { /** * Accesses the 3 dimensional ordered vector of weight values associated * with latitude, longitude, and radius. * * * @return @b boost::numeric::ublas::bounded_vector<double,3>& * @return @b boost::numeric::ublas::bounded_vector<double,3>& The vector of * weight values. */ boost::numeric::ublas::bounded_vector< double, 3 > &BundleControlPoint::weights() { return m_weights; Loading @@ -282,9 +312,9 @@ namespace Isis { /** * Accesses the 3 dimensional ordered NIC vector. * * * @return @b boost::numeric::ublas::bounded_vector<double,3>& * @return @b boost::numeric::ublas::bounded_vector<double,3>& The NIC vector. */ boost::numeric::ublas::bounded_vector<double, 3> &BundleControlPoint::nicVector() { return m_nicVector; Loading @@ -292,9 +322,9 @@ namespace Isis { /** * Accesses the CholMod matrix associated with this BundleControlPoint. * * * @return @b SparseBlockRowMatrix& * @return @b SparseBlockRowMatrix& The CholMod row matrix. */ SparseBlockRowMatrix &BundleControlPoint::cholmod_QMatrix() { return m_cholmod_QMatrix; Loading @@ -302,10 +332,14 @@ namespace Isis { /** * Formats an output summary string for this BundleControlPoint. This string * includes ID, point type, number of rays from non-rejected measures, * residual RMS, adjusted latitude and longitude (in degrees), adjusted radius * (in km), and the adjusted sigmas (for latitude, longitude and radius). * * @param errorPropagation * @param errorPropagation Indicates whether error propagation was selected. * * @return @b QString * @return @b QString The formatted output summary string. */ QString BundleControlPoint::formatBundleOutputSummaryString(bool errorPropagation) const { Loading Loading @@ -336,11 +370,13 @@ namespace Isis { /** * Formats an detailed output string table for this BundleControlPoint. * * @param errorPropagation * @param RTM * @param errorPropagation Indicates whether error propagation was selected. * @param RTM Conversion factor from meters to radians. Used to convert the * latitude and longitude corrections to meters. * * @return @b QString * @return @b QString The formatted output detailed string. */ QString BundleControlPoint::formatBundleOutputDetailString(bool errorPropagation, double RTM) const { Loading Loading @@ -424,16 +460,18 @@ namespace Isis { /** * Formats the given double precision value using the specified field width * and precision. If the given value is special, then "Null" is returned. * * @param value * @param fieldWidth * @param precision * @param value The double value to be formattted. * @param fieldWidth The return string's field width. * @param precision The precision of the given double value to be saved off. * * @return @b QString * @return @b QString The formatted value, as a string. */ QString BundleControlPoint::formatValue(double value, int fieldWidth, int precision) const { QString output; IsNullPixel(value) ? IsSpecial(value) ? output = QString("%1").arg("Null", fieldWidth) : output = QString("%1").arg(value, fieldWidth, 'f', precision); return output; Loading @@ -441,18 +479,21 @@ namespace Isis { /** * Formats the apriori sigma value indicated by the given type code. If no * sigma was set, then the string "N/A" will be returned. * * @param type * @param fieldWidth * @param precision * @param type Integer code that indicates which apriori sigma value will be * formatted. Latitude=0, Longitude=1, Radius=2. * @param fieldWidth The return string's field width. * @param precision The precision of the double to be saved off. * * @return @b QString * @return @b QString The formatted value, as a string. */ QString BundleControlPoint::formatAprioriSigmaString(int type, int fieldWidth, int precision) const { QString aprioriSigmaStr; double sigma = m_aprioriSigmas[type]; if (sigma == 0) { // if globalAprioriSigma <= 0 (including Isis::NUll), then m_aprioriSigmas = 0 if (IsSpecial(sigma)) { // if globalAprioriSigma <= 0 (including Isis::NUll), then m_aprioriSigmas = Null aprioriSigmaStr = QString("%1").arg("N/A", fieldWidth); } else { Loading @@ -463,11 +504,14 @@ namespace Isis { /** * Formats the apriori latitude sigma value. * * @param fieldWidth The return string's field width. * @param precision The precision of the double to be saved off. * * @param fieldWidth * @param precision * @return @b QString The formatted apriori latitude sigma value, as a string. * * @return @b QString * @see formatAprioriSigmaString() */ QString BundleControlPoint::formatLatitudeAprioriSigmaString(int fieldWidth, int precision) const { Loading @@ -476,11 +520,14 @@ namespace Isis { /** * Formats the apriori longitude sigma value. * * @param fieldWidth The return string's field width. * @param precision The precision of the double to be saved off. * * @param fieldWidth * @param precision * @return @b QString The formatted apriori longitude sigma value, as a string. * * @return @b QString * @see formatAprioriSigmaString() */ QString BundleControlPoint::formatLongitudeAprioriSigmaString(int fieldWidth, int precision) const { Loading @@ -489,11 +536,14 @@ namespace Isis { /** * Formats the apriori radius sigma value. * * @param fieldWidth * @param precision * @param fieldWidth The return string's field width. * @param precision The precision of the double to be saved off. * * @return @b QString * @return @b QString The formatted apriori radius sigma value, as a string. * * @see formatAprioriSigmaString() */ QString BundleControlPoint::formatRadiusAprioriSigmaString(int fieldWidth, int precision) const { return formatAprioriSigmaString(2, fieldWidth, precision); Loading @@ -501,13 +551,18 @@ namespace Isis { /** * Formats the adjusted sigma value indicated by the given type code. If error * propagation is false or the selected sigma type was set to Null, then only * "N/A" will be returned. * * @param type Integer code that indicates which apriori sigma value will be * formatted. Latitude=0, Longitude=1, Radius=2. * @param fieldWidth The return string's field width. * @param precision The precision of the double to be saved off. * @param errorPropagation Indicates whether error propagation was selected. * * @param type * @param fieldWidth * @param precision * @param errorPropagation * @return @b QString The formatted value, as a string. * * @return @b QString */ QString BundleControlPoint::formatAdjustedSigmaString(int type, int fieldWidth, int precision, bool errorPropagation) const { Loading @@ -527,7 +582,7 @@ namespace Isis { if (type == 2) { sigma = m_controlPoint->GetAdjustedSurfacePoint().GetLocalRadiusSigma().meters(); } if (IsNullPixel(sigma)) { if (IsSpecial(sigma)) { adjustedSigmaStr = QString("%1").arg("N/A",fieldWidth); } else { Loading @@ -540,12 +595,16 @@ namespace Isis { /** * Formats the adjusted latitude sigma value. * * @param fieldWidth The return string's field width. * @param precision The precision of the double to be saved off. * @param errorPropagation Indicates whether error propagation was selected. * * @param fieldWidth * @param precision * @param errorPropagation * @return @b QString The formatted adjusted latitude sigma value, as a * string. * * @return @b QString * @see formatAdjustedSigmaString() */ QString BundleControlPoint::formatLatitudeAdjustedSigmaString(int fieldWidth, int precision, bool errorPropagation) const { Loading @@ -554,12 +613,16 @@ namespace Isis { /** * Formats the adjusted longitude sigma value. * * @param fieldWidth * @param precision * @param errorPropagation * @param fieldWidth The return string's field width. * @param precision The precision of the double to be saved off. * @param errorPropagation Indicates whether error propagation was selected. * * @return @b QString * @return @b QString The formatted adjusted longitude sigma value, as a * string. * * @see formatAdjustedSigmaString() */ QString BundleControlPoint::formatLongitudeAdjustedSigmaString(int fieldWidth, int precision, bool errorPropagation) const { Loading @@ -567,15 +630,16 @@ namespace Isis { } // TODO: what do we do if we're not solving for radius, how do we know that here????????????????? // TODO: sigma is not == 0.0, if not solving for radius it's like something crazy e-22 /** * Formats the adjusted radius sigma value. * * @param fieldWidth The return string's field width. * @param precision The precision of the double to be saved off. * @param errorPropagation Indicates whether error propagation was selected. * * @param fieldWidth * @param precision * @param errorPropagation * @return @b QString The formatted adjusted radius sigma value, as a string. * * @return @b QString * @see formatAdjustedSigmaString() */ QString BundleControlPoint::formatRadiusAdjustedSigmaString(int fieldWidth, int precision, bool errorPropagation) const { Loading