SLAP2 photon gain varies across sessions and paths (constant across trials); fixed photonScale and per-trial Vk don't match
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
Hướng nghiên cứu
Start by reading setParamsExtractTrial.m (where photonScale = 25 is fixed) and the Vk estimation in localizeSources_vIM.m, then reproduce the photon transfer curve that slap2_f0/stats.py computes from exported trials. The first empirical step is measuring single-photon amplitude on the raw/200 Hz data for the four sessions and both paths and comparing against acquisition metadata. Done means photon units are consistent across sessions and paths, either by fixing a preprocessing scaling or by estimating the gain once per session/path and feeding it to both extraction and localization.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
In SLAP2 data, the photon-noise gain (temporal variance per unit mean) is constant across trials of a session, but it differs by up to 1.8× between sessions, and in one session between its two paths. The true photon gain should be constant barring an instrument recalibration. So either the instrument settings changed, or some step before GIAnT's fit scales the data differently by session or path.
GIAnT assumes one gain for all SLAP2 data in extraction: photonScale = 25 in setParamsExtractTrial.m. Localization re-estimates Vk independently for every trial in localizeSources_vIM.m.
Measurement
Data: the 80 Hz registered movies (alignHz 80, after MultiRoiRegistration), as SiLo localizes on them. Taken from the first 180 s of the four integration-test sessions, run through GIAnT main at d2fb85c.
Method:
- Per pixel, take the temporal mean and variance of movie − GIAnT's fitted activity, on background pixels (valid and outside every labeled region, so with no fitted activity).
- Fit binned variance against mean across pixels: a photon transfer curve. The slope is the gain; the intercept reflects an offset or additive noise.
| session | path | trial | lines / cycle | median bg mean | var / mean | PTC slope | intercept |
|---|---|---|---|---|---|---|---|
| 780125_2025-03-14 | 1 | 2 | 122 | 2.80 | 7.97 | 7.93 | −0.02 |
| 803121_2025-10-29 | 1 | 3 | 247 | 5.82 | 10.74 | 10.73 | −0.20 |
| 878030_2026-08-28 | 1 | 1 | 96 | 1.83 | 12.76 | 14.56 | −3.38 |
| 878030_2026-08-28 | 1 | 2 | 96 | 1.86 | 12.36 | 13.95 | −3.03 |
| 878030_2026-08-28 | 1 | 3 | 96 | 1.86 | 12.50 | 14.14 | −3.12 |
| 878030_2026-08-28 | 1 | 5 | 96 | 1.91 | 12.70 | 14.16 | −2.86 |
| 878030_2026-08-28 | 2 | 2 | 448 | 1.92 | 9.36 | 10.45 | −2.17 |
| 885233_2026-10-02 | 1 | 1 | 73 | 3.04 | 9.63 | 10.40 | −2.41 |
| 885233_2026-10-02 | 1 | 2 | 73 | 2.95 | 9.79 | 10.62 | −2.52 |
| 885233_2026-10-02 | 1 | 4 | 73 | 2.91 | 9.88 | 10.59 | −2.08 |
| 885233_2026-10-02 | 2 | 2 | 297 | 3.15 | 9.92 | 10.53 | −1.90 |
Observations:
- Constant across trials: within ±3% for the four 878030 Path 1 trials and the three 885233 Path 1 trials.
- Different across sessions: the slope ranges from 7.9 to 14.6.
- Different across paths in one session: 878030 Path 1 is 14.2 and Path 2 is 10.5. In 885233 the two paths agree (10.5).
- Not explained by the alignment kernel: lines per cycle sets how many raw samples the 80 Hz kernel averages per pixel, but it shows no relation to the gain. Correcting for the kernel's effective sample count (
exp(-|Δline|/134)within ±402 lines) makes the spread larger. - Not explained by registration smoothing: neighbour correlations of the noise are similar in every session (0.22–0.27 between rows, 0.36–0.40 between columns, 0.50–0.69 between consecutive frames).
- Intercepts: about 0 in two sessions, and −2 to −3 counts² in the other two, equivalent to an offset of about +0.2 counts.
Why it matters
- Extraction: it divides the data by a fixed
photonScale. If the per-photon amplitude differs by 1.8× between sessions or paths, the noise model and the sparsity penalties are miscalibrated by that much from one recording to the next. - Localization: the per-trial
Vkadapts to the gain. But it is the 10th percentile of a ratio over the brightest 10% of pixels, from the first 500 frames of each trial. It is recomputed for every trial even though the gain is constant within a session and path, so it adds trial-to-trial noise and bias to the Z-scores.
Caveats
- These numbers come from the 80 Hz aligned movie, not the raw samples or the 200 Hz data that
extractTrialfits. - The alignment kernel and registration interpolation scale the absolute values. That can't make the gain constant across trials yet session- and path-dependent unless those steps depend on session or path settings, and this should be checked.
Suggested next steps
- On raw data, check whether the single-photon amplitude differs between these sessions and paths. Compare against acquisition metadata (detector gain, digitizer settings, any averaging in the reader).
- If a preprocessing step causes it, fix the scaling so photon units are the same everywhere.
- If the instrument causes it (per path, or after recalibrations), estimate the photon scale once per session and path, pooled over trials, or read it from metadata. Use it in both extraction (
photonScale) and localization (Vk), instead of the fixed 25 and the per-trialVk.
Found while building training data for a blind-spot baseline network (AllenNeuralDynamics/slap2-F0-network; slap2_f0/stats.py computes these statistics from exported trials).
- Ngôn ngữ chính
- MATLAB
- Star
- 3
- Fork
- 3
- Merge trung bình
- 1 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 31
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của AllenNeuralDynamics/GIAnT-MATLAB
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 8/100
AllenNeuralDynamics/GIAnT-MATLAB#56 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
AllenNeuralDynamics/GIAnT-MATLAB#49 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
AllenNeuralDynamics/GIAnT-MATLAB#42 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
AllenNeuralDynamics/GIAnT-MATLAB#41 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
AllenNeuralDynamics/GIAnT-MATLAB#36 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của AllenNeuralDynamics/GIAnT-MATLAB
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
UniprJRC/DSwithMATLAB#255 ·
-
Bump ODEInterface_jll to rebuilt 0.0.2+2 (execstack fix) in 8 benchmark folder ManifestsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
SciML/SciMLBenchmarks.jl#2044 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
MohammadRaziei/ctoon#12 ·
-
easy first-contributor first-contributors good first issue help wanted matlab up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
fork-commit-merge/fork-commit-merge#8766 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100