Consolidate functions duplicated in ophys-slap2-analysis into GIAnT-MATLAB
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
- 25/100
Hướng nghiên cứu
Start by reviewing the inventory and proposed consolidation in this issue, then compare the named GIAnT-MATLAB and ophys-slap2-analysis entry points, especially setParams, optionsGUI, and the older summarize_LoCo pipeline. The issue leaves key decisions open about retiring or freezing that pipeline and choosing an annotation format. Done means the repositories no longer have unintended function-name collisions, their dependency and path setup is documented, and the proposed path-resolution test is in place.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
GIAnT-MATLAB started on 2026-03-23 by moving processing code out of ophys-slap2-analysis, but the originals stayed there. I compared the two main branches (GIAnT-MATLAB at c69d1db, ophys-slap2-analysis at AllenNeuralDynamics/ophys-slap2-analysis@8b89d18) by file name and by content. 31 GIAnT functions have a copy or an earlier version in ophys-slap2-analysis, and two more names differ from GIAnT's only by letter case.
This causes three problems:
-
With both repos on the MATLAB path, one copy silently shadows the other. The worst case is
setParams: the two copies have the same signature but disjoint case lists. Whichever is first on the path makes the other repo's stages fail with "Unknown function name passed to setParams.m". -
Fixes land in only one copy. GIAnT has:
- the
nansvdpadding fix - the
drawROIscircle-radius fix - an
errorinstead ofkeyboardin thexcorr2_nans*functions
ophys-slap2-analysis has the
optionsGUIdialog-centering fix (AllenNeuralDynamics/ophys-slap2-analysis@2282dd1), and GIAnT does not. - the
-
New copies are still being made.
extractDendritesnow carriesreadTrialTableH5, an inline copy of GIAnT'sloadStructFromH5, so that it doesn't need GIAnT-MATLAB on the path.
Since the split, only four of these ophys-slap2-analysis files have changed: setParams, optionsGUI, postAcquisitionAnnotation and summarize_LoCo. Every other copy there is an older version of the GIAnT code.
Inventory
A. Identical. These can be deleted from ophys-slap2-analysis once GIAnT is on its path.
| GIAnT-MATLAB | ophys-slap2-analysis | Files calling it in ophys-slap2-analysis |
|---|---|---|
dependencies/alignment/dftregistration_clipped.m |
matlab/dependencies/dftregistration_clipped.m |
8 |
dependencies/alignment/interpFrame.m |
matlab/dependencies/interpFrame.m |
2 |
dependencies/alignment/interpFrames.m |
matlab/preprocessing/interpFrames.m |
1 |
dependencies/alignment/slap2/bandscan/makeLookupTable.m |
matlab/slap2/Registration/Michael/makeLookupTable.m |
2 |
dependencies/alignment/slap2/bandscan/poissonLogLikelihoodTable.m |
matlab/slap2/Registration/Michael/poissonLogLikelihoodTable.m |
2 |
dependencies/alignment/slap2/getOnlineMotion.m |
matlab/slap2/Registration/getOnlineMotion.m |
3 |
dependencies/io/loadMetadata.m |
matlab/slap2/loadMetadata.m |
9 |
B. Same signature, and the GIAnT copy has fixes. The GIAnT copies are drop-in replacements.
| GIAnT-MATLAB | ophys-slap2-analysis | What GIAnT changed | Callers |
|---|---|---|---|
dependencies/alignment/xcorr2_nans.m |
matlab/dependencies/xcorr2_nans.m |
error instead of keyboard when the motion is NaN |
13 |
dependencies/alignment/xcorr2_nans3d.m |
matlab/dependencies/xcorr2_nans3d.m |
Same | 1 |
dependencies/alignment/xcorr2_nans_weighted.m |
matlab/dependencies/xcorr2_nans_weighted.m |
Same, plus a faster version of the same arithmetic | 1 |
dependencies/nansvd.m |
matlab/dependencies/nansvd.m |
Pads the outputs when svds returns fewer components than requested |
3 |
dependencies/gui/drawROIs.m |
matlab/dependencies/drawROIs.m |
Circle ROIs keep their radius, closing the window keeps the ROIs, and the display image comes from annotationDisplayImage |
6 |
dependencies/nanmedfilt2.m |
matlab/dependencies/nanmedfilt2.m |
Licence header and an error-message typo only | 3 |
dependencies/alignment/makeConsensusTemplate.m |
matlab/slap2/Registration/makeTemplateMultiRoi.m |
Renamed only | 6 |
C. Same name, diverged. These are stages of the older ophys-slap2-analysis pipeline, which uses trialTable.mat and .mat alignment files.
| Function | GIAnT-MATLAB | ophys-slap2-analysis | How they differ |
|---|---|---|---|
buildTrialTableSLAP2 |
buildTrialTableSLAP2.m |
matlab/preprocessing/buildTrialTableSLAP2.m |
GIAnT takes (dr, savedr, useAllFiles) and writes trial_table.h5; ophys-slap2-analysis takes (dr) and writes trialTable.mat |
verifyFiles |
dependencies/verifyFiles.m |
matlab/preprocessing/verifyFiles.m |
ophys-slap2-analysis takes an extra params argument |
loadAndProcessTrialAsync |
dependencies/extraction/activityImage/ |
matlab/preprocessing/ |
GIAnT takes the motion_correction folder and reads the H5 alignment layout |
localizeSources_vIM |
dependencies/extraction/activityImage/ |
matlab/preprocessing/ |
Different first output (skIm vs summaryEroded) |
processAllTrials_Async |
dependencies/extraction/ |
matlab/preprocessing/ |
Same signature; GIAnT expects the H5 alignment layout (alignData.slap2) and reads frames only at the sampled pixels |
extractTrial |
dependencies/extraction/ |
matlab/preprocessing/ |
GIAnT takes an extra alignData argument |
setParamsExtractTrial |
dependencies/extraction/ |
matlab/preprocessing/ |
The parameter sets have diverged |
D. Same name, different function (collisions)
| Name | GIAnT-MATLAB | ophys-slap2-analysis | Notes |
|---|---|---|---|
setParams |
dependencies/gui/setParams.m, with cases SILo, MultiRoiRegistration, BandRegistration, StripRegistration |
matlab/dependencies/setParams.m, with cases summarize_NoLoCo, summarize_LoCo, multiRoiRegSLAP2, integrationRegistration, stripRegBergamo, extractDendrites, summarize_Voltage |
Whichever comes first on the path breaks the other repo. 14 files in ophys-slap2-analysis call it. |
optionsGUI |
dependencies/gui/optionsGUI.m |
matlab/dependencies/optionsGUI.m |
The copies have diverged substantially; only ophys-slap2-analysis has the centering fix. |
postAcquisitionAnnotation |
utils/postAcquisitionAnnotation.m: (dr, fns), writes postacq_annotations.h5 for importPostAcqAnnotations |
matlab/slap2/postAcquisition/postAcquisitionAnnotation.m: (dr), its output is read by summarize_LoCo |
Two implementations of the same step at the rig, writing different formats |
ScanImageTiffReader |
dependencies/io/ScanImageTiffReader.m (a MATLAB class) |
matlab/dependencies/+ScanImageTiffReader/ (MEX package) |
Two different readers under one name |
MultiRoiRegistration / multiRoiRegistration |
motion_correction/MultiRoiRegistration.m |
matlab/slap2/Registration/multiRoiRegistration.m (old, no callers) |
The names differ only in case, which is fragile on Windows and macOS |
StripRegistration / stripRegistration |
motion_correction/StripRegistration.m |
matlab/bergamo/stripRegistration.m (old, no callers) |
Same |
E. Renamed copies. These are the ophys-slap2-analysis originals of GIAnT functions.
| GIAnT-MATLAB | ophys-slap2-analysis | Content similarity |
|---|---|---|
motion_correction/MultiRoiRegistration.m |
matlab/preprocessing/multiRoiRegSLAP2.m |
0.75 |
motion_correction/StripRegistration.m |
matlab/preprocessing/stripRegBergamo.m |
0.74 |
motion_correction/BandRegistration.m |
matlab/slap2/Registration/Michael/integrationRegistration.m |
0.76 |
buildTrialTable.m |
matlab/preprocessing/buildTrialTableBergamo.m |
0.54 |
dependencies/alignment/shiftRoiData.m |
Local function in matlab/preprocessing/summarize_LoCo.m |
|
dependencies/io/loadStructFromH5.m |
Local readTrialTableH5 in matlab/slap2/Voltage/extractDendrites.m |
Proposed consolidation
-
Bring into GIAnT the one fix that exists only in ophys-slap2-analysis: the
optionsGUIcentering fix (AllenNeuralDynamics/ophys-slap2-analysis@2282dd1). -
Make GIAnT-MATLAB a declared dependency of ophys-slap2-analysis, in its README and with a helper that sets up the path. Then:
- Delete groups A and B from ophys-slap2-analysis.
- Point the 6 callers of
makeTemplateMultiRoiatmakeConsensusTemplate.
One behaviour changes for ophys-slap2-analysis callers: the
xcorr2_nans*functions throw an error on NaN motion instead of stopping inkeyboard. -
Remove the collisions in group D:
setParams: rename the ophys-slap2-analysis copy, which only configures ophys-slap2-analysis functions, or merge both sets of cases into the GIAnT copy.optionsGUI: delete the ophys-slap2-analysis copy after step 1.postAcquisitionAnnotation: settle on one output format. Ifsummarize_LoCocan readpostacq_annotations.h5, delete the ophys-slap2-analysis copy.multiRoiRegistration.mandbergamo/stripRegistration.m: delete them, since nothing calls them.ScanImageTiffReader: check that ophys-slap2-analysis calls toScanImageTiffReader.ScanImageTiffReaderstill reach the MEX package when GIAnT is on the path.
-
Decide what happens to the older pipeline in groups C and E (
multiRoiRegSLAP2/stripRegBergamo→summarize_LoCo). It still uses its own copies and the.matlayouts, andsummarize_LoCochanged as recently as 2026-08-25, so it is still in use. There are two options:- Retire it in favour of
MultiRoiRegistration/StripRegistration→SILo, and keep in ophys-slap2-analysis only the analyses that GIAnT doesn't have, such asextractDendritesand the voltage analysis. - Freeze it, and rename its internals so they no longer shadow GIAnT's.
- Retire it in favour of
-
Replace the inline
readTrialTableH5inextractDendriteswithloadStructFromH5.
To keep the repos from drifting apart again, add a test that runs with both repos on the path and fails when any function name resolves to more than one file (which -all).
How the inventory was made. Each non-test .m file in GIAnT-MATLAB was matched against every .m file in ophys-slap2-analysis, by file name (ignoring case) and by content similarity (difflib ratio on non-comment lines). Local functions defined in both repos were listed as well. Third-party code bundled in ophys-slap2-analysis (NoRMCorre, OASIS, Fast_Tiff_Write) is out of scope.
- 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 20/100
AllenNeuralDynamics/GIAnT-MATLAB#45 ·
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
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