Skip to content

Releases: neuroinformatics-unit/movement

v0.7.1

06 Jun 09:54
fe28a5f
Compare
Choose a tag to compare

✨ Highlight ✨ netCDF is the file format 🗃️ of choice for saving movement datasets 💾

  • Test and document saving movement datasets to netCDF by @niksirbi in #606

Saving to netCDF is the recommended way to preserve the complete state of your analysis, including all variables, coordinates, and attributes. Below is an example of how you may integrate netCDF into you movement-powered workflows:

from movement.io import load_poses
from movement.filtering import rolling_filter
from movement.kinematics import compute_speed

ds = load_poses.from_file(
    "path/to/my_data.h5", source_software="DeepLabCut", fps=30
)

# Apply a rolling median filter to smooth the position data
ds["position_smooth"] = rolling_filter(
    ds["position"], window=5, statistic="median"
)

# Compute speed based on the smoothed position data
ds["speed"] = compute_speed(ds["position_smooth"])

# Save the dataset to a netCDF file
# This includes the original position and confidence data,
# the smoothed position, and the computed speed
ds.to_netcdf("my_data_processed.nc")

To later load the dataset back from disk:

import xarray as xr

ds = xr.open_dataset("my_data_processed.nc")

Miscellaneous

  • Completely remove deprecated median_filter function by @niksirbi in #611
  • Add log_to_attrs decorator to scale function by @niksirbi in #604

Warning

The deprecated movement.filtering.median_filter() function has been completely removed. Use movement.filtering.median_filter() instead, with statistic="median".

Housekeeping

New Contributors

Full Changelog: v0.7.0...v0.7.1

v0.7.0

29 May 16:09
87acf4d
Compare
Choose a tag to compare

🎉 Highlight: support for the NWB file format 🧠

movement poses datasets can now be loaded from and saved to NeuroData Without Borders (NWB) files. The pose tracks are formatted according to the ndx-pose extension.

This was a global team effort started long ago by @edeno, continued by me, and finally wrapped up by @lochhh.
Many thanks go to @luiztauffer for providing advice and crash-testing.

Example usage:

import pynwb
import xarray as xr
from movement.io import load_poses, save_poses

# Load pose tracks from open NWBFile objects:
with pynwb.NWBHDF5IO("path/to/file.nwb", mode="r") as io:
    nwb_file = io.read()
    ds = load_poses.from_nwb_file(nwb_file)

# Or, directly load pose tracks from NWB files on disk.
# Here merge data from 2 files into a multi-individual dataset:
ds_singles = [load_poses.from_nwb_file(f) for f in ["id1.nwb", "id2.nwb"]]
ds_multi = xr.merge(ds_singles)

# Create NWBFile objects for each individual and save them to disk
nwb_files = save_poses.to_nwb_file(ds)
for file in nwb_files:
    with NWBHDF5IO(f"{file.identifier}.nwb", "w") as io:
    io.write(file)

As always, let us know if you encounter any hurdles with this.

What's Changed

Full Changelog: v0.6.1...v0.7.0

v0.6.1

14 May 09:34
57b5cbd
Compare
Choose a tag to compare

What's Changed

Small updates to documentation

  • Add Mahi7828 as contributor and change str to locate section by @sfmig in #576
  • Clarify x,y data in VIA-tracks by @sfmig in #577
  • Add announcement banner for open software week by @niksirbi in #578
  • Added a sub-gallery for "Advanced" examples by @niksirbi in #582
  • Add ShigrafS to github contributors by @niksirbi in #587
  • Contributors-Readme-Action: Update contributors list by @github-actions in #589
  • Update animovement website URL by @lochhh in #588

Internal refactoring of the kinematics module

Note

The interface for using all kinematics functions remains unchanged

Full Changelog: v0.6.0...v0.6.1

v0.6.0

07 May 17:26
5395b70
Compare
Choose a tag to compare

What's Changed

Highlight: ✨ See into the past and future ✨

@sfmig has worked hard to visualise point trajectories as "tracks" in napari.
In effect, this means that in our GUI you can now display each point's past ("tail") and future ("head").
Read more about it the updated guide.

  • Add tracks to napari visualisation by @sfmig in #476
  • Update GUI docs with tracks details by @sfmig in #547

napari_tracks_layer_head_length

Documentation

  • Update upgrading instructions by @sfmig in #551
  • Add people section and support for automatic contributors list update by @lochhh in #554
  • Contributors-Readme-Action: Update contributors list by @github-actions in #559
  • Removed warning about package being in early development by @niksirbi in #560

Bug fixes

  • Fix _warn_about_nan_proportion bugs by @lochhh in #541
  • Fix: frame slider to show max n of frames across all loaded files by @sfmig in #503
  • Fix: update frame slider after deletion of layers by @sfmig in #504
  • Ensure derived data variables have correct name by @Ishaan0132 in #523
  • Fix for bboxes dataset loading by @sfmig in #561
  • Fix duplicate reference when closing and reopening napari widget by @sfmig in #575

Housekeeping

New Contributors

  • @github-actions made their first contribution in #559

Full Changelog: v0.5.1...v0.6.0

v0.5.1

03 Apr 09:52
956faf3
Compare
Choose a tag to compare

Note

This release changes the way we do logging in movement, which fixes a bug (certain warnings were not showing up on the console) and impacts developers. We encourage contributors to the consult the "Logging" section of the updated contributing guide.

What's Changed

New Contributors

Full Changelog: v0.5.0...v0.5.1

v0.5.0

27 Mar 10:54
a87156f
Compare
Choose a tag to compare

Highlight

Our Regions of Interest (RoI) classes now have a .plot method for conveniently showing the RoI with matplotlib.
@willGraham01 has showcased this and other cool RoI features—like computing distances and angles relative to RoIs—in a new comprehensive example.

image

What's Changed

Full Changelog: v0.4.0...v0.5.0

v0.4.0

14 Mar 16:28
bdb9fc6
Compare
Choose a tag to compare

What's Changed

@sfmig has added the ability to load tracked bounding boxes in our GUI, and has also improved the GUI user experience by matching the colour of the text labels to the colour of the displayed points.

  • Data points text labels in napari by @sfmig in #466
  • Extend napari plugin to bboxes' centroids by @sfmig in #434

A small fix to the docs:

  • Correct confidence_array shape in from_numpy example docstring by @Ishaan0132 in #492

Full Changelog: v0.3.0...v0.4.0

v0.3.0

13 Mar 19:37
1cc05a4
Compare
Choose a tag to compare

What's Changed

@willGraham01 and @stellaprins have summarised their work on spatial navigation features introduced during Jan-Feb 2025 in a blogpost.

With the help of @angkul07 we've added a general rolling_filter function, which can be used to apply a rolling median, mean, max, or min filters. The more specific median_filter function is being deprecated and will be removed in a future release.

  • Added a general filter function for mean and median filter by @angkul07 in #455

New Contributors

Full Changelog: v0.2.0...v0.3.0

v0.2.0

10 Mar 12:50
85091a7
Compare
Choose a tag to compare

New feature

Bug fix

Full Changelog: v0.1.0...v0.1.1

v0.1.0

07 Mar 09:12
eaa3e22
Compare
Choose a tag to compare

The graphical user interface (GUI) is here!

This is the first release including our napari plugin, which we'll gradually develop into a fully fledged GUI for movement. We have been working on a minimal version of this plugin for a while and are happy to share it with the world with this release.

Read this guide on how to use it.

  • Minimal viable version of the movement plugin for napari. by @niksirbi in #450
  • Fix: remove NaN points before passing to points layer by @sfmig in #465

Regions of interest and spatial navigation

This chunk of work was spearheaded by @willGraham01 and includes many goodies for analysing tracking data in relation to user-defined regions of interest. Stay tuned for more to come in the next releases.

Quick plots

Mostly thanks to @stellaprins, movement now includes a plots submodule, currently offering two functions for quickly visualising trajectories and occupancy heatmaps.

New and overhauled examples

Many of our examples were updated in this release, but we'd like to draw special attention to the ones on pupil tracking and head direction. Our more advanced users may appreciate the new example on broadcasting functions along data dimensions.

Housekeeping

As usual, it takes lots of work to keep the lights on. We'd like to draw particular attention to two changes that may impact users:

  1. We've updated the supported Python versions to 3.11 - 3.13
  2. The print_report parameter now defaults to False for all functions in the movement.filtering module.

New Contributors

Full Changelog: v0.0.23...v0.1.0