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
b52b47ae
Commit
b52b47ae
authored
1 month ago
by
Paolo Veglio
Browse files
Options
Downloads
Patches
Plain Diff
updates to .gitignore and small fixes of main functions
parent
eacf116c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#61343
failed
4 weeks ago
Stage: .pre
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+6
-2
6 additions, 2 deletions
.gitignore
mvcm/main_prep_only.py
+5
-9
5 additions, 9 deletions
mvcm/main_prep_only.py
mvcm/main_tests_only.py
+0
-5
0 additions, 5 deletions
mvcm/main_tests_only.py
with
11 additions
and
16 deletions
.gitignore
+
6
−
2
View file @
b52b47ae
...
...
@@ -7,7 +7,6 @@ VNP*.nc
*.vscode
ancillary.c
viz.py
.coverage
...
...
@@ -18,4 +17,9 @@ dev
__pycache__
notebooks/
env/
\ No newline at end of file
env/
.idea/
.pytest_cache/
.ipynb_checkpoints/
This diff is collapsed.
Click to expand it.
mvcm/main_prep_only.py
+
5
−
9
View file @
b52b47ae
...
...
@@ -6,11 +6,13 @@ import os
from
datetime
import
datetime
as
dt
try
:
from
memory_profiler
import
profile
# real decorator
except
ImportError
:
# no-op fallback
def
profile
(
func
):
# type: ignore[misc]
from
memory_profiler
import
profile
# real decorator
except
ImportError
:
# no-op fallback
def
profile
(
func
):
# type: ignore[misc]
return
func
import
numpy
as
np
import
psutil
import
xarray
as
xr
...
...
@@ -196,12 +198,6 @@ def main(
satellite
,
sensor
,
file_names
,
thresholds
,
hires
=
use_hires
,
use_sipsanc
=
use_sipsanc
)
if
np
.
all
(
pixel_type
.
day
==
0
):
logger
.
info
(
"
no day pixels found, likely a night granule, exiting
"
)
attrs
=
{
"
version
"
:
_VERSION
,
"
satellite
"
:
"
VIIRS
"
,
"
sensor
"
:
"
VIIRS
"
}
save_output
(
None
,
attrs
,
out_file
,
compression
=
5
,
debug
=
debug
,
shape
=
lat_shape
)
return
logger
.
info
(
f
"
Memory usage #3:
{
proc
.
memory_info
().
rss
/
1e6
}
MB
"
)
with
xr
.
open_dataset
(
file_names
[
"
MOD02
"
])
as
vnp02
:
...
...
This diff is collapsed.
Click to expand it.
mvcm/main_tests_only.py
+
0
−
5
View file @
b52b47ae
...
...
@@ -89,11 +89,6 @@ def main(
logger
.
info
(
"
no day pixels found, likely a night granule, exiting
"
)
return
pxl
=
xr
.
open_dataset
(
pixel_data
)
if
np
.
all
(
pxl
.
day
==
0
):
logger
.
info
(
"
no day pixels found, likely a night granule, exiting
"
)
return
with
open
(
threshold_file
)
as
f
:
text
=
f
.
read
()
thresholds
=
YAML
(
typ
=
"
safe
"
).
load
(
text
)
...
...
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