Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace obsolete gdal import in aster #421

Merged
merged 4 commits into from
May 14, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dependencies:
- python>=3.9
- cartopy
- cython
- fsspec!=2023.12.0,!=2023.12.1
- fsspec!=2023.12.0,!=2023.12.1,!=2024.3.1
- gdal
- h5netcdf
- keras
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cartopy
cython
fsspec!=2023.12.0,!=2023.12.1
fsspec!=2023.12.0,!=2023.12.1,!=2024.3.1
gdal
h5netcdf
keras
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
include_package_data=True,
install_requires=[
"docutils",
"fsspec!=2023.12.0,!=2023.12.1",
"fsspec!=2023.12.0,!=2023.12.1,!=2024.3.1",
"h5netcdf",
"imageio",
"matplotlib>=1.4",
Expand Down
8 changes: 4 additions & 4 deletions typhon/cloudmask/aster.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import warnings
from collections import namedtuple

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

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

if flyingdir is "DE":
if flyingdir == "DE":
azimuth[n_angles > 0] = 90 + S
azimuth[n_angles <= 0] = 270 + S
else:
Expand All @@ -716,7 +716,7 @@ def sensor_angles(self, channel="1"):
)

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