Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
let-it-snow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Remote Modules
let-it-snow
Commits
cb8cb44e
Commit
cb8cb44e
authored
4 years ago
by
Aurore Dupuis
Browse files
Options
Downloads
Patches
Plain Diff
Change all snow_line error value to -1000
parent
95f82aaf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
4 merge requests
!57
Patch 1.6.4
,
!56
Release 1.6
,
!55
Release 1.6
,
!52
Resolve "zs computation method return -1 when error occur, whereas "-1" is a valid zs value"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/s2snow/snow_detector.py
+1
-1
1 addition, 1 deletion
python/s2snow/snow_detector.py
src/histo_utils.cxx
+4
-4
4 additions, 4 deletions
src/histo_utils.cxx
with
5 additions
and
5 deletions
python/s2snow/snow_detector.py
+
1
−
1
View file @
cb8cb44e
...
...
@@ -731,7 +731,7 @@ class snow_detector:
if
snow_fraction
>
self
.
fsnow_total_lim
:
# Test zs value (-1 means that no zs elevation was found)
if
self
.
zs
!=
-
1
:
if
self
.
zs
!=
-
1
000
:
#~ # NDSI threshold again
#~ ndsi_formula = "(im1b" + str(self.nGreen) + "-im1b" + str(self.nSWIR) + \
#~ ")/(im1b" + str(self.nGreen) + "+im1b" + str(self.nSWIR) + ")"
...
...
This diff is collapsed.
Click to expand it.
src/histo_utils.cxx
+
4
−
4
View file @
cb8cb44e
...
...
@@ -224,8 +224,8 @@ short compute_snowline_internal(const itk::VectorImage<short, 2>::Pointer compos
myfile
<<
"Number of bins=0"
<<
std
::
endl
;
myfile
.
close
();
// Return -1 as no zs is found in this case
return
-
1
;
// Return -1
000
as no zs is found in this case
return
-
1
OOO
;
}
...
...
@@ -248,7 +248,7 @@ short compute_snowline_internal(const itk::VectorImage<short, 2>::Pointer compos
{
print_histogram
(
*
histogram
,
histo_file
);
}
short
snowline
=
-
1
;
short
snowline
=
-
1
000
;
if
(
reverse
)
{
for
(
int
i
=
histogram
->
GetSize
()[
0
]
-
1
;
i
>=
0
;
i
--
)
...
...
@@ -267,7 +267,7 @@ short compute_snowline_internal(const itk::VectorImage<short, 2>::Pointer compos
return
snowline
;
}
}
// snow line not found -1
// snow line not found -1
000
return
snowline
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment