Commit 07e6cf1a authored by Manuel Grizonnet's avatar Manuel Grizonnet

Merge branch 'hotfix/ctest_and_s2_param'

parents 2fcb1f5f 42fefd6d
......@@ -26,7 +26,7 @@ export PYTHONPATH=${lis-build-dir}/app/:$PYTHONPATH
Run the main python script:
```bash
python run_snow_detector param.json
run_snow_detector.py param.json
```
There is a Bash script in app directory which allows to set the env variable and run the script:
......
{
"general":{
"pout":"outputdir",
"shadow_value":32,
"nodata":-10000,
"ram":1024,
"nbThreads":1,
"mode":"landsat",
"nb_threads":1,
"generate_vector":false,
"preprocessing":false,
"postprocessing":false
},
"inputs":{
"vrt":"inputvrt",
"image":"inputimage",
"log":true
},
"inputs":{
"green_band": {
"path": "inputimage",
"noBand": 3
},
"red_band": {
"path": "inputimage",
"noBand": 4
},
"swir_band": {
"path": "inputimage",
"noBand": 6
},
"dem":"inputdem",
"cloud_mask":"inputcloud"
},
"cloud_mask":{
"cloud":
{
"shadow_mask":64,
"all_cloud_mask":0,
"high_cloud_mask":64,
"rf":8,
"rRed_darkcloud":500,
"rRed_backtocloud":100
"red_darkcloud":650,
"red_backtocloud":100
},
"snow":{
"dz":100,
"ndsi_pass1":0.4,
"rRed_pass1":200,
"red_pass1":200,
"ndsi_pass2":0.15,
"rRed_pass2":120,
"red_pass2":120,
"fsnow_lim":0.1,
"fsnow_total_lim":0.001
}
}
......@@ -322,7 +322,7 @@ After passing the pass 1 and 2 snow tests, some pixels that were originally mark
\hline
Parameter & Description & Name in the configuration file & Default value\\
\hline
\textcolor{red}{$r_f$} & Resize factor to produce the down-sampled red band & \texttt{rRed\_backtocloud} & 0.100 \\
\textcolor{red}{$r_f$} & Resize factor to produce the down-sampled red band & \texttt{rf} & 8 for L8 (12 for S2) \\
\textcolor{red}{$r_D$} & Maximum value of the down-sampled red band reflectance to define a dark cloud pixel & \texttt{rRed\_darkcloud} & 0.650 \\
\textcolor{red}{$n_1$} & Minimum value of the NDSI for the pass 1 snow test & \texttt{ndsi\_pass1} & 0.400\\
\textcolor{red}{$n_2$} & Minimum value of the NDSI for the pass 2 snow test & \texttt{ndsi\_pass2} & 0.150\\
......@@ -370,7 +370,7 @@ The implementation of the Sentinel-2 configuration was tested on the Sentinel-2A
\label{fig:S2snowzoom}
\end{figure}
The output of LIS was also examined by comparing the output snow mask from two images acquired on the same day by two different sensors. The example shown in Fig.~\ref{fig:L8vS4} illustrates that both snow masks are consistent, although further inspection revealed that the SPOT-4 snow mask tends to underestimate the snow cover area in this case. This is probably due to the lower radiometric resolution of SPOT-4 sensor.
The output of LIS was also examined by comparing the output snow mask from two images acquired on the same day by two different sensors. The example shown in Fig.~\ref{fig:L8vsS4-23042013} illustrates that both snow masks are consistent, although further inspection revealed that the SPOT-4 snow mask tends to underestimate the snow cover area in this case. This is probably due to the lower radiometric resolution of SPOT-4 sensor.
\begin{figure}[h]
\centering
......
......@@ -17,7 +17,7 @@ add_test(NAME test_json_builder_test
add_test(NAME s2snow_test
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_SOURCE_DIR}/app/run_snow_detector.py ${OUTPUT_TEST_TAKE5}/param_test.json
${CMAKE_BINARY_DIR}/app/run_snow_detector.py ${OUTPUT_TEST_TAKE5}/param_test.json
)
#Add dependence to s2 test to avoid conflict in Testing directory
......@@ -32,7 +32,7 @@ add_test(NAME test_s2_json_builder_test
add_test(NAME s2snow_s2_test
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_SOURCE_DIR}/app/run_snow_detector.py ${OUTPUT_TEST_S2}/param_s2_test.json
${CMAKE_BINARY_DIR}/app/run_snow_detector.py ${OUTPUT_TEST_S2}/param_s2_test.json
)
set_tests_properties(s2snow_s2_test PROPERTIES DEPENDS test_s2_json_builder_test)
......@@ -46,7 +46,7 @@ add_test(NAME test_s2_small_json_builder_test
add_test(NAME s2snow_s2_small_test
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_SOURCE_DIR}/app/run_snow_detector.py ${OUTPUT_TEST_S2_SMALL}/param_s2_test.json
${CMAKE_BINARY_DIR}/app/run_snow_detector.py ${OUTPUT_TEST_S2_SMALL}/param_s2_test.json
)
set_tests_properties(s2snow_s2_small_test PROPERTIES DEPENDS test_s2_small_json_builder_test)
......
......@@ -30,7 +30,7 @@
"shadow_mask":32,
"all_cloud_mask":1,
"high_cloud_mask":128,
"rf":8,
"rf":12,
"red_darkcloud":500,
"red_backtocloud":100
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment