AllenNeuralDynamics / AllenNeuralDynamics/Aind.Behavior.VrForaging.Packaging

`sites` table: `last_stop_time`/`last_stop_duration`/`velocity_at_last_stop` are always null for legacy (`dataset_version < 0.6.0`) sessions

Đang mở
#59 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
0
Fork
0
Merge trung bình
7 giờ 11 phút
Pull request đã merge (30 ngày)
12

Mô tả

**Summary**

In the `sites` table (parquet or NWB trials table), the last three non-index columns — `last_stop_time`, `last_stop_duration`, `velocity_at_last_stop` — are 100% null for v0.3-0.4 legacy-schema session I've checked. This will happen for all legacy (<0.6) sessions.

**Steps to reproduce**

```python
import pandas as pd

df = pd.read_parquet("/sites.parquet")
cols = ["last_stop_time", "last_stop_duration", "velocity_at_last_stop"]
print(df[cols].isna().mean()) # 1.0, 1.0, 1.0 for every dataset_version < 0.6.0 session
```

Reproduced `dataset_version` 0.3.0 and 0.4.0, e.g. `707349_2024-04-17_10-34-09` (0.3.0) and `behavior_745301_2024-09-11_15-04-58` (0.4.0).

**Root cause (found in source)**

https://github.com/AllenNeuralDynamics/Aind.Behavior.VrForaging.Packaging/tree/main/src/aind_behavior_vr_foraging_packaging/session_pipeline.py's `_LEGACY_VERSION_CUTOFF = 0.6.0` routes any session with `dataset_version < 0.6.0` to `LegacySiteTableProcessor`, [whose docstring states](https://github.com/AllenNeuralDynamics/Aind.Behavior.VrForaging.Packaging/blob/main/src/aind_behavior_vr_foraging_packaging/processing/_legacy_site_table.py#L35C1-L36C1):

> IsStopped and velocity streams are absent; last_stop_* fields are always None.

So this is expected/deliberate behavior for legacy datasets, not a parsing bug.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.