Skip to content

Commit 1b6b44d

Browse files
authored
removed "analysis" level from namespace (#333)
1 parent f7f3b48 commit 1b6b44d

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

docs/source/getting_started/movement_dataset.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ Let's imagine we want to compute the instantaneous velocity of all tracked
232232
points and store the results within the same dataset, for convenience.
233233

234234
```python
235-
from movement.analysis.kinematics import compute_velocity
235+
from movement.kinematics import compute_velocity
236236

237237
# compute velocity from position
238238
velocity = compute_velocity(ds.position)
@@ -246,7 +246,7 @@ ds["velocity"] = compute_velocity(ds.position)
246246
ds.velocity
247247
```
248248

249-
The output of {func}`movement.analysis.kinematics.compute_velocity` is an {class}`xarray.DataArray` object,
249+
The output of {func}`movement.kinematics.compute_velocity` is an {class}`xarray.DataArray` object,
250250
with the same **dimensions** as the original `position` **data variable**,
251251
so adding it to the existing `ds` makes sense and works seamlessly.
252252

examples/compute_kinematics.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,18 @@
117117
# %%
118118
# Compute displacement
119119
# ---------------------
120-
# The :mod:`movement.analysis.kinematics` module provides functions to compute
120+
# The :mod:`movement.kinematics` module provides functions to compute
121121
# various kinematic quantities,
122122
# such as displacement, velocity, and acceleration.
123123
# We can start off by computing the distance travelled by the mice along
124124
# their trajectories:
125125

126-
import movement.analysis.kinematics as kin
126+
import movement.kinematics as kin
127127

128128
displacement = kin.compute_displacement(position)
129129

130130
# %%
131-
# The :func:`movement.analysis.kinematics.compute_displacement`
131+
# The :func:`movement.kinematics.compute_displacement`
132132
# function will return a data array equivalent to the ``position`` one,
133133
# but holding displacement data along the ``space`` axis, rather than
134134
# position data.
@@ -269,7 +269,7 @@
269269
velocity = kin.compute_velocity(position)
270270

271271
# %%
272-
# The :func:`movement.analysis.kinematics.compute_velocity`
272+
# The :func:`movement.kinematics.compute_velocity`
273273
# function will return a data array equivalent to
274274
# the ``position`` one, but holding velocity data along the ``space`` axis,
275275
# rather than position data. Notice how ``xarray`` nicely deals with the

examples/filter_and_interpolate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
# Imports
1010
# -------
1111
from movement import sample_data
12-
from movement.analysis.kinematics import compute_velocity
1312
from movement.filtering import filter_by_confidence, interpolate_over_time
13+
from movement.kinematics import compute_velocity
1414

1515
# %%
1616
# Load a sample dataset

movement/analysis/__init__.py

Whitespace-only changes.

movement/analysis/kinematics.py renamed to movement/kinematics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def compute_head_direction_vector(
290290
"""Compute the 2D head direction vector given two keypoints on the head.
291291
292292
This function is an alias for :func:`compute_forward_vector()\
293-
<movement.analysis.kinematics.compute_forward_vector>`. For more
293+
<movement.kinematics.compute_forward_vector>`. For more
294294
detailed information on how the head direction vector is computed,
295295
please refer to the documentation for that function.
296296

tests/test_integration/test_kinematics_vector_transform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pytest
55
import xarray as xr
66

7-
import movement.analysis.kinematics as kin
7+
import movement.kinematics as kin
88
from movement.utils import vector
99

1010

tests/test_unit/test_kinematics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pytest
55
import xarray as xr
66

7-
from movement.analysis import kinematics
7+
from movement import kinematics
88

99

1010
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)