Skip to content

Commit baeed5f

Browse files
authored
Merge pull request #421 from olemke/fix-aster
Replace obsolete gdal import in aster
2 parents 75cb52b + de09840 commit baeed5f

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

.github/workflows/build-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@v2
2828
- name: Install Python ${{ matrix.python-version }}
29-
uses: actions/setup-python@v1
29+
uses: actions/setup-python@v4
3030
with:
3131
python-version: ${{ matrix.python-version }}
3232

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ dependencies:
33
- python>=3.9
44
- cartopy
55
- cython
6-
- fsspec!=2023.12.0,!=2023.12.1
6+
- fsspec!=2023.12.0,!=2023.12.1,!=2024.3.1
77
- gdal
88
- h5netcdf
99
- keras

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cartopy
22
cython
3-
fsspec!=2023.12.0,!=2023.12.1
3+
fsspec!=2023.12.0,!=2023.12.1,!=2024.3.1
44
gdal
55
h5netcdf
66
keras

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
include_package_data=True,
8080
install_requires=[
8181
"docutils",
82-
"fsspec!=2023.12.0,!=2023.12.1",
82+
"fsspec!=2023.12.0,!=2023.12.1,!=2024.3.1",
8383
"h5netcdf",
8484
"imageio",
8585
"matplotlib>=1.4",

typhon/cloudmask/aster.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import warnings
88
from collections import namedtuple
99

10-
import gdal
10+
from osgeo import gdal
1111
import numpy as np
1212
from scipy import interpolate
1313
from skimage.measure import block_reduce
@@ -682,7 +682,7 @@ def sensor_angles(self, channel="1"):
682682
# sides therefore depend on the ascending / decending mode defined in the
683683
# meta data.
684684
flyingdir = self.meta["FLYINGDIRECTION"]
685-
if flyingdir is "DE":
685+
if flyingdir == "DE":
686686
n *= -1
687687

688688
swath_widths = np.sum(np.isfinite(field), axis=1)
@@ -696,7 +696,7 @@ def sensor_angles(self, channel="1"):
696696
if channel != "3B":
697697
zenith = abs(n_angles)
698698

699-
if flyingdir is "DE":
699+
if flyingdir == "DE":
700700
azimuth[n_angles > 0] = 90 + S
701701
azimuth[n_angles <= 0] = 270 + S
702702
else:
@@ -716,7 +716,7 @@ def sensor_angles(self, channel="1"):
716716
)
717717

718718
x = np.rad2deg(np.arctan(0.6 / np.tan(np.deg2rad(n_angles))))
719-
if flyingdir is "DE":
719+
if flyingdir == "DE":
720720
azimuth[n_angles > 0] = np.array(90 - x + S)[n_angles > 0]
721721
azimuth[n_angles <= 0] = np.array(270 - x + S)[n_angles <= 0]
722722
else:

0 commit comments

Comments
 (0)