Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jigsaw Fixes #5703

Merged
merged 5 commits into from
Jan 13, 2025
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 @@ -42,6 +42,7 @@ release.
### Fixed
- Fixed kaguyatc2isis invalid BandBin values [#5629](https://github.com/DOI-USGS/ISIS3/issues/5629)
- Fixed SpiceClient to handle redirect requests.
- Fixed jigsaw to default OUTADJUSTMENTH5 option to false and allow this feature to run on read-only images [#5700](https://github.com/DOI-USGS/ISIS3/issues/5700)

## [9.0.0] - 09-25-2024

Expand Down
2 changes: 1 addition & 1 deletion isis/src/control/apps/jigsaw/jigsaw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ namespace Isis {
for (int i = 0; i < bundleAdjustment->numberOfImages(); i++) {
Process p;
CubeAttributeInput inAtt;
Cube *c = p.SetInputCube(bundleAdjustment->fileName(i), inAtt, ReadWrite);
Cube *c = p.SetInputCube(bundleAdjustment->fileName(i), inAtt, 0); // 0 for read only

// Only for ISIS adjustment values
if (!c->hasBlob("CSMState", "String")) {
Expand Down
11 changes: 6 additions & 5 deletions isis/src/control/apps/jigsaw/jigsaw.xml
Original file line number Diff line number Diff line change
Expand Up @@ -921,9 +921,6 @@
<default>
<item>No</item>
</default>
<exclusions>
<item>ADJUSTMENT_INPUT</item>
</exclusions>
</parameter>

<parameter name="OUTLIER_REJECTION">
Expand Down Expand Up @@ -1880,7 +1877,7 @@
</description>
<type>boolean</type>
<default>
<item>yes</item>
<item>no</item>
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we make it so update=true is forced on if the h5adjustments is set to true? Lynn pointed out that it is confusing to force update=false since the cubes are being updated. Which I think is a reasonable change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we can default update=true for when adjustment_input=<file.h5>. Currently, it would be more of a cosmetic change since a set adjustment_input will inherently update the cubes and the update flag is checked in another part of the code. Basically, there is some duplication of code that we can refactor later down the road.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does not seem to be a way to set default value for another param via another param but did lift the restriction so users can set update=true when setting the adjustment_input option.

</default>
</parameter>

Expand All @@ -1898,6 +1895,11 @@
<filter>
*.h5
</filter>
<inclusions>
<item>
UPDATE
</item>
</inclusions>
<exclusions>
<item>ONET</item>
<item>CNET</item>
Expand All @@ -1907,7 +1909,6 @@
<item>SCCONFIG</item>
<item>OBSERVATIONS</item>
<item>RADIUS</item>
<item>UPDATE</item>
<item>OUTLIER_REJECTION</item>
<item>REJECTION_MULTIPLIER</item>
<item>ERRORPROPAGATION</item>
Expand Down
9 changes: 5 additions & 4 deletions isis/tests/FunctionalTestsJigsaw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1875,20 +1875,21 @@ TEST_F(LidarNetwork, FunctionalTestJigsawLidar) {

TEST_F(ApolloNetwork, FunctionalTestJigsawSaveApplyValues) {
QVector<QString> args = {"spsolve=position",
"update=yes",
"update=no",
"bundleout_txt=no",
"cnet="+controlNetPath,
"fromlist="+tempDir.path() + "/cubes.lis",
"onet="+tempDir.path()+"/apollo_out.net",
"file_prefix="+tempDir.path()+"/"};
"file_prefix="+tempDir.path()+"/",
"outadjustmenth5=yes"};

UserInterface ui(APP_XML, args);

jigsaw(ui);

// Check apollo_jigsaw.h5 was created
QString bundleOutput = tempDir.path()+"/adjustment_out.h5";
HighFive::File file(bundleOutput.toStdString(), HighFive::File::ReadWrite);
HighFive::File file(bundleOutput.toStdString(), HighFive::File::ReadOnly);

std::string datasetName = "/APOLLO15/METRIC/1971-08-01T15:37:39.428";
QString cmatrixName = "InstrumentPointing";
Expand All @@ -1899,7 +1900,7 @@ TEST_F(ApolloNetwork, FunctionalTestJigsawSaveApplyValues) {
HighFive::DataSet datasetRead = file.getDataSet(cmatrixKey);
auto cmatrixData = datasetRead.read<std::string>();
Table cmatrixTable(cmatrixName, cmatrixData, ',');
std::string cmatrixTableStr = Table::toString(cmatrixTable).toStdString();
std::string cmatrixTableStr = Table::toString(cmatrixTable).toStdString();

datasetRead = file.getDataSet(spvectorKey);
auto spvectorData = datasetRead.read<std::string>();
Expand Down
Loading