Skip to content

Commit

Permalink
Merge branch 'senbox-org:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinaHutter authored Feb 25, 2025
2 parents b7cea43 + cd80f72 commit 54c3b30
Show file tree
Hide file tree
Showing 389 changed files with 1,424 additions and 7,042 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ It is therefore possible, to cover large geographic extent with a __seamless ima
It is worth noting that the overall accuracy of your final ARD product strongly depends on the accuracy of sen2like auxiliary data. Two categories of auxiliary data are important: the raster reference for geometric corrections and the meteorological data for atmospheric corrections. Regarding atmospheric corrections, one possibility is to use data from the Copernicus Atmosphere Monitoring Service [9]. The Sen2Like team prepared a dedicated CAMS monthly dataset for the Year 2020, available from [here](http://185.178.85.51/CAMS/). Please refer to this short [description](http://185.178.85.51/CAMS/Readme_CAMS2020.txt) for additional information.

For further details on the format specification of the harmonized products or the functionalities of the Sen2Like software, please
refer to the [Product Format Specification](sen2like/docs/source/S2-PDGS-MPC-L2HF-PFS-v1.2.pdf), and the [User Manual v1.9](sen2like/docs/source/S2-SEN2LIKE-UM-V1.9.pdf).
refer to the [Product Format Specification](sen2like/docs/source/OMPC.TPZ.S2L.PFS.001%20-%20i1r3%20Level%202HF%20Product%20Format%20Specification.pdf), and the [User Manual v1.10](sen2like/docs/source/S2-SEN2LIKE-UM-V1.10.pdf).

## Publications and Contacts
**Yearning to know more ? Check out**
Expand All @@ -61,7 +61,7 @@ And the following references :
+ [10] Saunier, S.; Pflug, B.; Lobos, I.M.; Franch, B.; Louis, J.; De Los Reyes, R.; Debaecker, V.; Cadau, E.G.; Boccia, V.; Gascon, F.; Kocaman, S. Sen2Like: Paving the Way towards Harmonization and Fusion of Optical Data. Remote Sens. 2022, 14, 3855. (https://doi.org/10.3390/rs14163855)
+ [11] [Sen2Cor3 installation instructions](sen2cor3/README.md)

**Learn how to use Sen2Like**, have a look at the [User Manual](sen2like/docs/source/S2-SEN2LIKE-UM-V1.9.pdf).
**Learn how to use Sen2Like**, have a look at the [User Manual](sen2like/docs/source/S2-SEN2LIKE-UM-V1.10.pdf).

**Get help**, contact us at sen2like@telespazio.com.

Expand Down
44 changes: 22 additions & 22 deletions sen2cor3/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Sen2Cor 3 version 3.01.00
# Sen2Cor 3 version 3.03.00

## Retrieve Sen2cor 3.01.00 documentation from sftp server
## Retrieve Sen2cor 3.03.00 documentation from sftp server

```
hostname = 'sftp.telespazio.fr'
port = 22 # default SFTP port is 22
username = 'sen2cor3'
password = '4sen2like'
remote_path = '/upload/Sen2Cor-3.01.00/Documentation/'
remote_path = '/upload/Sen2Cor-3.03.00/Documentation/'
```

**_Sen2cor 3.01.00 Software Release Note:_**
sftp://sen2cor3@sftp.telespazio.fr/upload/Sen2Cor-3.01.00/Documentation/S2-SEN2LIKE-Sen2Cor_3.01.00-SRN_V1.1.pdf
**_Sen2cor 3.03.00 Software Release Note:_**
sftp://sen2cor3@sftp.telespazio.fr/upload/Sen2Cor-3.03.00/Documentation/OMPC.TPZ.SRN.003%20-%20i1r0%20-%20Sen2Cor%203.03.00%20Software%20Release%20Note.pdf

**_Sen2cor 3.01.00 Software Configuration and User Manual:_**
sftp://sen2cor3@sftp.telespazio.fr/upload/Sen2Cor-3.01.00/Documentation/S2-SEN2LIKE-Sen2Cor_3.01.00-SUM_V1.1.pdf
**_Sen2cor 3.03.00 Software Configuration and User Manual:_**
sftp://sen2cor3@sftp.telespazio.fr/upload/Sen2Cor-3.03.00/Documentation/OMPC.TPZ.SUM.003%20-%20i1r0%20-%20Sen2Cor%203.03.00%20Configuration%20and%20User%20Manual.pdf

## Retrieve Sen2cor 3.01.00 software from sftp server
## Retrieve Sen2cor 3.03.00 software from sftp server

Either with a software like Filezilla:

Expand All @@ -25,29 +25,29 @@ hostname = 'sftp.telespazio.fr'
port = 22 # default SFTP port is 22
username = 'sen2cor3'
password = '4sen2like'
remote_path = '/upload/Sen2Cor-3.01.00/Software/sen2cor_3.1.0_python_3.10_20240313.zip'
remote_path = '/upload/Sen2Cor-3.03.00/Software/sen2cor_3.3.0_python_3.12_20250131.zip'
```

e.g: sftp://sen2cor3@sftp.telespazio.fr/upload/Sen2Cor-3.01.00/Software/sen2cor_3.1.0_python_3.10_20240313.zip
e.g: sftp://sen2cor3@sftp.telespazio.fr/upload/Sen2Cor-3.03.00/Software/sen2cor_3.3.0_python_3.12_20250131.zip

or with the example script "sen2cor3_download.py" based on "paramiko" module.
It requires paramiko version 3.4.0 that could be installed with conda [see below](#create-the-sen2like-conda-environment):
It requires paramiko module that could be installed with conda [see below](#create-the-sen2like-conda-environment):

```
conda activate sen2like
conda install paramiko=3.4.0 -c conda-forge
conda install paramiko -c conda-forge
```

```
python sen2cor3_download.py sen2cor3_install_dir
```

## Unzip sen2cor_3.1.0_python_3.10.zip into the Sen2Cor 3 directory of your choice
## Unzip sen2cor_3.3.0_python_3.12.zip into the Sen2Cor 3 directory of your choice

```
e.g. sen2cor3_install_dir=/opt/sen2cor3/code/
cd $sen2cor3_install_dir
unzip sen2cor_3.1.0_python_3.10.zip
unzip sen2cor_3.3.0_python_3.12.zip
```

## Auxiliary Data Symbolic linking
Expand All @@ -65,7 +65,7 @@ Examples of symbolic linking is given hereafter:


```
cd $sen2cor3_install_dir/sen2cor_3.1.0_python_3.10/SEN2COR_3/aux_data
cd $sen2cor3_install_dir/sen2cor_3.3.0_python_3.12/SEN2COR_3/aux_data
ln -s /data/CAMS/daily ./ECMWF/daily
ln -s /data/AUX_DATA/ESACCI-LC-L4-Snow-Cond-500m-MONTHLY-2000-2012-v2.4 ./ESACCI-LC-L4-Snow-Cond-500m-MONTHLY-2000-2012-v2.4
ln -s /data/AUX_DATA/ESACCI-LC-L4-WB-Map-150m-P13Y-2000-v4.0.tif ./ESACCI-LC-L4-WB-Map-150m-P13Y-2000-v4.0.tif
Expand All @@ -74,29 +74,29 @@ ln -s /data/AUX_DATA/ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7.tif ./ESACCI-LC-

## Install miniconda if conda is not already installed on your system

https://repo.anaconda.com/miniconda/Miniconda3-py37_22.11.1-1-Linux-x86_64.sh
https://repo.anaconda.com/miniconda/Miniconda3-py312_25.1.1-2-Linux-x86_64.sh

## Create the sen2like conda environment

Once you retrieved the code, go into Sen2Cor3 root source folder and run the following command to create a conda env named sen2like:

```
cd $sen2cor3_install_dir/sen2cor_3.1.0_python_3.10
conda create -n sen2like --file requirements.txt -c conda-forge
cd $sen2cor3_install_dir/sen2cor_3.3.0_python_3.12
conda env create --file requirements.yml
```

## Activate sen2like conda environment

Sen2Cor 3.1 uses the same conda environment as Sen2like:
Sen2Cor 3.3 uses the same conda environment as Sen2like 4.5 with Python 3.12:

```
conda activate sen2like
conda activate sen2like_py312
```

### Test the Command line execution

```
python $sen2cor3_install_dir/sen2cor_3.1.0_python_3.10/SEN2COR_3/L2A_Process.py --help
python $sen2cor3_install_dir/sen2cor_3.3.0_python_3.12/SEN2COR_3/L2A_Process.py --help
output:
usage: L2A_Process.py [-h] [--mode MODE] [--resolution {10,20,30,60}] [--datastrip DATASTRIP] [--tile TILE] [--output_dir OUTPUT_DIR] [--work_dir WORK_DIR]
Expand All @@ -105,7 +105,7 @@ usage: L2A_Process.py [-h] [--mode MODE] [--resolution {10,20,30,60}] [--datastr
[--GIP_L2A_SC GIP_L2A_SC] [--GIP_L2A_AC GIP_L2A_AC] [--GIP_L2A_PB GIP_L2A_PB] [--Hyper_MS]
input_dir
Sen2Cor. Version: 03.01.00, created: 2024.02.29, supporting Level-1C product version 14.2 - 14.9, supporting Level-1TP Collection_1-2 Landsat_8-9, supporting Hyper Level-1C - .
Sen2Cor. Version: 03.03.00, created: 2025.01.31, supporting Level-1C product version 15.0, supporting Level-1TP Collection_1-2 Landsat_8-9, supporting Hyper MS Level-1C.
positional arguments:
input_dir Directory of Level-1C input
Expand Down
6 changes: 3 additions & 3 deletions sen2cor3/sen2cor3_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ def download_from_sftp(hostname, port, username, password, remote_path, local_pa
sys.exit(1)

local_path = sys.argv[1]
local_path = os.path.join(local_path, 'sen2cor_3.1.0_python_3.10_20240313.zip')
local_path = os.path.join(local_path, 'sen2cor_3.3.0_python_3.12_20250131.zip')

hostname = "sftp.telespazio.fr"
port = 22 # default SFTP port is 22
username = 'sen2cor3'
password = '4sen2like'
remote_path = '/upload/Sen2Cor-3.01.00/Software/sen2cor_3.1.0_python_3.10_20240313.zip'
remote_path = '/upload/Sen2Cor-3.03.00/Software/sen2cor_3.3.0_python_3.12_20250131.zip'

download_from_sftp(hostname, port, username, password, remote_path, local_path)
download_from_sftp(hostname, port, username, password, remote_path, local_path)
2 changes: 1 addition & 1 deletion sen2like/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# exclude all
*
# but not what we want to send in the build context
!requirements.txt
!environment.yml
!requirements_dev.txt
!sen2like
!aux_data
6 changes: 3 additions & 3 deletions sen2like/Dockerfile-base
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM continuumio/miniconda3:23.10.0-1
WORKDIR /usr/local/sen2like

# Create the environment:
# copy requirements.txt from sources to docker image
COPY ./requirements.txt .
# copy environment.yml from sources to docker image
COPY ./environment.yml .
# create sen2like env from requirement
RUN conda create -n sen2like --file requirements.txt -c conda-forge
RUN conda env create --file environment.yml
Loading

0 comments on commit 54c3b30

Please sign in to comment.