Skip to content

Commit b470be4

Browse files
committed
Update files for most recent black update
1 parent 469d469 commit b470be4

34 files changed

Lines changed: 21 additions & 61 deletions

mhkit/dolfyn/adv/clean.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from ..velocity import VelBinner
66
from ..tools.misc import group, slice1d_along_axis
77

8-
98
sin = np.sin
109
cos = np.cos
1110

mhkit/dolfyn/binned.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -512,10 +512,8 @@ def _fft_freq(self, fs=None, units="Hz", n_fft=None, coh=False):
512512
fs = self._parse_fs(fs)
513513

514514
if ("Hz" not in units) and ("rad" not in units):
515-
raise Exception(
516-
"Valid fft frequency vector units are Hz \
517-
or rad/s"
518-
)
515+
raise Exception("Valid fft frequency vector units are Hz \
516+
or rad/s")
519517

520518
if "rad" in units:
521519
return fft_frequency(n_fft, 2 * np.pi * fs)

mhkit/dolfyn/io/base.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,8 @@ def _read_userdata(fname):
6262
for nm in ["body2head_rotmat", "body2head_vec"]:
6363
if nm in data:
6464
new_name = "inst" + nm[4:]
65-
warnings.warn(
66-
f"{nm} has been deprecated, please change this to {new_name} \
67-
in {fname}."
68-
)
65+
warnings.warn(f"{nm} has been deprecated, please change this to {new_name} \
66+
in {fname}.")
6967
data[new_name] = data.pop(nm)
7068
if "inst2head_rotmat" in data:
7169
if data["inst2head_rotmat"] in ["identity", "eye", 1, 1.0]:

mhkit/dolfyn/io/nortek.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ def update_defs(dat, mag=False, orientmat=False):
10161016
if ahrsid == 195: # 0xc3
10171017
byts = self.read(64)
10181018
dt = unpack(self.endian + "6f9f4x", byts)
1019-
(dv["angrt"][:, c], dv["accel"][:, c]) = (
1019+
dv["angrt"][:, c], dv["accel"][:, c] = (
10201020
dt[0:3],
10211021
dt[3:6],
10221022
)
@@ -1026,7 +1026,7 @@ def update_defs(dat, mag=False, orientmat=False):
10261026
# This skips the "DWORD" (4 bytes) and the AHRS checksum
10271027
# (2 bytes)
10281028
dt = unpack(self.endian + "18f6x", byts)
1029-
(dv["accel"][:, c], dv["angrt"][:, c], dv["mag"][:, c]) = (
1029+
dv["accel"][:, c], dv["angrt"][:, c], dv["mag"][:, c] = (
10301030
dt[0:3],
10311031
dt[3:6],
10321032
dt[6:9],
@@ -1035,7 +1035,7 @@ def update_defs(dat, mag=False, orientmat=False):
10351035
elif ahrsid == 211:
10361036
byts = self.read(42)
10371037
dt = unpack(self.endian + "9f6x", byts)
1038-
(dv["angrt"][:, c], dv["accel"][:, c], dv["mag"][:, c]) = (
1038+
dv["angrt"][:, c], dv["accel"][:, c], dv["mag"][:, c] = (
10391039
dt[0:3],
10401040
dt[3:6],
10411041
dt[6:9],
@@ -1174,12 +1174,12 @@ def convert_imu(self):
11741174
# Rotate the MS orientation data (in MS coordinate system)
11751175
# to be consistent with the ADV coordinate system.
11761176
# (x,y,-z)_ms = (z,y,x)_adv
1177-
(dv[nm][2], dv[nm][0]) = (dv[nm][0], -dv[nm][2].copy())
1177+
dv[nm][2], dv[nm][0] = (dv[nm][0], -dv[nm][2].copy())
11781178
if "orientmat" in self._orient_dnames:
11791179
# MS coordinate system is in North-East-Down (NED),
11801180
# we want East-North-Up (ENU)
11811181
dv["orientmat"][:, 2] *= -1
1182-
(dv["orientmat"][:, 0], dv["orientmat"][:, 1]) = (
1182+
dv["orientmat"][:, 0], dv["orientmat"][:, 1] = (
11831183
dv["orientmat"][:, 1],
11841184
dv["orientmat"][:, 0].copy(),
11851185
)

mhkit/dolfyn/io/nortek2_defs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from . import nortek2_lib as lib
66

7-
87
dt32 = "float32"
98
grav = 9.81
109
# The starting value for the checksum:

mhkit/dolfyn/io/rdi_defs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from . import rdi_lib as lib
55
from .. import time as tmlib
66

7-
87
century = np.uint16(2000)
98
adcp_type = {
109
4: "Broadband",

mhkit/dolfyn/rotate/api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import xarray as xr
88
import warnings
99

10-
1110
# The 'rotation chain'
1211
rc = ["beam", "inst", "earth", "principal"]
1312

mhkit/loads/extreme/mler.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,8 @@ def mler_coefficients(
120120
elif isinstance(rao, np.ndarray):
121121
rao_array = rao
122122
else:
123-
raise TypeError(
124-
"Unsupported type for 'rao'. Must be one of: list, pd.Series, \
125-
np.ndarray, xr.DataArray."
126-
)
123+
raise TypeError("Unsupported type for 'rao'. Must be one of: list, pd.Series, \
124+
np.ndarray, xr.DataArray.")
127125

128126
if not isinstance(rao_array, np.ndarray):
129127
raise TypeError(f"rao must be of type np.ndarray. Got: {type(rao_array)}")

mhkit/tests/acoustics/test_analysis.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import mhkit.acoustics as acoustics
88

9-
109
testdir = dirname(abspath(__file__))
1110
plotdir = join(testdir, "plots")
1211
isdir = os.path.isdir(plotdir)

mhkit/tests/acoustics/test_io.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import mhkit.acoustics as acoustics
88

9-
109
testdir = dirname(abspath(__file__))
1110
plotdir = join(testdir, "plots")
1211
isdir = os.path.isdir(plotdir)

0 commit comments

Comments
 (0)