You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a78e2bc
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
9
9
10
10
### Added
11
11
12
+
-**Metric documentation for the 3-D fixes.** IL-15, IL-16 and IL-17 (METRICS_SPEC and the in-app text) now say that a native file's z is cleaned like x and y and bounded by the water column, and that IL-15 on a fused session counts the side view's own samples; `docs/dev/DECISIONS.md` gains D-044 recording the decisions of the 3-D review.
12
13
-**Wiki: 3-D known issues and what to diff after the 3-D fixes.***Known issues* gains a 3-D section (one camera pair and no optics correction, flagged fused depth, GL-1 vs GL-16 frames, the shared native water column, `flip`), and *Reanalysing after a metric fix* lists the 3-D numbers that changed since v0.1.0.
13
14
-**User guide: the 3-D data path after the review fixes.** The guide describes the Fusion dialog's upside-down box and helper line, the depth provenance flags, `z_cm`, the water column's effect on IL-16/IL-17, the README count of samples outside it, and GL-16's `frac_frames_used_3d`; the PDF is rebuilt. The guide has no screenshot of the Fusion dialog or the native Calibration page, so none changed.
14
15
-**Clearer wording where the 3-D settings are made.** The Fusion dialog says under the shared horizontal axis and flip that they are used only to check that the two views agree and do not change the fused positions (the two never moved the fused data, but sat beside the surface and floor rows as if they did). The Calibration page's water-column help says one surface and floor apply to every session, so the files must share a vertical axis and an origin (the origin cannot be checked from the files), and that samples outside the column are left out of the vertical-position metrics and of the 3-D path length and speed. The run `README.md` of a native 3-D session with a water column gains a row, **Samples outside the water column**, with the count (0 when nothing is outside), so the exclusion is visible next to the numbers it affects.
Copy file name to clipboardExpand all lines: docs/METRICS_SPEC.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -409,7 +409,7 @@ info-button modal (§6).
409
409
|**Formula**|`T`, `B` = top and bottom image rows of the main zones (`T < B`); `d[t,k] = (y[t,k] − T) / (B − T)` for frames with `T ≤ y[t,k] ≤ B`; `mean_depth_fraction`, `median_depth_fraction` and `sd_depth_fraction` (n − 1) over those frames; `mean_depth_cm = mean(y − T) / px_per_cm`; `frac_outside_extent` = share of non-NaN frames with `y < T` or `y > B`|
|**Units**| fraction (0 = water surface, 1 = tank floor); cm; fraction; categorical |
412
-
|**Assumptions**| The project declares a side camera view, and the top edge of the main zones is the water surface and the bottom edge the tank floor. The camera is upright: image rows grow downward, so a larger y is deeper. Every main-level additive ("+") zone is pooled into one column, so tanks side by side share it; tanks stacked on top of each other would pool into one tall column. Subtractive ("−") zones and secondary-level zones do not move the extent. Frames outside the column are dropped and counted, never clipped to the surface or floor. Interpolated frames are included. |
412
+
|**Assumptions**| The project declares a side camera view, and the top edge of the main zones is the water surface and the bottom edge the tank floor. The camera is upright: image rows grow downward, so a larger y is deeper. Every main-level additive ("+") zone is pooled into one column, so tanks side by side share it; tanks stacked on top of each other would pool into one tall column. Subtractive ("−") zones and secondary-level zones do not move the extent. Frames outside the column are dropped and counted, never clipped to the surface or floor. Interpolated frames are included. On a fused 3-D session `frac_outside_extent` is the share of the side view's own samples outside the column (top-view gaps do not change it). On a native 3-D file the entered column applies to every session, and without it `depth_extent_source` is `none:no_water_column`. |
413
413
|**Warnings**| No refraction or parallax correction: a fish near the front glass looks larger and sits at a different apparent depth than one at the back, and depth in cm uses a single scale for the whole picture. A column taken from zones that do not match the video, or a tracker following reflections, shows up as a high `frac_outside_extent` (a warning is logged above 5 %). Without a main zone there is no depth: the values are NaN and `depth_extent_source` says why (`none:no_main_zone`, `none:degenerate_zone`, `none:frame_size_mismatch` for zones drawn at another recorded frame size, `none:not_derived`); the video frame is never used instead. Depth is measured from the surface; height above the floor is `1 − depth`. For band occupancy, latency, visits and dwell on a side view, draw stacked secondary-level zones and use Z-1 to Z-9. |
414
414
|**Parameters**|`water_column` is `derived=True` and cannot be overridden. |
415
415
|**Reference**| Standard descriptive statistic of vertical position in the water column; no single originating work defines this mean-depth fraction. The construct, vertical position as a behavioural measure in novel-tank assays, is in the supporting references. |
@@ -427,7 +427,7 @@ info-button modal (§6).
427
427
|**Formula**|`Σ_t ‖P[t+1, k] − P[t, k]‖` over frame pairs where both positions are finite, with `P = (x_px / px_per_cm, y_px / px_per_cm, depth · tank_height_cm)`|
|**Assumptions**| The depth comes from a side camera at right angles to the top camera. A step needs three finite coordinates (x, y, depth) at both of its frames; an animal with no such step has **no measured distance**, reported as NaN (cm and BL) with `n_valid_steps` 0, never as 0. Interpolated frames contribute a straight line |
430
+
|**Assumptions**| The depth comes from a side camera at right angles to the top camera. A step needs three finite coordinates (x, y, depth) at both of its frames; an animal with no such step has **no measured distance**, reported as NaN (cm and BL) with `n_valid_steps` 0, never as 0. Interpolated frames contribute a straight line. A native 3-D file's z is gap-filled and smoothed with the same settings as x and y, and a sample outside the water column (when one is set) is left out, so the step touching it is dropped, never clipped|
431
431
|**Warnings**| Under-smoothed data inflates the length, as for IL-1 (and depth noise adds to it). No refraction or parallax correction. A wrong tank height scales every vertical distance. Over the steps where depth is also finite (see `n_valid_steps`) it is at least IL-1. Without depth or a cm scale all columns are NaN |
432
432
|**Reference**| Standard kinematics |
433
433
|**Supporting references**| Martin & Bateson 2007, Measuring Behaviour: An Introductory Guide, 3rd ed. (Cambridge University Press) (DOI: 10.1017/CBO9780511810893) |
@@ -441,7 +441,7 @@ info-button modal (§6).
441
441
|**Priority**| Optional |
442
442
|**Inputs**|`PreprocessedSession.kinematics.speed_px_s`, `PreprocessedSession.depth`, `px_per_cm` and `depth_height_cm` of a fused 3-D session (for a native 3-D file, the absolute `PreprocessedSession.z` in place of `depth · tank_height_cm`); the pipeline's `KinematicsCfg`|
443
443
|**Required preprocessing**| A fused 3-D session (top view plus side view) with a cm scale for the top view (scalar or session calibration, not body-length calibration). A project without these skips the metric and the run records why |
444
-
|**Formula**|`v3[t, k] = sqrt(vh² + vz²)` with `vh = speed_px_s[t, k] / px_per_cm` (identical to the horizontal part of IL-2 in cm/s) and `vz` the vertical speed in cm/s of `Z = depth · tank_height_cm`, from the same estimator and window as the pipeline's kinematics (Savitzky-Golay by default, forward difference when the project selects it); mean/median/max over frames where both `vh` and `vz` are finite |
444
+
|**Formula**|`v3[t, k] = sqrt(vh² + vz²)` with `vh = speed_px_s[t, k] / px_per_cm` (identical to the horizontal part of IL-2 in cm/s) and `vz` the vertical speed in cm/s of `Z = depth · tank_height_cm` (for a native file, its z after the same gap filling and smoothing as x and y, with samples outside the water column left out), from the same estimator and window as the pipeline's kinematics (Savitzky-Golay by default, forward difference when the project selects it); mean/median/max over frames where both `vh` and `vz` are finite |
|**Assumptions**| The depth comes from a side camera at right angles to the top camera. A frame needs both speeds finite: where the estimator gives no vertical speed (the last frame of the forward-difference estimator, a depth segment shorter than the window needs) the frame is left out of the 3-D speed, never counted as 0. An animal with no such frame is NaN. In a binned run `vz` is estimated inside each bin, so the estimator's edge frames differ slightly from the whole-session values |
0 commit comments