diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c9ce01f66c..0a3bc69d37 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -36,6 +36,7 @@ - [ ] I have updated the documentation accordingly. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. +- [ ] I have added myself to the [AUTHORS.rst](https://github.com/USGS-Astrogeology/ISIS3/blob/dev/AUTHORS.rst) document. ## 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: diff --git a/.gitignore b/.gitignore index bce992dee0..d4bc1304e7 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,9 @@ print.prt build/ install/ +# Unignore the documentation build +!isis/src/docsys/build + # Created by https://www.gitignore.io/api/macos # Edit at https://www.gitignore.io/?templates=macos diff --git a/README.md b/README.md index 172384ab44..762c0e8550 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,16 @@ [![Join the chat at https://gitter.im/USGS-Astrogeology/isis3_cmake](https://badges.gitter.im/USGS-Astrogeology/isis3_cmake.svg)](https://gitter.im/USGS-Astrogeology/isis3_cmake?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Join the discourse at https://astrodiscuss.usgs.gov](https://img.shields.io/discourse/https/astrodiscuss.usgs.gov/topics.svg?style=flat)](https://astrodiscuss.usgs.gov/) - [![Anaconda-Server Badge](https://anaconda.org/usgs-astrogeology/isis3/badges/version.svg)](https://anaconda.org/usgs-astrogeology/isis3) [![Anaconda-Server Badge](https://anaconda.org/usgs-astrogeology/isis/badges/version.svg)](https://anaconda.org/usgs-astrogeology/isis) -[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3697216.svg)](https://doi.org/10.5281/zenodo.3697216) +[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2563341.svg)](https://doi.org/10.5281/zenodo.2563341) ## Table of Contents * [Requests for Comment](README.md#Requests-for-Comment) * [FAQ](README.md#FAQ) * [Installation](README.md#Installation) +* [Citing ISIS](README.md#Citing-ISIS) * [Start Contributing](https://github.com/USGS-Astrogeology/ISIS3/wiki/How-to-Start-Contributing) * [ISIS Data Area](README.md#The-ISIS-Data-Area) * [Installing Older Versions of ISIS](README.md#Installing-older-versions-of-ISIS) @@ -22,7 +22,7 @@ The ISIS project uses a Request for Comment (RFC) model whereby major potential Current open RFCs: * [Migration of ISIS Data to Git](https://github.com/USGS-Astrogeology/ISIS3/wiki/RFC4---Migration-of-ISIS-Data-to-Git) * [Removal of LOLAGRAIL SPKs from the data area](https://github.com/USGS-Astrogeology/ISIS3/wiki/RFC5-Remove-old-LOLAGRAIL-SPKs) - + We encourage all contributors and users to review open RFCs and comment as these proposed changes will impact use of the software. ## FAQ @@ -90,18 +90,27 @@ This installation guide is for ISIS users interested in installing ISIS (3.6.0)+ 7. Finally, setup the environment variables: - #Execute the ISIS variable initialization script with default arguments. - #This script prepares default values for: $ISISROOT, $ISIS3DATA, $ISIS3TESTDATA + To use the default values for: `$ISISROOT, $ISISDATA, $ISISTESTDATA`, run the ISIS variable initialization script with default arguments. + + To do this, for versions of ISIS 4.2.0 and earlier, use: python $CONDA_PREFIX/scripts/isis3VarInit.py + For versions of ISIS after 4.2.0, use: + + python $CONDA_PREFIX/scripts/isisVarInit.py - Executing this script with no arguments will result in $ISIS3DATA=$CONDA\_PREFIX/data, and $ISIS3TESTDATA=$CONDA\_PREFIX/testdata. The user can specify different directories for both of these optional values: + Executing this script with no arguments will result in $ISISDATA=$CONDA\_PREFIX/data, and $ISISTESTDATA=$CONDA\_PREFIX/testdata. The user can specify different directories for both of these optional values: + + For ISIS 4.2.0 and earlier, use: python $CONDA_PREFIX/scripts/isis3VarInit.py --data-dir=[path to data directory] --test-dir=[path to test data directory] + For versions of ISIS after 4.2.0, use: + + python $CONDA_PREFIX/scripts/isisVarInit.py --data-dir=[path to data directory] --test-dir=[path to test data directory] - More information about the ISIS3DATA environment variable and the ISIS Data Area can be found [here]("#The-ISIS-Data-Area"). Now everytime the isis environment is activated, $ISISROOT, $ISIS3DATA, and $ISIS3TESTDATA will be set to the values passed to isis3VarInit.py. This does not happen retroactively, re-activate the isis envionment with one of the following commands: + More information about the ISISDATA environment variable and the ISIS Data Area can be found [here]("#The-ISIS-Data-Area"). Now everytime the isis environment is activated, $ISISROOT, $ISISDATA, and $ISISTESTDATA will be set to the values passed to isisVarInit.py. This does not happen retroactively, so re-activate the isis envionment with one of the following commands: for Anaconda 3.4 and up - conda activate isis prior to Anaconda 3.4 - source activate isis @@ -187,7 +196,7 @@ already done this. that it starts with whatever you got from step 1, and ends in the name of your isis environment, if you followed the installation instructions above, you called that environment 'isis'. - + You can do the same thing to find the path to your new 'working' environment, but in this example, it will be at `$HOME/anaconda3/envs/working`. @@ -245,11 +254,11 @@ remove these elements to and from your path. To update to our latest release candidate up to version 3.9.1, run `conda update -c usgs-astrogeology -c usgs-astrogeology/label/RC isis3` - Note that for ISIS versions 3.10 and above, new versions and release candidates will only be + Note that for ISIS versions 3.10 and above, new versions and release candidates will only be available under the package name `isis` and `conda update isis3` and - `conda update -c usgs-astrogeology -c usgs-astrogeology/label/RC isis3` + `conda update -c usgs-astrogeology -c usgs-astrogeology/label/RC isis3` will no longer work for additional updates. Instead, after installing an `isis` package, - `conda update isis` should be used to update to a new version and + `conda update isis` should be used to update to a new version and `conda update -c usgs-astrogeology/label/RC isis` to update to a new release candidate. ### Operating System Requirements @@ -285,15 +294,18 @@ To build and compile ISIS requires following the instructions listed below, whic - [Building ISIS3 documentation](https://github.com/USGS-Astrogeology/ISIS3/wiki/Developing-ISIS3-with-cmake#building-isis3-documentation) - [What to do if you encounter any problems](https://github.com/USGS-Astrogeology/ISIS3/wiki/Developing-ISIS3-with-cmake#problems) +## Citing ISIS +This project uses a [Zenodo](https://zenodo.org) generated DOI. The badge at the top of this README links to the DOI for the [latest release](https://doi.org/10.5281/zenodo.2563341). It is [good practice](https://help.zenodo.org) (See 'Which DOI Should I Use in Citations?') to cite the version of the software being used by the citing work. To obtain this DOI, one can follow the [link to the latest version](https://doi.org/10.5281/zenodo.2563341) and then check the right sidebar area titled **Versions** for a listing of all ISIS versions that currently have a Zenodo DOI. + ## The ISIS Data Area ### Ancillary Data -Many ISIS applications require ancillary data. For example, ingestion applications require translation tables to convert labels, calibration applications require flat files to do flat field correct, and map projection applications require DTMs to accurately compute intersections. Due to its size, this data is stored in a separate directory called the ISIS Data Area. Any location can be used for the ISIS Data Area, the software simply requires that the ISIS3DATA environment variable is set to its location. +Many ISIS applications require ancillary data. For example, calibration applications require flat files to do flat field corrections, and map projection applications require DTMs to accurately compute intersections. Due to its size, this data is stored in a separate directory called the ISIS Data Area. Any location can be used for the ISIS Data Area, the software simply requires that the ISISDATA environment variable is set to its location. ### Structure of the ISIS3 Data Area -Under the root directory of the ISIS Data Area pointed to by the ISIS3DATA environment variable are a variety of sub-directories. Each mission supported by ISIS has a sub-directory that contains mission specific processing data such as flat files and mission specific SPICE. There are also data areas used by more generic applications. These sub-directories contain everything from templates to test data. +Under the root directory of the ISIS Data Area pointed to by the ISISDATA environment variable are a variety of sub-directories. Each mission supported by ISIS has a sub-directory that contains mission specific processing data such as flat files and mission specific SPICE. There are also data areas used by more generic applications. These sub-directories contain everything from templates to test data. ### Size of the ISIS3 Data Area @@ -305,19 +317,19 @@ The ISIS Data Area is hosted on rsync servers and not through conda channels lik To download all ISIS data, enter the following commands in the location where you want to install the ISIS Data Area: - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/ . > Note: The above command downloads all ISIS data including the required base data area and all of the optional mission data areas. -### Partial Download of ISIS Base Data (Required) +### Partial Download of ISIS Base Data -The base data area is separate from the source code. This data area is crucial to ISIS and must be downloaded. To do that run the following commands: +This data area contains data that is common between multiple missions such as DEMS and leap second kernels. As of ISIS 4.1, the base data area is no longer required to run many applications as data such as icons and templates has been moved into the binary distribution. If you plan to work with any applications that use camera models (e.g., cam2map, campt, qview), it is still recommended you download the base data area. To download the base data area run the following commands: - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/base . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/base . ### Partial Download of Mission Specific Data @@ -332,8 +344,8 @@ ISIS can now use a service to retrieve the SPICE data for all instruments ISIS s For example:
-cd $ISIS3DATA
-rsync -azv --exclude='kernels' --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/cassini .
+cd $ISISDATA
+rsync -azv --exclude='kernels' --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/cassini .
 
**WARNING:** Some instruments require mission data to be present for radiometric calibration, which is not supported by the SPICE Web Server, and some programs that are designed to run an image from ingestion through the mapping phase do not have an option to use the SPICE Web Service. For information specific to an instrument, see the documentation for radiometric calibration programs. @@ -342,163 +354,163 @@ rsync -azv --exclude='kernels' --delete --partial isisdist.astrogeology.u **Apollo Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/apollo15 . - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/apollo16 . - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/apollo17 . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/apollo15 . + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/apollo16 . + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/apollo17 . **Cassini Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/cassini . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/cassini . **Chandrayaan Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/chandrayaan1 . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/chandrayaan1 . **Clementine Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/clementine1 . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/clementine1 . **Dawn Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/dawn . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/dawn . **ExoMars Trace Gas Orbiter Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/tgo . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/tgo . **Galileo Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/galileo . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/galileo . **Hayabusa Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/hayabusa . - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/hayabusa2 . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/hayabusa . + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/hayabusa2 . **Juno Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/juno . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/juno . **Kaguya Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/kaguya . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/kaguya . **Lunar Orbiter Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/lo . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/lo . **Lunar Reconnaissance Orbiter Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/lro . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/lro . **Mars Exploration Rover Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/mer . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/mer . **Mariner10 Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/mariner10 . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/mariner10 . **Messenger Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/messenger . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/messenger . **Mars Express Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/mex . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/mex . **Mars Global Surveyor Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/mgs . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/mgs . **Mars Reconnaissance Orbiter Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/mro . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/mro . **Mars Odyssey Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/odyssey . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/odyssey . **Near Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/near . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/near . **New Horizons Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/newhorizons . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/newhorizons . **Rolo Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/rolo . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/rolo . **Rosetta Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/rosetta . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/rosetta . **Smart1 Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/smart1 . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/smart1 . **Viking Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/viking1 . - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/viking2 . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/viking1 . + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/viking2 . **Voyager Mission:** - cd $ISIS3DATA - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/voyager1 . - rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/voyager2 . + cd $ISISDATA + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/voyager1 . + rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isisdata/data/voyager2 . ## Installing older versions of ISIS diff --git a/environment.yml b/environment.yml index 9701aacae0..f84f390b67 100644 --- a/environment.yml +++ b/environment.yml @@ -39,8 +39,8 @@ dependencies: - nanoflann - nlohmann_json - ninja==1.7.2 - - conda-forge/label/gcc7::nn - - opencv>=3.0.0,<=4.0.0 + - nn + - opencv=3.2 - openssl>=1.0.0,<1.1.0 - pcl - protobuf=3.9.1 diff --git a/isis/scripts/isis3VarInit.py b/isis/scripts/isis3VarInit.py deleted file mode 100755 index ca0793517c..0000000000 --- a/isis/scripts/isis3VarInit.py +++ /dev/null @@ -1,175 +0,0 @@ -#!/usr/bin/env python -""" -This program builds shell scripts that define ISIS3 environment variables during -conda environment activation and deactivation, and creates some directories. -""" - -import argparse -import os -import sys - -########################################################################################################## -# -# This work is free and unencumbered software released into the public domain. -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. -# -# -# Description: This program builds the shell scripts that define the -# ISISROOT/ISISDATA/ISISTESTDATA environment variables for the user -# when the ISIS3 conda environment is activated, and clean up when it is -# deactivated. -# -# The data directory and test directory are optional command line arguments. -# If the user chooses not to set them, they will both be created in the -# $ISISROOT directory. -# -# History: -# Author: Tyler Wilson, USGS -# Date: 2018-10-05 -# Description: Initial commit. -# -# Author: Tyler Wilson, USGS -# Date: 2018-11-01 -# Description: Removed a pair of lines which were causing output errors on Mac OS X and were not -# required anyway. -# -# Author: Ross Beyer -# Date: 2018-11-19 -# Description: Streamlined the program, improved documentation, and made the directory and -# file creation more `pythonic' rather than using system calls. -# -# Author: Jesse Mapel -# Date: 2019-03-25 -# Description: Added C-Shell support. -# -# Author: K.-Michael Aye -# Date: 2019-08-09 -# Description: Added support for fish shell. -# -# Author: Adam Paquette -# Date: 2019-12-02 -# Description: Added ALESPICEROOT environment variable for ISIS 4. -# -########################################################################################################## - -# There are still a lot of Python 2 installations out there, and if people don't have -# their conda environment set up properly, the error message they'll get will be hard -# to decipher. This might help: -assert sys.version_info >= (3, 2) # Must be using Python 3.2 or later - - -# This just wraps and reports on the directory creation: -def mkdir(p): - if os.path.exists(p): - print("Tried to create " + p + ", but it already exists.") - else: - os.makedirs(p) - print("Created " + p) - return - - -# Set up and then parse the command line: -parser = argparse.ArgumentParser(description=__doc__) - -parser.add_argument( - "-d", - "--data-dir", - default=os.environ["CONDA_PREFIX"] + "/data", - help="ISIS3 Data Directory, default: %(default)s", -) -parser.add_argument( - "-t", - "--test-dir", - default=os.environ["CONDA_PREFIX"] + "/testData", - help="ISIS3 Test Data Directory, default: %(default)s", -) - -parser.add_argument( - "-a", - "--ale-dir", - default=os.environ["CONDA_PREFIX"] + "/aleData", - help="ISIS3 Ale Data Directory, default: %(default)s", -) -args = parser.parse_args() - -# Create the data directories: -mkdir(args.data_dir) -mkdir(args.test_dir) -mkdir(args.ale_dir) - -# Create the conda activation and deactivation directories: -activate_dir = os.environ["CONDA_PREFIX"] + "/etc/conda/activate.d" -deactivate_dir = os.environ["CONDA_PREFIX"] + "/etc/conda/deactivate.d" - -mkdir(activate_dir) -mkdir(deactivate_dir) - -# Write the files that manage the ISIS3 environments: -# Three coralated lists for zsh, csh, and fish shell - -# Associated file -activate_deactivate_files = ["/env_vars.sh", "/env_vars.csh", "/env_vars.fish"] - -# Activation script -activate_scripts = [""" - #!/usr/bin/env sh - export ISISROOT={} - export ISISDATA={} - export ISISTESTDATA={} - export ALESPICEROOT={} - """, - """ - #!/usr/bin/env csh - setenv ISISROOT {} - setenv ISISDATA {} - setenv ISISTESTDATA {} - setenv ALESPICEROOT {} - - source $CONDA_PREFIX/scripts/tabCompletion.csh - """, - """ - #!/usr/bin/env fish - set -gx ISISROOT {} - set -gx ISISDATA {} - set -gx ISISTESTDATA {} - set -gx ALESPICEROOT {} - """] - -# Deactivation script -deactivate_scripts = [""" - #!/usr/bin/env sh - unset ISISROOT - unset ISISDATA - unset ISISTESTDATA - unset ALESPICEROOT - """, - """ - #!/usr/bin/env csh - unsetenv ISISROOT - unsetenv ISISDATA - unsetenv ISISTESTDATA - unsetenv ALESPICEROOT - """, - """ - #!/usr/bin/env fish - set -e ISISROOT - set -e ISISDATA - set -e ISISTESTDATA - set -e ALESPICEROOT - """] - -# Loop over the files and create the correct script associated with -# said file -for i, file in enumerate(activate_deactivate_files): - with open(activate_dir + file, mode="w") as a: - script = activate_scripts[i].format( - os.environ["CONDA_PREFIX"], args.data_dir, args.test_dir, args.ale_dir - ) - a.write(script) - print("Wrote " + activate_dir + file) - - with open(deactivate_dir + file, mode="w") as d: - d.write(deactivate_scripts[i]) - print("Wrote " + deactivate_dir + file) diff --git a/isis/scripts/isisStartup.csh b/isis/scripts/isisStartup.csh new file mode 100644 index 0000000000..8192b6a3e2 --- /dev/null +++ b/isis/scripts/isisStartup.csh @@ -0,0 +1,38 @@ +#!/bin/csh +################################################################################ +# This file should be sourced within your current shell using the "source" +# command. +# +# On the command line type: +# > setenv ISISROOT ???? +# > source isis3Startup.csh +# +# Replace the "????" in the above command line with the path you installed +# the Isis distribution +# +################################################################################ + +if ($?ISISROOT == 0) then + echo "ISISROOT environment variable is not set" + exit 1 +endif + +if ($?ISISDATA == 0) then + if (-d $ISISROOT/../data) then + setenv ISISDATA $ISISROOT/../isis_data + else + setenv ISISDATA /usgs/cpkgs/isis3/isis_data + endif +endif + +if ($?ISISTESTDATA == 0) then + if (-d $ISISROOT/../testData) then + setenv ISISTESTDATA $ISISROOT/../testData + else + setenv ISISTESTDATA /usgs/cpkgs/isis3/isis_testData + endif +endif + +if ( -f $ISISROOT/scripts/tabcomplete.csh ) then + source $ISISROOT/scripts/tabcomplete.csh; +endif diff --git a/isis/scripts/isisStartup.sh b/isis/scripts/isisStartup.sh new file mode 100644 index 0000000000..ac2644503e --- /dev/null +++ b/isis/scripts/isisStartup.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# +# This file should be executed within your current shell using the "." or "source" +# command. +# +# On the command line type: +# > set ISISROOT=???? +# > . isis3Startup.sh +# +# Replace the "????" in the above command line with the path where you installed +# the Isis distribution +# +if [ ! "$ISISROOT" ]; then + ISISROOT=/usgs/pkgs/isis3/install + export ISISROOT +fi + +if [ ! "$ISISDATA" ]; then + if [ -d $ISISROOT/../data ]; then + ISISDATA=$ISISROOT/../isis_data + else + ISISDATA=/usgs/cpkgs/isis3/isis_data + fi + export ISISDATA +fi + +if [ ! "$ISISTESTDATA" ]; then + if [ -d $ISISROOT/../testData ]; then + ISISTESTDATA=$ISISROOT/../testData + else + ISISTESTDATA=/usgs/cpkgs/isis3/isis_testData + fi + export ISISTESTDATA +fi + +if [ "$PATH" ]; then + PATH="${PATH}:${ISISROOT}/bin" +else + PATH="$ISISROOT/bin" +fi +export PATH diff --git a/isis/scripts/isisVarInit.py b/isis/scripts/isisVarInit.py new file mode 100755 index 0000000000..bdaf84fb87 --- /dev/null +++ b/isis/scripts/isisVarInit.py @@ -0,0 +1,146 @@ +#!/usr/bin/env python +""" +This program builds shell scripts that define the ISIS environment +variables that are sourced during conda environment activation and +removed at deactivation. + +If the directories don't exist, they are created. If their path is +not specified, they are placed in $ISISROOT. +""" + +import argparse +import os +from pathlib import Path + +# This is free and unencumbered software released into the public domain. +# +# The authors of ISIS do not claim copyright on the contents of this file. +# For more details about the LICENSE terms and the AUTHORS, you will +# find files of those names at the top level of this repository. +# +# SPDX-License-Identifier: CC0-1.0 + + +def mkdir(p: Path) -> str: + """Returns a string with a message about the creation or existance + of the path, *p*.""" + if p.exists(): + return f"{p} exists, don't need to create." + else: + p.mkdir(parents=False) + return f"Created {p}" + + +def activate_text(shell: dict, env_vars: dict) -> str: + """Returns the formatted text to write to the activation script + based on the passed dictionaries.""" + + lines = [shell["shebang"]] + for k, v in env_vars.items(): + lines.append(shell["activate"].format(k, v)) + + if shell["activate_extra"] != "": + lines.append(shell["activate_extra"]) + + lines.append("cat $ISISROOT/version") + + return "\n".join(lines) + + +def deactivate_text(shell: dict, env_vars: dict) -> str: + """Returns the formatted text to write to the deactivation script + based on the passed dictionaries.""" + + lines = [shell["shebang"]] + for k in env_vars.keys(): + lines.append(shell["deactivate"].format(k)) + + return "\n".join(lines) + + +# Set up and then parse the command line: +parser = argparse.ArgumentParser(description=__doc__) + +parser.add_argument( + "-d", + "--data-dir", + default=os.environ["CONDA_PREFIX"] + "/data", + type=Path, + help="ISIS Data Directory, default: %(default)s", +) +parser.add_argument( + "-t", + "--test-dir", + default=os.environ["CONDA_PREFIX"] + "/testData", + type=Path, + help="ISIS Test Data Directory, default: %(default)s", +) + +parser.add_argument( + "-a", + "--ale-dir", + default=os.environ["CONDA_PREFIX"] + "/aleData", + type=Path, + help="ISIS Ale Data Directory, default: %(default)s", +) +args = parser.parse_args() + +print("-- ISIS Data Directories --") +# Create the data directories: +print(mkdir(args.data_dir)) +print(mkdir(args.test_dir)) +print(mkdir(args.ale_dir)) + +print("-- Conda activation and deactivation scripts --") +# Create the conda activation and deactivation directories: +activate_dir = Path(os.environ["CONDA_PREFIX"]) / "etc/conda/activate.d" +deactivate_dir = Path(os.environ["CONDA_PREFIX"]) / "etc/conda/deactivate.d" + +print(mkdir(activate_dir)) +print(mkdir(deactivate_dir)) + +# Set the environment variables to manage +env_vars = dict( + ISISROOT=os.environ["CONDA_PREFIX"], + ISISDATA=args.data_dir, + ISISTESTDATA=args.test_dir, + ALESPICEROOT=args.ale_dir +) + +# These dicts define the unique aspects of the shell languages +# for setting and unsetting the environment variables. + +sh = dict( # this covers bash and zsh + extension=".sh", + shebang="#!/usr/bin/env sh", + activate="export {}={}", + activate_extra="", + deactivate="unset {}" +) + +csh = dict( + extension=".csh", + shebang="#!/usr/bin/env csh", + activate="setenv {} {}", + activate_extra="source $CONDA_PREFIX/scripts/tabCompletion.csh", + deactivate="unsetenv {}" +) + +fish = dict( + extension=".fish", + shebang="#!/usr/bin/env fish", + activate="set -gx {} {}", + activate_extra="", + deactivate="set -e {}" +) + +# Loop over the shell types and create the correct scripts associated with +# each: +for shell in (sh, csh, fish): + a_path = activate_dir / ("isis-activate" + shell["extension"]) + a_path.write_text(activate_text(shell, env_vars)) + print(f"Wrote {a_path}") + + d_path = deactivate_dir / ("isis-deactivate" + shell["extension"]) + d_path.write_text(deactivate_text(shell, env_vars)) + print(f"Wrote {d_path}") diff --git a/isis/src/base/apps/hist/hist.xml b/isis/src/base/apps/hist/hist.xml index e0d4171a04..17c580d68d 100644 --- a/isis/src/base/apps/hist/hist.xml +++ b/isis/src/base/apps/hist/hist.xml @@ -84,11 +84,9 @@ Updated logic such that min/max values are no longer calculated from .cub if values are provided by the user. Fixes #3881. - - Added "Pixels Below Min" and "Pixels Above Max" to the CSV output and changed how the data is - outputted. Originally, the CSV output and the GUI histogram would use the DN value in the - middle of a bin to represent that bin. That is, the CSV output used to have a "DN" value that - was the bin's middle pixel DN. This was not intuitive to users. Removed the "DN" value and added "MinInclusive" and "MaxExclusive" to the CSV so that bins are represented by their min/max values. These changes were also reflected in the histrogram creation. The x-axis is now based off of the min value of a bin instead of the middle value. These changes were made alongside changes made to Histogram and cnethist. + + Re-added the ability to set number of bins without setting min/max values after the last update. + Follow-on to #3881. diff --git a/isis/src/base/apps/hist/main.cpp b/isis/src/base/apps/hist/main.cpp index 2b078ea2ee..5f37938835 100644 --- a/isis/src/base/apps/hist/main.cpp +++ b/isis/src/base/apps/hist/main.cpp @@ -57,9 +57,15 @@ void IsisMain() { } else { hist = new Histogram(*icube, 1, p.Progress()); + + if (ui.WasEntered("NBINS")){ + hist->SetBins(ui.GetInteger("NBINS")); + } } // Setup the histogram + // Setup the histogram + // Loop and accumulate histogram p.Progress()->SetText("Gathering Histogram"); p.Progress()->SetMaximumSteps(icube->lineCount()); @@ -79,26 +85,24 @@ void IsisMain() { ofstream fout; fout.open(outfile.toLatin1().data()); - fout << "Cube: " << ui.GetFileName("FROM") << endl; - fout << "Band: " << icube->bandCount() << endl; - fout << "Average: " << hist->Average() << endl; - fout << "Std Deviation: " << hist->StandardDeviation() << endl; - fout << "Variance: " << hist->Variance() << endl; - fout << "Median: " << hist->Median() << endl; - fout << "Mode: " << hist->Mode() << endl; - fout << "Skew: " << hist->Skew() << endl; - fout << "Minimum: " << hist->Minimum() << endl; - fout << "Maximum: " << hist->Maximum() << endl; + fout << "Cube: " << ui.GetFileName("FROM") << endl; + fout << "Band: " << icube->bandCount() << endl; + fout << "Average: " << hist->Average() << endl; + fout << "Std Deviation: " << hist->StandardDeviation() << endl; + fout << "Variance: " << hist->Variance() << endl; + fout << "Median: " << hist->Median() << endl; + fout << "Mode: " << hist->Mode() << endl; + fout << "Skew: " << hist->Skew() << endl; + fout << "Minimum: " << hist->Minimum() << endl; + fout << "Maximum: " << hist->Maximum() << endl; fout << endl; - fout << "Total Pixels: " << hist->TotalPixels() << endl; - fout << "Valid Pixels: " << hist->ValidPixels() << endl; - fout << "Pixels Below Min: " << hist->UnderRangePixels() << endl; - fout << "Pixels Above Max: " << hist->OverRangePixels() << endl; - fout << "Null Pixels: " << hist->NullPixels() << endl; - fout << "Lis Pixels: " << hist->LisPixels() << endl; - fout << "Lrs Pixels: " << hist->LrsPixels() << endl; - fout << "His Pixels: " << hist->HisPixels() << endl; - fout << "Hrs Pixels: " << hist->HrsPixels() << endl; + fout << "Total Pixels: " << hist->TotalPixels() << endl; + fout << "Valid Pixels: " << hist->ValidPixels() << endl; + fout << "Null Pixels: " << hist->NullPixels() << endl; + fout << "Lis Pixels: " << hist->LisPixels() << endl; + fout << "Lrs Pixels: " << hist->LrsPixels() << endl; + fout << "His Pixels: " << hist->HisPixels() << endl; + fout << "Hrs Pixels: " << hist->HrsPixels() << endl; // Write histogram in tabular format fout << endl; @@ -110,16 +114,13 @@ void IsisMain() { double low; double high; - for (int i = 0; i < hist->Bins(); i++) { - if (hist->BinCount(i) > 0) { + for(int i = 0; i < hist->Bins(); i++) { + if(hist->BinCount(i) > 0) { total += hist->BinCount(i); double pct = (double)hist->BinCount(i) / hist->ValidPixels() * 100.; cumpct += pct; - hist->BinRange(i, low, high); - - fout << low << ","; - fout << high << ","; + fout << hist->BinMiddle(i) << ","; fout << hist->BinCount(i) << ","; fout << total << ","; fout << pct << ","; @@ -166,16 +167,13 @@ void IsisMain() { QVector binCountData; QVector cumPctData; double cumpct = 0.0; - double low; - double high; - for (int i = 0; i < hist->Bins(); i++) { - if (hist->BinCount(i) > 0) { - hist->BinRange(i, low, high); - binCountData.append(QPointF(low, hist->BinCount(i) ) ); + for(int i = 0; i < hist->Bins(); i++) { + if(hist->BinCount(i) > 0) { + binCountData.append(QPointF(hist->BinMiddle(i), hist->BinCount(i) ) ); - double pct = (double)hist->BinCount(i) / hist->ValidPixels() * 100.0; + double pct = (double)hist->BinCount(i) / hist->ValidPixels() * 100.; cumpct += pct; - cumPctData.append(QPointF(low, cumpct) ); + cumPctData.append(QPointF(hist->BinMiddle(i), cumpct) ); } } @@ -213,6 +211,10 @@ void IsisMain() { plot->add(histCurve); plot->add(cdfCurve); +// plot->fillTable(); + +// plot->setScale(QwtPlot::yLeft, 0, maxYValue); +// plot->setScale(QwtPlot::xBottom, hist.Minimum(), hist.Maximum()); QLabel *label = new QLabel(" Average = " + QString::number(hist->Average()) + '\n' + "\n Minimum = " + QString::number(hist->Minimum()) + '\n' + diff --git a/isis/src/base/apps/hist/tsts/default/Makefile b/isis/src/base/apps/hist/tsts/default/Makefile index 92b0a4cfd2..89268ffcf8 100644 --- a/isis/src/base/apps/hist/tsts/default/Makefile +++ b/isis/src/base/apps/hist/tsts/default/Makefile @@ -1,9 +1,20 @@ +# 2020-06-25 - Kristin Berry - Added a test to check that if nbins is set, it is used. +# To make the truthdata for this test, I set the number of bins to 25, a number much smaller than +# the internal default, and just checked that the output was different from the default test. + APPNAME = hist histTruth.txt.IGNORELINES = Cube +histTruthNbins.txt.IGNORELINES = Cube TEMP = $(OUTPUT)/histTruth.txt +TEMPNBINS = $(OUTPUT)/histTruthNbins.txt include $(ISISROOT)/make/isismake.tsts commands: + # Test without additional arguments $(APPNAME) from=$(INPUT)/isisTruth.cub \ - to= $(TEMP) > /dev/null; + to=$(TEMP) > /dev/null; + + # Test with setting nbins + $(APPNAME) from=$(INPUT)/isisTruth.cub nbins=25\ + to=$(TEMPNBINS) > /dev/null; diff --git a/isis/src/base/objs/Cube/Cube.cpp b/isis/src/base/objs/Cube/Cube.cpp index 5273e29e74..b2cbfb568f 100644 --- a/isis/src/base/objs/Cube/Cube.cpp +++ b/isis/src/base/objs/Cube/Cube.cpp @@ -55,6 +55,7 @@ using namespace std; namespace Isis { + //! Constructs a Cube object. Cube::Cube() { construct(); diff --git a/isis/src/base/objs/Spice/Spice.cpp b/isis/src/base/objs/Spice/Spice.cpp index 2f82d6efa8..4b37800029 100644 --- a/isis/src/base/objs/Spice/Spice.cpp +++ b/isis/src/base/objs/Spice/Spice.cpp @@ -94,6 +94,17 @@ namespace Isis { } + /** + * Constructs a Spice Object + * + * @param lab Isis Cube Pvl Lavel + * @param isd ALE Json ISD + */ + Spice::Spice(Pvl &lab, json isd) { + init(lab, true, isd); + } + + /** * Constructs a Spice Object * @@ -122,6 +133,7 @@ namespace Isis { // Initialize members m_solarLongitude = new Longitude; + m_et = NULL; m_kernels = new QVector; @@ -170,9 +182,9 @@ namespace Isis { *m_endTimePadding = 0.0; } - // We should remove this completely in the near future + // We should remove this completely in the near future m_usingNaif = !lab.hasObject("NaifKeywords") || noTables; - m_usingAle = false; + m_usingAle = false; // Modified to load planetary ephemeris SPKs before s/c SPKs since some // missions (e.g., MESSENGER) may augment the s/c SPK with new planet @@ -185,7 +197,7 @@ namespace Isis { QString msg = "Falling back to ISIS generation of nadir pointing"; throw IException(IException::Programmer, msg, _FILEINFO_); } - + if (isd == NULL){ // try using ALE std::ostringstream kernel_pvl; @@ -194,19 +206,19 @@ namespace Isis { json props; props["kernels"] = kernel_pvl.str(); - isd = ale::load(lab.fileName().toStdString(), props.dump(), "isis"); + isd = ale::load(lab.fileName().toStdString(), props.dump(), "ale"); } - - json aleNaifKeywords = isd["NaifKeywords"]; + + json aleNaifKeywords = isd["naif_keywords"]; m_naifKeywords = new PvlObject("NaifKeywords", aleNaifKeywords); - // Still need to load clock kernels for now + // Still need to load clock kernels for now load(kernels["LeapSecond"], noTables); if ( kernels.hasKeyword("SpacecraftClock")) { load(kernels["SpacecraftClock"], noTables); } - m_usingAle = true; - } + m_usingAle = true; + } catch(...) { // Backup to stadnard ISIS implementation if (noTables) { @@ -227,12 +239,12 @@ namespace Isis { if (kernels.hasKeyword("InstrumentAddendum")) { load(kernels["InstrumentAddendum"], noTables); } - - // Still need to load clock kernels for now + + // Still need to load clock kernels for now load(kernels["LeapSecond"], noTables); if ( kernels.hasKeyword("SpacecraftClock")) { load(kernels["SpacecraftClock"], noTables); - } + } // Modified to load extra kernels last to allow overriding default values // (2010-04-07) (DAC) @@ -240,14 +252,14 @@ namespace Isis { load(kernels["Extra"], noTables); } } - - // Moved the construction of the Target after the NAIF kenels have been loaded or the - // NAIF keywords have been pulled from the cube labels, so we can find target body codes + + // Moved the construction of the Target after the NAIF kenels have been loaded or the + // NAIF keywords have been pulled from the cube labels, so we can find target body codes // that are defined in kernels and not just body codes build into spicelib // TODO: Move this below the else once the rings code below has been refactored m_target = new Target(this, lab); - // This should not be here. Consider having spiceinit add the necessary rings kernels to the + // This should not be here. Consider having spiceinit add the necessary rings kernels to the // Extra parameter if the user has set the shape model to RingPlane. // If Target is Saturn and ShapeModel is RingPlane, load the extra rings pck file // which changes the prime meridian values to report longitudes with respect to @@ -259,9 +271,9 @@ namespace Isis { } else { *m_naifKeywords = lab.findObject("NaifKeywords"); - - // Moved the construction of the Target after the NAIF kenels have been loaded or the - // NAIF keywords have been pulled from the cube labels, so we can find target body codes + + // Moved the construction of the Target after the NAIF kenels have been loaded or the + // NAIF keywords have been pulled from the cube labels, so we can find target body codes // that are defined in kernels and not just body codes build into spicelib // TODO: Move this below the else once the rings code above has been refactored m_target = new Target(this, lab); @@ -344,7 +356,7 @@ namespace Isis { QString naifTarget = "IAU_" + m_target->name().toUpper(); namfrm_c(naifTarget.toLatin1().data(), &frameCode); if (frameCode == 0) { - QString msg = "Can not find NAIF BODY_FRAME_CODE for target [" + QString msg = "Can not find NAIF BODY_FRAME_CODE for target [" + m_target->name() + "]"; throw IException(IException::Io, msg, _FILEINFO_); } @@ -363,7 +375,7 @@ namespace Isis { m_instrumentRotation = new SpiceRotation(*m_ckCode); - // Set up for observer/target and light time correction to between s/c + // Set up for observer/target and light time correction to between s/c // and target body. LightTimeCorrectionState ltState(*m_ikCode, this); ltState.checkSpkKernelsForAberrationCorrection(); @@ -376,11 +388,19 @@ namespace Isis { m_sunPosition = new SpicePosition(10, m_target->naifBodyCode()); + // Check to see if we have nadir pointing that needs to be computed & - // See if we have table blobs to load + // See if we have table blobs to load if (m_usingAle) { - m_sunPosition->LoadCache(isd["SunPosition"]); - m_bodyRotation->LoadCache(isd["BodyRotation"]); + m_sunPosition->LoadCache(isd["sun_position"]); + if (m_sunPosition->cacheSize() > 3) { + m_sunPosition->Memcache2HermiteCache(0.01); + } + m_bodyRotation->LoadCache(isd["body_rotation"]); + m_bodyRotation->MinimizeCache(SpiceRotation::DownsizeStatus::Yes); + if (m_bodyRotation->cacheSize() > 5) { + m_bodyRotation->LoadTimeCache(); + } solarLongitude(); } else if (kernels["TargetPosition"][0].toUpper() == "TABLE") { @@ -421,7 +441,11 @@ namespace Isis { m_instrumentRotation = new SpiceRotation(*m_ikCode, *m_spkBodyCode); } else if (m_usingAle) { - m_instrumentRotation->LoadCache(isd["InstrumentPointing"]); + m_instrumentRotation->LoadCache(isd["instrument_pointing"]); + m_instrumentRotation->MinimizeCache(SpiceRotation::DownsizeStatus::Yes); + if (m_instrumentRotation->cacheSize() > 5) { + m_instrumentRotation->LoadTimeCache(); + } } else if (kernels["InstrumentPointing"][0].toUpper() == "TABLE") { Table t("InstrumentPointing", lab.fileName(), lab); @@ -429,23 +453,27 @@ namespace Isis { } + if (kernels["InstrumentPosition"].size() == 0) { throw IException(IException::Unknown, "No instrument position available", _FILEINFO_); } - + if (m_usingAle) { - m_instrumentPosition->LoadCache(isd["InstrumentPosition"]); + m_instrumentPosition->LoadCache(isd["instrument_position"]); + if (m_instrumentPosition->cacheSize() > 3) { + m_instrumentPosition->Memcache2HermiteCache(0.01); + } } else if (kernels["InstrumentPosition"][0].toUpper() == "TABLE") { Table t("InstrumentPosition", lab.fileName(), lab); m_instrumentPosition->LoadCache(t); } - - + + NaifStatus::CheckErrors(); - } + } /** * Loads/furnishes NAIF kernel(s) @@ -850,9 +878,9 @@ namespace Isis { * spacecraft and sun positions. * * @return @b iTime the currently set ephemeris time - * - * @throws IException::Programmer "Unable to retrieve the time Spice::setTime must be called - * first." + * + * @throws IException::Programmer "Unable to retrieve the time Spice::setTime must be called + * first." */ iTime Spice::time() const { if (m_et == NULL) { @@ -901,7 +929,7 @@ namespace Isis { * @param r[] Radii of the target in kilometers */ void Spice::radii(Distance r[3]) const { - for (int i = 0; i < 3; i++) + for (int i = 0; i < 3; i++) r[i] =m_target->radii()[i]; } @@ -953,7 +981,7 @@ namespace Isis { } /** - * This returns the NAIF body frame code. It is read from the labels, if it + * This returns the NAIF body frame code. It is read from the labels, if it * exists. Otherwise, it's calculated by the init() method. * * @return @b SpiceInt NAIF body frame code @@ -966,7 +994,7 @@ namespace Isis { /** * This returns the PvlObject that stores all of the requested Naif data - * and can be a replacement for furnishing text kernels. + * and can be a replacement for furnishing text kernels. */ PvlObject Spice::getStoredNaifKeywords() const { return *m_naifKeywords; @@ -1015,10 +1043,10 @@ namespace Isis { /** * This converts the spacecraft clock ticks value (clockValue) to an iTime. - * - * If the clock ticks value is provided directly, rather than the spacecraft - * clock string, set clockTicks=true. - * + * + * If the clock ticks value is provided directly, rather than the spacecraft + * clock string, set clockTicks=true. + * * Use this when possible because naif calls (such as scs2e_c) cannot be * called when not using naif. */ @@ -1036,10 +1064,10 @@ namespace Isis { SpiceDouble timeOutput; NaifStatus::CheckErrors(); if (clockTicks) { - sct2e_c(sclkCode, (SpiceDouble) clockValue.toDouble(), &timeOutput); + sct2e_c(sclkCode, (SpiceDouble) clockValue.toDouble(), &timeOutput); } else { - scs2e_c(sclkCode, clockValue.toLatin1().data(), &timeOutput); + scs2e_c(sclkCode, clockValue.toLatin1().data(), &timeOutput); } NaifStatus::CheckErrors(); storedClockTime = timeOutput; @@ -1274,7 +1302,7 @@ namespace Isis { SpiceBoolean found; SpiceDouble subB[3]; - + surfpt_c(originB, usB, a, b, c, subB, &found); SpiceDouble mylon, mylat; @@ -1309,7 +1337,7 @@ namespace Isis { SpiceDouble uuB[3], dist; unorm_c(m_uB, uuB, &dist); std::vector radii = target()->radii(); - + SpiceDouble a = radii[0].kilometers(); SpiceDouble b = radii[1].kilometers(); SpiceDouble c = radii[2].kilometers(); @@ -1362,6 +1390,17 @@ namespace Isis { } + double Spice::sunToBodyDist() const { + std::vector sunPosition = m_sunPosition->Coordinate(); + std::vector bodyRotation = m_bodyRotation->Matrix(); + + double sunPosFromTarget[3]; + mxv_c(&bodyRotation[0], &sunPosition[0], sunPosFromTarget); + + return vnorm_c(sunPosFromTarget); + } + + /** * Computes the solar longitude for the given ephemeris time. If the target * is sky, the longitude is set to -999.0. @@ -1377,15 +1416,50 @@ namespace Isis { } if (m_usingAle) { - double og_time = m_bodyRotation->EphemerisTime(); + double og_time = m_bodyRotation->EphemerisTime(); m_bodyRotation->SetEphemerisTime(et.Et()); m_sunPosition->SetEphemerisTime(et.Et()); - std::vector bodyRotMat = m_bodyRotation->Matrix(); - std::vector sunPos = m_sunPosition->Coordinate(); + std::vector bodyRotMat = m_bodyRotation->Matrix(); + std::vector sunPos = m_sunPosition->Coordinate(); std::vector sunVel = m_sunPosition->Velocity(); double sunAv[3]; + ucrss_c(&sunPos[0], &sunVel[0], sunAv); + + double npole[3]; + for (int i = 0; i < 3; i++) { + npole[i] = bodyRotMat[6+i]; + } + + double x[3], y[3], z[3]; + vequ_c(sunAv, z); + ucrss_c(npole, z, x); + ucrss_c(z, x, y); + + double trans[3][3]; + for (int i = 0; i < 3; i++) { + trans[0][i] = x[i]; + trans[1][i] = y[i]; + trans[2][i] = z[i]; + } + + double pos[3]; + mxv_c(trans, &sunPos[0], pos); + + double radius, ls, lat; + reclat_c(pos, &radius, &ls, &lat); + + *m_solarLongitude = Longitude(ls, Angle::Radians).force360Domain(); + + NaifStatus::CheckErrors(); + m_bodyRotation->SetEphemerisTime(og_time); + m_sunPosition->SetEphemerisTime(og_time); + return; + } + + if (m_bodyRotation->IsCached()) return; + ucrss_c(&sunPos[0], &sunVel[0], sunAv); double npole[3]; @@ -1540,9 +1614,9 @@ namespace Isis { /** * Returns true if time has been initialized. - * + * * @author 2016-10-19 Kristin Berry - * + * * @return @b bool true if time has been set */ bool Spice::isTimeSet(){ @@ -1593,7 +1667,7 @@ namespace Isis { SpiceRotation *Spice::instrumentRotation() const { return m_instrumentRotation; } - + bool Spice::isUsingAle(){ return m_usingAle; } diff --git a/isis/src/base/objs/SpicePosition/SpicePosition.cpp b/isis/src/base/objs/SpicePosition/SpicePosition.cpp index a7f1b6fcc7..0414ed0885 100644 --- a/isis/src/base/objs/SpicePosition/SpicePosition.cpp +++ b/isis/src/base/objs/SpicePosition/SpicePosition.cpp @@ -354,22 +354,22 @@ namespace Isis { } // Load the full cache time information from the label if available - p_fullCacheStartTime = isdPos["SpkTableStartTime"].get(); - p_fullCacheEndTime = isdPos["SpkTableEndTime"].get(); - p_fullCacheSize = isdPos["SpkTableOriginalSize"].get(); - p_cacheTime = isdPos["EphemerisTimes"].get>(); + p_fullCacheStartTime = isdPos["spk_table_start_time"].get(); + p_fullCacheEndTime = isdPos["spk_table_end_time"].get(); + p_fullCacheSize = isdPos["spk_table_original_size"].get(); + p_cacheTime = isdPos["ephemeris_times"].get>(); - for (auto it = isdPos["Positions"].begin(); it != isdPos["Positions"].end(); it++) { + for (auto it = isdPos["positions"].begin(); it != isdPos["positions"].end(); it++) { std::vector pos = {it->at(0).get(), it->at(1).get(), it->at(2).get()}; p_cache.push_back(pos); } p_cacheVelocity.clear(); - bool hasVelocityKey = isdPos.find("Velocities") != isdPos.end(); + bool hasVelocityKey = isdPos.find("velocities") != isdPos.end(); if (hasVelocityKey) { - for (auto it = isdPos["Velocities"].begin(); it != isdPos["Velocities"].end(); it++) { + for (auto it = isdPos["velocities"].begin(); it != isdPos["velocities"].end(); it++) { std::vector vel = {it->at(0).get(), it->at(1).get(), it->at(2).get()}; p_cacheVelocity.push_back(vel); } diff --git a/isis/src/base/objs/SpicePosition/SpicePosition.h b/isis/src/base/objs/SpicePosition/SpicePosition.h index e770949877..f727d4553a 100644 --- a/isis/src/base/objs/SpicePosition/SpicePosition.h +++ b/isis/src/base/objs/SpicePosition/SpicePosition.h @@ -250,6 +250,11 @@ namespace Isis { return (p_cache.size() > 0); }; + //! Get the size of the current cached positions + int cacheSize() const { + return p_cache.size(); + }; + void SetPolynomial(const Source type = PolyFunction); void SetPolynomial(const std::vector& XC, diff --git a/isis/src/base/objs/SpicePosition/SpicePosition.truth b/isis/src/base/objs/SpicePosition/SpicePosition.truth index faaf3dc128..6592dd3bbc 100644 --- a/isis/src/base/objs/SpicePosition/SpicePosition.truth +++ b/isis/src/base/objs/SpicePosition/SpicePosition.truth @@ -62,6 +62,7 @@ Velocity (J) = -3.5732696 1.5440214 -2.5639247 Time = -69382512 Spacecraft (J) = -2908.5545 -1132.3409 1981.0142 Velocity (J) = -3.4897306 1.5779899 -2.6234689 +Cache Size: 10 Testing tables ... Time = -69382819 diff --git a/isis/src/base/objs/SpicePosition/unitTest.cpp b/isis/src/base/objs/SpicePosition/unitTest.cpp index d4fc022012..ba367d4dad 100644 --- a/isis/src/base/objs/SpicePosition/unitTest.cpp +++ b/isis/src/base/objs/SpicePosition/unitTest.cpp @@ -61,6 +61,7 @@ int main(int argc, char *argv[]) { cout << "Spacecraft (J) = " << p[0] << " " << p[1] << " " << p[2] << endl; cout << "Velocity (J) = " << v[0] << " " << v[1] << " " << v[2] << endl; } + std::cout << "Cache Size: " << pos.cacheSize() << '\n'; cout << endl; // Test table options @@ -296,11 +297,11 @@ int main(int argc, char *argv[]) { // Test loading cache from an ALE ISD without velocities cout << "Test loading cache from an ALE ISD with velocities" << endl; - json aleIsd = {{"SpkTableStartTime" , -10.0}, - {"SpkTableEndTime" , 10.0}, - {"SpkTableOriginalSize" , 3}, - {"EphemerisTimes" , {-10.0, 0.0, 10.0}}, - {"Positions" , {{-10.0, -10.0, -10.0}, + json aleIsd = {{"spk_table_start_time" , -10.0}, + {"spk_table_end_time" , 10.0}, + {"spk_table_original_size" , 3}, + {"ephemeris_times" , {-10.0, 0.0, 10.0}}, + {"positions" , {{-10.0, -10.0, -10.0}, {0.0, 0.0, 0.0}, {10.0, 10.0, 10.0}}}}; SpicePosition alePos(-94, 499); @@ -319,7 +320,7 @@ int main(int argc, char *argv[]) { // Test loading cache from an ALE ISD with velocities cout << "Test loading cache from an ALE ISD with velocities" << endl; json aleVelIsd = aleIsd; - aleVelIsd["Velocities"] = {{1.0, 1.0, 1.0}, + aleVelIsd["velocities"] = {{1.0, 1.0, 1.0}, {1.0, 1.0, 1.0}, {1.0, 1.0, 1.0}}; SpicePosition aleVelPos(-94, 499); diff --git a/isis/src/base/objs/SpiceRotation/SpiceRotation.cpp b/isis/src/base/objs/SpiceRotation/SpiceRotation.cpp index 7b335bacfb..d21091e021 100644 --- a/isis/src/base/objs/SpiceRotation/SpiceRotation.cpp +++ b/isis/src/base/objs/SpiceRotation/SpiceRotation.cpp @@ -429,32 +429,32 @@ namespace Isis { m_frameType = CK; // Load the full cache time information from the label if available - p_fullCacheStartTime = isdRot["CkTableStartTime"].get(); - p_fullCacheEndTime = isdRot["CkTableEndTime"].get(); - p_fullCacheSize = isdRot["CkTableOriginalSize"].get(); - p_cacheTime = isdRot["EphemerisTimes"].get>(); - p_timeFrames = isdRot["TimeDependentFrames"].get>(); + p_fullCacheStartTime = isdRot["ck_table_start_time"].get(); + p_fullCacheEndTime = isdRot["ck_table_end_time"].get(); + p_fullCacheSize = isdRot["ck_table_original_size"].get(); + p_cacheTime = isdRot["ephemeris_times"].get>(); + p_timeFrames = isdRot["time_dependent_frames"].get>(); - for (auto it = isdRot["Quaternions"].begin(); it != isdRot["Quaternions"].end(); it++) { + for (auto it = isdRot["quaternions"].begin(); it != isdRot["quaternions"].end(); it++) { std::vector quat = {it->at(0).get(), it->at(1).get(), it->at(2).get(), it->at(3).get()}; Quaternion q(quat); std::vector CJ = q.ToMatrix(); p_cache.push_back(CJ); } - if (isdRot["AngularVelocity"].size() != 0) { - for (auto it = isdRot["AngularVelocity"].begin(); it != isdRot["AngularVelocity"].end(); it++) { + if (isdRot["angular_velocities"].size() != 0) { + for (auto it = isdRot["angular_velocities"].begin(); it != isdRot["angular_velocities"].end(); it++) { std::vector av = {it->at(0).get(), it->at(1).get(), it->at(2).get()}; p_cacheAv.push_back(av); } p_hasAngularVelocity = true; } - bool hasConstantFrames = isdRot.find("ConstantFrames") != isdRot.end(); + bool hasConstantFrames = isdRot.find("constant_frames") != isdRot.end(); if (hasConstantFrames) { - p_constantFrames = isdRot["ConstantFrames"].get>(); - p_TC = isdRot["ConstantRotation"].get>(); + p_constantFrames = isdRot["constant_frames"].get>(); + p_TC = isdRot["constant_rotation"].get>(); } else { diff --git a/isis/src/base/objs/SpiceRotation/SpiceRotation.h b/isis/src/base/objs/SpiceRotation/SpiceRotation.h index 4fac02f418..8effc6eef7 100644 --- a/isis/src/base/objs/SpiceRotation/SpiceRotation.h +++ b/isis/src/base/objs/SpiceRotation/SpiceRotation.h @@ -425,6 +425,10 @@ namespace Isis { void checkForBinaryPck(); + int cacheSize() { + return p_cache.size(); + } + protected: void SetFullCacheParameters(double startTime, double endTime, int cacheSize); void setEphemerisTimeMemcache(); diff --git a/isis/src/base/objs/SpiceRotation/SpiceRotation.truth b/isis/src/base/objs/SpiceRotation/SpiceRotation.truth index 5978be72bd..de5c26eef0 100644 --- a/isis/src/base/objs/SpiceRotation/SpiceRotation.truth +++ b/isis/src/base/objs/SpiceRotation/SpiceRotation.truth @@ -93,6 +93,7 @@ CJ(9) = -0.61729588 0.4060182 -0.67386573 0.010223693 0.86060645 0.50916796 0.78666465 0.30741789 -0.53539982 av(9) = -1.2932496e-05 -0.0010747293 -0.00063276804 +Cache Size: 10 Testing with functions ... Source = 3 diff --git a/isis/src/base/objs/SpiceRotation/SpiceRotation_Darwin_x86_64_MacOSX10_13.truth b/isis/src/base/objs/SpiceRotation/SpiceRotation_Darwin_x86_64_MacOSX10_13.truth index dd0c2fcebc..a8558bd9b8 100644 --- a/isis/src/base/objs/SpiceRotation/SpiceRotation_Darwin_x86_64_MacOSX10_13.truth +++ b/isis/src/base/objs/SpiceRotation/SpiceRotation_Darwin_x86_64_MacOSX10_13.truth @@ -93,6 +93,7 @@ CJ(9) = -0.61729588 0.4060182 -0.67386573 0.010223693 0.86060645 0.50916796 0.78666465 0.30741789 -0.53539982 av(9) = -1.2932496e-05 -0.0010747293 -0.00063276804 +Cache Size: 10 Testing with functions ... Source = 3 diff --git a/isis/src/base/objs/SpiceRotation/SpiceRotation_Darwin_x86_64_MacOSX10_15.truth b/isis/src/base/objs/SpiceRotation/SpiceRotation_Darwin_x86_64_MacOSX10_15.truth index dd0c2fcebc..a8558bd9b8 100644 --- a/isis/src/base/objs/SpiceRotation/SpiceRotation_Darwin_x86_64_MacOSX10_15.truth +++ b/isis/src/base/objs/SpiceRotation/SpiceRotation_Darwin_x86_64_MacOSX10_15.truth @@ -93,6 +93,7 @@ CJ(9) = -0.61729588 0.4060182 -0.67386573 0.010223693 0.86060645 0.50916796 0.78666465 0.30741789 -0.53539982 av(9) = -1.2932496e-05 -0.0010747293 -0.00063276804 +Cache Size: 10 Testing with functions ... Source = 3 diff --git a/isis/src/base/objs/SpiceRotation/unitTest.cpp b/isis/src/base/objs/SpiceRotation/unitTest.cpp index 93eb4171ad..0097f78bff 100644 --- a/isis/src/base/objs/SpiceRotation/unitTest.cpp +++ b/isis/src/base/objs/SpiceRotation/unitTest.cpp @@ -102,6 +102,7 @@ int main(int argc, char *argv[]) { cout << "av(" << i << ") = " << av[0] << " " << av[1] << " " << av[2] << endl; } } + std::cout << "Cache Size: " << rot.cacheSize() << '\n'; cout << endl; // Save off cache for polynomial over SPICE test @@ -620,12 +621,12 @@ int main(int argc, char *argv[]) { // [-90, 0, 0], // [-90, 180, 0], // [-90, 180, 90] - json aleQuatIsd = {{"CkTableStartTime" , 0.0}, - {"CkTableEndTime" , 3.0}, - {"CkTableOriginalSize" , 4}, - {"EphemerisTimes" , {0.0, 1.0, 2.0, 3.0}}, - {"TimeDependentFrames" , {-94031, 10014, 1}}, - {"Quaternions" , {{0.0, 0.0, 0.0, 1.0}, + json aleQuatIsd = {{"ck_table_start_time" , 0.0}, + {"ck_table_end_time" , 3.0}, + {"ck_table_original_size" , 4}, + {"ephemeris_times" , {0.0, 1.0, 2.0, 3.0}}, + {"time_dependent_frames" , {-94031, 10014, 1}}, + {"quaternions" , {{0.0, 0.0, 0.0, 1.0}, {-1.0 / sqrt(2), 0.0, 0.0, 1.0 / sqrt(2)}, {0.0, 1.0 / sqrt(2), 1.0 / sqrt(2), 0.0}, {-0.5, -0.5, 0.5, 0.5}}}}; @@ -644,7 +645,7 @@ int main(int argc, char *argv[]) { cout << " }" << endl; vector constChain = aleQuatRot.ConstantFrameChain(); cout << "Time dependent frame chain = { "; - for (unsigned int i = 0; i < constChain.size(); i++) { + for (int i = 0; i < constChain.size(); i++) { if (i > 0) { cout << ", "; } @@ -664,10 +665,10 @@ int main(int argc, char *argv[]) { cout << endl << endl << "Testing loading cache from ALE ISD with time dependent quaternions and AV ..." << endl; SpiceRotation aleQuatAVRot(-94031); json aleQuatAVIsd(aleQuatIsd); - aleQuatAVIsd["AngularVelocity"] = {{-Isis::PI / 2, 0.0, 0.0}, - {0.0, Isis::PI, 0.0}, - {0.0, 0.0, Isis::PI / 2}, - {0.0, 0.0, Isis::PI / 2}}; + aleQuatAVIsd["angular_velocities"] = {{-Isis::PI / 2, 0.0, 0.0}, + {0.0, Isis::PI, 0.0}, + {0.0, 0.0, Isis::PI / 2}, + {0.0, 0.0, Isis::PI / 2}}; aleQuatAVRot.LoadCache(aleQuatAVIsd); cout << "Has AV? " << (aleQuatAVRot.HasAngularVelocity() ? "Yes" : "No") << endl; @@ -675,13 +676,13 @@ int main(int argc, char *argv[]) { cout << endl << endl << "Testing loading cache from ALE ISD with time dependent quaternions and constant rotation ..." << endl; SpiceRotation aleQuatConstRot(-94031); json aleQuatConstIsd(aleQuatIsd); - aleQuatConstIsd["TimeDependentFrames"] = {-94030, 10014, 1}; - aleQuatConstIsd["ConstantFrames"] = {-94031, -94030}; - aleQuatConstIsd["ConstantRotation"] = {1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0}; + aleQuatConstIsd["time_dependent_frames"] = {-94030, 10014, 1}; + aleQuatConstIsd["constant_frames"] = {-94031, -94030}; + aleQuatConstIsd["constant_rotation"] = {1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0}; aleQuatConstRot.LoadCache(aleQuatConstIsd); timeDepChain = aleQuatConstRot.TimeFrameChain(); cout << "Time dependent frame chain = { "; - for (unsigned int i = 0; i < timeDepChain.size(); i++) { + for (int i = 0; i < timeDepChain.size(); i++) { if (i > 0) { cout << ", "; } @@ -690,7 +691,7 @@ int main(int argc, char *argv[]) { cout << " }" << endl; constChain = aleQuatConstRot.ConstantFrameChain(); cout << "Time dependent frame chain = { "; - for (unsigned int i = 0; i < constChain.size(); i++) { + for (int i = 0; i < constChain.size(); i++) { if (i > 0) { cout << ", "; } diff --git a/isis/src/docsys/build/Installation.xsl b/isis/src/docsys/build/Installation.xsl index e1b67d8a94..3679a8bc3a 100644 --- a/isis/src/docsys/build/Installation.xsl +++ b/isis/src/docsys/build/Installation.xsl @@ -1,7 +1,7 @@ - - @@ -104,13 +104,13 @@ Deborah Lee Soltesz

- See the ISIS 3 Installation Guide - for instructions on downloading and installing ISIS 3. + See the ISIS Installation Guide + for instructions on downloading and installing ISIS 3.6 and later.

See the Legacy ISIS 3 Installation Guide - for instructions on downloading and installing versions of ISIS3 3.5.2 and earlier. + for instructions on downloading and installing versions of ISIS3 3.5.2 and earlier.

@@ -297,4 +297,3 @@ Deborah Lee Soltesz - diff --git a/isis/src/docsys/build/homepage.xml b/isis/src/docsys/build/homepage.xml index 725aed8532..1a41d138aa 100644 --- a/isis/src/docsys/build/homepage.xml +++ b/isis/src/docsys/build/homepage.xml @@ -25,10 +25,10 @@

Welcome

- This is the home page for ISIS, a digital image processing software - package. The focus of the software is to manipulate imagery collected - by current and past NASA and International planetary missions sent - throughout our Solar System. + This is the home page for ISIS, a digital image processing software + package. The focus of the software is to manipulate imagery collected + by current and past NASA and International planetary missions sent + throughout our Solar System.

Announcements

@@ -38,6 +38,14 @@
+

Request for comments

+

+ Major changes to how ISIS works are now handled through Requests for Comment (RFCs). + These are a venue for the user community to voice their opinions on how they would + like the software to work. + Currently open RFCs can be found on the + ISIS Github. +

Popular Destinations

diff --git a/isis/src/docsys/documents/InstallGuide/InstallGuide.xml b/isis/src/docsys/documents/InstallGuide/InstallGuide.xml index 8c7047c6cb..c73152846e 100644 --- a/isis/src/docsys/documents/InstallGuide/InstallGuide.xml +++ b/isis/src/docsys/documents/InstallGuide/InstallGuide.xml @@ -22,513 +22,20 @@ you must not upgrade the ISIS Data Files!!!

--> -

Overview

+

+ See the ISIS Installation Guide + for instructions on downloading and installing ISIS 3.6 and later. +

-

- This installation guide is for ISIS3 users interested in installing ISIS3 (3.6.0)+ through conda. - If you are a developer, we refer you to our GitHub repository. -

+

+ See the Legacy ISIS 3 Installation Guide + for instructions on downloading and installing versions of ISIS 3.5.2 and earlier. +

- -

ISIS3 Installation With Conda

-
    -
  1. Download either the Anaconda or Miniconda installation script for your OS platform. Anaconda is a much larger distribtion of packages supporting scientific python, while Miniconda is a minimal installation and not as large: - Anaconda installer, Miniconda installer
  2. - -
  3. If you are running on some variant of Linux, open a terminal window in the directory where you downloaded the script, and run the following commands. In this example, we chose to do a full install of Anaconda, and our OS is Linux-based. Your file name may be different depending on your environment. -
    -          chmod +x Anaconda3-5.2.0-Linux-x86_64.sh
    -          ./Anaconda3-5.2.0-Linux-x86_64.sh
    -        
    - - This will start the Anaconda installer which will guide you through the installation process.
  4. - -
  5. If you are running Mac OS X, a pkg file (which looks similar to Anaconda3-5.3.0-MacOSX-x86_64.pkg) will be downloaded. Double-click on the file to start the installation process.
  6. - -
  7. After the installation has finished, open up a bash prompt in your terminal window.
  8. - -
  9. Next setup your Anaconda environment for ISIS3. In the bash prompt, run the following commands: -
    -          #Create a new conda environment to install ISIS3 in
    -          conda create -n isis3 python=3.6
    -
    -          #Activate the environment
    -          #Depending on your OS, you may need to use conda activate isis3 instead
    -          source activate isis3
    -
    -          #Add the following channels to the environment
    -          conda config --env --add channels conda-forge
    -          conda config --env --add channels usgs-astrogeology
    -
    -          #Verify you have the correct channels:
    -          conda config --show channels
    -
    -          #You should see:
    -
    -          channels:
    -             - usgs-astrogeology
    -             - conda-forge
    -             - defaults
    -
    -          #The order is important.  If conda-forge is before usgs-astrogeology, you will need to run:
    -
    -          conda config --env --add channels usgs-astrogeology
    -        
  10. - -
  11. The environment is now ready to download ISIS3 and its dependencies: -
    -          conda install -c usgs-astrogeology isis3
    -        
  12. - -
  13. Finally, setup the environment variables: -
    -          #Execute the ISIS3 variable initialization script with default arguments.
    -          #This script prepares default values for:  $ISISROOT/$ISISDATA/$ISISTESTDATA
    -
    -          python $CONDA_PREFIX/scripts/isis3VarInit.py
    -        
    - - Executing this script with no arguments will result in $ISISDATA=$CONDA_PREFIX/data, - and $ISISTESTDATA=$CONDA_PREFIX/testdata. The user can specify different directories - for both of these optional values: -
    -          python $CONDA_PREFIX/scripts/isis3VarInit.py --data-dir=[path to data directory]  --test-dir=[path to test data directory]
    -        
    - - More information about the ISISDATA environment variable and the ISIS3 Data Area - can be found here. - - Now everytime the isis3 environment is activated, $ISISROOT, $ISISDATA, and $ISISTESTDATA - will be set to the values passed to isis3VarInit.py. This does not happen retroactively, - re-activate the isis3 envionment with the following command: -
    -          #Depending on your OS, you may need to use conda activate isis3 instead
    -          source activate isis3
    -        
  14. -
- - -

Operating System Requirements

-

ISIS3 runs on many UNIX variants. ISIS does not run natively on MS Windows, - although it has been successfully run on Windows 10 using the Windows - Subsystem for Linux (WSL). Instructions for doing this can be found - here. - - The UNIX variants ISIS3 has been successfully built on are:

-
    -
  • Ubuntu 18.04 LTS
  • -
  • Mac OS X 10.13.6 High Sierra
  • -
  • Fedora 28
  • -
  • CentOS 7.2
  • -
- -

- ISIS3 may be run on other Linux or macOS operating systems then those listed above, - but it has not been tested and is not supported. -

- - -

Hardware Requirements

-

Here are the minimum hardware requirements

-
    -
  • 64-bit (x86) processors
  • -
  • 2 GB RAM
  • -
  • 2.5 GB of disk space for ISIS3 binaries
  • -
  • 10 GB to 510 GB disk space for ISIS3 data
  • -
  • 10 GB to many TB disk space for processing images
  • -
  • A quality graphics card
  • -
- -

To build and compile ISIS3 requires following the instructions listed below, which are given on - the GitHub wiki page for the ISIS3 project: -

-

- - - -

Running ISIS3 on Windows 10

- -

- While the ISIS3 development team has not examined these - instructions for correctness or completeness, they appear to have - successfully worked for a number of ISIS3 users within the USGS who run Windows. - Thanks for these instructions are directed towards Trent Hare who maintains an - excellent and thoughtful blog on Planetary GIS Science. -

- - -

Setting Up X11 forwarding on Windows with Putty and Xming

-

-Some ISIS3 users prefer to run ISIS3 in Windows, but SSH into a computer -that is running ISIS3 and has enabled X11 forwarding. This requires the -installation of an X server on Windows. Below are links to two popular choices -in Astrogeology. -

- -

-Additionally, a Windows SSH client is required to create an SSH connection. PuTTY -is a popular choice and may be downloaded below. -

- - - -

The ISIS3 Data Area

- -

Ancillary Data

-

Many ISIS3 applications require ancillary data. For example, ingestion applications require - translation tables to convert labels, calibration applications require flat files to do - flat field correct, and map projection applications require DTMs to accurately compute intersections. - Due to its size, this data is stored in a separate directory called the ISIS3 Data Area. Any - location can be used for the ISIS3 Data Area, the software simply requires that the ISISDATA - environment variable is set to its location. -

- -

Structure of the ISIS3 Data Area

-

Under the root directory of the ISIS3 Data Area pointed to by the ISISDATA environment - variable are a variety of sub-directories. Each mission supported by ISIS3 has a sub-directory - that contains mission specific processing data such as flat files and mission specific SPICE. - There are also data areas used by more generic applications. These sub-directories contain - everything from templates to test data. -

- -

Size of the ISIS3 Data Area

-

If you plan to work with data from all missions, then the download will require about 520 GB - for all the ancillary data. However, most of this volume is taken up by SPICE files. We have a - SPICE Web service that can be used in lieu of downloading all of - the SPICE files. This reduces the total download size to about 10 GB. -

- - -

Full ISIS3 Data Area Download

- -

The ISIS3 Data Area is hosted on rsync servers and not through conda channels like the - ISIS3 binaries. This requires using the rsync command from within a terminal window within - your Unix distribution, or from within WSL if running Windows 10. Downloading all mission - data requires over 520 GB of disk space. If you want to acquire only certain mission data - click here. To download all ISIS3 data files, continue reading. -

- -

To download all ISIS3 data, enter the following commands in the location where you want - to install the ISIS3 Data Area: -

- -
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/ .
-      
- -

Note: The above command downloads all ISIS data including the required base data area - and all of the optional missiondata areas. -

- - - -

Partial Download of ISIS3 Base Data (Required)

-

The base data area is separate from the source code. This data area is crucial to ISIS3 and - must be downloaded. -

- -
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/base .
-      
- -

Partial Download of Mission Specific Data

- - -

There are many missions supported by ISIS. If you are only working with a few missions - then you should download only those specific sub-directories of the ISIS3 Data Area. One way - you can save time and space is to not download the SPICE data for the mission you need. - If you choose to not download the SPICE data, read the next section about the SPICE Web Service - that provides instructions for excluding the SPICE kernels. Otherwise - jump to the mission specific sections. -

- - - -

ISIS SPICE Web Service

- -

ISIS can now use a service to retrieve the SPICE data for all instruments ISIS supports - via the internet. To use this service instead of your local SPICE data, click the WEB check box - in the spiceinit program GUI or type spiceinit web=yes at the command line. Using the ISIS SPICE - Web Service will significantly reduce the size of the downloads from our data area. - - If you want to use this service, without having to download all the SPICE data, add the - following argument to the mission-specific rsync command: -

- -
-      --exclude='kernels'
-      
-

For example, the following command will download the Cassini mission data except for SPICE kernels: -

- -
-      cd $ISISDATA
-      rsync -azv --exclude='kernels' --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/cassini .
-      
- - - WARNING: Some instruments require mission data to be present for calibration, which may - not be supported by the SPICE Web Server exclusively, and some programs that are designed - to run an image from ingestion through the mapping phase do not have an option to use the - SPICE Web Service. For information specific to an instrument, see the documentation for - radiometric callobration programs. - - - -

Apollo Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/apollo15 .
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/apollo16 .
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/apollo17 .
-      
- - -

Cassini Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/cassini .
-      
- - -

Chandrayaan Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/chandrayaan1 .
-      
- - -

Clementine Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/clementine1 .
-      
- - -

Dawn Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/dawn .
-      
- - -

ExoMars Trace Gas Orbiter Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/tgo .
-      
- - -

Galileo Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/galileo .
-      
- - -

Hayabusa Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/hayabusa .
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/hayabusa2 .
-      
- - -

Juno Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/juno .
-      
- - -

Kaguya Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/kaguya .
-      
- - -

Lunar Orbiter Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/lo .
-      
- - -

Lunar Reconnaissance Orbiter Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/lro .
-      
- - -

Mars Exploration Rover Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/mer .
-      
- - -

Mariner10 Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/mariner10 .
-      
- - -

Messenger Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/messenger .
-      
- - -

Mars Express Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/mex .
-      
- - -

Mars Global Surveyor Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/mgs .
-      
- - -

Mars Reconnaissance Orbiter Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/mro .
-      
- - -

Mars Odyssey Mission (kernels can be excluded): -

-
-        cd $ISISDATA
-        rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/odyssey .
-        
- - -

Near Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/near .
-      
- - -

New Horizons Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/newhorizons .
-      
- - -

Odyssey Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/odyssey .
-      
- - -

Rolo Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/rolo .
-      
- - -

Rosetta Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/rosetta .
-      
- - -

Smart1 Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/smart1 .
-      
- - -

Viking Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/viking1 .
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/viking2 .
-      
- - -

Voyager Mission (kernels can be excluded): -

-
-      cd $ISISDATA
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/voyager1 .
-      rsync -azv --delete --partial isisdist.astrogeology.usgs.gov::isis3data/data/voyager2 .
-      
- -

Installing older versions of ISIS

-

How do I install ISIS2?

-

- If you are looking for ISIS2, please - refer to the ISIS 2 Installation - Guide for instructions on downloading and installing ISIS 2. -

- -

How do I install ISIS3.5.2 or earlier?

-

- If you are looking for a version of ISIS3 prior to 3.6.0, please - refer to the Legacy ISIS3 Installation - Guide for instructions on downloading and installing ISIS3, versions prior to 3.6.0. -

+

+ Refer to the ISIS 2 Installation Guide + for instructions on downloading and installing ISIS 2. +

@@ -548,6 +55,7 @@ is a popular choice and may be downloaded below. Original Version Updated version to incorporate installation through Conda Updated version after feedback was received from outside users. + Changed to point to Github and legacy install guide. @@ -555,8 +63,7 @@ is a popular choice and may be downloaded below. Installing ISIS Downloading and installing ISIS3 - This document describes how to download/compile and install a - binary version of ISIS3 as well + This document describes how to download and install ISIS3 ASC Development Team 2018-08-28 diff --git a/isis/src/docsys/documents/LegacyInstallGuide/LegacyInstallGuide.xml b/isis/src/docsys/documents/LegacyInstallGuide/LegacyInstallGuide.xml index 36950f49b0..47084016d4 100644 --- a/isis/src/docsys/documents/LegacyInstallGuide/LegacyInstallGuide.xml +++ b/isis/src/docsys/documents/LegacyInstallGuide/LegacyInstallGuide.xml @@ -643,11 +643,12 @@ you must not upgrade the ISIS Data Files!!! and how to tell what shell a user is using to the UNIX Enviroment Setup section. Fixes #5372.
Updated for latest supported Fedora version (Fedora25). Removed references to deprecated Java-based installer and split off into a new Legacy ISIS3 installation instructions page. + Fixed version spacing to be a little more consistant. - Installing Legacy Versions of ISIS3 - Downloading and installing ISIS 3 versions 3.5.2.0 and earlier + Installing Legacy Versions of ISIS3 + Downloading and installing ISIS versions 3.5.2.0 and earlier This document describes how to download and install a binary version of ISIS. diff --git a/isis/src/hayabusa2/apps/hyb2onc2isis/Hayabusa2OncArchive.trn b/isis/src/hayabusa2/apps/hyb2onc2isis/Hayabusa2OncArchive.trn index 4498b0e25f..4374e5021a 100755 --- a/isis/src/hayabusa2/apps/hyb2onc2isis/Hayabusa2OncArchive.trn +++ b/isis/src/hayabusa2/apps/hyb2onc2isis/Hayabusa2OncArchive.trn @@ -14,8 +14,9 @@ Group = ProducerId End_Group Group = L0FileName - Auto + Auto InputKey = P_L0NAME + InputKey = L0FILE InputPosition = FitsLabels OutputName = L0FileName OutputPosition = (Object, IsisCube, Group, Archive) @@ -94,6 +95,7 @@ End_Group # AMICA calls this one "ImageNumber" Group = ImageNumber Auto + Optional InputKey = P_IMGID InputPosition = FitsExtras OutputName = ImageNumber diff --git a/isis/src/hayabusa2/apps/hyb2onc2isis/Hayabusa2OncInstrument.trn b/isis/src/hayabusa2/apps/hyb2onc2isis/Hayabusa2OncInstrument.trn index 68da05521b..8f3f737a63 100755 --- a/isis/src/hayabusa2/apps/hyb2onc2isis/Hayabusa2OncInstrument.trn +++ b/isis/src/hayabusa2/apps/hyb2onc2isis/Hayabusa2OncInstrument.trn @@ -16,6 +16,7 @@ End_Group Group = InstrumentId Auto InputKey = P_NAME + InputKey = NAIFNAME InputPosition = FitsLabels OutputName = InstrumentId OutputPosition = (Object, IsisCube, Group, Instrument) @@ -79,6 +80,7 @@ End_Group Group = ExposureDuration Auto InputKey = EXPOSURE + InputKey = XPOSURE InputPosition = FitsLabels OutputName = ExposureDuration OutputPosition = (Object, IsisCube, Group, Instrument) @@ -88,6 +90,7 @@ End_Group Group = SpacecraftClockStartCount Auto InputKey = P_SCCSC + InputKey = SCCL-BEG InputPosition = FitsLabels OutputName = SpacecraftClockStartCount OutputPosition = (Object, IsisCube, Group, Instrument) @@ -97,6 +100,7 @@ End_Group Group = SpacecraftClockEndCount Auto InputKey = P_SCCEC + InputKey = SCCL-END InputPosition = FitsLabels OutputName = SpacecraftClockStartCount OutputPosition = (Object, IsisCube, Group, Instrument) @@ -116,6 +120,7 @@ End_Group #s/c counter at data recorded time Group = OnboardDataRecordedTime Auto + Optional InputKey = P_RECTI InputPosition = FitsExtras OutputName = OnboardDataRecordedTime @@ -126,6 +131,7 @@ End_Group Group = Binning Auto InputKey = P_BINN + InputKey = NPIXBIN InputPosition = FitsLabels OutputName = Binning OutputPosition = (Object, IsisCube, Group, Instrument) @@ -136,6 +142,7 @@ End_Group Group = SelectedImageAreaX1 Auto InputKey = P_OPOSX1 + InputKey = ROI_LLX InputPosition = FitsLabels OutputName = SelectedImageAreaX1 OutputPosition = (Object, IsisCube, Group, Instrument) @@ -145,6 +152,7 @@ End_Group Group = SelectedImageAreaY1 Auto InputKey = P_OPOSY1 + InputKey = ROI_LLY InputPosition = FitsLabels OutputName = SelectedImageAreaY1 OutputPosition = (Object, IsisCube, Group, Instrument) @@ -153,7 +161,9 @@ End_Group Group = SelectedImageAreaX2 Auto + Optional InputKey = P_OPOSX2 + InputKey = ROI_URX InputPosition = FitsLabels OutputName = SelectedImageAreaX2 OutputPosition = (Object, IsisCube, Group, Instrument) @@ -162,7 +172,9 @@ End_Group Group = SelectedImageAreaY2 Auto + Optional InputKey = P_OPOSY2 + InputKey = ROI_URY InputPosition = FitsLabels OutputName = SelectedImageAreaY2 OutputPosition = (Object, IsisCube, Group, Instrument) @@ -171,6 +183,7 @@ End_Group Group = SelectedImageAreaX3 Auto + Optional InputKey = P_OPOSX3 InputPosition = FitsLabels OutputName = SelectedImageAreaX3 @@ -180,6 +193,7 @@ End_Group Group = SelectedImageAreaY3 Auto + Optional InputKey = P_OPOSY3 InputPosition = FitsLabels OutputName = SelectedImageAreaY3 @@ -190,6 +204,7 @@ End_Group Group = SelectedImageAreaX4 Auto InputKey = P_OPOSX4 + InputKey = ROI_URX InputPosition = FitsLabels OutputName = SelectedImageAreaX4 OutputPosition = (Object, IsisCube, Group, Instrument) @@ -199,6 +214,7 @@ End_Group Group = SelectedImageAreaY4 Auto InputKey = P_OPOSY4 + InputKey = ROI_URY InputPosition = FitsLabels OutputName = SelectedImageAreaY4 OutputPosition = (Object, IsisCube, Group, Instrument) @@ -217,6 +233,7 @@ End_Group Group = OffsetCorrection Auto InputKey = OFFSETCR + InputKey = AOFFSET InputPosition = FitsLabels OutputName = OffsetCorrection OutputPosition = (Object, IsisCube, Group, Instrument) @@ -235,6 +252,7 @@ End_Group Group = RadianceConversion Auto InputKey = RADIANCE + InputKey = RADCONV InputPosition = FitsLabels OutputName = RadianceConversion OutputPosition = (Object, IsisCube, Group, Instrument) @@ -262,6 +280,7 @@ End_Group Group = L2BFlatFileName Auto InputKey = L2BFLTFN + InputKey = FLATFN InputPosition = FitsLabels OutputName = L2BFlatFileName OutputPosition = (Object, IsisCube, Group, Instrument) @@ -270,6 +289,7 @@ End_Group Group = L2BSystemEfficiencyFileName Auto + Optional InputKey = L2BEFCFN InputPosition = FitsLabels OutputName = L2BSystemEfficiencyFileName @@ -280,6 +300,7 @@ End_Group Group = L2CShapeModelFileName Auto InputKey = L2CSHPFN + InputKey = SHAPEFN InputPosition = FitsLabels OutputName = L2CShapeModelFileName OutputPosition = (Object, IsisCube, Group, Instrument) @@ -289,6 +310,7 @@ End_Group Group = L2DPhaseFunctionFileName Auto InputKey = L2DPHSFN + InputKey = PHASEFN InputPosition = FitsLabels OutputName = L2DPhaseFunctionFileName OutputPosition = (Object, IsisCube, Group, Instrument) @@ -298,6 +320,7 @@ End_Group Group = L2DShapeModelFileName Auto InputKey = L2DSHPFN + InputKey = SHAPEFN InputPosition = FitsLabels OutputName = L2DShapeModelFileName OutputPosition = (Object, IsisCube, Group, Instrument) @@ -307,6 +330,7 @@ End_Group # the following image ID is assigned by the onboard image processor: Group = ImageID Auto + Optional InputKey = P_IMGID InputPosition = FitsExtras OutputName = ImageID @@ -465,20 +489,21 @@ End_Group Group = Compression Auto InputKey = P_CMPSTY + InputKey = IMGCMPRV InputPosition = FitsLabels OutputName = Compression OutputPosition = (Object, IsisCube, Group, Instrument) Translation = (*, *) End_Group -# Distance from sun to Hayabusa2 -Group = SolarDistance - Auto - InputKey = S_DISTRS - InputPosition = FitsLabels - OutputName = SolarDistance - OutputPosition = (Object, IsisCube, Group, Instrument) - Translation = (*, *) +# Distance from sun to Hayabusa2 +Group = SolarDistance + Auto + InputKey = S_DISTRS + InputPosition = FitsLabels + OutputName = SolarDistance + OutputPosition = (Object, IsisCube, Group, Instrument) + Translation = (*, *) End_Group End diff --git a/isis/src/hayabusa2/apps/hyb2onc2isis/Hayabusa2OncKernels.trn b/isis/src/hayabusa2/apps/hyb2onc2isis/Hayabusa2OncKernels.trn index 57a120bab5..4516171643 100755 --- a/isis/src/hayabusa2/apps/hyb2onc2isis/Hayabusa2OncKernels.trn +++ b/isis/src/hayabusa2/apps/hyb2onc2isis/Hayabusa2OncKernels.trn @@ -7,6 +7,7 @@ Group = NaifCode Auto Optional InputKey = P_ID + InputKey = NAIFID InputPosition = FitsLabels OutputName = NaifFrameCode OutputPosition = (Object, IsisCube, Group, Kernels) diff --git a/isis/src/hayabusa2/apps/hyb2onc2isis/main.cpp b/isis/src/hayabusa2/apps/hyb2onc2isis/main.cpp index a95c241168..7fc770723c 100644 --- a/isis/src/hayabusa2/apps/hyb2onc2isis/main.cpp +++ b/isis/src/hayabusa2/apps/hyb2onc2isis/main.cpp @@ -9,5 +9,108 @@ using namespace Isis; void IsisMain () { UserInterface &ui = Application::GetUserInterface(); - hyb2onc2isis(ui); + importFits.setFitsFile(FileName(ui.GetFileName("FROM"))); + importFits.setProcessFileStructure(0); + + Cube *outputCube = importFits.SetOutputCube("TO"); + + // Get the directory where the Hayabusa translation tables are. + QString transDir = "$ISISROOT/appdata/translations/"; + + // Create a PVL to store the translated labels in + Pvl outputLabel; + + // Get the FITS label + Pvl fitsLabel; + fitsLabel.addGroup(importFits.fitsImageLabel(0)); + try { + fitsLabel.addGroup(importFits.extraFitsLabel(0)); + } + catch (IException &e) { + QString msg = "Input file [" + FileName(ui.GetFileName("FROM")).expanded() + + "] does not appear to be a Hayabusa2/ONC label file."; + throw IException(e, IException::Unknown, msg, _FILEINFO_); + } + + QString instid; + QString missid; + try { + instid = fitsLabel.findGroup("FitsLabels").findKeyword("INSTRUME")[0]; + missid = fitsLabel.findGroup("FitsLabels").findKeyword ("SPCECRFT")[0]; + } + catch (IException &e) { + QString msg = "Unable to read instrument ID, [INSTRUME], or spacecraft ID, [SPCECRFT], " + "from input file [" + FileName(ui.GetFileName("FROM")).expanded() + "]"; + throw IException(e, IException::Io,msg, _FILEINFO_); + } + + missid = missid.simplified().trimmed(); + if (QString::compare(missid, "HAYABUSA-2", Qt::CaseInsensitive) != 0) { + QString msg = "Input file [" + FileName(ui.GetFileName("FROM")).expanded() + + "] does not appear to be a Hayabusa2 label file."; + throw IException(IException::Unknown, msg, _FILEINFO_); + } + instid = instid.simplified().trimmed(); + if (QString::compare(instid, "Optical Navigation Camera", Qt::CaseInsensitive) != 0) { + QString msg = "Input file [" + FileName(ui.GetFileName("FROM")).expanded() + + "] does not appear to be a Hayabusa2/ONC label file."; + throw IException(IException::Unknown, msg, _FILEINFO_); + } + + // Translate the Instrument group + FileName transFile(transDir + "Hayabusa2OncInstrument.trn"); + PvlToPvlTranslationManager instrumentXlater (fitsLabel, transFile.expanded()); + instrumentXlater.Auto(outputLabel); + + // Update target if user specifies it + PvlGroup &instGrp = outputLabel.findGroup("Instrument",Pvl::Traverse); + QString target; + if (ui.WasEntered("TARGET")) { + instGrp["TargetName"] = ui.GetString("TARGET"); + } + instGrp["ExposureDuration"].setUnits("seconds"); + outputCube->putGroup(instGrp); + + // Translate the BandBin group + transFile = transDir + "Hayabusa2OncBandBin.trn"; + PvlToPvlTranslationManager bandBinXlater (fitsLabel, transFile.expanded()); + bandBinXlater.Auto(outputLabel); + PvlGroup &bandGrp = outputLabel.findGroup("BandBin",Pvl::Traverse); + if (bandGrp.hasKeyword("Width")) { // if width exists, then so must center + bandGrp["Width"].setUnits("nanometers"); + bandGrp["Center"].setUnits("nanometers"); + } + outputCube->putGroup(outputLabel.findGroup("BandBin",Pvl::Traverse)); + + // Translate the Archive group + transFile = transDir + "Hayabusa2OncArchive.trn"; + PvlToPvlTranslationManager archiveXlater (fitsLabel, transFile.expanded()); + archiveXlater.Auto(outputLabel); + PvlGroup &archGrp = outputLabel.findGroup("Archive", Pvl::Traverse); + QString source = archGrp.findKeyword("SourceProductId")[0]; + archGrp["SourceProductId"].setValue(FileName(source).baseName()); + + // Create YearDoy keyword in Archive group + iTime stime(outputLabel.findGroup("Instrument", Pvl::Traverse)["StartTime"][0]); + PvlKeyword yeardoy("YearDoy", toString(stime.Year()*1000 + stime.DayOfYear())); + archGrp.addKeyword(yeardoy); + outputCube->putGroup(archGrp); + + + // Create a Kernels group + transFile = transDir + "Hayabusa2OncKernels.trn"; + PvlToPvlTranslationManager kernelsXlater(fitsLabel, transFile.expanded()); + kernelsXlater.Auto(outputLabel); + outputCube->putGroup(outputLabel.findGroup("Kernels", Pvl::Traverse)); + + // Now write the FITS augmented label as the original label + // Save the input FITS label in the Cube original labels + OriginalLabel originalLabel(fitsLabel); + outputCube->write(originalLabel); + + // Convert the image data + importFits.Progress()->SetText("Importing Hayabusa2 image"); + importFits.StartProcess(); + importFits.Finalize(); + } diff --git a/isis/src/hayabusa2/apps/hyb2pds4gen/main.cpp b/isis/src/hayabusa2/apps/hyb2pds4gen/main.cpp index fe4d3b33e2..acb12e0e76 100644 --- a/isis/src/hayabusa2/apps/hyb2pds4gen/main.cpp +++ b/isis/src/hayabusa2/apps/hyb2pds4gen/main.cpp @@ -1,233 +1,11 @@ #include "Isis.h" -#include +#include "UserInterface.h" +#include "hyb2pds4gen.h" -#include -#include -#include +using namespace Isis; -#include "Application.h" -#include "Cube.h" -#include "ExportDescription.h" -#include "FileName.h" -#include "Process.h" -#include "ProcessExportPds.h" -#include "ProcessExportPds4.h" -#include "Pvl.h" -#include "PvlKeyword.h" -#include "PvlToXmlTranslationManager.h" - -using namespace std; -using namespace Isis; - - -static QMap descMap({ - {"J2000Q0", "element q0 of quaternion representing a rotation"}, - {"J2000Q1", "element q1 of quaternion representing a rotation"}, - {"J2000Q2", "element q2 of quaternion representing a rotation"}, - {"J2000Q3", "element q3 of quaternion representing a rotation"}, - {"AV1", "Angular velocity vector"}, - {"AV2", "Angular velocity vector"}, - {"AV3", "Angular velocity vector"}, - {"ET", "Ephemeris time"}, - {"J2000X", "J2000 position x"}, - {"J2000Y", "J2000 position y"}, - {"J2000Z", "J2000 position z"}, - {"J2000XV", "J2000 velocity xv"}, - {"J2000YV", "J2000 velocity yv"}, - {"J2000ZV", "J2000 velocity zv"} - }); - -Pvl toPvl(PvlObject &container); -QDomDocument emptyDoc(); - -void IsisMain() { +void IsisMain() { UserInterface &ui = Application::GetUserInterface(); - - QString translationFile = "$ISISROOT/appdata/translations/Hayabusa2OncPds4Export.trn"; - - // Setup the process and set the input cube - ProcessExportPds4 process; - Cube *inputCube = process.SetInputCube("FROM"); - Pvl *inputLabel = inputCube->label(); - - process.setImageType(ProcessExportPds4::BinSetSpectrum); - - QDomDocument &pdsLabel = process.StandardPds4Label(); - ProcessExportPds4::translateUnits(pdsLabel); - - QString logicalId = ui.GetString("PDS4LOGICALIDENTIFIER"); - process.setLogicalId(logicalId); - - QStringList xmlPath = {"Product_Observational", "File_Area_Observational"}; - - for (int i = 0; i < inputLabel->objects(); i++) { - PvlObject obj = inputLabel->object(i); - if (obj.name() == "Table") { - QDomDocument doc = emptyDoc(); - - Pvl pvlObj = toPvl(obj); - PvlToXmlTranslationManager tableXlator(pvlObj,"$ISISROOT/appdata/translations/pds4ExportSpiceTable.trn"); - tableXlator.Auto(doc); - QDomElement recordBinary = doc.createElement("Record_Binary"); - QDomElement fields = doc.createElement("fields"); - QDomElement groups = doc.createElement("groups"); - QDomElement record_len = doc.createElement("record_length"); - - QDomElement tableBinary = process.getElement({"Product_Observational", "File_Area_Observational", "Table_Binary"}, doc.documentElement()); - - PvlToXmlTranslationManager::setElementValue(fields, QString::number(obj.groups())); - PvlToXmlTranslationManager::setElementValue(groups, QString::number(0)); - PvlToXmlTranslationManager::setElementValue(record_len, obj["Bytes"]); - record_len.setAttribute("unit", "byte"); - - tableBinary.appendChild(recordBinary).appendChild(fields); - recordBinary.appendChild(groups); - recordBinary.appendChild(record_len); - - // Translate Field Groups - for (int j = 0; j < obj.groups(); j++) { - PvlGroup grp = obj.group(j); - QDomElement field = doc.createElement("Field_Binary"); - - QDomElement name = doc.createElement("name"); - PvlToXmlTranslationManager::setElementValue(name, grp["Name"]); - - QDomElement fieldNumber = doc.createElement("field_number"); - PvlToXmlTranslationManager::setElementValue(fieldNumber, QString::number(j+1)); - - QDomElement fieldLocation = doc.createElement("field_location"); - PvlToXmlTranslationManager::setElementValue(fieldLocation, QString::number((j*8)+1)); - fieldLocation.setAttribute("unit", "byte"); - - QDomElement dataType = doc.createElement("data_type"); - PvlToXmlTranslationManager::setElementValue(dataType, "IEEE754MSBDouble"); - - QDomElement fieldLength = doc.createElement("field_length"); - PvlToXmlTranslationManager::setElementValue(fieldLength, QString::number(8)); - fieldLength.setAttribute("unit", "byte"); - - QDomElement description = doc.createElement("description"); - PvlToXmlTranslationManager::setElementValue(description, descMap[grp["Name"]]); - - field.appendChild(name); - field.appendChild(fieldNumber); - field.appendChild(fieldLocation); - field.appendChild(dataType); - field.appendChild(fieldLength); - field.appendChild(description); - recordBinary.appendChild(field); - - } - - // translation files do not support adding attrs to siblings so we have to do it manually - QDomNodeList fieldList = doc.elementsByTagName("field_length"); - for (int j = 0; j < fieldList.size(); j++) { - fieldList.at(j).toElement().setAttribute("unit", "byte"); - } - - QDomElement tableElement = process.getElement(xmlPath, doc.documentElement()).firstChildElement("Table_Binary"); - QDomElement base = process.getElement(xmlPath, pdsLabel.documentElement()); - base.appendChild(tableElement); - } - } - - // remove elements not wanted in hyb2 - QDomElement del = process.getElement({"Product_Observational", "Observation_Area", "Discipline_Area"}, pdsLabel.documentElement()); - del.removeChild(del.firstChildElement("img:Imaging")); - del.removeChild(del.firstChildElement("sp:Spectral_Characteristics")); - - del = process.getElement({"Product_Observational", "File_Area_Observational", "Array_3D_Spectrum"}, pdsLabel.documentElement()); - del.removeChild(del.firstChildElement("Special_Constants")); - - PvlToXmlTranslationManager xlator(*(inputLabel), translationFile); - xlator.Auto(pdsLabel); - - QDomElement base = process.getElement(xmlPath, pdsLabel.documentElement()); - - QDomDocument tempDoc = emptyDoc(); - PvlToXmlTranslationManager originalLabelXlator(*(inputLabel), "$ISISROOT/appdata/translations/pds4ExportOriginalLabel.trn"); - originalLabelXlator.Auto(tempDoc); - QDomElement ogLabelElem = process.getElement(xmlPath, tempDoc.documentElement()).firstChildElement("Header"); - base.appendChild(ogLabelElem); - - tempDoc = emptyDoc(); - PvlToXmlTranslationManager histXlator(*(inputLabel), "$ISISROOT/appdata/translations/pds4ExportHistory.trn"); - histXlator.Auto(tempDoc); - QDomElement histElem = process.getElement(xmlPath, tempDoc.documentElement()).firstChildElement("Header"); - base.appendChild(histElem); - - tempDoc = emptyDoc(); - PvlToXmlTranslationManager labXlator(*(inputLabel), "$ISISROOT/appdata/translations/pds4ExportLabelObject.trn"); - labXlator.Auto(tempDoc); - QDomElement labElem = process.getElement(xmlPath, tempDoc.documentElement()).firstChildElement("Header"); - QDomElement fileElem = process.getElement({"Product_Observational", "File_Area_Observational", "Array_3D_Spectrum"}, pdsLabel.documentElement()); - base.insertBefore(labElem, fileElem); - - PvlGroup instGroup = inputLabel->findObject("IsisCube").findGroup("Instrument"); - - QStringList subFramePath = {"Product_Observational", - "Observation_Area", - "Discipline_Area", - "img:Imaging", - "img:Image_Product_Information", - "img:Subframe_Parameters"}; - - if (instGroup.hasKeyword("FirstLine") && instGroup.hasKeyword("LastLine")) { - - int lines = (int) instGroup["LastLine"] - (int) instGroup["FirstLine"]; - QDomElement baseElement = pdsLabel.documentElement(); - QDomElement subframeParametersElement = process.getElement(subFramePath, baseElement); - - QDomElement linesElement = pdsLabel.createElement("img:lines"); - PvlToXmlTranslationManager::setElementValue(linesElement, toString(lines)); - subframeParametersElement.appendChild(linesElement); - - } - - if (instGroup.hasKeyword("FirstSample") && instGroup.hasKeyword("LastSample")) { - int samples = (int) instGroup["LastSample"] - (int) instGroup["FirstSample"]; - QDomElement baseElement = pdsLabel.documentElement(); - QDomElement subframeParametersElement = process.getElement(subFramePath, baseElement); - - QDomElement samplesElement = pdsLabel.createElement("img:samples"); - PvlToXmlTranslationManager::setElementValue(samplesElement, toString(samples)); - subframeParametersElement.appendChild(samplesElement); - } - - QString outFile = ui.GetFileName("TO"); - process.WritePds4(outFile); - - return; + hyb2pds4gen(ui); } - - -/** - * Converts a PvlObject instance to a PVL instance. - * - * Something about the relationship between the Pvl class and PvlObject class - * makes it impossible to simply cast without a segfault, so we have to do a - * bit more massaging. - * - */ -Pvl toPvl(PvlObject &container) { - Pvl newPvl; - std::stringstream buffer; - buffer << container << std::endl; - buffer >> newPvl; - return newPvl; -} - - -/** - * Returns a minimal QDomDocument for running it through - * PvlToXmlTranslationManager - */ -QDomDocument emptyDoc() { - QDomDocument doc; - QDomElement root = doc.createElement("Product_Observational"); - doc.appendChild(root); - return doc; -} - - diff --git a/isis/src/hayabusa2/tsts/Makefile b/isis/src/hayabusa2/tsts/Makefile deleted file mode 100644 index d29fa4cf81..0000000000 --- a/isis/src/hayabusa2/tsts/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -BLANKS = "%-6s" -LENGTH = "%-42s" - -include $(ISISROOT)/make/isismake.tststree diff --git a/isis/src/odyssey/tsts/Makefile b/isis/src/odyssey/tsts/Makefile deleted file mode 100644 index 016388fc89..0000000000 --- a/isis/src/odyssey/tsts/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -BLANKS = "%-6s" -LENGTH = "%-42s" - -include $(ISISROOT)/make/isismake.tststree diff --git a/isis/tests/CMakeLists.txt b/isis/tests/CMakeLists.txt index a42d49b9fd..7f7483d5c5 100644 --- a/isis/tests/CMakeLists.txt +++ b/isis/tests/CMakeLists.txt @@ -38,7 +38,6 @@ set(MISSION_LIBS voyager) - # Link runISISTests with what we want to test and the GTest and pthread library add_executable(runISISTests IsisTestMain.cpp diff --git a/isis/tests/CubeTests.cpp b/isis/tests/CubeTests.cpp index 0a19a4582a..c70b06c83d 100644 --- a/isis/tests/CubeTests.cpp +++ b/isis/tests/CubeTests.cpp @@ -120,8 +120,8 @@ TEST(CubeTest, TestCubeAttachSpiceFromIsd) { json isd = json::parse(R"( - {"CameraVersion": 2, - "NaifKeywords": { + {"isis_camera_version": 2, + "naif_keywords": { "BODY_CODE" : 499, "BODY499_RADII" : [3396.19, 3396.19, 3376.2], "BODY_FRAME_CODE" : 10014, @@ -131,75 +131,75 @@ TEST(CubeTest, TestCubeAttachSpiceFromIsd) { "INS-27002_ITRANSS" : [0.0, 85.0, 0.0], "INS-27002_ITRANSL" : [0.0, 0.0, 85.0] }, - "InstrumentPointing": { - "TimeDependentFrames": [-85600, -85000, 1], - "CkTableStartTime": 100, - "CkTableEndTime": 100.1, - "CkTableOriginalSize": 2, - "EphemerisTimes": [ + "instrument_pointing": { + "time_dependent_frames": [-85600, -85000, 1], + "ck_table_start_time": 100, + "ck_table_end_time": 100.1, + "ck_table_original_size": 2, + "ephemeris_times": [ 100, 100.1 ], - "Quaternions": [ + "quaternions": [ [0.0, -0.660435174378928, 0, 0.750883067090392], [0.0, -0.660435174378928, 0, 0.750883067090392] ], - "AngularVelocity": [ + "angular_velocity": [ [0, 0, 0], [0, 0, 0] ], - "ConstantFrames": [-85600], - "ConstantRotation": [1, 0, 0, 0, 1, 0, 0, 0, 1] + "constant_frames": [-85600], + "constant_rotation": [1, 0, 0, 0, 1, 0, 0, 0, 1] }, - "BodyRotation": { - "TimeDependentFrames": [31006, 1], - "CkTableStartTime": 100, - "CkTableEndTime": 100.1, - "CkTableOriginalSize": 2, - "EphemerisTimes": [ + "body_rotation": { + "time_dependent_frames": [31006, 1], + "ck_table_start_time": 100, + "ck_table_end_time": 100.1, + "ck_table_original_size": 2, + "ephemeris_times": [ 100, 100.1 ], - "Quaternions": [ + "quaternions": [ [ 0, 0.8509035, 0, 0.525322 ], [ 0, 0.8509035, 0, 0.525322 ] ], - "AngularVelocity": [ + "angular_velocity": [ [0, 0, 0], [0, 0, 0] ], - "ConstantFrames": [31001, 31007, 31006], - "ConstantRotation": [-0.4480736, 0, 0.8939967, 0, 1, 0, -0.8939967, 0, -0.4480736] + "constant_frames": [31001, 31007, 31006], + "constant_rotation": [-0.4480736, 0, 0.8939967, 0, 1, 0, -0.8939967, 0, -0.4480736] }, - "InstrumentPosition": { - "SpkTableStartTime": 100, - "SpkTableEndTime": 100.1, - "SpkTableOriginalSize": 2, - "EphemerisTimes": [ + "instrument_position": { + "spk_table_start_time": 100, + "spk_table_end_time": 100.1, + "spk_table_original_size": 2, + "ephemeris_times": [ 100, 100.1 ], - "Positions": [ + "positions": [ [1000, 0, 0], [1000, 0, 0] ], - "Velocities": [ + "velocities": [ [0, 0, 0], [0, 0, 0] ] }, - "SunPosition": { - "SpkTableStartTime": 100, - "SpkTableEndTime": 100.1, - "SpkTableOriginalSize": 2, - "EphemerisTimes": [ + "sun_position": { + "spk_table_start_time": 100, + "spk_table_end_time": 100.1, + "spk_table_original_size": 2, + "ephemeris_times": [ 100, 100.1 ], - "Positions": [ + "positions": [ [0, 20, 0] ], - "Velocities": [ + "velocities": [ [10,10,10] ] } diff --git a/isis/tests/FuntionalTestsFindImageOverlaps.cpp b/isis/tests/FuntionalTestsFindImageOverlaps.cpp index a66cbd84ab..13c1ef352b 100644 --- a/isis/tests/FuntionalTestsFindImageOverlaps.cpp +++ b/isis/tests/FuntionalTestsFindImageOverlaps.cpp @@ -21,7 +21,7 @@ TEST_F(ThreeImageNetwork, FunctionalTestFindImageOverlapsNoOverlap) { std::ifstream i(isdPath2->expanded().toStdString()); i >> newIsd2; - newIsd2["InstrumentPosition"]["Positions"] = {{1,1,1}, {2,2,2}, {3,3,3}}; + newIsd2["instrument_position"]["positions"] = {{1,1,1}, {2,2,2}, {3,3,3}}; newCube2.fromIsd(tempDir.path()+"/new2.cub", *cube2->label(), newIsd2, "rw"); ImagePolygon fp2; diff --git a/isis/tests/Hyabusa2OncCameraTests.cpp b/isis/tests/Hyabusa2OncCameraTests.cpp index 8a28fe0b4c..3cfe1abc2c 100644 --- a/isis/tests/Hyabusa2OncCameraTests.cpp +++ b/isis/tests/Hyabusa2OncCameraTests.cpp @@ -24,6 +24,7 @@ void testCamera(Cube &c, double knownLat, double knownLon, double s2, double l2, double s3, double l3, double s4, double l4); + void testLineSamp(Camera *cam, double sample, double line); class Hayabusa2Cube : public DefaultCube { diff --git a/isis/tests/SpiceTests.cpp b/isis/tests/SpiceTests.cpp index 1f84c99b2f..43536e4964 100644 --- a/isis/tests/SpiceTests.cpp +++ b/isis/tests/SpiceTests.cpp @@ -22,84 +22,84 @@ class ConstVelIsd : public ::testing::Test { void SetUp() { constVelIsdStr = json::parse(R"( - {"CameraVersion": 2, - "NaifKeywords": { + {"isis_camera_version": 2, + "naif_keywords": { "BODY301_RADII": [ 1000, 2000, 3000 ], "BODY_FRAME_CODE": 31001, "BODY_CODE": 301, "INS-85600_FOCAL_LENGTH" : 699.62, "INS-85600_CK_FRAME_ID": -85000, "FRAME_-85600_NAME": "LRO_LROCNACL" - }, - "InstrumentPointing": { - "TimeDependentFrames": [-85600, -85000, 1], - "CkTableStartTime": 100, - "CkTableEndTime": 100.1, - "CkTableOriginalSize": 2, - "EphemerisTimes": [ + }, + "instrument_pointing": { + "time_dependent_frames": [-85600, -85000, 1], + "ck_table_start_time": 100, + "ck_table_end_time": 100.1, + "ck_table_original_size": 2, + "ephemeris_times": [ 100, 100.1 ], - "Quaternions": [ + "quaternions": [ [0.0, -0.660435174378928, 0, 0.750883067090392], [0.0, -0.660435174378928, 0, 0.750883067090392] ], - "AngularVelocity": [ + "angular_velocity": [ [0, 0, 0], [0, 0, 0] ], - "ConstantFrames": [-85600], - "ConstantRotation": [1, 0, 0, 0, 1, 0, 0, 0, 1] + "constant_frames": [-85600], + "constant_rotation": [1, 0, 0, 0, 1, 0, 0, 0, 1] }, - "BodyRotation": { - "TimeDependentFrames": [31006, 1], - "CkTableStartTime": 100, - "CkTableEndTime": 100.1, - "CkTableOriginalSize": 2, - "EphemerisTimes": [ + "body_rotation": { + "time_dependent_frames": [31006, 1], + "ck_table_start_time": 100, + "ck_table_end_time": 100.1, + "ck_table_original_size": 2, + "ephemeris_times": [ 100, 100.1 ], - "Quaternions": [ + "quaternions": [ [ 0, 0.8509035, 0, 0.525322 ], [ 0, 0.8509035, 0, 0.525322 ] ], - "AngularVelocity": [ + "angular_velocity": [ [0, 0, 0], [0, 0, 0] ], - "ConstantFrames": [31001, 31007, 31006], - "ConstantRotation": [-0.4480736, 0, 0.8939967, 0, 1, 0, -0.8939967, 0, -0.4480736] + "constant_frames": [31001, 31007, 31006], + "constant_rotation": [-0.4480736, 0, 0.8939967, 0, 1, 0, -0.8939967, 0, -0.4480736] }, - "InstrumentPosition": { - "SpkTableStartTime": 100, - "SpkTableEndTime": 100.1, - "SpkTableOriginalSize": 2, - "EphemerisTimes": [ + "instrument_position": { + "spk_table_start_time": 100, + "spk_table_end_time": 100.1, + "spk_table_original_size": 2, + "ephemeris_times": [ 100, 100.1 ], - "Positions": [ + "positions": [ [1000, 0, 0], [1000, 0, 0] ], - "Velocities": [ + "velocities": [ [0, 0, 0], [0, 0, 0] ] }, - "SunPosition": { - "SpkTableStartTime": 100, - "SpkTableEndTime": 100.1, - "SpkTableOriginalSize": 2, - "EphemerisTimes": [ + "sun_position": { + "spk_table_start_time": 100, + "spk_table_end_time": 100.1, + "spk_table_original_size": 2, + "ephemeris_times": [ 100, 100.1 ], - "Positions": [ + "positions": [ [0, 20, 0] ], - "Velocities": [ + "velocities": [ [10,10,10] ] } diff --git a/isis/tests/data/LineScannerImage/defaultLineScanner.isd b/isis/tests/data/LineScannerImage/defaultLineScanner.isd index bd44240ee0..d7fff45153 100644 --- a/isis/tests/data/LineScannerImage/defaultLineScanner.isd +++ b/isis/tests/data/LineScannerImage/defaultLineScanner.isd @@ -1 +1 @@ -{"CameraVersion": 1, "NaifKeywords": {"BODY301_RADII": [1737.4, 1737.4, 1737.4], "BODY_FRAME_CODE": 31001, "BODY_CODE": 301, "INS-131371_FOV_SHAPE": "RECTANGLE", "INS-131371_TRANSX": [0.0, 0.0, -0.007], "INS-131371_TRANSY": [0.0, -0.007, 0.0], "INS-131371_PIXEL_SIZE": 0.007, "INS-131371_FOV_FRAME": "LISM_TC2_HEAD", "INS-131371_BORESIGHT_SAMPLE": 2048.0, "INS-131371_PIXEL_SAMPLES": 4096.0, "INS-131371_ITRANSL": [0.0, -142.857142857, 0.0], "INS-131371_ITRANSS": [0.0, 0.0, -142.857142857], "INS-131371_F_NUMBER": 4.0, "INS-131371_PIXEL_PITCH": 0.007, "INS-131371_CENTER": [2048.5, 1.0], "INS-131371_LT_SURFACE_CORRECT": "FALSE", "INS-131371_SWAP_OBSERVER_TARGET": "TRUE", "INS-131371_LIGHTTIME_CORRECTION": "NONE", "INS-131371_FOV_BOUNDARY_CORNERS": [-0.0439, 14.3486, 72.63, -0.0509, 14.3486, 72.63, -0.0509, -14.3234, 72.63, -0.0439], "INS-131371_DISTORTION_COEF_X": [0.0029786, 7.7836e-05, 3.9265e-06, -4.4088e-06], "INS-131371_DISTORTION_COEF_Y": [0.0009241, -0.00011994000000000001, 2.9281000000000003e-05, -3.7239e-07], "INS-131371_BORESIGHT": [-0.0474, 0.0126, 72.63], "INS-131371_FOCAL_LENGTH": 72.63, "INS-131371_BORESIGHT_LINE": 0.5, "INS-131371_PIXEL_LINES": 1.0, "BODY301_POLE_RA": [269.9949, 0.0031, 0.0], "BODY301_NUT_PREC_PM": [3.561, 0.1208, -0.0642, 0.0158, 0.0252, -0.0066, -0.0047, -0.0046, 0.0028, 0.0052], "BODY301_NUT_PREC_RA": [-3.8787000000000003, -0.1204, 0.07, -0.0172, 0.0, 0.0072, 0.0, 0.0, 0.0, -0.0052], "BODY301_LONG_AXIS": 0.0, "BODY301_NUT_PREC_DEC": [1.5419, 0.0239, -0.0278, 0.0068, 0.0, -0.0029, 0.0009, 0.0, 0.0, 0.0008], "BODY301_POLE_DEC": [66.5392, 0.013, 0.0], "BODY301_PM": [38.3213, 13.17635815, -1.3999999999999999e-12]}, "InstrumentPointing": {"TimeDependentFrames": [-131000, 1], "CkTableStartTime": 266722396.0643095, "CkTableEndTime": 266722396.08380935, "CkTableOriginalSize": 3, "EphemerisTimes": [266722396.0643095, 266722396.07405943, 266722396.08380935], "Quaternions": [[-0.07258178603278033, -0.7585172886441466, -0.20634853751680124, 0.6138433743463404], [-0.07258093817800686, -0.758514789204515, -0.20634857716124952, 0.613846549778329], [-0.07258009031162928, -0.7585122897213898, -0.20634861680266406, 0.6138497252386755]], "AngularVelocity": [[0.0022430600523948674, 0.0024569399476051332, 0.002917674499750139], [0.002234285151958466, 0.002465714848041535, 0.0029084121048450476], [0.0022255101442337044, 0.002474489855766297, 0.002899149596691133]], "ConstantFrames": [-131370, -131320, -131000], "ConstantRotation": [0.9656985673997477, 0.0004905793956105436, 0.2596652388247834, -0.00017391330559124002, 0.9999992129874262, -0.0012424889096336862, -0.25966564400443376, 0.0011547105200121683, 0.9656978927011169]}, "BodyRotation": {"TimeDependentFrames": [31006, 1], "CkTableStartTime": 266722396.0643095, "CkTableEndTime": 266722396.08380935, "CkTableOriginalSize": 3, "EphemerisTimes": [266722396.0643095, 266722396.07405943, 266722396.08380935], "Quaternions": [[-0.936287351474061, 0.18636368544486284, -0.049044014917789314, 0.29364818544959587], [-0.9362873476659693, 0.1863636847964222, -0.04904401733836228, 0.29364819759882477], [-0.9362873438578776, 0.18636368414798168, -0.04904401975893525, 0.2936482097480537]], "AngularVelocity": [[4.461810256128659e-08, -1.0067093480197162e-06, 2.463694017891988e-06], [4.461810256885661e-08, -1.006709348029926e-06, 2.463694017890467e-06], [4.461810257642673e-08, -1.0067093480401365e-06, 2.4636940178889463e-06]], "ConstantFrames": [31001, 31007, 31006], "ConstantRotation": [0.9999998732547144, -0.00032928542237557133, 0.00038086961867138755, 0.00032928600021094723, 0.9999999457843062, -1.4544409378362713e-06, -0.00038086911909607826, 1.5798557868269087e-06, 0.9999999274681067]}, "InstrumentPosition": {"SpkTableStartTime": 266722396.0643095, "SpkTableEndTime": 266722396.08380935, "SpkTableOriginalSize": 3, "EphemerisTimes": [266722396.0643095, 266722396.07405943, 266722396.08380935], "Positions": [[1754.316476671243, 258.61475417125087, 437.92308833352314], [1754.319021749069, 258.62120353743677, 437.9086303378481], [1754.3215666926658, 258.6276528838555, 437.89417230867934]], "Velocities": [[0.2610422280584062, 0.6614800902405181, -1.4828820831912195], [0.26102846094480053, 0.6614780628557761, -1.482885518642688], [0.2610146938087066, 0.6614760354201006, -1.4828889539812709]]}, "SunPosition": {"SpkTableStartTime": 266722396.07405943, "SpkTableEndTime": 266722396.07405943, "SpkTableOriginalSize": 1, "EphemerisTimes": [266722396.07405943], "Positions": [[16892830.68946849, 138798081.1105639, 60210916.96805835]], "Velocities": [[-29.702056155683298, 3.7793859578794873, 1.6599285017040675]]}} \ No newline at end of file +{"isis_camera_version": 1, "naif_keywords": {"BODY301_RADII": [1737.4, 1737.4, 1737.4], "BODY_FRAME_CODE": 31001, "BODY_CODE": 301, "INS-131371_FOV_SHAPE": "RECTANGLE", "INS-131371_TRANSX": [0.0, 0.0, -0.007], "INS-131371_TRANSY": [0.0, -0.007, 0.0], "INS-131371_PIXEL_SIZE": 0.007, "INS-131371_FOV_FRAME": "LISM_TC2_HEAD", "INS-131371_BORESIGHT_SAMPLE": 2048.0, "INS-131371_PIXEL_SAMPLES": 4096.0, "INS-131371_ITRANSL": [0.0, -142.857142857, 0.0], "INS-131371_ITRANSS": [0.0, 0.0, -142.857142857], "INS-131371_F_NUMBER": 4.0, "INS-131371_PIXEL_PITCH": 0.007, "INS-131371_CENTER": [2048.5, 1.0], "INS-131371_LT_SURFACE_CORRECT": "FALSE", "INS-131371_SWAP_OBSERVER_TARGET": "TRUE", "INS-131371_LIGHTTIME_CORRECTION": "NONE", "INS-131371_FOV_BOUNDARY_CORNERS": [-0.0439, 14.3486, 72.63, -0.0509, 14.3486, 72.63, -0.0509, -14.3234, 72.63, -0.0439], "INS-131371_DISTORTION_COEF_X": [0.0029786, 7.7836e-05, 3.9265e-06, -4.4088e-06], "INS-131371_DISTORTION_COEF_Y": [0.0009241, -0.00011994000000000001, 2.9281000000000003e-05, -3.7239e-07], "INS-131371_BORESIGHT": [-0.0474, 0.0126, 72.63], "INS-131371_FOCAL_LENGTH": 72.63, "INS-131371_BORESIGHT_LINE": 0.5, "INS-131371_PIXEL_LINES": 1.0, "BODY301_POLE_RA": [269.9949, 0.0031, 0.0], "BODY301_NUT_PREC_PM": [3.561, 0.1208, -0.0642, 0.0158, 0.0252, -0.0066, -0.0047, -0.0046, 0.0028, 0.0052], "BODY301_NUT_PREC_RA": [-3.8787000000000003, -0.1204, 0.07, -0.0172, 0.0, 0.0072, 0.0, 0.0, 0.0, -0.0052], "BODY301_LONG_AXIS": 0.0, "BODY301_NUT_PREC_DEC": [1.5419, 0.0239, -0.0278, 0.0068, 0.0, -0.0029, 0.0009, 0.0, 0.0, 0.0008], "BODY301_POLE_DEC": [66.5392, 0.013, 0.0], "BODY301_PM": [38.3213, 13.17635815, -1.3999999999999999e-12]}, "instrument_pointing": {"time_dependent_frames": [-131000, 1], "ck_table_start_time": 266722396.0643095, "ck_table_end_time": 266722396.08380935, "ck_table_original_size": 3, "ephemeris_times": [266722396.0643095, 266722396.07405943, 266722396.08380935], "quaternions": [[-0.07258178603278033, -0.7585172886441466, -0.20634853751680124, 0.6138433743463404], [-0.07258093817800686, -0.758514789204515, -0.20634857716124952, 0.613846549778329], [-0.07258009031162928, -0.7585122897213898, -0.20634861680266406, 0.6138497252386755]], "angular_velocity": [[0.0022430600523948674, 0.0024569399476051332, 0.002917674499750139], [0.002234285151958466, 0.002465714848041535, 0.0029084121048450476], [0.0022255101442337044, 0.002474489855766297, 0.002899149596691133]], "constant_frames": [-131370, -131320, -131000], "constant_rotation": [0.9656985673997477, 0.0004905793956105436, 0.2596652388247834, -0.00017391330559124002, 0.9999992129874262, -0.0012424889096336862, -0.25966564400443376, 0.0011547105200121683, 0.9656978927011169]}, "body_rotation": {"time_dependent_frames": [31006, 1], "ck_table_start_time": 266722396.0643095, "ck_table_end_time": 266722396.08380935, "ck_table_original_size": 3, "ephemeris_times": [266722396.0643095, 266722396.07405943, 266722396.08380935], "quaternions": [[-0.936287351474061, 0.18636368544486284, -0.049044014917789314, 0.29364818544959587], [-0.9362873476659693, 0.1863636847964222, -0.04904401733836228, 0.29364819759882477], [-0.9362873438578776, 0.18636368414798168, -0.04904401975893525, 0.2936482097480537]], "angular_velocity": [[4.461810256128659e-08, -1.0067093480197162e-06, 2.463694017891988e-06], [4.461810256885661e-08, -1.006709348029926e-06, 2.463694017890467e-06], [4.461810257642673e-08, -1.0067093480401365e-06, 2.4636940178889463e-06]], "constant_frames": [31001, 31007, 31006], "constant_rotation": [0.9999998732547144, -0.00032928542237557133, 0.00038086961867138755, 0.00032928600021094723, 0.9999999457843062, -1.4544409378362713e-06, -0.00038086911909607826, 1.5798557868269087e-06, 0.9999999274681067]}, "instrument_position": {"spk_table_start_time": 266722396.0643095, "spk_table_end_time": 266722396.08380935, "spk_table_original_size": 3, "ephemeris_times": [266722396.0643095, 266722396.07405943, 266722396.08380935], "positions": [[1754.316476671243, 258.61475417125087, 437.92308833352314], [1754.319021749069, 258.62120353743677, 437.9086303378481], [1754.3215666926658, 258.6276528838555, 437.89417230867934]], "velocities": [[0.2610422280584062, 0.6614800902405181, -1.4828820831912195], [0.26102846094480053, 0.6614780628557761, -1.482885518642688], [0.2610146938087066, 0.6614760354201006, -1.4828889539812709]]}, "sun_position": {"spk_table_start_time": 266722396.07405943, "spk_table_end_time": 266722396.07405943, "spk_table_original_size": 1, "ephemeris_times": [266722396.07405943], "positions": [[16892830.68946849, 138798081.1105639, 60210916.96805835]], "velocities": [[-29.702056155683298, 3.7793859578794873, 1.6599285017040675]]}} diff --git a/isis/tests/data/defaultImage/defaultCube.isd b/isis/tests/data/defaultImage/defaultCube.isd index 0a8764f1fb..9adff719b8 100644 --- a/isis/tests/data/defaultImage/defaultCube.isd +++ b/isis/tests/data/defaultImage/defaultCube.isd @@ -1,6 +1,6 @@ { - "CameraVersion": 1, - "NaifKeywords": { + "isis_camera_version": 1, + "naif_keywords": { "BODY_CODE": 499, "BODY499_RADII": [ 3396.19, @@ -30,18 +30,18 @@ 85.0 ] }, - "InstrumentPointing": { - "TimeDependentFrames": [ + "instrument_pointing": { + "time_dependent_frames": [ -27000, 1 ], - "CkTableStartTime": -709401200.2611448, - "CkTableEndTime": -709401200.2611448, - "CkTableOriginalSize": 1, - "EphemerisTimes": [ + "ck_table_start_time": -709401200.2611448, + "ck_table_end_time": -709401200.2611448, + "ck_table_original_size": 1, + "ephemeris_times": [ -709401200.2611448 ], - "Quaternions": [ + "quaternions": [ [ 0.31520810249542935, -0.9166503199522611, @@ -49,18 +49,18 @@ -0.18786937311160073 ] ], - "AngularVelocity": [ + "angular_velocity": [ [ 0.0, 0.0, 0.0 ] ], - "ConstantFrames": [ + "constant_frames": [ -27002, -27000 ], - "ConstantRotation": [ + "constant_rotation": [ -0.0003979349968896706, 0.9999292841798486, -0.011885633652183106, @@ -72,18 +72,18 @@ 0.9999292100388355 ] }, - "BodyRotation": { - "TimeDependentFrames": [ + "body_rotation": { + "time_dependent_frames": [ 10014, 1 ], - "CkTableStartTime": -709401200.2611448, - "CkTableEndTime": -709401200.2611448, - "CkTableOriginalSize": 1, - "EphemerisTimes": [ + "ck_table_start_time": -709401200.2611448, + "ck_table_end_time": -709401200.2611448, + "ck_table_original_size": 1, + "ephemeris_times": [ -709401200.2611448 ], - "Quaternions": [ + "quaternions": [ [ 0.53600001724021, 0.07306205657296709, @@ -91,7 +91,7 @@ 0.7819827021000583 ] ], - "AngularVelocity": [ + "angular_velocity": [ [ 3.1626696613081345e-05, -2.8772751199032417e-05, @@ -99,21 +99,21 @@ ] ] }, - "InstrumentPosition": { - "SpkTableStartTime": -709401200.2611448, - "SpkTableEndTime": -709401200.2611448, - "SpkTableOriginalSize": 1, - "EphemerisTimes": [ + "instrument_position": { + "spk_table_start_time": -709401200.2611448, + "spk_table_end_time": -709401200.2611448, + "spk_table_original_size": 1, + "ephemeris_times": [ -709401200.2611448 ], - "Positions": [ + "positions": [ [ -2314.3697349186045, 1641.5929356131498, 3043.112681407324 ] ], - "Velocities": [ + "velocities": [ [ -4.130724817121533, -0.7713952678774164, @@ -121,21 +121,21 @@ ] ] }, - "SunPosition": { - "SpkTableStartTime": -709401200.2611448, - "SpkTableEndTime": -709401200.2611448, - "SpkTableOriginalSize": 1, - "EphemerisTimes": [ + "sun_position": { + "spk_table_start_time": -709401200.2611448, + "spk_table_end_time": -709401200.2611448, + "spk_table_original_size": 1, + "ephemeris_times": [ -709401200.2611448 ], - "Positions": [ + "positions": [ [ -199122331.6742814, -67302869.13807923, -25474695.77623297 ] ], - "Velocities": [ + "velocities": [ [ 7.293383953631856, -22.524325637284665, @@ -143,4 +143,4 @@ ] ] } -} \ No newline at end of file +} diff --git a/isis/tests/data/threeImageNetwork/cube1.isd b/isis/tests/data/threeImageNetwork/cube1.isd index ec1d9af868..5684f7aa25 100644 --- a/isis/tests/data/threeImageNetwork/cube1.isd +++ b/isis/tests/data/threeImageNetwork/cube1.isd @@ -1,6 +1,6 @@ { - "CameraVersion": 1, - "NaifKeywords": { + "isis_camera_version": 1, + "naif_keywords": { "BODY_CODE": 499, "BODY499_RADII": [ 3396.19, @@ -32,15 +32,15 @@ 0.0 ] }, - "InstrumentPointing": { - "TimeDependentFrames": [ + "instrument_pointing": { + "time_dependent_frames": [ -94000, 1 ], - "CkTableStartTime": 57345753.41254357, - "CkTableEndTime": 57345797.412537105, - "CkTableOriginalSize": 12, - "EphemerisTimes": [ + "ck_table_start_time": 57345753.41254357, + "ck_table_end_time": 57345797.412537105, + "ck_table_original_size": 12, + "ephemeris_times": [ 57345753.41254357, 57345757.412542984, 57345761.412542395, @@ -54,7 +54,7 @@ 57345793.412537694, 57345797.412537105 ], - "Quaternions": [ + "quaternions": [ [ 0.39560723871934095, 0.002543915547405817, @@ -128,7 +128,7 @@ -0.282771910736018 ] ], - "AngularVelocity": [ + "angular_velocity": [ [ -0.00010791818838034288, 0.0007403987312518469, @@ -190,11 +190,11 @@ 0.0004544935032716655 ] ], - "ConstantFrames": [ + "constant_frames": [ -94032, -94000 ], - "ConstantRotation": [ + "constant_rotation": [ 0.9998746454987442, -0.01386759067459899, 0.007640891155002286, @@ -206,19 +206,19 @@ 0.9998016874925517 ] }, - "BodyRotation": { - "TimeDependentFrames": [ + "body_rotation": { + "time_dependent_frames": [ 10014, 1 ], - "CkTableStartTime": 57345756.56332419, - "CkTableEndTime": 57345795.19372419, - "CkTableOriginalSize": 2, - "EphemerisTimes": [ + "ck_table_start_time": 57345756.56332419, + "ck_table_end_time": 57345795.19372419, + "ck_table_original_size": 2, + "ephemeris_times": [ 57345756.56332419, 57345795.19372419 ], - "Quaternions": [ + "quaternions": [ [ 0.16259508712075812, 0.19507578814318294, @@ -232,7 +232,7 @@ 0.9337347048229626 ] ], - "AngularVelocity": [ + "angular_velocity": [ [ 3.162454196512495e-05, -2.8796806937405154e-05, @@ -245,16 +245,16 @@ ] ] }, - "InstrumentPosition": { - "SpkTableStartTime": 57345756.56332419, - "SpkTableEndTime": 57345795.19372419, - "SpkTableOriginalSize": 3, - "EphemerisTimes": [ + "instrument_position": { + "spk_table_start_time": 57345756.56332419, + "spk_table_end_time": 57345795.19372419, + "spk_table_original_size": 3, + "ephemeris_times": [ 57345756.56332419, 57345775.87852419, 57345795.19372419 ], - "Positions": [ + "positions": [ [ -3224.660848158962, -1579.8820847949596, @@ -271,7 +271,7 @@ 1303.818495003927 ] ], - "Velocities": [ + "velocities": [ [ 1.5628364874133902, -1.177618181741141, @@ -289,15 +289,15 @@ ] ] }, - "SunPosition": { - "SpkTableStartTime": 57345756.56332419, - "SpkTableEndTime": 57345795.19372419, - "SpkTableOriginalSize": 2, - "EphemerisTimes": [ + "sun_position": { + "spk_table_start_time": 57345756.56332419, + "spk_table_end_time": 57345795.19372419, + "spk_table_original_size": 2, + "ephemeris_times": [ 57345756.56332419, 57345795.19372419 ], - "Positions": [ + "positions": [ [ -199550116.6918371, 47316995.30654406, @@ -309,7 +309,7 @@ 27096372.01931588 ] ], - "Velocities": [ + "velocities": [ [ -7.28188692220347, -23.20890830715373, diff --git a/isis/tests/data/threeImageNetwork/cube2.isd b/isis/tests/data/threeImageNetwork/cube2.isd index 978a2c9e89..f9cd10f174 100644 --- a/isis/tests/data/threeImageNetwork/cube2.isd +++ b/isis/tests/data/threeImageNetwork/cube2.isd @@ -1,6 +1,6 @@ { - "CameraVersion": 1, - "NaifKeywords": { + "isis_camera_version": 1, + "naif_keywords": { "BODY_CODE": 499, "BODY499_RADII": [ 3396.19, @@ -32,15 +32,15 @@ 0.0 ] }, - "InstrumentPointing": { - "TimeDependentFrames": [ + "instrument_pointing": { + "time_dependent_frames": [ -94000, 1 ], - "CkTableStartTime": 60009029.02132867, - "CkTableEndTime": 60009073.02132221, - "CkTableOriginalSize": 12, - "EphemerisTimes": [ + "ck_table_start_time": 60009029.02132867, + "ck_table_end_time": 60009073.02132221, + "ck_table_original_size": 12, + "ephemeris_times": [ 60009029.02132867, 60009033.021328084, 60009037.021327496, @@ -54,7 +54,7 @@ 60009069.021322794, 60009073.02132221 ], - "Quaternions": [ + "quaternions": [ [ 0.40693445003466444, 0.09370103307741508, @@ -128,7 +128,7 @@ -0.3778959357220759 ] ], - "AngularVelocity": [ + "angular_velocity": [ [ -0.00040284417832488114, 0.0006373852214281113, @@ -190,11 +190,11 @@ 0.0004598654565784397 ] ], - "ConstantFrames": [ + "constant_frames": [ -94032, -94000 ], - "ConstantRotation": [ + "constant_rotation": [ 0.9998746454987442, -0.01386759067459899, 0.007640891155002286, @@ -206,19 +206,19 @@ 0.9998016874925517 ] }, - "BodyRotation": { - "TimeDependentFrames": [ + "body_rotation": { + "time_dependent_frames": [ 10014, 1 ], - "CkTableStartTime": 60009030.54710953, - "CkTableEndTime": 60009069.17750953, - "CkTableOriginalSize": 2, - "EphemerisTimes": [ + "ck_table_start_time": 60009030.54710953, + "ck_table_end_time": 60009069.17750953, + "ck_table_original_size": 2, + "ephemeris_times": [ 60009030.54710953, 60009069.17750953 ], - "Quaternions": [ + "quaternions": [ [ 0.29273270866157947, 0.15764863994086384, @@ -232,7 +232,7 @@ 0.9012758952381467 ] ], - "AngularVelocity": [ + "angular_velocity": [ [ 3.162453445077168e-05, -2.8796890497762457e-05, @@ -245,16 +245,16 @@ ] ] }, - "InstrumentPosition": { - "SpkTableStartTime": 60009030.54710953, - "SpkTableEndTime": 60009069.17750953, - "SpkTableOriginalSize": 3, - "EphemerisTimes": [ + "instrument_position": { + "spk_table_start_time": 60009030.54710953, + "spk_table_end_time": 60009069.17750953, + "spk_table_original_size": 3, + "ephemeris_times": [ 60009030.54710953, 60009049.86230953, 60009069.17750953 ], - "Positions": [ + "positions": [ [ -2864.8218379130535, -2395.6108663245764, @@ -271,7 +271,7 @@ 719.6840669870414 ] ], - "Velocities": [ + "velocities": [ [ 1.5289903270898393, -1.1646169362680832, @@ -289,15 +289,15 @@ ] ] }, - "SunPosition": { - "SpkTableStartTime": 60009030.54710953, - "SpkTableEndTime": 60009069.17750953, - "SpkTableOriginalSize": 2, - "EphemerisTimes": [ + "sun_position": { + "spk_table_start_time": 60009030.54710953, + "spk_table_end_time": 60009069.17750953, + "spk_table_original_size": 2, + "ephemeris_times": [ 60009030.54710953, 60009069.17750953 ], - "Positions": [ + "positions": [ [ -208160310.7093076, -15893543.022472382, @@ -309,7 +309,7 @@ -1663361.3085369645 ] ], - "Velocities": [ + "velocities": [ [ 0.8354733466372126, -23.84032456833683, diff --git a/isis/tests/data/threeImageNetwork/cube3.isd b/isis/tests/data/threeImageNetwork/cube3.isd index bd67caa9af..46ae685a63 100644 --- a/isis/tests/data/threeImageNetwork/cube3.isd +++ b/isis/tests/data/threeImageNetwork/cube3.isd @@ -1,6 +1,6 @@ { - "CameraVersion": 1, - "NaifKeywords": { + "isis_camera_version": 1, + "naif_keywords": { "BODY_CODE": 499, "BODY499_RADII": [ 3396.19, @@ -32,15 +32,15 @@ 0.0 ] }, - "InstrumentPointing": { - "TimeDependentFrames": [ + "instrument_pointing": { + "time_dependent_frames": [ -94000, 1 ], - "CkTableStartTime": 87174528.8705133, - "CkTableEndTime": 87174568.87050696, - "CkTableOriginalSize": 11, - "EphemerisTimes": [ + "ck_table_start_time": 87174528.8705133, + "ck_table_end_time": 87174568.87050696, + "ck_table_original_size": 11, + "ephemeris_times": [ 87174528.8705133, 87174532.87051266, 87174536.87051204, @@ -53,7 +53,7 @@ 87174564.8705076, 87174568.87050696 ], - "Quaternions": [ + "quaternions": [ [ 0.12581038781350534, 0.6406424399561862, @@ -121,7 +121,7 @@ -0.6823688904629003 ] ], - "AngularVelocity": [ + "angular_velocity": [ [ 0.0002065094235121068, -0.0006759077796039037, @@ -178,11 +178,11 @@ -0.0005166682152265915 ] ], - "ConstantFrames": [ + "constant_frames": [ -94032, -94000 ], - "ConstantRotation": [ + "constant_rotation": [ 0.9998746454987442, -0.01386759067459899, 0.007640891155002286, @@ -194,19 +194,19 @@ 0.9998016874925517 ] }, - "BodyRotation": { - "TimeDependentFrames": [ + "body_rotation": { + "time_dependent_frames": [ 10014, 1 ], - "CkTableStartTime": 87174529.64629424, - "CkTableEndTime": 87174568.27669424, - "CkTableOriginalSize": 2, - "EphemerisTimes": [ + "ck_table_start_time": 87174529.64629424, + "ck_table_end_time": 87174568.27669424, + "ck_table_original_size": 2, + "ephemeris_times": [ 87174529.64629424, 87174568.27669424 ], - "Quaternions": [ + "quaternions": [ [ 0.9308240822213619, -0.2549921202399327, @@ -220,7 +220,7 @@ -0.18093657295008497 ] ], - "AngularVelocity": [ + "angular_velocity": [ [ 3.1624457792113795e-05, -2.879774281803634e-05, @@ -233,16 +233,16 @@ ] ] }, - "InstrumentPosition": { - "SpkTableStartTime": 87174529.64629424, - "SpkTableEndTime": 87174568.27669424, - "SpkTableOriginalSize": 3, - "EphemerisTimes": [ + "instrument_position": { + "spk_table_start_time": 87174529.64629424, + "spk_table_end_time": 87174568.27669424, + "spk_table_original_size": 3, + "ephemeris_times": [ 87174529.64629424, 87174548.96149424, 87174568.27669424 ], - "Positions": [ + "positions": [ [ 3358.1610455693144, 1538.8001589071823, @@ -259,7 +259,7 @@ -725.6570999899571 ] ], - "Velocities": [ + "velocities": [ [ 1.3975653521284683, -1.5714265645896175, @@ -277,15 +277,15 @@ ] ] }, - "SunPosition": { - "SpkTableStartTime": 87174529.64629424, - "SpkTableEndTime": 87174568.27669424, - "SpkTableOriginalSize": 2, - "EphemerisTimes": [ + "sun_position": { + "spk_table_start_time": 87174529.64629424, + "spk_table_end_time": 87174568.27669424, + "spk_table_original_size": 2, + "ephemeris_times": [ 87174529.64629424, 87174568.27669424 ], - "Positions": [ + "positions": [ [ 237858169.72921923, -64521076.64051085, @@ -297,7 +297,7 @@ -36021479.07972962 ] ], - "Velocities": [ + "velocities": [ [ 6.246446793600917, 19.22500582446158,