Skip to content

Commit

Permalink
Adding minimal support for CSM (#4195)
Browse files Browse the repository at this point in the history
* Added Community Sensor Model as a dependency (#4130)

* Added Community Sensor Model as a dependency

* Added new keyword for CSM plugin locations

* Fixed csm entry to allow the 4th version number to float

* Csm plugin (#4142)

* Added Community Sensor Model as a dependency

* Added new keyword for CSM plugin locations

* Fixed csm entry to allow the 4th version number to float

* Load CSM plugin libraries

* Adds csminit and csmpt as prototype CSM support (#4143)

* Partial csminit code

* Update csminit to get compiling, update label based on discussion to store csm information in the Archive group, and write the state string out to the cube

* Removed Thanksgiving-themed debug output

* Updated StringBlob override methods

* Fixed some build errors

* Fixed header

* Working?

* Now working?

* First pass at csmpt application

* Better error checking

* Modified to use the plugin specification

* Addressed PR comments

Co-authored-by: Kristin <[email protected]>

* Update Test plugin and model to get partway to using a second sensor model

* Adds tests for csminit (#4151)

* Update Test plugin and model to get partway to using a second sensor model

* Add tests for csminit

* Fixed stream buffer flushing issue to fix json file issues

* Fix issue with reading/writing blobs to test cube and general cleanup and documentation

* Update PR based on comments

* Remove full path

* Update based on feedback

* modified csminit to put model info in a separate group (#4171)

* Added test model parameters

* Added geometric model stuff to alternate

* Moved csm info to new group

* Updated tests for csminit clean-up

* Changed test states to hold params

* Fixed param names and removed hardcoding

* Add documentation for testing plugin and sensosr model classes

* Added the ability to run spiceinit and csminit in any order (#4180)

* Added csminit cleanup

* spiceinit clean up

* Added no clean up test

* Added a new comment and fixed test name

* Update Test CSM Plugin to act more like a real plugin (#4187)

* Add documentation for testing plugin and sensosr model classes

* Update Test Plugin to act more like a functional plugin

* Remove comments

* Clean up

* Fix failing tests

* Update TestCsmPlugin based on feedback and add back in model construction from state based on name

* Switch to use comparison with static plugin name rather than hardcoded state

* Remove json include and unnecessary model_name from test

* Csm branch clean up (#4191)

* Removed csmpt

* General cleanup

* Review feedback

* Updated based on feedback

* Fix faulty spiceinit merge

Co-authored-by: Stuart Sides <[email protected]>
Co-authored-by: Kristin <[email protected]>
  • Loading branch information
3 people authored Jan 20, 2021
1 parent 3e127e6 commit fab3a9e
Show file tree
Hide file tree
Showing 26 changed files with 2,627 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ install/
# Unignore the documentation build
!isis/src/docsys/build

# Ignore vs code
.vscode

# Created by https://www.gitignore.io/api/macos
# Edit at https://www.gitignore.io/?templates=macos

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ update the Unreleased link so that it compares against the latest release tag.
- Added warning to ocams2isis about the model being out of date. [#4200](https://github.com/USGS-Astrogeology/ISIS3/issues/4200)
- Added documentation to lronaccal and lrowaccal to describe why there are negative DNs in I/F calibrated images. [#3860](https://github.com/USGS-Astrogeology/ISIS3/issues/3860)
- Update qview MeasureTool to add an option to calculate distances using RA/DEC and update qview to show DEC/RA rather than LAT/LON in lower-right corner [#3371](https://github.com/USGS-Astrogeology/ISIS3/issues/3371)
- Added the new csminit application and CSM Library loading to the IsisPreferences file. Together these allow users to get CSM state strings from ISD files. Once CSM camera model support is added, these will be used to setup a Cube to use a CSM camera model.
- Added a new application, topds4, which generates an output PDS4 XML label and a PDS4-compliant ISIS Cube from an input Cube, a PDS4 label template, and optionally additional input XML, PVL, or JSON data. The Inja templating engine is used to render the output PDS4 label from the label template. [#4246](https://github.com/USGS-Astrogeology/ISIS3/pull/4246)
- Updated spiceinit so that a user can specify a shape model and use the spice web service without any errors. [#1986](https://github.com/USGS-Astrogeology/ISIS3/issues/1986)

Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies:
- bzip2
- cmake >=3.15
- cspice
- csm>=3.0.3,<3.0.4
- curl
- doxygen
- eigen
Expand Down
1 change: 1 addition & 0 deletions isis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ find_package(Ale REQUIRED)
find_package(Json REQUIRED)
find_package(Bullet 2.86 REQUIRED)
find_package(Cholmod 4.4.5 REQUIRED)
find_package(CSM 3.0.3.3 REQUIRED)
find_package(CSPICE 65 REQUIRED)
find_package(Eigen REQUIRED)
find_package(Embree 2.15.0 REQUIRED)
Expand Down
15 changes: 15 additions & 0 deletions isis/IsisPreferences
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,21 @@ Group = Performance
GlobalThreads = Optimized
EndGroup

########################################################
#
# Indicate where ISIS should search for Community
# Sensor Model (CSM) plugins. The value of this keyword
# should be a list of paths, that contain CSM plugin
# libraries.
#
########################################################

Group = Plugins
CSMDirectory = ("$ISISROOT/lib/isis/csm3.0.3/", -
"$ISISROOT/csmlibs/3.0.3/", -
"$HOME/.Isis/csm3.0.3/")
EndGroup

########################################################
# Customize the location of mission specific data
# files (calibration and spice kernels). Usually this
Expand Down
15 changes: 15 additions & 0 deletions isis/TestPreferences
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,21 @@ Group = Performance
GlobalThreads = 2
EndGroup

########################################################
#
# Indicate where ISIS should search for Community
# Sensor Model (CSM) plugins. The value of this keyword
# should be a list of paths, that contain CSM plugin
# libraries.
#
########################################################

Group = Plugins
CSMDirectory = ("$CONDA_PREFIX/lib/isis/csm3.0.3/", -
"$CONDA_PREFIX/csmlibs/3.0.3/", -
"$HOME/.Isis/csm3.0.3/")
EndGroup

########################################################
# Customize the location of mission specific data
# files (calibration and spice kernels). Usually this
Expand Down
18 changes: 18 additions & 0 deletions isis/cmake/FindCSM.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# CMake module for find_package(CSM) aka Community Sensor Model
# Finds include directory and all applicable libraries
#
# Sets the following:
# CSM_INCLUDE_DIR
# CSM_LIBRARY

find_path(CSM_INCLUDE_DIR
NAME csm.h
PATH_SUFFIXES csm
)

find_library(CSM_LIBRARY
NAMES csmapi
)

message(STATUS "CSM INCLUDE: " ${CSM_INCLUDE_DIR} )
message(STATUS "CSM LIB: " ${CSM_LIBRARY} )
7 changes: 7 additions & 0 deletions isis/src/base/apps/csminit/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ifeq ($(ISISROOT), $(BLANK))
.SILENT:
error:
echo "Please set ISISROOT";
else
include $(ISISROOT)/make/isismake.apps
endif
Loading

0 comments on commit fab3a9e

Please sign in to comment.