Skip to content

Commit fc3b79b

Browse files
committed
Small fix to doc, replace zeros by Nan before applying offset with S2
1 parent 8bcb973 commit fc3b79b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/deploy.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Here is an example of producing a forest mask using ``xinfereo``:
8181
)
8282
8383
# 4. Apply standard offset and scaling
84+
ds = ds.where(ds != 0)
8485
ds = (ds.astype(np.float32) - 1000) / 10000
8586
8687
# 5. Initialize the EOInferencer with a pre-trained model
@@ -447,4 +448,4 @@ Considerations
447448
Filesystem Stability: Depending on the architecture you are deploying on (e.g., HPC, cloud), writing directly to a distributed or network file system can be risky. An interrupted process could leave files in a corrupted or incomplete state. A more stable pattern is to write all outputs to a temporary local disk first (e.g., ``/scratch``). Once all processing is complete, a single, atomic move operation can transfer the final products to the persistent storage.
448449

449450
.. note::
450-
Parallel Processing with Dask: For large-scale deployments, the data loading strategy presented above may be inneficient. Dask provides a powerful solution for parallel and out-of-core (lazy) computation. When using ``odc.stac.stac_load``, you can pass a chunks argument (e.g., chunks={'x': 1024, 'y': 1024}). This instructs stac_load to return a Dask array instead of a NumPy array, allowing data to be loaded, processed, and written in parallel blocks.
451+
Parallel Processing with Dask: For large-scale deployments, the data loading strategy presented above may be inneficient. Dask provides a powerful solution for parallel and out-of-core (lazy) computation. When using ``odc.stac.stac_load``, you can pass a chunks argument (e.g., chunks={'x': 1024, 'y': 1024}). This instructs stac_load to return a Dask array instead of a NumPy array, allowing data to be loaded, processed, and written in parallel blocks.

0 commit comments

Comments
 (0)