Skip to content
Snippets Groups Projects
Commit 42225dbb authored by TGermain's avatar TGermain
Browse files

rtd build test

parent 6f021b16
No related branches found
No related tags found
No related merge requests found
Showing
with 244 additions and 0 deletions
# readthedocs.yaml
# RTD configuration file
# Required
version: 2
sphinx:
configuration: rtd/conf.py
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)
if "%1" == "" goto help
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd
rtd/source/Logo_Espace_Dev_-_coul.png

30.6 KiB

=====================
automatization
=====================
.. automodule:: sen2chain.automatization
:members:
=====================
cloud_mask
=====================
.. automodule:: sen2chain.cloud_mask
:members:
rtd/source/cnes_logo.png

22 KiB

=====================
colormap
=====================
.. automodule:: sen2chain.colormap
:members:
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'sen2chain'
copyright = '2023, ESPACE-DEV'
author = 'ESPACE-DEV'
release = '0.1'
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
# math
from sphinx_math_dollar import NODE_BLACKLIST
from docutils.nodes import header,FixedTextElement, literal,math
from docutils.nodes import comment, doctest_block, image, literal_block, math_block, paragraph, pending, raw, rubric, substitution_definition, target
math_dollar_node_blacklist = (literal,math,doctest_block, image, literal_block, math_block, pending, raw,rubric, substitution_definition,target)
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = ["myst_parser",'sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.napoleon','sphinx.ext.autosummary','sphinx_math_dollar','sphinx.ext.mathjax']
templates_path = ['_templates']
exclude_patterns = []
autodoc_member_order = 'bysource'
mathjax_config = {
'tex2jax': {
'inlineMath': [ ["\\(","\\)"] ],
'displayMath': [["\\[","\\]"] ],
},
}
mathjax3_config = {
"tex": {
"inlineMath": [['\\(', '\\)']],
"displayMath": [["\\[", "\\]"]],
}
}
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'sphinx_book_theme'
html_permalinks_icon = '<span>#</span>'
html_static_path = ['_static']
=====================
config
=====================
.. automodule:: sen2chain.config
:members:
==================================
Configure sen2cor
==================================
.. toctree::
:maxdepth: 2
:caption: Contents:
sen2cor_2_5
sen2cor_2_8
sen2cor_2_9
sen2cor_2_10
# Sen2cor 2.10
* Download [Sen2Cor v2.10.01](https://step.esa.int/thirdparties/sen2cor/2.10.0/Sen2Cor-02.10.01-Linux64.run) and put it to its final install directory
* Make it executable `chmod +x Sen2Cor-02.10.01-Linux64.run`
* Install Sen2Cor `./Sen2Cor-02.10.01-Linux64.run`
* Update config
* Move or symlink [ESACCI-LC package for SC module](https://earth.esa.int/eogateway/ftp/Sentinel-2/ESACCI-LC-L4-ALL-FOR-SEN2COR-2.10.tar.gz) content to Sen2Cor directory:
* `ln -s /path/to/ESACCI-LC-L4-ALL-FOR-SEN2COR-2.10/ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7.tif /Path/to/Sen2Cor-02.10.01-Linux64/lib/python2.7/site-packages/sen2cor/aux_data`
* `ln -s /path/to/ESACCI-LC-L4-WB-Map-150m-P13Y-2000-v4.0.tif Sen2Cor-02.10.01-Linux64/lib/python2.7/site-packages/sen2cor/aux_data/`
* `ln -s /path/to/ESACCI-LC-L4-Snow-Cond-500m-MONTHLY-2000-2012-v2.4 Sen2Cor-02.10.01-Linux64/lib/python2.7/site-packages/sen2cor/aux_data/`
* Create or symlink DEM directory
* `ln -s /path/to/dem ~/sen2cor/2.10/dem`
* Update Sen2Cor config file `nano ~/sen2cor/2.10/cfg/L2A_GIPP.xml`
* <DEM_Directory>dem/srtm</DEM_Directory>
* <DEM_Reference>http://srtm.csi.cgiar.org/wp-content/uploads/files/srtm_5x5/TIFF/</DEM_Reference>
* <DEM_Terrain_Correction>FALSE</DEM_Terrain_Correction> # If you don't want DEM terrain correction
* Update Sen2Chain config file `nano ~/sen2chain_data/config/config.cfg`
* sen2cor_bashrc_path = /path/to/Sen2Cor-02.10.01-Linux64/L2A_Bashrc
* Of course you have to update Sen2Chain
## Sen2cor 2.5
Sen2Cor v02.05.05 is still supported by Sen2Chain latest version.
Sen2Cor install path (sen2cor_bashrc_path) in config file (\~/sen2chain_data/config/config.cfg) is used to retrieve info of the Sen2Cor version and process L1C accordingly. So please keep the default Sen2Cor install directory name unchanged (ie Sen2Cor-02.0\*.0\*-Linux64) so that Sen2Chain finds this pattern.
_Pas certain de comment configurer 2.5.5 donc le texte suivant n'est peut etre pas utile_
**Sen2Cor default config**\
Sen2Chain will not override your Sen2Cor config. You have to directly edit your Sen2Cor configuration file (default path: `\~/sen2cor/2.5/cfg/L2A_GIPP.xml`) : -> DEM_Directory and DEM_Reference paths in order to auto-download and use DEM correction. If a DEM is used the land cover data should be used to improve Sen2Cor classification algorithms. Please refer to 4.1 of Sen2Cor Configuration and User Manual (http://step.esa.int/thirdparties/sen2cor/2.8.0/docs/S2-PDGS-MPC-L2A-SUM-V2.8.pdf) for more install and configuration infos.\
At SEAS-OI we still don't use the DEM correction as it seems not relevant in high shadow / steep slope environments (as in Reunion Island). Config file example: [L2A_GIPP.xml](/espace-dev/sen2chain/-/wikis/uploads/975660b0f1d6806891c4dd3b36feda7c/L2A_GIPP.xml)
# Sen2cor 2.8
Starting from last tag version (v0.6-rc1), Sen2Chain should be compatible with Sen2Cor v02.08.00 (Sen2Cor v02.05.05 is still supported).
Sen2Cor install path (sen2cor_bashrc_path) in config file (~/sen2chain_data/config/config.cfg) is used to retrieve info of the Sen2Cor version and process L1C accordingly. So please keep the default Sen2Cor install directory name unchanged (ie Sen2Cor-02.0*.0*-Linux64) so that Sen2Chain finds this pattern.
**Sen2Cor default config**\
Sen2Chain will not override your Sen2Cor config. You have to directly edit your Sen2Cor configuration file (default path: `~/sen2cor/2.8/cfg/L2A_GIPP.xml`) :
-> DEM_Directory and DEM_Reference paths in order to auto-download and use DEM correction. If a DEM is used the land cover data should be used to improve Sen2Cor classification algorithms. Please refer to 4.1 of Sen2Cor Configuration and User Manual (http://step.esa.int/thirdparties/sen2cor/2.8.0/docs/S2-PDGS-MPC-L2A-SUM-V2.8.pdf) for more install and configuration infos.
At SEAS-OI we still don't use the DEM correction as it seems not relevant in high shadow / steep slope environments (as in Reunion Island). Config file example: [L2A_GIPP.xml](uploads/975660b0f1d6806891c4dd3b36feda7c/L2A_GIPP.xml)
With Sen2Cor 2.8.0, default L2A naming convention has been changed, we forced it back to the Sen2Cor 2.5.5 way, to preserve compatibility with Sen2Chain functions:
- Sen2Cor 2.8.0 default processing_baseline number is set to 99.99 => Sen2Chain forces it to previous L1C processing_baseline number
- product discriminator is now set to the time the file is processed with Sen2Cor 2.8.0 => Sen2Chain forces it to previous L1C product discriminator
# Sen2cor 2.9
* Download [Sen2Cor v2.09.00 ](http://step.esa.int/main/snap-supported-plugins/sen2cor/sen2cor-v2-9/)and put it to its final install directory
* Make it executable `chmod +x Sen2Cor-02.09.00-Linux64.run`
* Install Sen2Cor `./Sen2Cor-02.09.00-Linux64.run`
* Update config
* Move or symlink <span dir="ltr">ESACCI-LC package for SC module</span> to Sen2Cor directory
* `ln -s /path/to/ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7.tif Sen2Cor-02.09.00-Linux64/lib/python2.7/site-packages/sen2cor/aux_data/`
* `ln -s /path/to/ESACCI-LC-L4-WB-Map-150m-P13Y-2000-v4.0.tif Sen2Cor-02.09.00-Linux64/lib/python2.7/site-packages/sen2cor/aux_data/`
* `ln -s /path/to/ESACCI-LC-L4-Snow-Cond-500m-P13Y7D-2000-2012-v2.0 Sen2Cor-02.09.00-Linux64/lib/python2.7/site-packages/sen2cor/aux_data/`
* Create or symlink DEM directory
* `ln -s /path/to/dem ~/sen2cor/2.9/dem`
* Update Sen2Cor config file `nano ~/sen2cor/2.9/cfg/L2A_GIPP.xml`
* <DEM_Directory>dem/srtm</DEM_Directory>
* <DEM_Reference><http://data_public:GDdci@data.cgiar-csi.org/srtm/tiles/GeoTIFF/></DEM_Reference>
* <DEM_Terrain_Correction>FALSE</DEM_Terrain_Correction> # If you don't want DEM terrain correction
* Update Sen2Chain config file `nano ~/sen2chain_data/config/config.cfg`
* sen2cor_bashrc_path = /path/to/Sen2Cor-02.09.00-Linux64/L2A_Bashrc
==========
Contribute
==========
You can submit your own developments and branches to our 'framagit <https://framagit.org/espace-dev/sen2chain>'
=======
Credits
=======
Sen2chain was developped in the frame of Sentinel-2 Malaria project, funded by `CNES <https://cnes.fr/en>`_ (TOSCA 2017-2019), under the coordination of Vincent Herbreteau (`IRD <https://en.ird.fr>`_ - `UMR ESPACE-DEV <http://www.espace-dev.fr>`_) and Christophe Révillion (`Univ La Réunion <http://www.univ-reunion.fr/university-of-reunion-island>`_ - UMR ESPACE-DEV). This project aims to use Sentinel-2 imagery for malaria monitoring in Madagascar and South Africa.
.. image:: logos.png
:align: center
:alt: logos
\ No newline at end of file
=====================
data_request
=====================
.. automodule:: sen2chain.data_request
:members:
=====================
download_and_process
=====================
.. automodule:: sen2chain.download_and_process
:members:
rtd/source/esdev.png

23.7 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment