PSMRTS/ISIS Integration for Small Irregular Body Support - #6090
PSMRTS/ISIS Integration for Small Irregular Body Support#6090KrisBecker wants to merge 33 commits into
Conversation
…is-psmrts-integration
Remove the setSurfacePoint() method. Move some inline methods to the cpp file. Remove print statements and implement debug options. Allow for overrides/specification of PSMRTS shape model parameterization using. PvlFlatMap containing keywords.
Add Target pointer with default to specialized constructor. Added plate_index() method to return the index of the facet containing the intercept. Fixed issue with setting the local normal intercept properly in interceptSurface().
Bump the miniimum CMake version to 3.24 due to use of find_package feature in FetchContent_Declare. Move PSMRTS installation to seperate cmake file, psmrts_system.cmake, to minimize PSMRTS footprint in ISIS.
The PSMRTS Bullet tracer was invoked when providing just a DSK file with no specific ray tracer engine specified. Added requires_psmrts() method to detect this condition and do the right thing. Removed warning about missing radii in PsmrtsShapeModel that was casing warnings in tests.
|
The build and test suite have started for your pull request. To view your build log, please reference the build with source version: "PR_6090". Additionally, check the latest "dev" source version to identify existing test failures. Please note that you are not responsible for the test failures that exist on both your PR and the dev branch. |
|
The build and test suite have started for your pull request. To view your build log, please reference the build with source version: "PR_6090". Additionally, check the latest "dev" source version to identify existing test failures. Please note that you are not responsible for the test failures that exist on both your PR and the dev branch. |
|
The build and test suite have started for your pull request. To view your build log, please reference the build with source version: "PR_6090". Additionally, check the latest "dev" source version to identify existing test failures. Please note that you are not responsible for the test failures that exist on both your PR and the dev branch. |
Removed the OVERRIDE_FIND_PACKAGE in the FetchContent_Declare configuration in psmrts_system.cmake. Removed find_package() call in CMakeLists.txt to correct ISIS build failures. Use psmrts::psmrts alias in ISIS library build dependences.
|
The build and test suite have started for your pull request. To view your build log, please reference the build with source version: "PR_6090". Additionally, check the latest "dev" source version to identify existing test failures. Please note that you are not responsible for the test failures that exist on both your PR and the dev branch. |
acpaquette
left a comment
There was a problem hiding this comment.
Overall, the code looks good! The functions defined in IsisPsmrtsUtilities seem to replicate existing functionality within the ISIS code base. It would be nice to transition some of those functions with overlapping functionality to use existing ISIS functions/classes but not a deal breaker.
Doing some initial testing comparing the existing ISIS bullet shapemodel implementation against the implementation within PSMRTS. When projecting a NEAR MSI image using the ISIS bullet tracer for one cube, and the PSMRTs bullet tracer for another cube. The PSMRTS engine is taking about 3 times longer to project the image at about 30 seconds compared to the ISIS bullet tracer which takes about 10 seconds to project the image.
The raw image can be found here:
m0132383354f4_2p.fit
m0132383354f4_2p.lbl
The DSK used is a global dsk of EROS:
(isis_build_env) acpaquette@IGSWZA281L2310 RayTracingShapeModel % dskbrief input/ErosHR.bds
DSKBRIEF Program; Ver. 3.0.0, 02-NOV-2021; Toolkit Ver. N0067
Summary for: input/ErosHR.bds
Body: 2000433 (EROS)
Surface: 2000433 (Name not available)
Reference frame: IAU_EROS
Coordinate system: Planetocentric Latitudinal
Min, max longitude (deg): -180.000 180.000
Min, max latitude (deg): -90.0000 90.0000
Min, max radius (km): 2.97303 17.6330
Here are the spiceinit commands used:
spiceinit from= m0132383354f4_2p_iof_dbl_Psmrts.cub shape=user model= 'bullet::input/ErosHR.bds' -pref= MyPreferences_Psmrts
spiceinit from= m0132383354f4_2p_iof_dbl_Bullet.cub shape=user model= input/ErosHR.bds -pref= input/MyPreferences_Bullet
Here are the Preference files:
MyPreference_Psmrts
########################################################
## PSMRTs Ray Tracing Engine
#########################################################
Group = ShapeModel
RayTraceEngine = psmrts
OnError = Continue
EndGroup
End
MyPreference_Bullet
########################################################
## Bullet Ray Tracing Engine
#########################################################
Group = ShapeModel
RayTraceEngine = Bullet
OnError = Continue
EndGroup
End
Cam2Map commands:
cam2map from= m0132383354f4_2p_iof_dbl_Psmrts.cub to= m0132383354f4_2p_iof_dbl_Psmrts.proj.cub
cam2map from= m0132383354f4_2p_iof_dbl_Bullet.cub to= m0132383354f4_2p_iof_dbl_Bullet.proj.cub
There was also issues with the naifdsk tracer in PSMRTS not being able to project the image. The image would be all black at the end of running cam2map. That image was created using:
spiceinit from= m0132383354f4_2p_iof_dbl_Psmrts.cub shape=user model= 'naifdsk::input/ErosHR.bds' -pref= MyPreferences_Psmrts
I am not entirely sure where the slowdown is occurring or if I am doing something wrong when initializing the PSMRTS engine to perform the projection. Any advice or insight into this would be helpful.
A bug was found in PSMRST DSK min/max radius which caused lat/lon traces (common to mapping) operations to fail. This was a PSMRTS fix. Copies of PSMRTS ray trace objects contributed most to the slowness of psmrts::BulletTracer operations when compared to Isis::Bullet implemetation. Implement efficient speedups of lat/lon traces that exploit common traces to acquire local radius before observer traces that check occclusion. NOTE additional trace is required to acquire facet intercept (index) and normals. Implement exclusive use of shape model intercept normals for emission and incidence angles. Fix implementations of lat/lon intercepts that properly check for occlusion. Update Psmrts/Isis tests.
|
The build and test suite have started for your pull request. To view your build log, please reference the build with source version: "PR_6090". Additionally, check the latest "dev" source version to identify existing test failures. Please note that you are not responsible for the test failures that exist on both your PR and the dev branch. |
|
The build and test suite have started for your pull request. To view your build log, please reference the build with source version: "PR_6090". Additionally, check the latest "dev" source version to identify existing test failures. Please note that you are not responsible for the test failures that exist on both your PR and the dev branch. |
I had added support for shape models that have a “pvl” file extension but this conflicts with a ShapeModelFactory test so I removed support for that file type. There are other suitable options in PSMRTS.
|
The build and test suite have started for your pull request. To view your build log, please reference the build with source version: "PR_6090". Additionally, check the latest "dev" source version to identify existing test failures. Please note that you are not responsible for the test failures that exist on both your PR and the dev branch. |
|
The build and test suite have started for your pull request. To view your build log, please reference the build with source version: "PR_6090". Additionally, check the latest "dev" source version to identify existing test failures. Please note that you are not responsible for the test failures that exist on both your PR and the dev branch. |
|
@KrisBecker After running the testing the above NEAR image and a the CTX image I sent against ISIS built in Release mode I got similar results to Kris. Timing parity between the implementations and overall reduced runtimes. In some cases PSMRTs is a bit slower but not prohibatively. I am going to give this PR another look over and we should probably be good to merge |
|
@acpaquette Please hold off on the merge for a bit until I have time to evaluate some additional optimizations. Attached are the cam2map profile runs using Isis::EllipsoidShape and PsmrtsShapeModel with the same ellipsoid definition. I think there are some improvements to be made.
|

Description
This PR integrates PSMRTS into the ISIS system. It provides support for small, irregular target bodies that include features/enhancements to the ISIS Shape Model System including regional DTMs, multiple shape models per image, shape and tracer resource reuse, and double precision planetary surface ray tracing intercepts.
Efforts were made to minimize the impact on existing ISIS code base. Some notable modifications have been made to enhance/support the integration:
Related Issue
See issue #6089 for a complete description.
How Has This Been Validated?
Numerous tests have been created that ensure existing ISIS shape model and spiceinit behavior as well as comparisons with existing ISIS small body ray tracing systems. The results of these tests on a Mac Arm system are shown here.
We also have successfully built this branch on Mac Intel and Ubuntu 22 systems.
Types of changes
Checklist:
Licensing
This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words: