|
| 1 | +{ |
| 2 | + "repo_notes": [ |
| 3 | + { |
| 4 | + "content": "" |
| 5 | + } |
| 6 | + ], |
| 7 | + "pages": [ |
| 8 | + { |
| 9 | + "title": "Overview", |
| 10 | + "purpose": "Introduce the suite2p repository, summarizing its purpose as a calcium imaging processing pipeline, its main capabilities, supported platforms, and how to navigate the documentation", |
| 11 | + "page_notes": [ |
| 12 | + { |
| 13 | + "content": "" |
| 14 | + } |
| 15 | + ] |
| 16 | + }, |
| 17 | + { |
| 18 | + "title": "Installation and Setup", |
| 19 | + "purpose": "Cover all installation methods including pip, conda, and editable dev install. Document optional dependency groups (gui, io, nwb, test, all), environment setup, and platform-specific notes", |
| 20 | + "page_notes": [ |
| 21 | + { |
| 22 | + "content": "" |
| 23 | + } |
| 24 | + ] |
| 25 | + }, |
| 26 | + { |
| 27 | + "title": "Core Concepts", |
| 28 | + "purpose": "Define the key vocabulary and mental model needed to understand suite2p: planes, channels, ROIs, neuropil, binary files, db/settings dicts, and the sequential pipeline model", |
| 29 | + "page_notes": [ |
| 30 | + { |
| 31 | + "content": "" |
| 32 | + } |
| 33 | + ] |
| 34 | + }, |
| 35 | + { |
| 36 | + "title": "Pipeline Architecture", |
| 37 | + "purpose": "Describe the overall architecture: run_s2p as orchestrator, the sequential stages it calls (registration, detection, extraction, classification, deconvolution), and the pipeline function in pipeline_s2p.py", |
| 38 | + "parent": "Core Concepts", |
| 39 | + "page_notes": [ |
| 40 | + { |
| 41 | + "content": "" |
| 42 | + } |
| 43 | + ] |
| 44 | + }, |
| 45 | + { |
| 46 | + "title": "Configuration System", |
| 47 | + "purpose": "Document the db/settings dictionary system, default_db and default_settings functions, every major parameter category", |
| 48 | + "parent": "Core Concepts", |
| 49 | + "page_notes": [ |
| 50 | + { |
| 51 | + "content": "" |
| 52 | + } |
| 53 | + ] |
| 54 | + }, |
| 55 | + { |
| 56 | + "title": "Data Structures and File Formats", |
| 57 | + "purpose": "Describe every key output file and data structure: F.npy, Fneu.npy, spks.npy, stat.npy, iscell.npy, detect_outputs.npy, reg_outputs.npy, the stat ROI dictionary schema, and the classifier.npy format", |
| 58 | + "parent": "Core Concepts", |
| 59 | + "page_notes": [ |
| 60 | + { |
| 61 | + "content": "" |
| 62 | + } |
| 63 | + ] |
| 64 | + }, |
| 65 | + { |
| 66 | + "title": "Binary File System", |
| 67 | + "purpose": "Explain the BinaryFile and BinaryRWFile classes, how raw imaging data is stored in the .bin format, memory-mapped access patterns, and why fast_disk matters for performance", |
| 68 | + "parent": "Core Concepts", |
| 69 | + "page_notes": [ |
| 70 | + { |
| 71 | + "content": "" |
| 72 | + } |
| 73 | + ] |
| 74 | + }, |
| 75 | + { |
| 76 | + "title": "Processing Pipeline", |
| 77 | + "purpose": "Top-level section introduction summarizing the end-to-end flow from raw files to output .npy files, the role of run_s2p and run_plane, and links to each stage sub-page", |
| 78 | + "page_notes": [ |
| 79 | + { |
| 80 | + "content": "" |
| 81 | + } |
| 82 | + ] |
| 83 | + }, |
| 84 | + { |
| 85 | + "title": "Data Input and Conversion", |
| 86 | + "purpose": "Document how raw data is ingested: the files_to_binary dispatch table, each supported format (TIFF, HDF5, NWB, ND2, SBX, Bruker, DCIMG), multi-plane de-interleaving, and the bad_frames.npy mechanism", |
| 87 | + "parent": "Processing Pipeline", |
| 88 | + "page_notes": [ |
| 89 | + { |
| 90 | + "content": "" |
| 91 | + } |
| 92 | + ] |
| 93 | + }, |
| 94 | + { |
| 95 | + "title": "Registration (Motion Correction)", |
| 96 | + "purpose": "Overview of the registration subsystem: its role in correcting motion artifacts, the registration_wrapper entry point, key parameters, and what reg_outputs contains", |
| 97 | + "parent": "Processing Pipeline", |
| 98 | + "page_notes": [ |
| 99 | + { |
| 100 | + "content": "" |
| 101 | + } |
| 102 | + ] |
| 103 | + }, |
| 104 | + { |
| 105 | + "title": "Rigid Registration", |
| 106 | + "purpose": "Detail the rigid registration algorithm: phase correlation via rigid.phasecorr, reference image computation, batch frame processing, subpixel upsampling, and smooth_sigma filtering", |
| 107 | + "parent": "Processing Pipeline", |
| 108 | + "page_notes": [ |
| 109 | + { |
| 110 | + "content": "" |
| 111 | + } |
| 112 | + ] |
| 113 | + }, |
| 114 | + { |
| 115 | + "title": "Non-Rigid Registration", |
| 116 | + "purpose": "Detail the non-rigid registration algorithm: block decomposition, nonrigid.phasecorr, block_size and maxregshiftNR parameters, and how block shifts are computed and applied", |
| 117 | + "parent": "Processing Pipeline", |
| 118 | + "page_notes": [ |
| 119 | + { |
| 120 | + "content": "" |
| 121 | + } |
| 122 | + ] |
| 123 | + }, |
| 124 | + { |
| 125 | + "title": "Multi-Plane Registration", |
| 126 | + "purpose": "Cover Z-stack registration via zalign, bidirectional phase correction, and registration quality metrics computed via PCA using get_pc_metrics", |
| 127 | + "parent": "Processing Pipeline", |
| 128 | + "page_notes": [ |
| 129 | + { |
| 130 | + "content": "" |
| 131 | + } |
| 132 | + ] |
| 133 | + }, |
| 134 | + { |
| 135 | + "title": "ROI Detection", |
| 136 | + "purpose": "Overview of the detection stage: detection_wrapper, movie binning, the sparse_mode flag that selects the detection algorithm, and how detection settings control the output stat array", |
| 137 | + "parent": "Processing Pipeline", |
| 138 | + "page_notes": [ |
| 139 | + { |
| 140 | + "content": "" |
| 141 | + } |
| 142 | + ] |
| 143 | + }, |
| 144 | + { |
| 145 | + "title": "Detection Algorithms", |
| 146 | + "purpose": "Describe all three detection algorithms in detail: sparsery (doubly-sparse decomposition), sourcery (SVD-based iterative detection), and Cellpose anatomical detection via select_rois", |
| 147 | + "parent": "Processing Pipeline", |
| 148 | + "page_notes": [ |
| 149 | + { |
| 150 | + "content": "" |
| 151 | + } |
| 152 | + ] |
| 153 | + }, |
| 154 | + { |
| 155 | + "title": "ROI Statistics and Filtering", |
| 156 | + "purpose": "Document the roi_stats function: how compactness, aspect ratio, overlap fraction, and npix_norm are computed, the max_overlap filter, soma cropping, and second-channel red cell detection", |
| 157 | + "parent": "Processing Pipeline", |
| 158 | + "page_notes": [ |
| 159 | + { |
| 160 | + "content": "" |
| 161 | + } |
| 162 | + ] |
| 163 | + }, |
| 164 | + { |
| 165 | + "title": "Signal Extraction and Deconvolution", |
| 166 | + "purpose": "Overview of fluorescence extraction and deconvolution: how extraction_wrapper takes stat and registered frames and produces F, Fneu, F_chan2, Fneu_chan2, and spks", |
| 167 | + "parent": "Processing Pipeline", |
| 168 | + "page_notes": [ |
| 169 | + { |
| 170 | + "content": "" |
| 171 | + } |
| 172 | + ] |
| 173 | + }, |
| 174 | + { |
| 175 | + "title": "Trace Extraction", |
| 176 | + "purpose": "Detail how cell and neuropil masks are created, how extract_traces uses sparse torch operations for efficient trace computation, and the inner_neuropil_radius and lam_percentile parameters", |
| 177 | + "parent": "Processing Pipeline", |
| 178 | + "page_notes": [ |
| 179 | + { |
| 180 | + "content": "" |
| 181 | + } |
| 182 | + ] |
| 183 | + }, |
| 184 | + { |
| 185 | + "title": "Spike Deconvolution", |
| 186 | + "purpose": "Document the OASIS deconvolution algorithm, the preprocess function and its three baseline methods (maximin, constant, prctile), the tau and fs parameters, and the neucoeff neuropil coefficient", |
| 187 | + "parent": "Processing Pipeline", |
| 188 | + "page_notes": [ |
| 189 | + { |
| 190 | + "content": "" |
| 191 | + } |
| 192 | + ] |
| 193 | + }, |
| 194 | + { |
| 195 | + "title": "Cell Classification", |
| 196 | + "purpose": "Explain the ROI classification system: the Classifier class, how it uses skew/npix_norm/compact features, the built-in classifier.npy, user-trainable classifiers, and the iscell.npy output format", |
| 197 | + "parent": "Processing Pipeline", |
| 198 | + "page_notes": [ |
| 199 | + { |
| 200 | + "content": "" |
| 201 | + } |
| 202 | + ] |
| 203 | + }, |
| 204 | + { |
| 205 | + "title": "User Interfaces", |
| 206 | + "purpose": "Introduce the three interaction modes for suite2p (CLI, Python API, GUI), when to use each, and how they all converge on the same run_s2p pipeline function", |
| 207 | + "page_notes": [ |
| 208 | + { |
| 209 | + "content": "" |
| 210 | + } |
| 211 | + ] |
| 212 | + }, |
| 213 | + { |
| 214 | + "title": "Command-Line Interface", |
| 215 | + "purpose": "Document the suite2p CLI entry point, all command-line arguments (--settings, --db, --single_plane, --version, --verbose), example invocations, and the __main__.py dispatch logic", |
| 216 | + "parent": "User Interfaces", |
| 217 | + "page_notes": [ |
| 218 | + { |
| 219 | + "content": "" |
| 220 | + } |
| 221 | + ] |
| 222 | + }, |
| 223 | + { |
| 224 | + "title": "Python API", |
| 225 | + "purpose": "Document run_s2p and run_plane function signatures, the db and settings parameter dictionaries, return values, how to load results programmatically, and Jupyter notebook usage patterns", |
| 226 | + "parent": "User Interfaces", |
| 227 | + "page_notes": [ |
| 228 | + { |
| 229 | + "content": "" |
| 230 | + } |
| 231 | + ] |
| 232 | + }, |
| 233 | + { |
| 234 | + "title": "Graphical User Interface", |
| 235 | + "purpose": "Overview of the suite2p GUI: how to launch it, its two main windows (RunWindow and MainWindow), the overall layout, and navigation between sections", |
| 236 | + "parent": "User Interfaces", |
| 237 | + "page_notes": [ |
| 238 | + { |
| 239 | + "content": "" |
| 240 | + } |
| 241 | + ] |
| 242 | + }, |
| 243 | + { |
| 244 | + "title": "Run Configuration Window", |
| 245 | + "purpose": "Document RunWindow: all configuration fields, batch mode workflow, settings save/load/revert, and the Suite2pWorker background thread", |
| 246 | + "parent": "User Interfaces", |
| 247 | + "page_notes": [ |
| 248 | + { |
| 249 | + "content": "" |
| 250 | + } |
| 251 | + ] |
| 252 | + }, |
| 253 | + { |
| 254 | + "title": "Main Visualization GUI", |
| 255 | + "purpose": "Document MainWindow: loading stat.npy and reg_outputs.npy and detect_outputs.npy, ROI display modes, color schemes, trace plotting, keyboard shortcuts, and drag-and-drop file loading", |
| 256 | + "parent": "User Interfaces", |
| 257 | + "page_notes": [ |
| 258 | + { |
| 259 | + "content": "" |
| 260 | + } |
| 261 | + ] |
| 262 | + }, |
| 263 | + { |
| 264 | + "title": "Registration Viewer", |
| 265 | + "purpose": "Document the BinaryPlayer window for inspecting raw and registered movie frames and the PCViewer for examining registration quality metrics from within the GUI", |
| 266 | + "parent": "User Interfaces", |
| 267 | + "page_notes": [ |
| 268 | + { |
| 269 | + "content": "" |
| 270 | + } |
| 271 | + ] |
| 272 | + }, |
| 273 | + { |
| 274 | + "title": "ROI Manipulation and Merging", |
| 275 | + "purpose": "Document manual ROI drawing via ROIDraw, the ROI merge workflow including correlation-based suggestions and save_merge, and the VisWindow activity visualization with RangeSlider controls and Rastermap integration", |
| 276 | + "parent": "User Interfaces", |
| 277 | + "page_notes": [ |
| 278 | + { |
| 279 | + "content": "" |
| 280 | + } |
| 281 | + ] |
| 282 | + }, |
| 283 | + { |
| 284 | + "title": "Advanced Topics", |
| 285 | + "purpose": "Cover specialized use cases and advanced configuration options beyond the standard single-plane workflow", |
| 286 | + "page_notes": [ |
| 287 | + { |
| 288 | + "content": "" |
| 289 | + } |
| 290 | + ] |
| 291 | + }, |
| 292 | + { |
| 293 | + "title": "Multi-Plane and Multi-Channel Processing", |
| 294 | + "purpose": "Explain how suite2p handles multi-plane Z-stacks and dual-channel recordings including plane de-interleaving, per-plane run_plane calls, functional_chan selection, combined view output, and mesoscan acquisition modes", |
| 295 | + "parent": "Advanced Topics", |
| 296 | + "page_notes": [ |
| 297 | + { |
| 298 | + "content": "" |
| 299 | + } |
| 300 | + ] |
| 301 | + } |
| 302 | + ] |
| 303 | +} |
0 commit comments