Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions asar_xarray/asar.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from xarray.core.types import ReadBuffer
from asar_xarray import reader, utils, envisat_direct
from loguru import logger
from numpy.typing import NDArray

from asar_xarray.derived_subdatasets_metadata import process_derived_subdatasets_metadata
from asar_xarray.general_metadata import process_general_metadata
Expand All @@ -36,7 +37,7 @@ def get_metadata(gdal_dataset: gdal.Dataset) -> Dict[str, Any]:


def open_asar_dataset(filename_or_obj: str | os.PathLike[Any] | ReadBuffer[
Any] | bytes | memoryview | AbstractDataStore,
Any] | bytes | memoryview | AbstractDataStore,
polarization: str | None = None) -> xr.Dataset:
"""
Open an ASAR dataset and converts it into an xarray Dataset.
Expand Down Expand Up @@ -296,7 +297,7 @@ def compute_azimuth_time(
product_first_line_utc_time: np.datetime64,
product_last_line_utc_time: np.datetime64,
number_of_lines: int
) -> np.ndarray:
) -> NDArray[Any]:
"""
Compute an array of azimuth times for each line in the ASAR product.

Expand Down
3 changes: 2 additions & 1 deletion asar_xarray/envisat_direct.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import math
import pathlib
import numpy as np
from numpy.typing import NDArray


def parse_int(s: str) -> int:
Expand Down Expand Up @@ -113,7 +114,7 @@ def parse_direct(path: str, gdal_metadata: dict[str, Any], polarization: str) ->

# antenna gain
n_samp = gdal_metadata["line_length"]
spreading_loss: np.ndarray[Any] = np.array([])
spreading_loss: NDArray[Any] = np.array([])
if gdal_metadata["sample_type"] == "DETECTED":
gain_arr = np.ones(n_samp)
spreading_loss = np.ones(n_samp)
Expand Down
14 changes: 7 additions & 7 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ channels:
- conda-forge
dependencies:
- python>=3.12
- gdal>=3.10
- gdal>=3.5.0
- libgdal>=3.10
- numpy>=2.2.0
- numpy<2.0
- xarray>=2025.1.0
- pip
- requests>=2.32.0
- boto3>=1.37.0
- boto3-stubs>=1.37.0
- boto3-stubs>=1.37.0 # type hints
- lxml>=5.3.0
- mypy>=1.15.0
- loguru>=0.7.0
- pandas-stubs >=2.0.0
- pandas-stubs >=2.0.0 # type hints
- rasterio>=1.4.0
- rioxarray>=0.19.0
- pip:
- pytest-stub>=1.1.0
- rasterio>=1.4.0
- rioxarray>=0.19.0
- pytest-stub>=1.1.0 # type hints
Loading