Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MVCM
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Paolo Veglio
MVCM
Commits
c2508daa
There was an error fetching the commit references. Please try again later.
Commit
c2508daa
authored
2 months ago
by
Paolo Veglio
Browse files
Options
Downloads
Patches
Plain Diff
fixes to scenes and imports
parent
afb0a50f
No related branches found
No related tags found
No related merge requests found
Pipeline
#58644
failed
2 months ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mvcm/scene.py
+3
-3
3 additions, 3 deletions
mvcm/scene.py
mvcm/utility_functions.py
+3
-0
3 additions, 0 deletions
mvcm/utility_functions.py
with
6 additions
and
3 deletions
mvcm/scene.py
+
3
−
3
View file @
c2508daa
...
...
@@ -133,7 +133,7 @@ class IdentifyPixels:
coast_scene
,
)
coast_scene
=
xr
.
where
(
uniformity
<
0
,
1
,
coast_scene
)
coast_scene
=
xr
.
where
(
uniformity
<
=
0
,
1
,
coast_scene
)
logger
.
info
(
f
"
scene: Memory usage:
{
proc
.
memory_info
().
rss
/
1e6
}
MB
"
)
return
coast_scene
.
astype
(
np
.
ubyte
)
...
...
@@ -178,7 +178,7 @@ class IdentifyPixels:
water_scene
,
)
water_scene
=
xr
.
where
(
uniformity
<
0
,
0
,
water_scene
).
astype
(
np
.
ubyte
)
water_scene
=
xr
.
where
(
uniformity
<
=
0
,
0
,
water_scene
).
astype
(
np
.
ubyte
)
logger
.
info
(
f
"
scene: Memory usage:
{
proc
.
memory_info
().
rss
/
1e6
}
MB
"
)
return
water_scene
...
...
@@ -358,7 +358,7 @@ class IdentifyPixels:
land_scene
,
)
land_scene
=
xr
.
where
(
uniformity
<
0
,
1
,
land_scene
).
astype
(
np
.
ubyte
)
land_scene
=
xr
.
where
(
uniformity
<
=
0
,
1
,
land_scene
).
astype
(
np
.
ubyte
)
logger
.
info
(
f
"
scene: Memory usage:
{
proc
.
memory_info
().
rss
/
1e6
}
MB
"
)
return
land_scene
...
...
This diff is collapsed.
Click to expand it.
mvcm/utility_functions.py
+
3
−
0
View file @
c2508daa
...
...
@@ -6,6 +6,8 @@ import numpy as np
import
xarray
as
xr
from
numpy.lib.stride_tricks
import
sliding_window_view
from
mvcm.constants
import
ConstantsNamespace
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -26,6 +28,7 @@ def cloud_mask_spi(data: xr.Dataset):
m07
.
coarsen
(
number_of_lines
=
2
,
number_of_pixels
=
2
).
std
()
/
m07
.
coarsen
(
number_of_lines
=
2
,
number_of_pixels
=
2
).
mean
()
)
spi
=
xr
.
where
(
np
.
isnan
(
spi
),
ConstantsNamespace
.
BAD_DATA
,
spi
)
return
spi
...
...
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