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. -
- 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
- 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.
+ 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. +
+ 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. +
- -- 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.
- #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 -
- conda install -c usgs-astrogeology isis3 -
- #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 -
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:
-- 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. -
- - -Here are the minimum hardware requirements
-To build and compile ISIS3 requires following the instructions listed below, which are given on - the GitHub wiki page for the ISIS3 project: -
- 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. -
- - --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. -
- - - -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. -
- -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. -
- -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. -
- - -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. -
- - - -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 . -- -
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 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 . -- -
- If you are looking for ISIS2, please - refer to the ISIS 2 Installation - Guide for instructions on downloading and installing ISIS 2. -
- -- 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. +