Skip to content

Commit 868985c

Browse files
committed
Black formatting
1 parent afc48a2 commit 868985c

7 files changed

Lines changed: 9 additions & 19 deletions

File tree

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 & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ def update_defs(dat, mag=False, orientmat=False):
12761276
if ahrsid == 195: # 0xc3
12771277
byts = self.read(64)
12781278
dt = unpack(self.endian + "6f9f4x", byts)
1279-
(dv["angrt"][:, c], dv["accel"][:, c]) = (
1279+
dv["angrt"][:, c], dv["accel"][:, c] = (
12801280
dt[0:3],
12811281
dt[3:6],
12821282
)
@@ -1286,7 +1286,7 @@ def update_defs(dat, mag=False, orientmat=False):
12861286
# This skips the "DWORD" (4 bytes) and the AHRS checksum
12871287
# (2 bytes)
12881288
dt = unpack(self.endian + "18f6x", byts)
1289-
(dv["accel"][:, c], dv["angrt"][:, c], dv["mag"][:, c]) = (
1289+
dv["accel"][:, c], dv["angrt"][:, c], dv["mag"][:, c] = (
12901290
dt[0:3],
12911291
dt[3:6],
12921292
dt[6:9],
@@ -1295,7 +1295,7 @@ def update_defs(dat, mag=False, orientmat=False):
12951295
elif ahrsid == 211:
12961296
byts = self.read(42)
12971297
dt = unpack(self.endian + "9f6x", byts)
1298-
(dv["angrt"][:, c], dv["accel"][:, c], dv["mag"][:, c]) = (
1298+
dv["angrt"][:, c], dv["accel"][:, c], dv["mag"][:, c] = (
12991299
dt[0:3],
13001300
dt[3:6],
13011301
dt[6:9],
@@ -1349,8 +1349,6 @@ def read_aqd_mag(self):
13491349
dv["amp"][2, c],
13501350
) = unpack(self.endian + "5H2h2BHhH7h3Bx", byts[8:48])
13511351
dv["pressure"][c] = 65536 * p_msb + p_lsw
1352-
status = bin(status)[2:].zfill(8)
1353-
13541352
self.checksum(byts)
13551353
self.c += 1
13561354

@@ -1471,12 +1469,12 @@ def convert_imu(self):
14711469
# Rotate the MS orientation data (in MS coordinate system)
14721470
# to be consistent with the ADV coordinate system.
14731471
# (x,y,-z)_ms = (z,y,x)_adv
1474-
(dv[nm][2], dv[nm][0]) = (dv[nm][0], -dv[nm][2].copy())
1472+
dv[nm][2], dv[nm][0] = (dv[nm][0], -dv[nm][2].copy())
14751473
if "orientmat" in self._orient_dnames:
14761474
# MS coordinate system is in North-East-Down (NED),
14771475
# we want East-North-Up (ENU)
14781476
dv["orientmat"][:, 2] *= -1
1479-
(dv["orientmat"][:, 0], dv["orientmat"][:, 1]) = (
1477+
dv["orientmat"][:, 0], dv["orientmat"][:, 1] = (
14801478
dv["orientmat"][:, 1],
14811479
dv["orientmat"][:, 0].copy(),
14821480
)

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

0 commit comments

Comments
 (0)