isofit.data.cli.sixs
Downloads 6S from https://github.com/isofit/6S
Attributes
Functions
|
Checks if gfortran is installed before downloading SixS |
|
Patch the 6S Makefile to: |
|
Builds a 6S directory via make |
|
Downloads MinGW64 for Windows |
|
Downloads 6S from https://github.com/isofit/6S. |
|
Validates a 6S installation |
|
Checks for an update and executes a new download if it is needed |
|
Downloads 6S from https://github.com/isofit/6S. Only HDF5 versions are supported at this time. |
|
Validates the installation of 6S |
Module Contents
- MINGW = 'https://github.com/brechtsanders/winlibs_mingw/releases/download/15.2.0posix-13.0.0-msvcrt-r2/wi...[source]
- precheck()[source]
Checks if gfortran is installed before downloading SixS
- Returns:
True if gfortran –version returns a valid response, None otherwise
- Return type:
True or None
- patch_makefile(file)[source]
Patch the 6S Makefile to: - Add -std=legacy to the EXTRAS (isofit)
- Parameters:
file (pathlib.Path) – Makefile to patch inplace
- make(directory, stdout=subprocess.PIPE, stderr=subprocess.PIPE, debug=False)[source]
Builds a 6S directory via make
- Parameters:
directory (str) – 6S directory to build
- download_mingw(path=None, tag='latest', overwrite=False, **_)[source]
Downloads MinGW64 for Windows
- download(path=None, tag='latest', overwrite=False, debug_make=False, **_)[source]
Downloads 6S from https://github.com/isofit/6S.
- validate(path=None, checkForUpdate=True, debug=print, error=print, **_)[source]
Validates a 6S installation
- Parameters:
path (str, default=None) – Path to verify. If None, defaults to the ini path
checkForUpdate (bool, default=True) – Checks for updates if the path is valid
debug (function, default=print) – Print function to use for debug messages, eg. logging.debug
error (function, default=print) – Print function to use for error messages, eg. logging.error
**_ (dict) – Ignores unused params that may be used by other validate functions. This is to maintain compatibility with env.validate
- Returns:
True if valid, False otherwise
- Return type:
- update(check=False, **kwargs)[source]
Checks for an update and executes a new download if it is needed Note: Not implemented for this module at this time
- download_cli(debug_make, mingw, **kwargs)[source]
Downloads 6S from https://github.com/isofit/6S. Only HDF5 versions are supported at this time.
Run isofit download paths to see default path locations. There are two ways to specify output directory:
isofit –sixs /path/sixs download sixs: Override the ini file. This will save the provided path for future reference.
isofit download sixs –path /path/sixs: Temporarily set the output location. This will not be saved in the ini and may need to be manually set.
It is recommended to use the first style so the download path is remembered in the future.