Skip to content
Snippets Groups Projects
Commit b52b47ae authored by Paolo Veglio's avatar Paolo Veglio
Browse files

updates to .gitignore and small fixes of main functions

parent eacf116c
Branches
Tags
No related merge requests found
Pipeline #61343 failed
......@@ -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/
......@@ -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:
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment