Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ ctest FunctionalTestJigsawApollo to validate this output. [#5710](https://github
- Fixed CSM State String blob not being propagated between input and output cubes [#5847](https://github.com/DOI-USGS/ISIS3/pull/5847)
- Fixed campt reporting when `ALLOWERROR` is set to true [#5845](https://github.com/DOI-USGS/ISIS3/pull/5845)
- Fixed order of observer and target in spiceql call in `ctxcal`. [#5823](https://github.com/DOI-USGS/ISIS3/pull/5823)
- Fixed bundle serialization on MacOS for IPCE [#5808](https://github.com/DOI-USGS/ISIS3/pull/5808)

## [9.0.0] - 09-25-2024

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,9 @@ namespace Isis {
stream.writeStartElement("quantileInfo");
// we need to write out high precision for minDistance calculations in value() and cumProb()
stream.writeAttribute("quantile", toString(m_quantiles[i], 17));
stream.writeAttribute("dataValue", toString(m_observationValues[i], 17));
if (i < m_observationValues.size()) {
stream.writeAttribute("dataValue", toString(m_observationValues[i], 17));
}
stream.writeAttribute("idealNumObsBelowQuantile",
toString(m_idealNumObsBelowQuantile[i]));
stream.writeAttribute("actualNumObsBelowQuantile", toString(m_numObsBelowQuantile[i]));
Expand Down
25 changes: 20 additions & 5 deletions isis/src/control/objs/BundleResults/BundleResults.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,27 @@ namespace Isis {
while (xmlReader->readNextStartElement()) {
if (xmlReader->qualifiedName() == "cumulativeProbabilityCalculator") {
m_cumPro = NULL;
m_cumPro = new StatCumProbDistDynCalc(xmlReader);
xmlReader->readNextStartElement();
if (xmlReader->qualifiedName() == "statCumProbDistDynCalc") {
m_cumPro = new StatCumProbDistDynCalc(xmlReader);
xmlReader->skipCurrentElement();
xmlReader->skipCurrentElement();
}
else {
m_cumPro = new StatCumProbDistDynCalc();
}
}
else if (xmlReader->qualifiedName() == "residualsCumulativeProbabilityCalculator") {
m_cumProRes = NULL;
m_cumProRes = new StatCumProbDistDynCalc();
m_cumProRes->readStatistics(xmlReader);
xmlReader->readNextStartElement();
if (xmlReader->qualifiedName() == "statCumProbDistDynCalc") {
m_cumProRes = new StatCumProbDistDynCalc(xmlReader);
xmlReader->skipCurrentElement();
xmlReader->skipCurrentElement();
}
else {
m_cumProRes = new StatCumProbDistDynCalc();
}
}
else if (xmlReader->qualifiedName() == "model") {
QString model = xmlReader->attributes().value("modelSelection").toString();
Expand Down Expand Up @@ -2313,11 +2328,11 @@ namespace Isis {
toString(maximumLikelihoodMedianR2Residuals()));

stream.writeStartElement("cumulativeProbabilityCalculator");
// cumulativeProbabilityDistribution().save(stream, project);
cumulativeProbabilityDistribution().save(stream, project);
stream.writeEndElement(); // end cumulativeProbabilityCalculator

stream.writeStartElement("residualsCumulativeProbabilityCalculator");
// residualsCumulativeProbabilityDistribution().save(stream, project);
Comment on lines -2316 to -2320
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hey @kledmundson, I was meaning to email you about this but figured I would ask you here. Was there a reason that these distributions were commented out of the bundle result serialization? If there is I can revert this change but it seemed weird that it was commented out

Copy link
Contributor

Choose a reason for hiding this comment

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

Sadly, I can't recall why/when/how this was done. I agree that it doesn't make sense to be removed specifically from IPCE. That being said, I'm not sure we ever finished properly serializing an IPCE project. Just for kicks I grabbed your code, built it, and ran a bundle both from the command line and in IPCE. Got identical results as expected. Then tried to save the IPCE project and it crashed on me. Don't know why. Based on where we were when we had to stop, I'm not completely sure we had everything serialized properly. Have you tested this in IPCE? And been able to save and restore a project with a bundle in it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have not but there is a test for bundle results serialization that was failing on Mac and this addresses it. With the commented outlines, the cumulativeProbabilityCalculator and residualsCumulativeProbabilityCalculator elements in the XML where empty causing issues when trying to read the serialized bundle results back in.

It doesn't surprise me that IPCE crashed while saving a bundle/project as we made a number of changes to the XML writing updating to qt 5.15. I just don't know if the crash existed prior to that XML change since IPCE isn't something we poke at regularly.

Copy link
Contributor

Choose a reason for hiding this comment

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

Then, I would say go ahead and merge it if only to get the tests passing. We If IPCE ever lives again we'll want those stats to persist in the project and the serialization will have to be re-sorted out anyway.

residualsCumulativeProbabilityDistribution().save(stream, project);
stream.writeEndElement(); // end residualsCumulativeProbabilityCalculator

for (int i = 0; i < numberMaximumLikelihoodModels(); i++) {
Expand Down