# Light-associated spikes appeared within a few milliseconds

In the SST recording, 31 of 995 quality-eligible units (3.1%) met the prespecified response definition at the highest recorded light level, 2.0. Seven had a resolved operational onset between 2 and 6 ms after pulse onset (median 4 ms); onset was unresolved for the other 24 responders. This result is conditional on assumed continuous unit observation and does not establish direct optogenetic activation.

Across the 31 responders, the median of each unit's conditional first-spike median was 4.08 ms (between-unit interquartile range 3.46–5.00 ms). This describes the first spike within the artifact-safe [2,8) ms window on trials containing a spike. It is not an estimate of the uncensored earliest biological response, and it differs from the conservative consecutive-bin onset definition. Responses before 2 ms were deliberately not measured.

## Recordings and source data

The two tutorial examples come from [DANDI 000022, fixed release 0.251116.2247](https://dandiarchive.org/dandiset/000022/0.251116.2247). Source metadata identifies NWB version 2.2.2.

| Recording | Session | Source start time | Mouse |
|---|---|---|---|
| SST | 794812542 | 2019-01-19T01:14:56-08:00 | Female, P120D; Sst-IRES-Cre/wt;Ai32(RCL-ChR2(H134R)_EYFP)/wt |
| Wild-type | 767871931 | 2019-01-02T15:20:27-08:00 | Male, P135D; wt/wt |

The November 2025 release date is not the recording date. The original [Allen tutorial](https://alleninstitute.github.io/openscope_databook/optotagging/) was supplied locally. Neither blocked website was accessed during this analysis.

The user-supplied 2.93 MB ZIP preserves all unit and stimulus tables and every sorted spike within the union of [-100,+100) ms around all single 10 ms pulses, across all levels. It contains 159,885 SST and 132,238 wild-type spikes before quality filtering. Its SHA-256 is c64e8857f0062acadecea190209bfbe96de16c2897862c4654f34a93e43cc154.

The supplied extraction provenance reports range-reading the complete spike-time arrays (877,650,112 SST bytes and 904,865,808 wild-type bytes), then retaining the requested windows. It did not download the full approximately 2.6 GB NWB files, raw voltage or LFP signal arrays. It was a partial-file extraction, not a transfer limited strictly to the retained 200 ms windows. Whole-NWB published hashes were recorded but not independently recomputed. Local member hashes were checked successfully; independent remote reread checks for ten units were supplied by the exporter, not rerun here.

## Fixed methods and coverage

The original protocol and finalized metadata amendment were saved before response calculations. Units required quality=good, amplitude_cutoff<0.1, presence_ratio>0.95, isi_violations<0.5, finite required metrics and a peak electrode marked valid. Of 2,688 SST units, 999 passed the original quality conjunction; four invalid peak electrodes left 995 candidates. Of 2,685 wild-type units, 703 passed, with one invalid peak electrode leaving 702. No firing-rate, waveform-width or response filter selected the tested population.

Only isolated single 10 ms square pulses were included. The primary comparison used baseline [-8,-2) ms and response [2,8) ms, both 6 ms long. At least 20 usable trials per unit and level were required for inference. The SST mouse had 25 at each level; wild-type had 15 and remained descriptive. No levels were pooled. The highest level in each session was the primary condition; recorded level units and delivered optical-power calibration were not established, so these are not power-matched controls.

There were no overlapping stimulation events in the requested windows. All 12 probe LFP timestamp envelopes enclosed the respective optotagging windows. Together with the exporter's completeness statement, this supported the amended assumption of continuous unit observation. Endpoint bounds do not establish internal timestamp continuity or uninterrupted spike detection. No per-unit observation intervals or invalid-times table were available. All trial rows therefore carry coverage_status=assumed_from_acquisition_metadata; first/last spikes were not used to determine eligibility or remove silent trials.

A responder required a one-sided paired sign-flip test with Benjamini–Hochberg q<=0.05, at least a twofold post/baseline rate and an absolute increase of at least 10 Hz. Zero-baseline ratios remain undefined, while the absolute-increase rule still applies. The primary FDR family contained all 995 SST tests. Secondary levels were adjusted jointly across 1,990 SST unit-by-level tests. Exact sign-flip distributions were computed for at most 20 nonzero differences; otherwise 99,999 draws were used. Exact integer convolution replaced explicit enumeration without changing its distribution. The saved code fixes seed 20261009 and deterministic unit/level offsets.

For primary responders, onset was the earliest of two consecutive 1 ms response bins exceeding the 99th percentile of a maximum-bin null distribution from 99,999 trial-wise baseline/response-vector swaps. This is a stringent per-unit operational onset criterion conditional on responder selection, not an independent population-level onset test. First-spike medians have 2,000-trial-resampling percentile bootstrap intervals. Trials without a [2,8) ms spike are retained as missing latency, not zero latency; the count analysis retains their zero counts.

## Results by level

Rates below are means across all eligible units, with equal trial exposure within each group/level. They are not means restricted to responders.

| Group | Recorded level | Trials per unit | Units | Before (Hz) | After (Hz) | Responders |
|---|---:|---:|---:|---:|---:|---|
| SST | 1.3 | 25 | 995 | 7.44 | 7.30 | 3 |
| SST | 1.7 | 25 | 995 | 6.91 | 10.71 | 24 |
| SST, primary | 2.0 | 25 | 995 | 6.80 | 12.80 | 31 |
| Wild-type | 1.0 | 15 | 702 | 9.61 | 9.97 | Not tested |
| Wild-type | 2.5 | 15 | 702 | 8.25 | 9.40 | Not tested |
| Wild-type, primary descriptive | 4.0 | 15 | 702 | 9.31 | 9.73 | Not tested |

The median per-unit rate difference was zero in every group/level, so a small responsive subset drives the SST population mean increase. Primary SST responders had a median response-trial fraction of 0.92. Wild-type showed a small mean change at its highest level (+0.43 Hz), but no significance or nonresponse claim is warranted with its descriptive status.

| SST unit | Region | Resolved onset (ms) | Conditional first-spike median (ms) |
|---|---|---:|---:|
| 951083408 | CA1 | 2 | 3.28 |
| 951083206 | CA1 | 3 | 3.34 |
| 951087437 | VISp | 3 | 3.89 |
| 951083876 | VISam | 4 | 2.26 |
| 951101812 | VISal | 4 | 4.89 |
| 951084733 | ProS | 6 | 7.19 |
| 951088523 | VISp | 6 | 4.20 |

A first spike can precede the resolved onset because onset requires two consecutive significant bins; the two columns are deliberately different measures. The 2 ms onset lies at the analysis floor and cannot establish that activity began exactly at 2 ms.

## Light artifacts and sensitivity

The primary analysis excluded [-2,2) ms around onset and [8,12) ms around the 10 ms pulse offset. Rasters preserve spikes in these windows in gray as context. A stricter comparison, [3,8) versus [-7,-2) ms, retained 30 of the 31 primary SST responders, lost one and added none. Secondary responder counts were 3 and 25 at levels 1.3 and 1.7 under this stricter comparison. These checks were prespecified; no exclusion window was tuned to the observed results.

The sorted spikes include highly repeatable bursts in some SST units. Without peri-light waveforms or raw voltage, reliable stimulus locking alone cannot distinguish genuine action potentials from residual photoelectric contamination or sorting artifacts. Wild-type has different light settings and fewer trials and cannot prove the SST signals artifact-free. This analysis therefore supports rapid light-associated spiking in an SST-ChR2 mouse, not confirmed SST cell identity for every responder, direct activation, or a general genotype effect. Each group has one mouse, with different sex, age and recording date.

## Figures and retained calculations

response-overview.png/pdf shows per-unit before/after rates, unsmoothed 1 ms population rates (including gray-masked artifact periods for display only), and all 31 responders' conditional first-spike medians with 95% bootstrap intervals alongside the seven resolved onsets. The identity line is equal pre/post rate. Blue shading is the 0–10 ms light interval; gray bands mark excluded inference windows. Population curves summarize 995 SST units ×25 trials and 702 wild-type units ×15 trials at their respective primary levels, without treating those units as independent animals.

resolved-onset-rasters.png/pdf shows every unit with a resolved onset, with all 25 individual trials beside the conditional first-spike distribution. Black dashed lines are operational onset; solid blue lines in histograms are first-spike medians. The plot shows all seven resolved units, not a favorable subset.

quartile-example-rasters.png/pdf follows the prespecified 25th/50th/75th percentile rate-difference selection over all eligible primary units, breaking ties by unit ID. Many differences are zero, so the same unit can legitimately occupy multiple quantile targets; repeated panels are not independent examples.

The SST and wild-type raster atlases include every eligible unit, with a wide primary-level view and separate detail rasters for all three levels. Labels give each level's conditional first-spike median; dashed onset lines appear only where resolved. Primary onset is not estimated for wild-type, nonresponders or secondary levels. “Not classified” in SST atlas titles means the unit did not meet the response rule at that level, not proof of biological nonresponse. The atlas index maps IDs to pages.

trial-counts-and-latencies.csv contains 106,215 unit-trial rows with both primary and stricter counts, first-spike latencies and coverage flags. unit-results.csv contains 5,091 unit-level rows with effect sizes, multiplicity-adjusted results and latency estimates. Unit exclusion audits, source extracts, protocols, environment versions and executable Python scripts are retained in the reproduction bundle.

Local validation checked all manifest entries, exact unit/index mapping, sorted finite spike times, exact extracted window matches, event isolation, probe-envelope coverage, and expected table row counts. Independent Boolean window counts were checked for deterministically sampled units/trials; exact sign-flip p-values matched brute-force examples. Final figure review checked layout and representative raster pages. No independent full-NWB or raw-voltage validation was performed.
