Commit 387b468b authored by Aurore Dupuis's avatar Aurore Dupuis

Merge branch 'release-1.6' into 'master'

Release 1.6

See merge request !37
parents ace4fbb7 ac8b4745
# Change Log
All notable changes to Let It Snow (LIS) will be documented in this file.
## [1.6] - 2020-04
### Added
- New snow FSC product (parameters json schema modification fsc / cosims_mode)
- New feature allowing to mask data (parameters json schema modification water_mask)
- Adapt snow synthesis treatment in order to take THEIA L2B Snow as inputs (from datalake)
- Add app/build_snow_annual_map_json.py, which create the params.json for snow_annual_map
- Rename Snow_Occurence into SCD for (Snow Coverage Duration) (#41)
- Add metadata generation for snow_annual_map (#39)
- Change nodata from 254 to 255 (#29)
- Add SMOD, SOD, NOBS syntheses
- Migration to python3
- Migration to OTB7
- Rename "DN" shapefile column intto "SEB"for Snow Extend Binary(#10)
- Change license from AGPL to Apache v2
- Add synthesis description into README.md
- Add CLA documents in doc/cla
- Add new LIS style files
### Fixed
- Inaccurate temporal interpolation (#48)
- Fix error on write call (python 2to3 problem) (#41)
- Fix links in CONTRIBUTING.md
- Update files header (adding license header)
- Fix the coherence between build_json.py and schema.json
- Fix latex errors in ATBD
- Fix cases when TCD>100
### Removed
- COMP file is no more generated (not used, representing more that 50% product size) (#37)
- Remove old/ directory
- Remove legacy/ sub directories except /doc
## [1.5] - 2019-01-11
### Added
......@@ -9,7 +43,7 @@ All notable changes to Let It Snow (LIS) will be documented in this file.
- python/s2snow/snow_annual_map.py, the core of the annual map processing
- python/s2snow/snow_annual_map_evaluation.py, provide the possibility to compare with other snow products and modis snow annual map
- python/s2snow/snow_product_parser.py, class to handle the supported type of snow products
- doc/snow_annual_map_schema.json, parameters descriptions
- doc/atbd/snow_annual_map_schema.json, parameters descriptions
- hpc/prepare_data_for_snow_annual_map.py, preprocessing script on CNES HPC,
- doc/tutorials/prepare_snow_annual_map_data.md, tutorial
- Provided new data pack for tests "Data-LIS-1.5"
......
#
# Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Let-it-snow (LIS)
#
# https://gitlab.orfeo-toolbox.org/remote_modules/let-it-snow
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
PROJECT(lis)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
......
# How to contribute to let-it-snow (LIS) ?
Thank you for taking the time to contribute to LIS! This document will guide you
through the workflow and best practices you need to know to send your
contribution.
There are many ways to contribute to LIS:
* [Reporting a bug](#reporting-bugs)
* [Making a feature request](#feature-requests-and-discussions)
* [Contributing code (C++, Python, CMake, etc.)](#code-contribution)
Our main workflow uses GitLab for source control, issues and task tracking. We
use a self-hosted GitLab instance:
[`https://gitlab.orfeo-toolbox.org/remote_modules/let-it-snow`](https://gitlab.orfeo-toolbox.org/remote_modules/let-it-snow)
## Reporting bugs
If you have found a bug, you can first [search the existing issues](https://gitlab.orfeo-toolbox.org/remote_modules/let-it-snow/issues?label_name%5B%5D=bug)
to see if it has already been reported.
If it's a new bug, please [open a new issue on GitLab](https://gitlab.orfeo-toolbox.org/remote_modules/let-it-snow/issues/new).
The 'Bug' issue template will help you provide all important information and
help fixing the bug quicker. Remember to add as much information as possible!
## Feature requests and discussions
Feature requests are welcome! Generally you are welcome to simply [open an issue](https://gitlab.orfeo-toolbox.org/remote_modules/let-it-snow/issues)
and discuss your idea there.
## Documentation improvements
## Code contribution
The LIS workflow is based on GitLab [Merge Requests](https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html).
Clone the repository, create a feature branch, commit your changes, push the
feature branch to a fork (or the main repository if you are a core developer),
then send a merge request. Direct push to develop without review must be avoided.
### Commit message
On your feature branch, write a good [commit message](https://xkcd.com/1296/):
short and descriptive. If fixing an issue or bug, put the issue number in the
commit message so that GitLab can [cross-link it](https://docs.gitlab.com/ce/user/project/issues/crosslinking_issues.html).
You can prefix your commit message with an indicating flag (DOC, BUG, PKG,
TEST, SuperBuild, etc.).
Standard prefixes for LIS commit messages:
BUG: Fix for runtime crash or incorrect result
COMP: Compiler error or warning fix
DOC: Documentation change
ENH: New functionality
PERF: Performance improvement
STYLE: No logic impact (indentation, comments)
WIP: Work In Progress not ready for merge
For example, here are some good commit messages:
BUG: #1701 Warn users if parameter string is unset
DOC: Fix typo in Monteverdi French translation
COMP: Allow GeoTIFF and TIFF to be disabled when no 3rd party drags them
### Merge request
Your contribution is ready to be added to the main LIS repository? Send a Merge
Request against the `develop` branch on GitLab using the merge request
template. The merge request will then be discussed by the community and the core
LIS team.
* Merge requests can not be merged until all discussions have been resolved (this is enforced by GitLab)
* The merger is responsible for checking that the branch is up-to-date with develop
### Contribution license agreement
LIS requires that contributors sign out a [Contributor License
Agreement](https://en.wikipedia.org/wiki/Contributor_License_Agreement). The
purpose of this CLA is to ensure that the project has the necessary ownership or
grants of rights over all contributions to allow them to distribute under the
chosen license.
To accept your contribution, we need you to complete, sign and email to *cla [at]
orfeo-toolbox [dot] org* an [Individual Contributor Licensing
Agreement](doc/cla/icla-en.doc) (ICLA) form and a
[Corporate Contributor Licensing
Agreement](doc/cla/ccla-en.doc) (CCLA) form if you are
contributing on behalf of your company or another entity which retains copyright
for your contribution.
The copyright owner (or owner's agent) must be mentioned in headers of all
modified source files.
## GitLab guidelines
In order to organize the issues in our GitLab instance, we use both labels and
milestones.
The [milestones](https://gitlab.orfeo-toolbox.org/remote_modules/let-it-snow/milestones) should be used to track in which release a feature is merged.
GitLab can then provide a summary of all features and bugs added to a given release
version.
This is free software under the GNU Affero General Public License v3.0. See
http://www.gnu.org/licenses/agpl.html for details.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
\ No newline at end of file
# Let-it-snow
## Synopsis
This code implements the snow cover extent detection algorithm LIS (Let It Snow) for Sentinel-2, Landsat-8 and SPOT4-Take5 data.
This code implements the snow cover extent detection algorithm LIS (Let It Snow) for Sentinel-2, Landsat-8 and SPOT4-Take5 data. It also implements different temporal syntheses based on time series of snow products.
The algorithm documentation with examples is available here:
......@@ -11,13 +11,17 @@ Access to Theia Snow data collection:
* [![DOI:10.24400/329360/f7q52mnk](https://zenodo.org/badge/DOI/10.24400/329360/f7q52mnk.svg)](http://doi.org/10.24400/329360/f7q52mnk)
To read more about the "Centre d'Expertise Scientifique surface enneigée" (in French):
How to cite:
* [Bulletin THEIA](https://www.theia-land.fr/sites/default/files/imce/BulletinTHEIA3.pdf#page=10)
* Gascoin, S., Grizonnet, M., Bouchet, M., Salgues, G., and Hagolle, O.: Theia Snow collection: high-resolution operational snow cover maps from Sentinel-2 and Landsat-8 data, Earth Syst. Sci. Data, 11, 493–514, [https://doi.org/10.5194/essd-11-493-2019](https://doi.org/10.5194/essd-11-493-2019), 2019.
The input files are Sentinel-2 or Landsat-8 level-2A products from the [Theia Land Data Centre](https://theia.cnes.fr/) or [SPOT-4/5 Take 5 level-2A products](https://spot-take5.org) and a Digital Terrain Model (DTM) like SRTM for instance reprojected at the same resolution as the input image.
The input files are Sentinel-2 or Landsat-8 level-2A products from the [Theia Land Data Centre](https://theia.cnes.fr/) or [SPOT-4/5 Take 5 level-2A products](https://spot-take5.org) and a Digital Terrain Model (DTM). The output is a Level-2B snow product.
The syntheses are temporally aggregated (level-3A) products derived from individual snow products after gapfilling. The three products are: the snow cover duration, the snow disappearance date and the snow appearance date. These products are typically computed over a hydrological year (more details : [Snow cover duration map](doc/snow_annual_map.md).
## Usage
### Snow detector
Run the python script run_snow_detector.py with a json configuration file as unique argument:
......@@ -26,16 +30,24 @@ python run_snow_detector.py param.json
```
The snow detection is performed in the Python script [run_snow_detector.py](app/run_snow_detector.py).
All the parameters of the algorithm, paths to input and output data are stored in the json file. See the provided example [param_test_s2_template.json](tes/param_test_s2_template.json) file for an example.
Moreover The JSON schema is available in the [Algorithm Theoretical Basis Documentation](doc/atbd/ATBD_CES-Neige.tex) and gives more information about the roles of these parameters.
All the parameters of the algorithm, paths to input and output data are stored in the json file. The JSON schema (snow_detector_schema.json) is available in the [Algorithm Theoretical Basis Documentation](doc/atbd/ATBD_CES-Neige.tex) and gives more information about the roles of these parameters.
NB: To build DEM data download the SRTM files corresponding to the study area and build the .vrt using gdalbuildvrt. Edit config.json file to activate preprocessing : Set "preprocessing" to true and set the vrt path.
### Snow syntheses
Run the python script run_snow_annual_map.py with a json configuration file as unique argument:
```bash
python run_snow_annual_map.py param.json
```
The snow syntheses are performed in the Python script [run_snow_annual_map.py](app/run_snow_annual_map.py).
All the parameters of the algorithm, paths to input and output data are stored in the json file. The JSON schema (snow_annual_map_schema.json) and its description are available in the [readme](doc/snow_annual_map.md).
## Products format
* COMPO: Raster image showing the outlines of the cloud (including cloud shadow) and snow masks drawn on the RGB composition of the L2A image (bands SWIR/Red/Green).
### Snow product
* SNOW_ALL: Binary mask of snow and clouds.
* 1st bit: Snow mask after pass1
* 2nd bit: Snow mask after pass2
......@@ -52,13 +64,46 @@ pixel_value & 00000101
* 0: No-snow
* 100: Snow
* 205: Cloud including cloud shadow
* 254: No data
* SEB_VEC: Vector image of the snow mask and cloud mask. Two fields of information are embedded in this product. DN (for Data Neige) and type.
* DN field :
* 255: No data
* SEB_VEC: Vector image of the snow mask and cloud mask. Two fields of information are embedded in this product. SEB (for Snow Extent Binary) and type.
* SEB field :
* 0: No-snow
* 100: Snow
* 205: Cloud including cloud shadow
* 254: No data
* 255: No data
### Snow syntheses
Each product is computed for a given tile [TILE\_ID] and a given period from [DATE\_START] to [DATE_STOP]. Products are identified by a tag according the following naming convention: [TILE\_ID]\_[DATE\_START]\_[DATE_STOP]
For example: **T31TCH\_20170901\_20180831**
LIS generates the following files:
- Raster: **DAILY\_SNOW\_MASKS\_<*tag*>.tif**, the snow time series file interpolated on a daily basis (1 image with one band per day). Each band are coded as follows (the interpolation removing any clouds or nodata):
- 0: No-snow
- 1: Snow
- Raster: **SCD\_<*tag*>.tif**, the snow cover duration map (SCD), pixel values within [0-number of days] corresponding the number of snow days.
- Raster: **CLOUD\_OCCURENCE\_<*tag*>.tif**, the cloud/nodata annual map image, pixel values within [0-1] corresponding the cloud or nodata occurrences in the non-interpolated time series
- Raster: **SMOD\_<*tag*>.tif**, the date of snow disappearance (Snow Melt-Out Date), defined as the last date of the longest snow period. The dates are given in number of days since the first day of the synthesis.
- Raster: **SOD\_<*tag*>.tif**, the date of snow appearance (Snow Onset Date), defined as the first date of the longest snow period. The dates are given in number of days since the first day of the synthesis.
- Raster: **NOBS\_<*tag*>.tif**, the number of clear observations to compute the SCD, SMOD and SOD syntheses
Output directory will also contain the following files :
- Text file: **input_dates.txt**, the list of observation dates in the non-interpolated time series
- Text file: **output_dates.txt**, the list of interpolated dates
- JSON file: **param.json**, the configuration file used for the products generation (optional)
- LOG file: **stdout.log**, the log file for the standard output generated during processing (optional)
- LOG file: **stderr.log**, the log file for the error output generated during processing (optional)
## Data set example
......@@ -77,13 +122,14 @@ LIS processing chain uses CMake (http://www.cmake.org) for building from source.
Following a summary of the required dependencies:
* GDAL >=2.0
* OTB >= 6.2
* Python interpreter >= 2.7
* Python libs >= 2.7
* OTB >= 7.0
* Python interpreter >= 3.6
* Python libs >= 3.6
* Python packages:
* numpy
* lxml
* matplotlib
* rasterio
GDAL itself depends on a number of other libraries provided by most major operating systems and also depends on the non standard GEOS and Proj libraries. GDAL- Python bindings are also required
......@@ -142,7 +188,7 @@ Update environment variables for LIS. Make sure that OTB and other dependencies
export PATH=/your/install/directory/bin:/your/install/directory/app:$PATH
export LD_LIBRARY_PATH=/your/install/directory/lib:$LD_LIBRARY_PATH
export OTB_APPLICATION_PATH=/your/install/directory/lib:$OTB_APPLICATION_PATH
export PYTHONPATH=/your/install/directory/lib:/your/install/directory/lib/python2.7/site-packages:$PYTHONPATH
export PYTHONPATH=/your/install/directory/lib:/your/install/directory/lib/python3.7/site-packages:$PYTHONPATH
```
let-it-snow is now installed.
......@@ -162,9 +208,8 @@ Do not modify these folders.
## Contributors
Manuel Grizonnet (CNES), Simon Gascoin (CNRS/CESBIO), Tristan Klempka (CNES), Germain Salgues (Magellium)
Manuel Grizonnet (CNES), Simon Gascoin (CNRS/CESBIO), Germain Salgues (Magellium), Aurore Dupuis (CNES), Rémi Jugier (Magellium)
## License
This is free software under the GNU Affero General Public License v3.0. See
http://www.gnu.org/licenses/agpl.html for details.
This is software under the Apache License v2.0. See https://www.apache.org/licenses/LICENSE-2.0.txt
This folder contains the code to do the calibration and evaluation of FSC products
import sys
import os
import errno
import re
import snowcover
#initialize
SNW = snowcover.snowcover()
#CALIBRATION PLEIADES
nameCAL = "PLEIADES_CAL"
sourceCAL = "PLEIADES"
dateDebut = "2015-01-01"
dateFin = "2020-01-01"
SNWCAL = [1]
NSNWCAL = [2]
OK = SNW.makeDataSet(dateDebut=dateDebut,dateFin=dateFin,source=sourceCAL,dirName=nameCAL,SNWval=SNWCAL,NSNWval=NSNWCAL)
OK = SNW.createQuickLooks(nameCAL)
OK = SNW.PlotPeriode(nameCAL,sourceCAL)
OK = SNW.PlotEachDates(nameCAL,sourceCAL)
a,b,rmse = SNW.calibrateModel(nameCAL,sourceCAL,0.4)
print(nameCAL,"a = ",a,"b = ",b,"rmse = ",rmse)
#EVALUATION IZAS
nameVAL = "IZAS_VAL"
sourceVAL = "IZAS"
SNWVAL = [1]
NSNWVAL = [0]
epsgVAL = "25830"
tileVAL = ["T30TYN"]
OK = SNW.makeDataSet(dateDebut=dateDebut,dateFin=dateFin,source=sourceVAL,dirName=nameVAL,SNWval=SNWVAL,NSNWval=NSNWVAL,epsgFSC = epsgVAL,tiles = tileVAL)
OK = SNW.createQuickLooks(nameVAL)
OK = SNW.PlotPeriode(nameVAL,sourceVAL)
rmse = SNW.evaluateModel(nameCAL,[nameVAL],sourceCAL,[sourceVAL],a,b)
print(nameVAL,"rmse = ",rmse)
#EVALUATION SPOT
nameVAL = "SPOT67_20160808_VAL"
sourceVAL = "SPOT67"
SNWVAL = [2]
NSNWVAL = [1]
NDVAL = [0]
epsgVAL = ""
tileVAL = ["T32TLS","T32TLR","T32TLQ","T31TGK","T31TGL","T31TGM"]
OK = SNW.makeDataSet(dateDebut="2016-08-08",source=sourceVAL,dirName=nameVAL,SNWval=SNWVAL,NSNWval=NSNWVAL,NDval=NDVAL,epsgFSC = epsgVAL,tiles = tileVAL,selection = "closest")
OK = SNW.createQuickLooks(nameVAL)
OK = SNW.PlotPeriode(nameVAL,sourceVAL)
rmse = SNW.evaluateModel(nameCAL,[nameVAL],sourceCAL,[sourceVAL],a,b)
print(nameVAL,"rmse = ",rmse)
nameVAL = "SPOT67_20170311_VAL"
sourceVAL = "SPOT67"
SNWVAL = [2]
NSNWVAL = [1]
NDVAL = [0]
epsgVAL = ""
tileVAL = ["T32TLS","T32TLR","T32TLQ","T31TGK","T31TGL","T31TGM"]
OK = SNW.makeDataSet(dateDebut="2017-03-11",source=sourceVAL,dirName=nameVAL,SNWval=SNWVAL,NSNWval=NSNWVAL,NDval=NDVAL,epsgFSC = epsgVAL,tiles = tileVAL,selection = "closest")
OK = SNW.createQuickLooks(nameVAL)
OK = SNW.PlotPeriode(nameVAL,sourceVAL)
rmse = SNW.evaluateModel(nameCAL,[nameVAL],sourceCAL,[sourceVAL],a,b)
print(nameVAL,"rmse = ",rmse)
nameVAL = "SPOT67_20161012_VAL"
sourceVAL = "SPOT67"
SNWVAL = [2]
NSNWVAL = [1]
NDVAL = [0]
epsgVAL = ""
tileVAL = ["T32TLS","T32TLR","T32TLQ","T31TGK","T31TGL","T31TGM"]
OK = SNW.makeDataSet(dateDebut="2016-10-12",source=sourceVAL,dirName=nameVAL,SNWval=SNWVAL,NSNWval=NSNWVAL,NDval=NDVAL,epsgFSC = epsgVAL,tiles = tileVAL,selection = "closest")
OK = SNW.createQuickLooks(nameVAL)
OK = SNW.PlotPeriode(nameVAL,sourceVAL)
rmse = SNW.evaluateModel(nameCAL,[nameVAL],sourceCAL,[sourceVAL],a,b)
print(nameVAL,"rmse = ",rmse)
nameVAL = "SPOT67_20161203_VAL"
sourceVAL = "SPOT67"
SNWVAL = [2]