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

Cnetthinner application aborts when computing point depth weight if point has no valid measures #5354

Closed
kledmundson opened this issue Nov 29, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@kledmundson
Copy link
Contributor

kledmundson commented Nov 29, 2023

Description

Original description of the problem...

In OSIRIS-REx processing it was found that the cnetthinner application will abort when computing point depth weight if the point doesn't contain valid measures. This is caused by a BOOST ASSERT (abort) in the file CnetManager.cpp.

A better description of the problem...

The calculateStrength method in CnetManager.cpp computes point strength as the sum of all the points' measures "goodness of fit" values divided by the number of measures with "goodness of fit" values.

Strength is not computed at all for points with less than two unignored measures, not including the reference measure.

If all unignored measures have no "goodness of fit" values, then the strength computation results in a divide by zero.



Additional context

Possibly related to #4883?

@kledmundson kledmundson added the bug Something isn't working label Nov 29, 2023
@lwellerastro
Copy link
Contributor

Yes, there is a very good chance that #4883 is failing because of problems in the network.

Let's talk about what it means to be a valid measure. The network contains hundreds of single measure constrained points (based on lidar shots) that are not ignored, but I'm certain those are valid. However they do cause some problems when running cnetedit on the network forcing the user to safeguard them by running the program using preserve=true. If Free points end up with all measures set to ignore because they fail a ResidualMagnitude check after a run of jigsaw and preserve=true, then Free points may be left behind that only have a reference measure and one that is ignored (with valid safe guarded single measure constrained measures).

While trying to troubleshoot the particular network that caused the cnethinner failure I found there were numerous FREE points which only contained a reference image which happened to be ignored. Those points may be the cause of the cnetthinner failure.

I will identify those ignored single measure free points and remove them from the failing network and try rerunning cnetthinner again to see if works and report back here.

Thanks for post what you ran across @kledmundson

@kledmundson
Copy link
Contributor Author

kledmundson commented Nov 29, 2023 via email

@lwellerastro
Copy link
Contributor

I simply ran cnetedit on the problem network to clean up ignored measures and points and cnetthinner now runs on it successfully (74G, 8.5 hours under isis8.0.1).

I'll add remarks to my original post. Not sure where the fix will come from though (internal or request for external to submit PR). Either way, mystery solved. Thanks!

@kledmundson
Copy link
Contributor Author

@lwellerastro I am preparing to submit a PR for this with the app converted to a callable function and old Makefile tests converted to gtests as well.

@kledmundson
Copy link
Contributor Author

@lwellerastro Based on my better understanding of the problem and the modified description above, now wondering if your success after removing ignored points and measures is truly related to this or is a fluke. Probably the easiest way to sort it is to just run a test version (if possible) on your original network after the fix for this is submitted.

kledmundson added a commit to kledmundson/ISIS3 that referenced this issue Dec 1, 2023
…etthinner app has been converted to a callable function and Makefile tests converted to gtests. Addresses DOI-USGS#5354.
kledmundson added a commit to kledmundson/ISIS3 that referenced this issue Dec 1, 2023
kledmundson added a commit to kledmundson/ISIS3 that referenced this issue Dec 1, 2023
Kelvinrr pushed a commit that referenced this issue Dec 4, 2023
…er.cpp. (#5356)

* Bug fix for a divide by zero in CnetManager.cpp. Additionally, the cnetthinner app has been converted to a callable function and Makefile tests converted to gtests. Addresses #5354.

* Updated CHANGELOG.md. Addresses #5354.

* Minor change to cnetthinner.xml. Addresses #5354.
@AustinSanders AustinSanders mentioned this issue Dec 6, 2023
12 tasks
AustinSanders added a commit that referenced this issue Dec 6, 2023
* Cnetthinner application bug fix resolving divide by zero in CnetManager.cpp. (#5356)

* Bug fix for a divide by zero in CnetManager.cpp. Additionally, the cnetthinner app has been converted to a callable function and Makefile tests converted to gtests. Addresses #5354.

* Updated CHANGELOG.md. Addresses #5354.

* Minor change to cnetthinner.xml. Addresses #5354.

* Update photomet's MinnaertEmpirical model to handle PVL input in photemplate format. Fixes #3621. (#5175)

* Update photomet's MinnaertEmpirical model to handle PVL input in photemplate format

* Updated CHANGELOG

* Dawn Target Translation Fix (#5294)

* Fixes dawn target translation for CERES images

* Added Changelog entry

* CSM Camera Qview Try Catches (#5295)

* Fix errors when using CSM camera in qview

* Added Changelog entry

* Fixes CSV parsing in shadowtau (#5316)

* Fixes CSV parsing in shadowtau

* Addressed PR feedback

* Error Report Fix for Program Launcher (#5331)

* Removed line that gets class, it is derived from the code

* Added more detailed error around itime not finding the leapsecond kernel

* Added changelog entry

* Updated trimfilter to correctly use high/low filters (#5340)

* Added high/low filters to trimfilter

* Updated changelog

* Updated changelog

---------

Co-authored-by: acpaquette <acpaquette@usgs.gov>

* corrected calibration inclusion filter (needed ,) (#5357)

* corrected calibration inclusion filter (needed ,)

* changelog entry downloadIsisData fix

* Updated changelog

* Updated changelog

* Cnetthinner application bug fix resolving divide by zero in CnetManager.cpp. (#5356)

* Bug fix for a divide by zero in CnetManager.cpp. Additionally, the cnetthinner app has been converted to a callable function and Makefile tests converted to gtests. Addresses #5354.

* Updated CHANGELOG.md. Addresses #5354.

* Minor change to cnetthinner.xml. Addresses #5354.

* The cnetedit application has been refactored to be callable; Makefile tests have been removed and replaced by gtests (#5348)

* The cnetedit application has been refactored to be callable; Makefile tests have been migrated to gtest format. Addresses #5346.

* Removed extraneous variables from FunctionalTestsCnetedit.cpp. Addresses #5346.

* Updated gtests; replace cubes with labels. Addresses #5346.

* Per review cleaned up sloppy spacing; made global variables static in cnetedit.cpp to avoid issues when linking libisis. Addresses #5346.

* The cnetdiff application has been refactored to be callable; Makefile tests have been removed and replaced by gtests. (#5323)

* The cnetedit applciation has been refactored to be callable; Makefile tests have been removed and replace by gtests. Addresses #5322.

* Moved CHANGELOG.md entry for cnetdiff changes from "Added" section to "Changed" section per reviewer suggestion. Addresses #5322.

* Reverted back to original ControlNetDiff source and header files per reviewer suggestion. Addresses #5322.

* Changes to cnetdiff.cpp and main.cpp to use the addLogGroup method to add PvlGroups to Pvl. Per reviewer suggestion. Addresses #5322.

* Put back line erroneously removed in CHANGELOG.md, per review. Addresses #5322.

* Version ticks

* Updated changelog

* Updated changelog

---------

Co-authored-by: kledmundson <6842706+kledmundson@users.noreply.github.com>
Co-authored-by: Christine Kim <125395064+chkim-usgs@users.noreply.github.com>
Co-authored-by: acpaquette <acpaquette@usgs.gov>
Co-authored-by: Jacob Cain <115182890+jrcain-usgs@users.noreply.github.com>
acpaquette added a commit to acpaquette/ISIS3 that referenced this issue Mar 29, 2024
* Cnetthinner application bug fix resolving divide by zero in CnetManager.cpp. (DOI-USGS#5356)

* Bug fix for a divide by zero in CnetManager.cpp. Additionally, the cnetthinner app has been converted to a callable function and Makefile tests converted to gtests. Addresses DOI-USGS#5354.

* Updated CHANGELOG.md. Addresses DOI-USGS#5354.

* Minor change to cnetthinner.xml. Addresses DOI-USGS#5354.

* Update photomet's MinnaertEmpirical model to handle PVL input in photemplate format. Fixes DOI-USGS#3621. (DOI-USGS#5175)

* Update photomet's MinnaertEmpirical model to handle PVL input in photemplate format

* Updated CHANGELOG

* Dawn Target Translation Fix (DOI-USGS#5294)

* Fixes dawn target translation for CERES images

* Added Changelog entry

* CSM Camera Qview Try Catches (DOI-USGS#5295)

* Fix errors when using CSM camera in qview

* Added Changelog entry

* Fixes CSV parsing in shadowtau (DOI-USGS#5316)

* Fixes CSV parsing in shadowtau

* Addressed PR feedback

* Error Report Fix for Program Launcher (DOI-USGS#5331)

* Removed line that gets class, it is derived from the code

* Added more detailed error around itime not finding the leapsecond kernel

* Added changelog entry

* Updated trimfilter to correctly use high/low filters (DOI-USGS#5340)

* Added high/low filters to trimfilter

* Updated changelog

* Updated changelog

---------

Co-authored-by: acpaquette <acpaquette@usgs.gov>

* corrected calibration inclusion filter (needed ,) (DOI-USGS#5357)

* corrected calibration inclusion filter (needed ,)

* changelog entry downloadIsisData fix

* Updated changelog

* Updated changelog

* Cnetthinner application bug fix resolving divide by zero in CnetManager.cpp. (DOI-USGS#5356)

* Bug fix for a divide by zero in CnetManager.cpp. Additionally, the cnetthinner app has been converted to a callable function and Makefile tests converted to gtests. Addresses DOI-USGS#5354.

* Updated CHANGELOG.md. Addresses DOI-USGS#5354.

* Minor change to cnetthinner.xml. Addresses DOI-USGS#5354.

* The cnetedit application has been refactored to be callable; Makefile tests have been removed and replaced by gtests (DOI-USGS#5348)

* The cnetedit application has been refactored to be callable; Makefile tests have been migrated to gtest format. Addresses DOI-USGS#5346.

* Removed extraneous variables from FunctionalTestsCnetedit.cpp. Addresses DOI-USGS#5346.

* Updated gtests; replace cubes with labels. Addresses DOI-USGS#5346.

* Per review cleaned up sloppy spacing; made global variables static in cnetedit.cpp to avoid issues when linking libisis. Addresses DOI-USGS#5346.

* The cnetdiff application has been refactored to be callable; Makefile tests have been removed and replaced by gtests. (DOI-USGS#5323)

* The cnetedit applciation has been refactored to be callable; Makefile tests have been removed and replace by gtests. Addresses DOI-USGS#5322.

* Moved CHANGELOG.md entry for cnetdiff changes from "Added" section to "Changed" section per reviewer suggestion. Addresses DOI-USGS#5322.

* Reverted back to original ControlNetDiff source and header files per reviewer suggestion. Addresses DOI-USGS#5322.

* Changes to cnetdiff.cpp and main.cpp to use the addLogGroup method to add PvlGroups to Pvl. Per reviewer suggestion. Addresses DOI-USGS#5322.

* Put back line erroneously removed in CHANGELOG.md, per review. Addresses DOI-USGS#5322.

* Version ticks

* Updated changelog

* Updated changelog

---------

Co-authored-by: kledmundson <6842706+kledmundson@users.noreply.github.com>
Co-authored-by: Christine Kim <125395064+chkim-usgs@users.noreply.github.com>
Co-authored-by: acpaquette <acpaquette@usgs.gov>
Co-authored-by: Jacob Cain <115182890+jrcain-usgs@users.noreply.github.com>
acpaquette added a commit that referenced this issue Mar 29, 2024
* Cnetthinner application bug fix resolving divide by zero in CnetManager.cpp. (#5356)

* Bug fix for a divide by zero in CnetManager.cpp. Additionally, the cnetthinner app has been converted to a callable function and Makefile tests converted to gtests. Addresses #5354.

* Updated CHANGELOG.md. Addresses #5354.

* Minor change to cnetthinner.xml. Addresses #5354.

* Update photomet's MinnaertEmpirical model to handle PVL input in photemplate format. Fixes #3621. (#5175)

* Update photomet's MinnaertEmpirical model to handle PVL input in photemplate format

* Updated CHANGELOG

* Dawn Target Translation Fix (#5294)

* Fixes dawn target translation for CERES images

* Added Changelog entry

* CSM Camera Qview Try Catches (#5295)

* Fix errors when using CSM camera in qview

* Added Changelog entry

* Fixes CSV parsing in shadowtau (#5316)

* Fixes CSV parsing in shadowtau

* Addressed PR feedback

* Error Report Fix for Program Launcher (#5331)

* Removed line that gets class, it is derived from the code

* Added more detailed error around itime not finding the leapsecond kernel

* Added changelog entry

* Updated trimfilter to correctly use high/low filters (#5340)

* Added high/low filters to trimfilter

* Updated changelog

* Updated changelog

---------

Co-authored-by: acpaquette <acpaquette@usgs.gov>

* corrected calibration inclusion filter (needed ,) (#5357)

* corrected calibration inclusion filter (needed ,)

* changelog entry downloadIsisData fix

* Updated changelog

* Updated changelog

* Cnetthinner application bug fix resolving divide by zero in CnetManager.cpp. (#5356)

* Bug fix for a divide by zero in CnetManager.cpp. Additionally, the cnetthinner app has been converted to a callable function and Makefile tests converted to gtests. Addresses #5354.

* Updated CHANGELOG.md. Addresses #5354.

* Minor change to cnetthinner.xml. Addresses #5354.

* The cnetedit application has been refactored to be callable; Makefile tests have been removed and replaced by gtests (#5348)

* The cnetedit application has been refactored to be callable; Makefile tests have been migrated to gtest format. Addresses #5346.

* Removed extraneous variables from FunctionalTestsCnetedit.cpp. Addresses #5346.

* Updated gtests; replace cubes with labels. Addresses #5346.

* Per review cleaned up sloppy spacing; made global variables static in cnetedit.cpp to avoid issues when linking libisis. Addresses #5346.

* The cnetdiff application has been refactored to be callable; Makefile tests have been removed and replaced by gtests. (#5323)

* The cnetedit applciation has been refactored to be callable; Makefile tests have been removed and replace by gtests. Addresses #5322.

* Moved CHANGELOG.md entry for cnetdiff changes from "Added" section to "Changed" section per reviewer suggestion. Addresses #5322.

* Reverted back to original ControlNetDiff source and header files per reviewer suggestion. Addresses #5322.

* Changes to cnetdiff.cpp and main.cpp to use the addLogGroup method to add PvlGroups to Pvl. Per reviewer suggestion. Addresses #5322.

* Put back line erroneously removed in CHANGELOG.md, per review. Addresses #5322.

* Version ticks

* Updated changelog

* Updated changelog

---------

Co-authored-by: kledmundson <6842706+kledmundson@users.noreply.github.com>
Co-authored-by: Christine Kim <125395064+chkim-usgs@users.noreply.github.com>
Co-authored-by: acpaquette <acpaquette@usgs.gov>
Co-authored-by: Jacob Cain <115182890+jrcain-usgs@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants