Skip to content

Commit

Permalink
fix: imports and args
Browse files Browse the repository at this point in the history
  • Loading branch information
cmosig committed Jan 21, 2025
1 parent 06f5bc7 commit f51449a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions sentle/sentle.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import multiprocessing as mp
import shutil
import tempfile
from time import time as currenttime
import warnings
from math import ceil
from os import path
from time import time

import geopandas as gpd
import numcodecs
import numpy as np
import pandas as pd
import pkg_resources
Expand Down Expand Up @@ -328,14 +329,14 @@ def setup_zarr_storage(zarr_store: str | zarr.storage.Store,
store = zarr_store

sync_file_path = None
if zarr_store_chunk_size["time"] == 1 and zarr_store_chunk_size[
"y"] == processing_spatial_chunk_size and zarr_store_chunk_size[
"x"] == processing_spatial_chunk_size:
if not (zarr_store_chunk_size["time"] == 1
and zarr_store_chunk_size["y"] == processing_spatial_chunk_size
and zarr_store_chunk_size["x"] == processing_spatial_chunk_size):
numcodecs.blosc.use_threads = False

# get a uuid for sync file
sync_file_path = path.join(tempfile.gettempdir(),
f"sentle_{time()}.sync")
f"sentle_{currenttime()}.sync")

# create array for where to store the processed sentinel data
# chunk size is the number of S2 bands, because we parallelize S1/S2
Expand Down Expand Up @@ -493,6 +494,7 @@ def process(
time_composite_freq=time_composite_freq,
S2_apply_snow_mask=S2_apply_snow_mask,
S2_apply_cloud_mask=S2_apply_cloud_mask,
zarr_store_chunk_size=zarr_store_chunk_size,
)

# TODO support to only download subset of bands (mutually exclusive with
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import find_packages, setup

VERSION = '2025.1.3'
VERSION = '2025.1.4'
DESCRIPTION = 'Sentinel-1 and Sentinel-2 scalable downloader.'
LONG_DESCRIPTION = 'Sentinel-1 & Sentinel-2 data cubes at large scale (bigger-than-memory) on any machine with integrated cloud detection, snow masking, harmonization, merging, and temporal composites.'

Expand Down

0 comments on commit f51449a

Please sign in to comment.