Skip to content

Commit 15701bb

Browse files
authored
Mac Test Fixes (#5822)
* Minor fixes for failing tests on MacOS * Minor fixes for failing tests on MacOS * Added changelog entries * Revert shadow tests * Actually fix BundleObservationSolveSettings xml reader reading sigmas * Revert truth data to pre qt update * Update changelog * Reverted bundleSettings test truthdata to pre qt update
1 parent 4a10944 commit 15701bb

File tree

6 files changed

+35
-18
lines changed

6 files changed

+35
-18
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ ctest FunctionalTestJigsawApollo to validate this output. [#5710](https://github
9090
- Fixed order of observer and target in spiceql call in `ctxcal`. [#5823](https://github.com/DOI-USGS/ISIS3/pull/5823)
9191
- Fixed bundle serialization on MacOS for IPCE [#5808](https://github.com/DOI-USGS/ISIS3/pull/5808)
9292
- Fixed `noseam` to use correct temporary files when running [#5878](https://github.com/DOI-USGS/ISIS3/pull/5878)
93+
- Fixed `CubeInfixToPostfix` to safely determine if a known symbol is a function symbol [#5822](https://github.com/DOI-USGS/ISIS3/pull/5822)
94+
- Fixed `BundleObservationSolveSettings` to properly read empty solve setting xmls [#5822](https://github.com/DOI-USGS/ISIS3/pull/5822)
9395

9496

9597
## [9.0.0] - 09-25-2024

isis/src/base/objs/CubeInfixToPostfix/CubeInfixToPostfix.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ namespace Isis {
6969
}
7070

7171
bool isFunction = (representation.size() > 1);
72-
if(representation[0] == 'f') {
72+
if(isFunction) {
73+
isFunction &= (representation[0] == 'f');
7374
for(int i = 1; isFunction && i < representation.size(); i++) {
7475
isFunction &= (representation[i] >= '0' && representation[i] <= '9');
7576
}

isis/src/control/objs/BundleSettings/BundleSettings.truth

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,9 @@ Testing XML: Object deserialized as (should match object above):
402402

403403
<instrumentId></instrumentId>
404404
<instrumentPointingOptions solveOption="None" numberCoefSolved="0" degree="2" solveDegree="2" solveTwist="Yes" solveOverExisting="Yes" interpolationType="4">
405-
<aprioriPointingSigmas/>
405+
<aprioriPointingSigmas>
406+
<sigma>N/A</sigma>
407+
</aprioriPointingSigmas>
406408
</instrumentPointingOptions>
407409
<instrumentPositionOptions solveOption="AllPolynomialCoefficients" numberCoefSolved="7" degree="5" solveDegree="6" solveOverHermiteSpline="Yes" interpolationType="4">
408410
<aprioriPositionSigmas>

isis/src/control/objs/BundleUtilities/BundleObservationSolveSettings.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,23 +1309,26 @@ namespace Isis {
13091309
}
13101310
while (xmlReader->readNextStartElement()) {
13111311
if (xmlReader->qualifiedName() == "aprioriPointingSigmas") {
1312-
m_anglesAprioriSigma.clear();
1312+
QList<double> anglesAprioriSigma;
13131313
while (xmlReader->readNextStartElement()) {
13141314
if (xmlReader->qualifiedName() == "sigma") {
13151315
QString sigma = xmlReader->readElementText();
13161316
if (!sigma.isEmpty()){
13171317
if (sigma == "N/A") {
1318-
m_anglesAprioriSigma.append(Isis::Null);
1318+
anglesAprioriSigma.append(Isis::Null);
13191319
}
13201320
else {
1321-
m_anglesAprioriSigma.append(sigma.toDouble());
1321+
anglesAprioriSigma.append(sigma.toDouble());
13221322
}
13231323
}
13241324
}
13251325
else {
13261326
xmlReader->skipCurrentElement();
13271327
}
13281328
}
1329+
if (anglesAprioriSigma.size() > 0) {
1330+
m_anglesAprioriSigma = anglesAprioriSigma;
1331+
}
13291332
}
13301333
else {
13311334
xmlReader->skipCurrentElement();
@@ -1364,24 +1367,27 @@ namespace Isis {
13641367
}
13651368
while (xmlReader->readNextStartElement()) {
13661369
if (xmlReader->qualifiedName() == "aprioriPositionSigmas") {
1367-
m_positionAprioriSigma.clear();
1370+
QList<double> positionAprioriSigma;
13681371
while (xmlReader->readNextStartElement()) {
13691372
if (xmlReader->qualifiedName() == "sigma") {
13701373
QString sigma = xmlReader->readElementText();
13711374
if (!sigma.isEmpty()){
13721375
if (sigma == "N/A") {
1373-
m_positionAprioriSigma.append(Isis::Null);
1376+
positionAprioriSigma.append(Isis::Null);
13741377

13751378
}
13761379
else {
1377-
m_positionAprioriSigma.append(sigma.toDouble());
1380+
positionAprioriSigma.append(sigma.toDouble());
13781381
}
13791382
}
13801383
}
13811384
else {
13821385
xmlReader->skipCurrentElement();
13831386
}
13841387
}
1388+
if (positionAprioriSigma.size() > 0) {
1389+
m_positionAprioriSigma = positionAprioriSigma;
1390+
}
13851391
}
13861392
else {
13871393
xmlReader->skipCurrentElement();

isis/src/control/objs/BundleUtilities/BundleUtilities.truth

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ Testing XML: read XML to BundleObservationSolveSettings object...
197197

198198
<instrumentId></instrumentId>
199199
<instrumentPointingOptions solveOption="None" numberCoefSolved="0" degree="2" solveDegree="2" solveTwist="Yes" solveOverExisting="No" interpolationType="3">
200-
<aprioriPointingSigmas/>
200+
<aprioriPointingSigmas>
201+
<sigma>N/A</sigma>
202+
</aprioriPointingSigmas>
201203
</instrumentPointingOptions>
202204
<instrumentPositionOptions solveOption="None" numberCoefSolved="0" degree="2" solveDegree="2" solveOverHermiteSpline="No" interpolationType="3">
203205
<aprioriPositionSigmas/>
@@ -293,7 +295,9 @@ Testing XML: read XML with no attributes or values to object...
293295

294296
<instrumentId></instrumentId>
295297
<instrumentPointingOptions solveOption="AnglesOnly" numberCoefSolved="1" degree="2" solveDegree="2" solveTwist="Yes" solveOverExisting="No" interpolationType="3">
296-
<aprioriPointingSigmas/>
298+
<aprioriPointingSigmas>
299+
<sigma>N/A</sigma>
300+
</aprioriPointingSigmas>
297301
</instrumentPointingOptions>
298302
<instrumentPositionOptions solveOption="None" numberCoefSolved="0" degree="2" solveDegree="2" solveOverHermiteSpline="No" interpolationType="3">
299303
<aprioriPositionSigmas/>
@@ -484,7 +488,9 @@ TWI (dd) 0.00000000 0.00000000 0.00000000
484488

485489
<instrumentId></instrumentId>
486490
<instrumentPointingOptions solveOption="AnglesOnly" numberCoefSolved="1" degree="2" solveDegree="2" solveTwist="Yes" solveOverExisting="No" interpolationType="3">
487-
<aprioriPointingSigmas/>
491+
<aprioriPointingSigmas>
492+
<sigma>N/A</sigma>
493+
</aprioriPointingSigmas>
488494
</instrumentPointingOptions>
489495
<instrumentPositionOptions solveOption="None" numberCoefSolved="0" degree="2" solveDegree="2" solveOverHermiteSpline="No" interpolationType="3">
490496
<aprioriPositionSigmas/>
@@ -499,18 +505,18 @@ parameter list: ("X", "Y", "Z", "RA", "DEC", "TWIST")
499505
image names: ()
500506
parameter weights : 0.0 0.0 0.0
501507
parameter corrections : 0.0 0.0 0.0
502-
apriori sigmas : 0.0 0.0 0.0
508+
apriori sigmas : -1.79769313486231e+308 -1.79769313486231e+308 -1.79769313486231e+308
503509
adjusted sigmas : 0.0 0.0 0.0
504510
output bundle observation...
505-
0.0,0.0,0.0,N/A,N/A,0.0,0.0,0.0,N/A,N/A,0.0,0.0,0.0,N/A,N/A,0.0,0.0,0.0,0.0,N/A,0.0,0.0,0.0,0.0,N/A,0.0,0.0,0.0,0.0,N/A,
511+
0.0,0.0,0.0,N/A,N/A,0.0,0.0,0.0,N/A,N/A,0.0,0.0,0.0,N/A,N/A,0.0,0.0,0.0,FREE,N/A,0.0,0.0,0.0,FREE,N/A,0.0,0.0,0.0,FREE,N/A,
506512
X (km) 0.00000000 0.00000000 0.00000000 N/A N/A m
507513
Y (km) 0.00000000 0.00000000 0.00000000 N/A N/A m
508514
Z (km) 0.00000000 0.00000000 0.00000000 N/A N/A m
509-
RA (dd) 0.00000000 0.00000000 0.00000000 0.0 N/A dd
510-
DEC (dd) 0.00000000 0.00000000 0.00000000 0.0 N/A dd
511-
TWI (dd) 0.00000000 0.00000000 0.00000000 0.0 N/A dd
515+
RA (dd) 0.00000000 0.00000000 0.00000000 FREE N/A dd
516+
DEC (dd) 0.00000000 0.00000000 0.00000000 FREE N/A dd
517+
TWI (dd) 0.00000000 0.00000000 0.00000000 FREE N/A dd
512518

513-
0.0,0.0,0.0,N/A,N/A,0.0,0.0,0.0,N/A,N/A,0.0,0.0,0.0,N/A,N/A,0.0,0.0,0.0,0.0,0.00000000,0.0,0.0,0.0,0.0,0.00000000,0.0,0.0,0.0,0.0,0.00000000,
519+
0.0,0.0,0.0,N/A,N/A,0.0,0.0,0.0,N/A,N/A,0.0,0.0,0.0,N/A,N/A,0.0,0.0,0.0,FREE,0.00000000,0.0,0.0,0.0,FREE,0.00000000,0.0,0.0,0.0,FREE,0.00000000,
514520
init exterior orientiation successful? "Yes"
515521
apply param corrections successful?
516522
**ERROR** Unable to apply parameter corrections to IsisBundleObservation.

isis/tests/TgoCassisModuleTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,7 @@ TEST_F(TgoCassisModuleKernels, TgoCassisSingleFrameletProjection) {
10831083
hist = bluCube.histogram();
10841084

10851085
EXPECT_NEAR(hist->Average(), 0.051942847688226532, 0.0001);
1086-
EXPECT_NEAR(hist->Sum(), 42226.885122356936, 0.0001);
1086+
EXPECT_NEAR(hist->Sum(), 42226.885122356936, 0.001);
10871087
EXPECT_EQ(hist->ValidPixels(), 812949);
10881088
EXPECT_NEAR(hist->StandardDeviation(), 0.00085567958401590197, 0.0001);
10891089
}

0 commit comments

Comments
 (0)