SainsburyWellcomeCentre / aeon_mecha

Project Aeon's main library for interfacing with acquired data. Contains modules for raw data file io, data querying, data processing, data qc, database ingestion, and building computational data pipelines.
BSD 3-Clause "New" or "Revised" License
3 stars 5 forks source link

Updated Pose Reader for Bonsai-Sleap0.3 #372

Closed jkbhagatio closed 2 months ago

jkbhagatio commented 2 months ago

Fixes #364 Fixes #365 Fixes #328 Fixes #308

Summary by CodeRabbit

github-actions[bot] commented 2 months ago

Image description CodeRabbit

Walkthrough

The changes primarily focus on enhancing the PoseReader class in the aeon/io/reader.py file to handle different versions of Bonsai.Sleap (0.2 and 0.3). The modifications include adjustments in column names, data processing, error handling for different versions, and reordering of columns in the data frame. A new method class_int2str has been introduced for converting class integers to strings based on the configuration file.

Changes

File Summary
aeon/io/reader.py The PoseReader class has been updated to handle different versions of Bonsai.Sleap (0.2 and 0.3). This includes changes in column names, data processing, and error handling. The read method has been modified to handle identity likelihood data differently. A new method class_int2str has been added for converting class integers to strings. Columns are now processed and reordered differently in the data frame.

Uplevel your code reviews with CodeRabbit Pro ### CodeRabbit Pro If you like this project, please support us by purchasing the [Pro version](https://coderabbit.ai). The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.