Reproducing Gao et al. (2025) from dandiset 001199¶

Paper. Gao H, Ramachandran S, Yu K, He B (2025). Transcranial Focused Ultrasound Modulates Feedforward and Feedback Cortico-Thalamo-Cortical Pathways by Selectively Activating Excitatory Neurons. J Neurosci 45(23):e2218242025. doi:10.1523/jneurosci.2218-24.2025. The claims file was written from the version of record in PubMed Central (PMC12139594), with its Methods and all figure legends; the paper has no supplement.

Dandiset. DANDI:001199, version 0.250829.1250. The paper does not cite this dandiset: its Methods name dandiset 000946 as the repository of all its data, with no version. 001199 has four published versions (0.250712.1551, 0.250713.1101, 0.250828.1941, 0.250829.1250). The cell below shows that all four and the draft hold the same 229 files (same paths and blobs) and differ only in metadata the analysis does not use (the order of contributors). The most recent published version is pinned, as the protocol says when the paper cites none.

What the dandiset holds. Sorted units (spike times only) and trial tables for 13 rats, recorded in August and September 2024 (4 rats) and February to July 2025 (9 rats). There are no spike waveforms and no RSU or FSU labels, every session uses PD 200 us, and AC recordings come from 7 rats.

Claims. The claims file (claims/001199/10.1523-jneurosci.2218-24.2025.yaml) has 35 claims.

Claim Tested here Why not
subjects yes
fig4-unit-counts yes, by upper bounds the untyped counts bound the typed ones (types need waveforms, not in the dandiset)
fig5-unit-counts no types; and no CG1 session at 3,000 Hz, so only the sham half is bounded, which leaves a partial result possible
fig11b-ac-responses yes
fig2-target-artifact no raw voltage and target-determination trials not in the dandiset
fig6-unit-counts no RSU and FSU types need waveforms, not in the dandiset; the bound leaves a partial result possible
fig4-timelocked-rsu-3000, fig4-postsonication-3000, fig4-30hz-responses, fig4-no-fsu-change no as above (types)
fig5a-sham-no-response, fig5b-cg1-control-no-response no types; and no CG1 session at 3,000 Hz
fig6a-s1-rsu-timelocked-high-prf, fig6a-s1-rsu-delayed, fig6b-s1-fsu-prf, fig6c-pom-rsu-prf, fig6d-pom-fsu-prf no types
fig7-9-unit-counts, fig7a to fig7d, fig8a, fig8b, fig9a, fig9b no the DC series (PDs other than 200 us) are not in the dandiset; and types
fig10a-dsttc-3000-during, fig10a-dsttc-3000-post, fig10b-dsttc-30, fig10c-sttc-constant-pd no types
fig10d-sttc-60dc, fig10e-sttc-30hz-dc, fig10f-sttc-3000-dc no DC series missing; and types
fig11c-ac-to-s1-30hz, fig11d-ac-to-s1-3000 no S1 RSU and FSU types

Every file is streamed from the archive; nothing is written to disk.

In [1]:
import time
import warnings

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import requests
from scipy import stats

import tfus

pd.set_option("display.width", 220)
pd.set_option("display.max_columns", 40)
pd.set_option("display.max_rows", 300)
warnings.filterwarnings("ignore", category=RuntimeWarning)

started = time.time()
assets = tfus.list_assets()
versions = ["0.250712.1551", "0.250713.1101", "0.250828.1941", "0.250829.1250", "draft"]
pinned = set(zip(assets.path, assets.blob))
for v in versions:
    a = tfus.list_assets(v)
    print(f"version {v}: {len(a)} assets, {a['size'].sum()} bytes, "
          f"(path, blob) pairs differing from the pinned version: {len(pinned ^ set(zip(a.path, a.blob)))}")
m_first, m_pin = tfus.version_metadata(versions[0]), tfus.version_metadata()
print("metadata fields that differ between 0.250712.1551 and the pinned version:",
      sorted(k for k in set(m_first) | set(m_pin) if m_first.get(k) != m_pin.get(k)))
print("\nDandiset description (pinned version):\n", m_pin["description"])
print("\nassetsSummary numberOfSubjects:", m_pin["assetsSummary"]["numberOfSubjects"],
      "; variableMeasured:", m_pin["assetsSummary"]["variableMeasured"])
version 0.250712.1551: 229 assets, 317011048 bytes, (path, blob) pairs differing from the pinned version: 0
version 0.250713.1101: 229 assets, 317011048 bytes, (path, blob) pairs differing from the pinned version: 0
version 0.250828.1941: 229 assets, 317011048 bytes, (path, blob) pairs differing from the pinned version: 0
version 0.250829.1250: 229 assets, 317011048 bytes, (path, blob) pairs differing from the pinned version: 0
version draft: 229 assets, 317011048 bytes, (path, blob) pairs differing from the pinned version: 0
metadata fields that differ between 0.250712.1551 and the pinned version: ['citation', 'contributor', 'datePublished', 'doi', 'id', 'manifestLocation', 'publishedBy', 'url', 'version']

Dandiset description (pinned version):
 In these recordings, we recorded neuronal activities from cortical-thalamocortical (CTC) pathway, including the somatosensory cortex (S1) and posteromedial complex (POm) of the thalamus responded to different Pulse Repetition Frequencies (PRFs ) or Pulse Durations (PDs) and Pressure Levels of transcranial ultrasound focused stimulation (tFUS) using a 128-element transducer to stimulate either at S1or PoM.  Recordings for S1 are taken using 64-channel Cambridge or Neuronexus electrodes and recordings for POm are taken using 32-channel Nueronexus electrodes. Ultrasound stimulation is delivered every 2.5 seconds and each recording has 500 trials. The Ultrasound Duration (UD) and pressure level used in each recording is 67ms. The PRFs, PDs and pressure levels for each recording can be found in the identifier field. For example, in BH596_3000_200_67_10, the PRF is 3000Hz, PD is 200us and pressure level is 10V.  Detailed description about this dataset can be found in the following publication. Please cite the paper if you would use a portion of the dataset. Gao, H., Ramachandran, S., Yu, K., & He, B. (2025). Transcranial Focused Ultrasound Modulates Feedforward and Feedback Cortico-Thalamo-Cortical Pathways by Selectively Activating Excitatory Neurons. The Journal of Neuroscience, 45(23), e2218242025. https://doi.org/10.1523/JNEUROSCI.2218-24.2025

assetsSummary numberOfSubjects: 13 ; variableMeasured: ['ElectrodeGroup', 'Units']
In [2]:
started = time.time()
files = tfus.read_many(assets.asset_id.tolist(), spikes=True)
print(f"read {len(files)} files from dandiset {tfus.DANDISET_ID} version {tfus.DANDISET_VERSION} "
      f"in {time.time() - started:.0f} s")

rows = []
for (_, a), f in zip(assets.iterrows(), files):
    c = tfus.parse_condition(f["identifier"], f["notes"])
    lab = f["celltype_label"]
    rows.append({
        "path": a.path, "rat": f["subject_id"], "start": f["session_start"][:19], "identifier": f["identifier"],
        "notes": f["notes"], "data_collection": f["data_collection"], "device": f["device"],
        "n_electrodes": f["n_electrodes"], "n_units": f["n_units"], "n_trials": len(f["trial_start"]),
        "label_values": "" if lab is None else ",".join(sorted(set(lab))),
        "n_pass": sum(len(s) > tfus.MIN_SPIKES for s in f["spikes"]), **c})
info = pd.DataFrame(rows)
info["cohort"] = np.where(info.rat.isin(["BH590", "BH594", "BH596", "BH615"]), "2024", "2025")
read 229 files from dandiset 001199 version 0.250829.1250 in 73 s

Data check¶

Each check of the description against the values is stated under its output.

In [3]:
print("Files per rat and cohort (cohort by the identifier format; see tfus.py):")
print(info.groupby(["cohort", "rat"]).agg(files=("path", "size"), first=("start", "min"), last=("start", "max"),
                                          units=("n_units", "sum"), units_over_2000=("n_pass", "sum")).to_string())
print("\nDistinct rats:", info.rat.nunique(), "; subject age field values:", sorted({f['age'] for f in files}),
      "; sex:", sorted({f['sex'] for f in files}))
print("\nDevices by cohort and recorded area (files):")
print(pd.crosstab([info.cohort, info.rec], info.device).T.to_string())
print("Electrodes per file:", info.n_electrodes.value_counts().to_dict(),
      "; electrode locations:", sorted({tuple(f['electrode_locations']) for f in files}))
print("\nUnits table columns:", pd.Series([",".join(f["units_columns"]) for f in files]).value_counts().to_dict())
print("celltype_label description:", sorted({f["units_descriptions"].get("celltype_label", "") for f in files} - {""}))
print("celltype_label values per file:", info.label_values.value_counts().to_dict())

# Per-file value counts of celltype_label (units per value), so that no 1 or 2 can hide in a file.
lab = pd.DataFrame([{"rat": info.loc[i, "rat"], "file": info.loc[i, "path"].split("/")[-1],
                     **pd.Series(f["celltype_label"]).value_counts().to_dict()}
                    for i, f in enumerate(files) if f["celltype_label"] is not None]).fillna(0)
vals = [c for c in lab if c not in ("rat", "file")]
lab[vals] = lab[vals].astype(int)
print("\ncelltype_label value counts per file:")
print(lab.to_string(index=False))
rsu_fsu = [c for c in vals if pd.to_numeric(c, errors="coerce") in (1, 2)]   # "1", "1.0", "2", "2.0"
print("Files whose celltype_label holds a 1 or a 2:", int(lab[rsu_fsu].sum(axis=1).gt(0).sum()) if rsu_fsu else 0,
      "of", len(lab), "; units per value, all files:", lab[vals].sum().to_dict())
Files per rat and cohort (cohort by the identifier format; see tfus.py):
              files                first                 last  units  units_over_2000
cohort rat                                                                           
2024   BH590     21  2024-08-16T16:54:00  2024-08-17T00:48:00    162              132
       BH594     28  2024-08-14T15:47:00  2024-08-15T02:32:00   1110              963
       BH596     25  2024-08-23T17:31:00  2024-08-24T02:02:00    261              199
       BH615     22  2024-09-11T16:33:00  2024-09-12T00:55:00    926              723
2025   BH608     12  2025-02-06T16:03:00  2025-07-11T20:22:00    103               63
       BH646     19  2025-03-08T00:39:00  2025-03-08T20:50:00    296              246
       BH648     18  2025-03-06T00:30:00  2025-03-07T23:29:00    209              206
       BH650     18  2025-03-08T21:51:00  2025-03-09T06:17:00    204              186
       BH654     13  2025-02-26T17:39:00  2025-02-27T01:19:00     68               50
       BH655     18  2025-02-27T20:32:00  2025-03-03T23:44:00    106               90
       BH656      1  2025-02-05T21:39:00  2025-02-05T21:39:00     10                8
       BH657     17  2025-03-04T00:26:00  2025-03-05T22:22:00     85               78
       BH658     17  2025-03-09T05:58:00  2025-03-10T03:03:00    169              162

Distinct rats: 13 ; subject age field values: ['P24W'] ; sex: ['M']

Devices by cohort and recorded area (files):
cohort                                                2024 2025        
rec                                                     S1   AC POm  S1
device                                                                 
A1x32-Poly3-10mm-50-177-A32                              0   43  48   0
A1x64-Edge-6mm-22.5-177 & A1x32-Poly3-10mm-50-177-A32   47    0   0   0
A1x64-Edge-6mm-22.5-177 with z-coating                  17    0   0  42
A1x64-Edge-6mm-22.5-177 without z-coating               28    0   0   0
H9                                                       4    0   0   0
Electrodes per file: {64: 138, 32: 91} ; electrode locations: [('unknown',)]

Units table columns: {'id,spike_times,spike_times_index': 133, 'celltype_label,id,spike_times,spike_times_index': 96}
celltype_label description: ['label 1 = RSU, label 2 = FSU']
celltype_label values per file: {'': 133, '0.0': 49, 'POm,S1': 35, 'POm': 12}

celltype_label value counts per file:
  rat                                      file  0.0  POm  S1
BH590 sub-BH590_ses-20240816T165400_ecephys.nwb   10    0   0
BH590 sub-BH590_ses-20240816T173100_ecephys.nwb   12    0   0
BH590 sub-BH590_ses-20240816T175200_ecephys.nwb   13    0   0
BH590 sub-BH590_ses-20240816T181300_ecephys.nwb   16    0   0
BH590 sub-BH590_ses-20240816T183500_ecephys.nwb   18    0   0
BH590 sub-BH590_ses-20240816T185700_ecephys.nwb   11    0   0
BH590 sub-BH590_ses-20240816T191800_ecephys.nwb   12    0   0
BH590 sub-BH590_ses-20240816T194000_ecephys.nwb   10    0   0
BH590 sub-BH590_ses-20240816T200200_ecephys.nwb    3    0   0
BH590 sub-BH590_ses-20240816T202300_ecephys.nwb    7    0   0
BH590 sub-BH590_ses-20240816T204500_ecephys.nwb    8    0   0
BH590 sub-BH590_ses-20240816T210600_ecephys.nwb    5    0   0
BH590 sub-BH590_ses-20240816T212700_ecephys.nwb    6    0   0
BH590 sub-BH590_ses-20240816T214900_ecephys.nwb   10    0   0
BH590 sub-BH590_ses-20240816T221100_ecephys.nwb    7    0   0
BH590 sub-BH590_ses-20240816T223300_ecephys.nwb    4    0   0
BH590 sub-BH590_ses-20240816T225500_ecephys.nwb    2    0   0
BH590 sub-BH590_ses-20240816T234200_ecephys.nwb    3    0   0
BH590 sub-BH590_ses-20240817T000400_ecephys.nwb    2    0   0
BH590 sub-BH590_ses-20240817T002600_ecephys.nwb    1    0   0
BH590 sub-BH590_ses-20240817T004800_ecephys.nwb    2    0   0
BH594 sub-BH594_ses-20240814T154700_ecephys.nwb   20    0   0
BH594 sub-BH594_ses-20240814T161300_ecephys.nwb   22    0   0
BH594 sub-BH594_ses-20240814T163400_ecephys.nwb   17    0   0
BH594 sub-BH594_ses-20240814T165600_ecephys.nwb   18    0   0
BH594 sub-BH594_ses-20240814T172400_ecephys.nwb   21    0   0
BH594 sub-BH594_ses-20240814T175600_ecephys.nwb   18    0   0
BH594 sub-BH594_ses-20240814T182300_ecephys.nwb   17    0   0
BH594 sub-BH594_ses-20240814T184500_ecephys.nwb   18    0   0
BH594 sub-BH594_ses-20240814T190700_ecephys.nwb   18    0   0
BH594 sub-BH594_ses-20240814T192800_ecephys.nwb   22    0   0
BH594 sub-BH594_ses-20240814T195400_ecephys.nwb   17    0   0
BH594 sub-BH594_ses-20240814T201000_ecephys.nwb   20    0   0
BH594 sub-BH594_ses-20240814T203200_ecephys.nwb   20    0   0
BH594 sub-BH594_ses-20240814T205300_ecephys.nwb   16    0   0
BH594 sub-BH594_ses-20240814T211500_ecephys.nwb   17    0   0
BH594 sub-BH594_ses-20240814T213600_ecephys.nwb   16    0   0
BH594 sub-BH594_ses-20240814T222900_ecephys.nwb   58    0   0
BH594 sub-BH594_ses-20240814T230200_ecephys.nwb   71    0   0
BH594 sub-BH594_ses-20240814T232400_ecephys.nwb   77    0   0
BH594 sub-BH594_ses-20240814T234500_ecephys.nwb   60    0   0
BH594 sub-BH594_ses-20240815T000600_ecephys.nwb   74    0   0
BH594 sub-BH594_ses-20240815T002800_ecephys.nwb   62    0   0
BH594 sub-BH594_ses-20240815T005000_ecephys.nwb   78    0   0
BH594 sub-BH594_ses-20240815T011600_ecephys.nwb   71    0   0
BH594 sub-BH594_ses-20240815T014200_ecephys.nwb   70    0   0
BH594 sub-BH594_ses-20240815T020100_ecephys.nwb   63    0   0
BH594 sub-BH594_ses-20240815T021700_ecephys.nwb   64    0   0
BH594 sub-BH594_ses-20240815T023200_ecephys.nwb   65    0   0
BH596 sub-BH596_ses-20240823T173100_ecephys.nwb    0    4   2
BH596 sub-BH596_ses-20240823T175300_ecephys.nwb    0    4   4
BH596 sub-BH596_ses-20240823T181500_ecephys.nwb    0    9   2
BH596 sub-BH596_ses-20240823T183700_ecephys.nwb    0    5   2
BH596 sub-BH596_ses-20240823T184200_ecephys.nwb    0   10   1
BH596 sub-BH596_ses-20240823T190400_ecephys.nwb    0   11   4
BH596 sub-BH596_ses-20240823T192600_ecephys.nwb    0    4   0
BH596 sub-BH596_ses-20240823T194700_ecephys.nwb    0    6   0
BH596 sub-BH596_ses-20240823T200900_ecephys.nwb    0   10   0
BH596 sub-BH596_ses-20240823T203100_ecephys.nwb    0    9   0
BH596 sub-BH596_ses-20240823T205300_ecephys.nwb    0    5   1
BH596 sub-BH596_ses-20240823T211600_ecephys.nwb    0    9   0
BH596 sub-BH596_ses-20240823T213800_ecephys.nwb    0    7   0
BH596 sub-BH596_ses-20240823T215900_ecephys.nwb    0   10   0
BH596 sub-BH596_ses-20240823T222000_ecephys.nwb    0   10   0
BH596 sub-BH596_ses-20240823T224200_ecephys.nwb    0    8   0
BH596 sub-BH596_ses-20240823T230400_ecephys.nwb    0    9   0
BH596 sub-BH596_ses-20240823T232600_ecephys.nwb    0    9   0
BH596 sub-BH596_ses-20240823T234700_ecephys.nwb    0    7   0
BH596 sub-BH596_ses-20240824T001400_ecephys.nwb    0    9  10
BH596 sub-BH596_ses-20240824T003500_ecephys.nwb    0    7   5
BH596 sub-BH596_ses-20240824T005700_ecephys.nwb    0    8   8
BH596 sub-BH596_ses-20240824T011800_ecephys.nwb    0   11   6
BH596 sub-BH596_ses-20240824T014000_ecephys.nwb    0    8   9
BH596 sub-BH596_ses-20240824T020200_ecephys.nwb    0    8  10
BH615 sub-BH615_ses-20240911T163300_ecephys.nwb    0    6  34
BH615 sub-BH615_ses-20240911T170300_ecephys.nwb    0    5  33
BH615 sub-BH615_ses-20240911T172500_ecephys.nwb    0    7  26
BH615 sub-BH615_ses-20240911T174700_ecephys.nwb    0    7  20
BH615 sub-BH615_ses-20240911T191700_ecephys.nwb    0    3  34
BH615 sub-BH615_ses-20240911T193900_ecephys.nwb    0    3  25
BH615 sub-BH615_ses-20240911T200000_ecephys.nwb    0    6  28
BH615 sub-BH615_ses-20240911T202300_ecephys.nwb    0   10  31
BH615 sub-BH615_ses-20240911T204400_ecephys.nwb    0    4  32
BH615 sub-BH615_ses-20240911T210600_ecephys.nwb    0    7  37
BH615 sub-BH615_ses-20240911T212700_ecephys.nwb    0    4  39
BH615 sub-BH615_ses-20240911T214900_ecephys.nwb    0    5  31
BH615 sub-BH615_ses-20240911T220200_ecephys.nwb    0   23  33
BH615 sub-BH615_ses-20240911T221500_ecephys.nwb    0   10  34
BH615 sub-BH615_ses-20240911T223600_ecephys.nwb    0   17  34
BH615 sub-BH615_ses-20240911T225800_ecephys.nwb    0   13  31
BH615 sub-BH615_ses-20240911T231300_ecephys.nwb    0   20  38
BH615 sub-BH615_ses-20240911T233500_ecephys.nwb    0   15  37
BH615 sub-BH615_ses-20240911T235600_ecephys.nwb    0   14  34
BH615 sub-BH615_ses-20240912T001800_ecephys.nwb    0   15  31
BH615 sub-BH615_ses-20240912T003400_ecephys.nwb    0   13  38
BH615 sub-BH615_ses-20240912T005500_ecephys.nwb    0   10  29
Files whose celltype_label holds a 1 or a 2: 0 of 96 ; units per value, all files: {'0.0': 1272, 'POm': 414, 'S1': 773}

The archive's summary says 13 subjects, as the files hold. Every file's age is P24W. The units tables hold spike times and, in 96 files, a celltype_label column described as "label 1 = RSU, label 2 = FSU". No file holds a 1 or a 2: the column holds 0 in the files of BH590 and BH594 and the area of the unit (S1 or POm) in those of BH596 and BH615. The 133 files of the 2025 cohort have no such column. No file holds waveforms. So the dandiset gives no way to type units as RSU or FSU, which the paper does from the waveforms (Methods, Neuronal type classification). The description says S1 is recorded with 64-channel probes and POm with 32-channel probes, and the files agree: S1 files list A1x64-Edge probes (four BH590 files a device "H9"), the POm and AC files of the 2025 cohort the A1x32-Poly3, and the 2024 files of BH596 and BH615 both. The paper used two 32-channel A1x32-Poly3 probes. Electrode locations are all "unknown".

In [4]:
print("Conditions (recording area, target, PRF, voltage written in the identifier):")
print(info.groupby(["cohort", "rec", "target", "prf", "volt"], dropna=False).size().rename("files").to_string())
print("\nPD values in identifiers:", info.pd.value_counts(dropna=False).to_dict())
print("data_collection values:", info.data_collection.value_counts().to_dict())
print("\nIdentifier tags:", info.tags.value_counts().to_dict())
print("Files with no PD parsed:", int(info.pd.isna().sum()), "; of these, sham files:", int(info[info.pd.isna()].sham.sum()),
      "; sham files in all:", int(info.sham.sum()))
print("2024 stimulated files with no voltage parsed:", int(((info.cohort == "2024") & ~info.sham & info.volt.isna()).sum()),
      "; 2025 files with a voltage parsed:", int(((info.cohort == "2025") & info.volt.notna()).sum()))
Conditions (recording area, target, PRF, voltage written in the identifier):
cohort  rec  target  prf     volt
2024    S1   POM     30.0    5.0     5
                             10.0    5
                             15.0    5
                     300.0   5.0     1
                             10.0    2
                     1500.0  5.0     1
                             10.0    2
                     3000.0  5.0     6
                             10.0    7
                             15.0    7
                     4500.0  10.0    2
             S1      30.0    5.0     5
                             10.0    5
                             15.0    5
                     300.0   5.0     2
                             10.0    2
                     1500.0  5.0     3
                             10.0    3
                             15.0    1
                     3000.0  5.0     6
                             10.0    6
                             15.0    7
                     4500.0  5.0     2
                             10.0    1
                             15.0    1
             none    NaN     NaN     4
2025    AC   S1      30.0    NaN     3
                     300.0   NaN     7
                     1500.0  NaN     7
                     3000.0  NaN     3
                     4500.0  NaN     7
             S1-6    30.0    NaN     5
                     3000.0  NaN     4
             none    NaN     NaN     7
        POm  CG1     300.0   NaN     1
                     4500.0  NaN     1
             NEW     300.0   NaN     1
                     1500.0  NaN     1
             S1      30.0    NaN     2
                     300.0   NaN     5
                     1500.0  NaN     6
                     3000.0  NaN     5
                     4500.0  NaN     6
             S1-6    30.0    NaN     5
                     3000.0  NaN     4
                     4500.0  NaN     1
             SEP     30.0    NaN     1
             none    NaN     NaN     8
             y-1     1500.0  NaN     1
        S1   CG1     300.0   NaN     1
                     4500.0  NaN     2
             S1      30.0    NaN     2
                     300.0   NaN     6
                     1500.0  NaN     7
                     3000.0  NaN     4
                     4500.0  NaN     5
             S1-6    30.0    NaN     4
                     3000.0  NaN     4
             none    NaN     NaN     7

PD values in identifiers: {200.0: 203, nan: 26}
data_collection values: {'': 133, 'tFUS parameters {PRF:3000Hz PD:200us UD:67ms PRESSURE:67V}': 31, 'tFUS parameters {PRF:30Hz PD:200us UD:67ms PRESSURE:67V}': 25, 'tFUS parameters {PRF:1500Hz PD:200us UD:67ms PRESSURE:67V}': 10, 'tFUS parameters {PRF:300Hz PD:200us UD:67ms PRESSURE:67V}': 7, 'tFUS parameters {PRF:4500Hz PD:200us UD:67ms PRESSURE:67V}': 6, 'No tFUS': 4, 'tFUS parameters {PRF:3000Hz PD:200us UD:67ms PRESSURE:15V}': 4, 'tFUS parameters {PRF:3000Hz PD:200us UD:67ms PRESSURE:10V}': 3, 'tFUS parameters {PRF:30Hz PD:200us UD:67ms PRESSURE:10V}': 2, 'tFUS parameters {PRF:30Hz PD:200us UD:67ms PRESSURE:15V}': 2, 'tFUS parameters {PRF:3000Hz PD:200us UD:67ms PRESSURE:5V}': 1, 'tFUS parameters {PRF:30Hz PD:200us UD:67ms PRESSURE:5V}': 1}

Identifier tags: {'': 143, 'NZ': 11, 'POm': 11, 'nocoating': 10, 'S1': 10, 'pom': 9, 'NZ,P': 6, 'nocoating,pom': 6, 'coating': 6, 'coating,pom': 5, 'C': 2, 'C,P': 2, '2mm': 2, 'coating,pom,2': 1, 'break': 1, 'pom,2mm,bad': 1, 'pom,2mm': 1, 'pom,2mm,2': 1, 'x0y35z165': 1}
Files with no PD parsed: 26 ; of these, sham files: 26 ; sham files in all: 26
2024 stimulated files with no voltage parsed: 0 ; 2025 files with a voltage parsed: 0

Every stimulated file has PD 200 us (the 26 files with no PD in the identifier are the 26 sham files), so only the constant-PD series of the paper (Fig. 4, 6) is here; the duty-cycle series of Fig. 7 to 9 (PDs of 2 to 30,000 us) is not. Voltage is written only in the 2024 identifiers (5, 10 or 15 V); the paper used 5 V (88 kPa in situ). The data_collection field gives "PRESSURE:67V" for most 2024 files whatever the identifier says (the 67 is the ultrasound duration), so it does not state the pressure. In the 2025 files neither field gives a voltage. Targets other than S1 and sham appear: POM (stimulation at POm, not in the paper), CG1 (the paper's control, here at 300 and 4,500 Hz, where the paper used 3,000 Hz), and "S1-6", "NEW", "y-1" and "SEP", which nothing in the dandiset explains.

In [5]:
# Trials: counts, durations, intersonication intervals (Methods: 500 trials, ISI 2.5 s with 10% jitter).
iti = np.concatenate([np.diff(f["trial_start"]) for f in files])
dur = np.concatenate([f["trial_stop"] - f["trial_start"] for f in files])
print("Trials per file:", info.n_trials.value_counts().sort_index().to_dict())
print("Trial duration (stop - start), s: min %.4f max %.4f" % (dur.min(), dur.max()))
print("Interval between trial starts, s: percentiles 0, 1, 50, 99, 100 =", np.round(np.percentile(iti, [0, 1, 50, 99, 100]), 3))
spk = np.concatenate([np.concatenate(f["spikes"]) for f in files if f["n_units"]])
print("Spike times, s: min %.3f max %.1f" % (spk.min(), spk.max()))
uns = info.assign(n_unsorted=[f["n_unsorted"] for f in files])
print("Units whose spike times are not in order, as stored: %d in %d files (sorted on reading):"
      % (uns.n_unsorted.sum(), (uns.n_unsorted > 0).sum()), uns[uns.n_unsorted > 0].groupby("rat").n_unsorted.sum().to_dict())
places = np.concatenate([f["unsorted_places"] for f in files if f["n_units"]])
print("Places out of order per such unit: min %d, max %d, counts" % (places.min(), places.max()),
      pd.Series(places).value_counts().sort_index().to_dict())
print("\nFiles with other than 499 trials:")
print(info[info.n_trials != 499][["path", "cohort", "rec", "target", "prf", "n_trials"]].sort_values("n_trials").to_string(index=False))

# Recordings deposited twice: identical spike trains, and files sharing a trial table.
info["spike_key"] = [hash(np.concatenate(f["spikes"]).round(6).tobytes()) if f["n_units"] else None for f in files]
info["trial_key"] = [hash(np.round(f["trial_start"], 5).tobytes()) for f in files]
dup = info[info.duplicated("spike_key", keep=False) & info.spike_key.notna()]
print("\nFiles with identical spike trains:")
print(dup[["path", "identifier", "notes", "n_units"]].to_string(index=False))
shared = info[info.duplicated("trial_key", keep=False)].sort_values(["trial_key", "path"])
print(f"\n{len(shared)} files share their trial table with another file, in "
      f"{shared.trial_key.nunique()} groups; areas per group:")
grp = shared.groupby("trial_key").agg(rat=("rat", "first"), areas=("rec", lambda x: "+".join(sorted(x))),
                                      targets=("target", lambda x: "/".join(sorted(set(x)))),
                                      prf=("prf", "first"), starts=("start", lambda x: " ".join(sorted(x))))
print(grp.sort_values(["rat", "prf"]).to_string(index=False))
Trials per file: {113: 1, 149: 2, 300: 2, 301: 1, 350: 1, 352: 2, 359: 1, 361: 1, 372: 1, 400: 1, 459: 1, 465: 1, 480: 1, 499: 213}
Trial duration (stop - start), s: min 2.2000 max 2.2000
Interval between trial starts, s: percentiles 0, 1, 50, 99, 100 = [2.25  2.255 2.5   2.745 2.75 ]
Spike times, s: min 0.000 max 1551.3
Units whose spike times are not in order, as stored: 64 in 16 files (sorted on reading): {'BH608': 29, 'BH646': 6, 'BH648': 3, 'BH650': 1, 'BH654': 2, 'BH655': 3, 'BH657': 18, 'BH658': 2}
Places out of order per such unit: min 1, max 7, counts {1.0: 46, 2.0: 13, 3.0: 3, 4.0: 1, 7.0: 1}

Files with other than 499 trials:
                                               path cohort rec target    prf  n_trials
sub-BH596/sub-BH596_ses-20240823T183700_ecephys.nwb   2024  S1     S1 1500.0       113
sub-BH608/sub-BH608_ses-20250206T160300_ecephys.nwb   2025 POm   none    NaN       149
sub-BH608/sub-BH608_ses-20250711T202200_ecephys.nwb   2025  S1   none    NaN       149
sub-BH615/sub-BH615_ses-20240911T220200_ecephys.nwb   2024  S1    POM 3000.0       300
sub-BH615/sub-BH615_ses-20240912T005500_ecephys.nwb   2024  S1     S1 3000.0       300
sub-BH615/sub-BH615_ses-20240911T214900_ecephys.nwb   2024  S1     S1 3000.0       301
sub-BH594/sub-BH594_ses-20240815T020100_ecephys.nwb   2024  S1    POM 3000.0       350
sub-BH594/sub-BH594_ses-20240814T195400_ecephys.nwb   2024  S1     S1 3000.0       352
sub-BH615/sub-BH615_ses-20240911T225800_ecephys.nwb   2024  S1     S1   30.0       352
sub-BH594/sub-BH594_ses-20240815T021700_ecephys.nwb   2024  S1     S1 3000.0       359
sub-BH615/sub-BH615_ses-20240912T001800_ecephys.nwb   2024  S1    POM   30.0       361
sub-BH594/sub-BH594_ses-20240815T023200_ecephys.nwb   2024  S1    POM 3000.0       372
sub-BH590/sub-BH590_ses-20240816T165400_ecephys.nwb   2024  S1   none    NaN       400
sub-BH594/sub-BH594_ses-20240815T014200_ecephys.nwb   2024  S1    POM 3000.0       459
sub-BH594/sub-BH594_ses-20240814T213600_ecephys.nwb   2024  S1     S1   30.0       465
sub-BH594/sub-BH594_ses-20240814T222900_ecephys.nwb   2024  S1   none    NaN       480
Files with identical spike trains:
                                               path identifier                         notes  n_units
sub-BH646/sub-BH646_ses-20250308T003900_ecephys.nwb  30_200_67 recording:AC;stimulation:S1-6       12
           sub-BH646/sub-BH646_ses-None_ecephys.nwb  30_200_67 recording:AC;stimulation:S1-6       12

79 files share their trial table with another file, in 39 groups; areas per group:
  rat    areas targets    prf                                                      starts
BH608   POm+S1  S1/SEP   30.0                     2025-07-09T12:10:00 2025-07-09T12:17:00
BH608   POm+S1      S1 1500.0                     2025-07-09T14:45:00 2025-07-09T15:13:00
BH608   POm+S1      S1 3000.0                     2025-07-09T18:10:00 2025-07-09T18:14:00
BH608   POm+S1      S1 4500.0                     2025-07-11T14:47:00 2025-07-11T14:48:00
BH608   POm+S1    none    NaN                     2025-02-06T16:03:00 2025-07-11T20:22:00
BH646 AC+AC+S1    S1-6   30.0 2025-03-08T00:39:00 2025-03-08T00:39:00 2025-03-08T00:51:00
BH646    AC+S1      S1  300.0                     2025-03-08T02:03:00 2025-03-08T02:15:00
BH646    AC+S1      S1 1500.0                     2025-03-08T12:13:00 2025-03-08T12:27:00
BH646    AC+S1    S1-6 3000.0                     2025-03-08T14:48:00 2025-03-08T15:32:00
BH646    AC+S1      S1 4500.0                     2025-03-08T18:44:00 2025-03-08T19:31:00
BH646    AC+S1    none    NaN                     2025-03-08T20:30:00 2025-03-08T20:50:00
BH648    AC+S1      S1   30.0                     2025-03-06T00:30:00 2025-03-06T00:51:00
BH648    AC+S1      S1  300.0                     2025-03-07T00:54:00 2025-03-07T01:13:00
BH648   POm+S1      S1 1500.0                     2025-03-07T02:58:00 2025-03-07T03:10:00
BH648    AC+S1      S1 3000.0                     2025-03-07T03:42:00 2025-03-07T04:07:00
BH648    AC+S1      S1 4500.0                     2025-03-07T20:50:00 2025-03-07T20:52:00
BH648    AC+S1    none    NaN                     2025-03-07T23:05:00 2025-03-07T23:29:00
BH650    AC+S1    S1-6   30.0                     2025-03-08T21:51:00 2025-03-08T22:12:00
BH650    AC+S1      S1  300.0                     2025-03-08T23:17:00 2025-03-08T23:34:00
BH650    AC+S1      S1 1500.0                     2025-03-09T00:09:00 2025-03-09T00:33:00
BH650    AC+S1    S1-6 3000.0                     2025-03-09T01:45:00 2025-03-09T03:18:00
BH650    AC+S1      S1 4500.0                     2025-03-09T04:12:00 2025-03-09T04:28:00
BH650    AC+S1    none    NaN                     2025-03-09T05:20:00 2025-03-09T06:17:00
BH654   POm+S1      S1 3000.0                     2025-02-26T23:54:00 2025-02-27T00:07:00
BH655    AC+S1    S1-6   30.0                     2025-02-27T20:32:00 2025-02-27T23:05:00
BH655    AC+S1      S1  300.0                     2025-03-03T11:20:00 2025-03-03T11:36:00
BH655    AC+S1      S1 1500.0                     2025-03-03T12:52:00 2025-03-03T13:04:00
BH655    AC+S1    S1-6 3000.0                     2025-03-03T19:48:00 2025-03-03T20:04:00
BH655    AC+S1      S1 4500.0                     2025-03-03T22:04:00 2025-03-03T22:15:00
BH655    AC+S1    none    NaN                     2025-03-03T23:37:00 2025-03-03T23:44:00
BH657    AC+S1    S1-6   30.0                     2025-03-04T00:26:00 2025-03-04T00:30:00
BH657    AC+S1      S1  300.0                     2025-03-04T01:17:00 2025-03-04T01:23:00
BH657    AC+S1      S1 1500.0                     2025-03-05T14:11:00 2025-03-05T14:11:00
BH657    AC+S1    S1-6 3000.0                     2025-03-05T15:16:00 2025-03-05T15:21:00
BH657    AC+S1    none    NaN                     2025-03-05T22:18:00 2025-03-05T22:22:00
BH658   POm+S1     CG1  300.0                     2025-03-09T22:53:00 2025-03-09T23:20:00
BH658    AC+S1      S1 1500.0                     2025-03-09T23:21:00 2025-03-09T23:41:00
BH658   POm+S1      S1 3000.0                     2025-03-10T01:16:00 2025-03-10T01:29:00
BH658    AC+S1    none    NaN                     2025-03-10T02:48:00 2025-03-10T03:03:00

Trials number 499 in most files (the paper: 500), and fewer in some (113 to 480); one 2024 baseline has 400 and two 2025 sham files 149. Each trial lasts 2.2 s, and trial starts are 2.25 to 2.75 s apart, the 2.5 s with 10% jitter of the Methods. In 64 units of 16 files of the 2025 cohort the stored spike times are not in increasing order (one to seven places per unit), which breaks the NWB convention; they are sorted on reading.

Two files hold the same spike trains and trial table: BH646 ses-None and ses-20250308T003900, both AC at 30 Hz. The first is counted once, as the second. In the 2025 cohort files of two areas share a trial table, which shows that they are the two probes of one session: S1 with AC, or S1 with POm, matching the paper's two areas per session. The session start times of such a pair differ by minutes, and for BH608 the two sham files (POm, S1) share a trial table though their start times are five months apart (2025-02-06 and 2025-07-11), so session_start_time does not date a session in this cohort. In the BH608 30 Hz pair the S1 file says stimulation at S1 and the POm file stimulation at "SEP". In the 2024 cohort each file is one session; BH596 and BH615 files hold S1 and POm units (by celltype_label), BH590 and BH594 files S1 only.

In [6]:
info_u = info[info.path != "sub-BH646/sub-BH646_ses-None_ecephys.nwb"].copy()   # the duplicate, counted once
keep = set(info_u.index)


def unit_area(i, k):
    f, r = files[i], info.loc[i]
    if r.cohort == "2024":
        lab = f["celltype_label"][k]
        return lab if lab in ("S1", "POm") else "S1"   # BH590/BH594 files: S1 probe only (notes, device)
    return r.rec


# Clock check: fraction of units (more than 2,000 spikes) whose count in 0-400 ms after the trial start
# differs from 400 ms before it (paired Wilcoxon, p < 0.01), with the true starts and with the starts
# shifted by half an intersonication interval.
rows = []
for i in keep:
    f, r = files[i], info.loc[i]
    sp = [s for s in f["spikes"] if len(s) > tfus.MIN_SPIKES]
    if not sp:
        continue
    on = f["trial_start"][(f["trial_start"] > 1.5) & (f["trial_start"] < f["trial_start"].max() - 1.5)]
    rows.append({"cohort": r.cohort, "rec": r.rec, "target": r.target, "rat": r.rat, "prf": r.prf, "units": len(sp),
                 "true": tfus.modulation_fraction(sp, on), "shifted": tfus.modulation_fraction(sp, on + tfus.SHIFT_S)})
clock = pd.DataFrame(rows)
clock["kind"] = np.where(clock.target == "none", "sham", "stimulated")
print("Fraction of modulated units, mean over files:")
print(clock.groupby(["cohort", "kind", "rec"]).agg(files=("units", "size"), units=("units", "sum"),
                                                   true=("true", "mean"), shifted=("shifted", "mean")).round(3).to_string())
for (c, k), g in clock.groupby(["cohort", "kind"]):
    if len(g) > 5:
        print(f"{c} {k}: true above shifted in {(g.true > g.shifted).sum()} of {len(g)} files; "
              f"paired Wilcoxon p = {stats.wilcoxon(g.true, g.shifted).pvalue:.2g}")
Fraction of modulated units, mean over files:
                       files  units   true  shifted
cohort kind       rec                              
2024   sham       S1       4     91  0.000    0.025
       stimulated S1      92   1926  0.391    0.132
2025   sham       AC       7     65  0.000    0.007
                  POm      8     33  0.077    0.000
                  S1       6     64  0.000    0.069
       stimulated AC      35    194  0.020    0.013
                  POm     40    287  0.019    0.006
                  S1      33    434  0.035    0.039
2024 stimulated: true above shifted in 50 of 92 files; paired Wilcoxon p = 6.9e-10
2025 sham: true above shifted in 3 of 21 files; paired Wilcoxon p = 0.75
2025 stimulated: true above shifted in 7 of 108 files; paired Wilcoxon p = 0.81
In [7]:
# Per-file population PSTH (sum over units with more than 2,000 spikes, % of the file's mean), 25 ms bins.
bins = np.arange(-0.2, 0.6001, 0.025)


def pop_psth(i):
    f = files[i]
    tot = np.zeros(len(bins) - 1)
    for s in f["spikes"]:
        if len(s) > tfus.MIN_SPIKES:
            for t in f["trial_start"]:
                tot += np.histogram(s - t, bins)[0]
    return tot / tot.mean() * 100 if tot.sum() else tot


show = info_u[(info_u.n_pass > 0) & (((info_u.rat == "BH615") & info_u.identifier.str.contains("300_200_67_10_S1|3000_200_67_15_S1$"))
               | ((info_u.rat == "BH648") & (info_u.prf == 4500)) | ((info_u.rat == "BH594") & info_u.identifier.str.contains("coating_3000_200_67_10$|coating_BASELINE")))]
np.set_printoptions(linewidth=220, precision=0, suppress=True)
print("bin starts (ms):", np.round(bins[:-1] * 1000).astype(int))
psth_rows = {}
for i, r in show.iterrows():
    key = f"{r.rat} {r.identifier} ({r.rec})"
    psth_rows[key] = pop_psth(i)
    print(f"{key:40s}", psth_rows[key])
fig, ax = plt.subplots(figsize=(9, 3.5))
for k, v in psth_rows.items():
    ax.plot(bins[:-1] * 1000, v, label=k, drawstyle="steps-post")
ax.axvspan(0, 67, color="0.9")
ax.set_xlabel("time from trial start (ms)"); ax.set_ylabel("population rate (% of mean)"); ax.legend(fontsize=7)
ax.set_yscale("log")
print("plotted range: %.0f to %.0f %%" % (min(v.min() for v in psth_rows.values()), max(v.max() for v in psth_rows.values())))
bin starts (ms): [-200 -175 -150 -125 -100  -75  -50  -25    0   25   50   75  100  125  150  175  200  225  250  275  300  325  350  375  400  425  450  475  500  525  550  575]
BH594 BH594_nocoating_BASELINE (S1)      [128.  97.  93. 136. 117. 102. 107. 103.  98.  53.  90. 159.  76.  95. 102. 132. 115.  79. 120. 125.  86.  73.  76.  61.  76.  88. 102. 119.  98.  99.  84. 111.]
BH594 BH594_nocoating_3000_200_67_10 (S1) [143.  98.  96.  63. 120.  91.  96.  98. 157.  97. 103.  72. 129.  91.  80. 110. 144. 120. 110. 111.  86.  96. 121. 144.  94.  96.  54.  63.  59.  76.  90.  91.]
BH594 BH594_coating_BASELINE (S1)        [ 99. 130.  89. 110. 103.  95. 104. 122.  98. 100. 104.  93.  91.  96.  94.  96.  92.  84.  99.  79.  88.  98. 108. 107. 103. 116. 102.  93. 113.  95. 106.  93.]
BH615 BH615_300_200_67_10_S1 (S1)        [ 47.  43.  47.  57.  48.  57.  56.  55. 439. 388. 290.  54.  59.  63.  47.  53.  49.  57.  70.  83. 110. 120.  96.  92.  91. 101.  89.  89.  98.  75.  83.  93.]
BH615 BH615_3000_200_67_15_S1 (S1)       [ 34.  39.  31.  35.  37.  37.  34.  33. 665. 716. 511.  28.  28.  38.  30.  31.  42.  56.  62.  63.  66.  71.  58.  56.  58.  55.  53.  54.  52.  42.  42.  45.]
BH648 4500_200_67 (S1)                   [ 71.  70.  67.  72.  72.  69.  68.  68.  69.  71.  73.  83.  82.  79.  80.  85.  95. 118. 127. 138. 146. 148. 142. 132. 134. 130. 120. 116. 113. 119. 127. 116.]
BH648 4500_200_67 (AC)                   [105.  93.  98. 107.  97.  99. 105. 103.  94.  93. 112.  88.  94. 100. 100.  96.  97.  98.  95.  93.  96. 101.  98. 104. 101.  98. 114. 104. 106. 113. 111.  89.]
BH648 4500_200_67 (POm)                  [105.  89. 109.  96. 116. 100.  91. 102.  94. 102.  91.  99. 116.  99.  95. 108. 109. 101. 101. 106.  98.  90.  91.  95. 105.  88.  94. 102. 104. 109.  92. 104.]
plotted range: 28 to 716 %
No description has been provided for this image
In [8]:
# Clock check, continued. (1) The span of the trial table against the span of the spikes, per file.
span = info_u.assign(t0=[files[i]["trial_start"].min() for i in info_u.index],
                     t1=[files[i]["trial_stop"].max() for i in info_u.index],
                     s0=[min(s.min() for s in files[i]["spikes"] if len(s)) if files[i]["n_units"] else np.nan for i in info_u.index],
                     s1=[max(s.max() for s in files[i]["spikes"] if len(s)) if files[i]["n_units"] else np.nan for i in info_u.index])
span["end_gap"] = span.s1 - span.t1
print("Trial table span against spike span, s (end_gap = last spike - last trial stop):")
print(span.groupby("cohort")[["t0", "s0", "t1", "s1", "end_gap"]].describe(percentiles=[0.5]).round(1).T.to_string())
print("Files whose last spike is more than 10 s from the last trial stop:")
print(span[span.end_gap.abs() > 10][["path", "rec", "target", "prf", "t1", "s1"]].round(1).to_string(index=False))

# (2) Population cross-correlogram of spikes with trial starts at lags of -60 to +60 s, per file
# (units with more than 2,000 spikes). A response, or a constant offset of the clocks, gives a peak.
rows = []
for i in keep:
    r, f = info.loc[i], files[i]
    sp = [s for s in f["spikes"] if len(s) > tfus.MIN_SPIKES]
    if not sp:
        continue
    lags, z = tfus.onset_correlogram(sp, f["trial_start"])
    w = (lags >= 0) & (lags <= 0.4)
    rows.append({"cohort": r.cohort, "rat": r.rat, "rec": r.rec, "target": r.target, "prf": r.prf, "units": len(sp),
                 "session": r.trial_key, "peak_lag_s": lags[z.argmax()], "peak_z": z.max(), "max_z_0_400ms": z[w].max(), "z": z})
xc = pd.DataFrame(rows)
xc["kind"] = np.where(xc.target == "none", "sham", "stimulated")
xc["peak_in_0_400ms"] = xc.peak_lag_s.between(0, 0.4)
print("\nPeak of the correlogram over -60 to +60 s, per file (chance of a peak in 0-400 ms: 0.4/120 = 0.3%):")
print(xc.groupby(["cohort", "kind"]).agg(files=("units", "size"), peak_in_0_400ms=("peak_in_0_400ms", "sum"),
                                         median_peak_z=("peak_z", "median"), median_max_z_0_400ms=("max_z_0_400ms", "median")).round(2).to_string())
for (c, k), g in xc.groupby(["cohort", "kind"]):
    m = np.mean(np.stack(g.z.values), axis=0)
    top = np.argsort(m)[::-1][:3]
    h, e = np.histogram(g.peak_lag_s, np.arange(-60, 60.01, 0.5))
    print(f"{c} {k}: mean z over files peaks at lags {[f'{v:.2f}' for v in lags[top]]} s (z {[f'{v:.2f}' for v in m[top]]}); "
          f"most files with a peak in one 0.5 s bin: {h.max()} (bin from {e[h.argmax()]:.1f} s)")

# (3) Every 2025 session (files sharing a trial table): peak lag and z per file.
s25 = xc[xc.cohort == "2025"].sort_values(["rat", "prf", "rec"])
s25 = s25.assign(file=s25.rec + " " + s25.units.astype(str) + "u: lag " + s25.peak_lag_s.round(2).astype(str)
                 + " s, z " + s25.peak_z.round(1).astype(str) + ", z(0-400 ms) " + s25.max_z_0_400ms.round(1).astype(str))
print("\nEvery 2025 session, each file's correlogram peak (lag, z) and its largest z within 0-400 ms:")
print(s25.groupby(["rat", "prf", "target", "session"], dropna=False, sort=False).file.agg(" | ".join)
      .reset_index().drop(columns="session").to_string(index=False))

# (4) Positive control: untyped S1 units of S1-targeted sessions against baseline, per cohort and PRF,
# R1 and the T1/T2 readings, in the paper's two windows (uncorrected one-tailed p for an increase).
def area_units(area, targets, cohort, volts=None):
    out = []
    for i in keep:
        r = info.loc[i]
        if r.cohort != cohort or r.target not in targets or (volts is not None and r.volt not in volts):
            continue
        idx = [k for k, s in enumerate(files[i]["spikes"]) if len(s) > tfus.MIN_SPIKES and unit_area(i, k) == area]
        if not idx:
            continue
        nr = tfus.normalized_rates(tfus.unit_counts([files[i]["spikes"][k] for k in idx], files[i]["trial_start"], tfus.WINDOWS), tfus.WINDOWS)
        nr["rat"], nr["prf"] = r.rat, r.prf
        out.append(nr)
    return pd.concat(out, ignore_index=True)


rows = []
for label, c, v in (("2024, 5 V", "2024", {5}), ("2024, all V", "2024", None), ("2025", "2025", None)):
    s1 = area_units("S1", {"S1", "S1-6"}, c, v)
    for q in tfus.PRFS:
        d = s1[s1.prf == q]
        row = {"set": label, "prf": q, "units": len(d), "rats": d.rat.nunique()}
        for w in ("0-67", "201-268"):
            row[f"R1 mean {w}"] = round(np.nanmean(d[f"R1_{w}"]), 1) if len(d) else np.nan
            for T in ("T1", "T2"):
                row[f"p {T} {w}"] = tfus.vs_baseline(d, w, "R1", T) if len(d) > 1 else np.nan
        rows.append(row)
pc = pd.DataFrame(rows)
fmt = pc.copy()
for c in [c for c in fmt if c.startswith("p ")]:
    fmt[c] = fmt[c].map(lambda v: f"{v:.2g}")
print("\nPositive control, untyped S1 units of S1-targeted sessions:")
print(fmt.to_string(index=False))

# Null for the positive control: untyped S1 units of the sham sessions of each cohort, as one group.
rows = []
for c in ("2024", "2025"):
    d = area_units("S1", {"none"}, c)
    for w in ("0-67", "201-268"):
        rows.append({"cohort": c, "window": w, "units": len(d), "R1 mean": round(np.nanmean(d[f"R1_{w}"]), 1),
                     **{f"p {T}": f"{tfus.vs_baseline(d, w, 'R1', T):.2g}" for T in ("T1", "T2")}})
print("\nNull: untyped S1 units of sham sessions (no tFUS):")
print(pd.DataFrame(rows).to_string(index=False))
s1_25 = area_units("S1", {"S1", "S1-6"}, "2025")
print("\n2025 S1 units, R1 mean (units) by rat at 30 and 1,500 Hz:")
for w in ("0-67", "201-268"):
    tab = (s1_25[s1_25.prf.isin([30, 1500])].groupby(["rat", "prf"])[f"R1_{w}"]
           .agg(lambda x: f"{x.mean():.0f} ({len(x)})").unstack())
    print(f"window {w}\n", tab.to_string())
Trial table span against spike span, s (end_gap = last spike - last trial stop):
cohort           2024    2025
t0      count    96.0   132.0
        mean      2.9     2.9
        std       0.2     0.2
        min       2.6     2.5
        50%       2.9     2.9
        max       3.3     3.3
s0      count    96.0   132.0
        mean      0.1     0.4
        std       0.3     1.4
        min       0.0     0.0
        50%       0.0     0.0
        max       2.6    10.9
t1      count    96.0   132.0
        mean   1197.2  1237.1
        std     153.8   107.7
        min     285.1   372.5
        50%    1249.3  1250.1
        max    1258.2  1257.7
s1      count    96.0   132.0
        mean   1210.7  1218.4
        std     164.4   167.4
        min     292.6   326.9
        50%    1253.7  1251.7
        max    1551.3  1319.9
end_gap count    96.0   132.0
        mean     13.5   -18.7
        std      44.2   130.2
        min      -4.4  -925.5
        50%       2.3     1.6
        max     299.5    71.6
Files whose last spike is more than 10 s from the last trial stop:
                                               path rec target    prf     t1     s1
sub-BH590/sub-BH590_ses-20240816T223300_ecephys.nwb  S1     S1 4500.0 1254.1 1307.9
sub-BH590/sub-BH590_ses-20240816T234200_ecephys.nwb  S1     S1 3000.0 1251.2 1336.7
sub-BH590/sub-BH590_ses-20240817T002600_ecephys.nwb  S1    POM 3000.0 1250.7 1265.9
sub-BH594/sub-BH594_ses-20240814T154700_ecephys.nwb  S1   none    NaN 1244.1 1255.7
sub-BH594/sub-BH594_ses-20240814T165600_ecephys.nwb  S1     S1 4500.0 1246.3 1543.2
sub-BH594/sub-BH594_ses-20240814T172400_ecephys.nwb  S1     S1  300.0 1251.8 1551.3
sub-BH594/sub-BH594_ses-20240814T175600_ecephys.nwb  S1     S1   30.0 1250.9 1269.1
sub-BH594/sub-BH594_ses-20240814T182300_ecephys.nwb  S1     S1 3000.0 1248.7 1278.2
sub-BH594/sub-BH594_ses-20240815T011600_ecephys.nwb  S1    POM 3000.0 1247.4 1301.0
sub-BH596/sub-BH596_ses-20240823T181500_ecephys.nwb  S1     S1 3000.0 1254.5 1268.4
sub-BH596/sub-BH596_ses-20240823T184200_ecephys.nwb  S1     S1 1500.0 1248.3 1260.9
sub-BH596/sub-BH596_ses-20240823T194700_ecephys.nwb  S1     S1   30.0 1248.1 1266.9
sub-BH596/sub-BH596_ses-20240823T205300_ecephys.nwb  S1    POM  300.0 1245.8 1295.1
sub-BH596/sub-BH596_ses-20240823T222000_ecephys.nwb  S1    POM 3000.0 1245.8 1263.2
sub-BH596/sub-BH596_ses-20240823T230400_ecephys.nwb  S1    POM   30.0 1255.4 1284.5
sub-BH596/sub-BH596_ses-20240824T001400_ecephys.nwb  S1     S1 3000.0 1246.9 1270.3
sub-BH596/sub-BH596_ses-20240824T005700_ecephys.nwb  S1     S1   30.0 1246.7 1256.9
sub-BH596/sub-BH596_ses-20240824T011800_ecephys.nwb  S1    POM   30.0 1256.9 1267.4
sub-BH608/sub-BH608_ses-20250709T181400_ecephys.nwb POm     S1 3000.0 1248.4 1259.0
sub-BH615/sub-BH615_ses-20240911T200000_ecephys.nwb  S1    POM  300.0 1250.8 1319.1
sub-BH615/sub-BH615_ses-20240911T221500_ecephys.nwb  S1    POM 3000.0 1246.1 1257.3
sub-BH648/sub-BH648_ses-20250307T034200_ecephys.nwb  AC     S1 3000.0 1251.4 1262.1
sub-BH648/sub-BH648_ses-20250307T040700_ecephys.nwb  S1     S1 3000.0 1251.4 1262.1
sub-BH648/sub-BH648_ses-20250307T223800_ecephys.nwb POm   none    NaN 1252.5  725.8
sub-BH648/sub-BH648_ses-20250307T232900_ecephys.nwb  S1   none    NaN 1249.9  725.9
sub-BH650/sub-BH650_ses-20250308T224300_ecephys.nwb POm   S1-6   30.0 1247.4 1259.7
sub-BH650/sub-BH650_ses-20250309T041200_ecephys.nwb  AC     S1 4500.0 1248.0 1288.5
sub-BH650/sub-BH650_ses-20250309T042800_ecephys.nwb  S1     S1 4500.0 1248.0 1288.6
sub-BH655/sub-BH655_ses-20250303T220400_ecephys.nwb  AC     S1 4500.0 1245.8 1256.0
sub-BH655/sub-BH655_ses-20250303T221500_ecephys.nwb  S1     S1 4500.0 1245.8 1256.1
sub-BH657/sub-BH657_ses-20250304T010300_ecephys.nwb POm   S1-6   30.0 1247.4 1257.7
sub-BH657/sub-BH657_ses-20250305T171300_ecephys.nwb POm   S1-6 3000.0 1248.3 1319.9
sub-BH658/sub-BH658_ses-20250310T000200_ecephys.nwb POm     S1 1500.0 1248.3 1266.0
sub-BH658/sub-BH658_ses-20250310T002500_ecephys.nwb  AC     S1 3000.0 1246.8 1258.4
sub-BH658/sub-BH658_ses-20250310T023200_ecephys.nwb POm   none    NaN 1247.9  326.9
sub-BH658/sub-BH658_ses-20250310T030300_ecephys.nwb  S1   none    NaN 1252.5  326.9
Peak of the correlogram over -60 to +60 s, per file (chance of a peak in 0-400 ms: 0.4/120 = 0.3%):
                   files  peak_in_0_400ms  median_peak_z  median_max_z_0_400ms
cohort kind                                                                   
2024   sham            4                0           3.94                  1.88
       stimulated     92               39           4.96                  3.73
2025   sham           21                0           3.60                  2.06
       stimulated    108                4           3.79                  2.10
2024 sham: mean z over files peaks at lags ['-15.61', '8.98', '8.97'] s (z ['1.94', '1.84', '1.83']); most files with a peak in one 0.5 s bin: 1 (bin from -14.5 s)
2024 stimulated: mean z over files peaks at lags ['0.21', '0.22', '0.20'] s (z ['2.74', '2.72', '2.65']); most files with a peak in one 0.5 s bin: 42 (bin from 0.0 s)
2025 sham: mean z over files peaks at lags ['-1.36', '-1.51', '-1.37'] s (z ['1.09', '1.08', '1.07']); most files with a peak in one 0.5 s bin: 1 (bin from -41.0 s)
2025 stimulated: mean z over files peaks at lags ['0.24', '-1.41', '-2.19'] s (z ['0.79', '0.78', '0.77']); most files with a peak in one 0.5 s bin: 5 (bin from -2.5 s)

Every 2025 session, each file's correlogram peak (lag, z) and its largest z within 0-400 ms:
  rat    prf target                                                                                       file
BH608   30.0    SEP                                               POm 13u: lag -2.45 s, z 3.2, z(0-400 ms) 2.5
BH608   30.0     S1                                                S1 1u: lag -40.33 s, z 4.3, z(0-400 ms) 2.4
BH608  300.0     S1                                                 POm 5u: lag 5.29 s, z 4.0, z(0-400 ms) 3.8
BH608 1500.0     S1 POm 10u: lag -14.78 s, z 3.2, z(0-400 ms) 2.0 | S1 1u: lag 24.38 s, z 4.3, z(0-400 ms) 1.8
BH608 3000.0     S1                                                 POm 6u: lag 3.64 s, z 3.8, z(0-400 ms) 1.7
BH608 4500.0     S1   POm 25u: lag 42.24 s, z 3.9, z(0-400 ms) 1.6 | S1 1u: lag 7.54 s, z 3.5, z(0-400 ms) 2.1
BH608    NaN   none                                                POm 1u: lag -3.75 s, z 4.1, z(0-400 ms) 2.4
BH646   30.0   S1-6 AC 12u: lag -21.29 s, z 2.4, z(0-400 ms) 1.8 | S1 22u: lag -2.92 s, z 4.2, z(0-400 ms) 2.1
BH646   30.0   S1-6                                                POm 6u: lag -2.13 s, z 2.3, z(0-400 ms) 1.6
BH646  300.0     S1    AC 5u: lag 30.63 s, z 3.6, z(0-400 ms) 2.1 | S1 27u: lag 7.97 s, z 3.6, z(0-400 ms) 2.3
BH646  300.0     S1                                               POm 10u: lag -8.41 s, z 2.4, z(0-400 ms) 1.4
BH646 1500.0     S1  AC 1u: lag 15.42 s, z 3.8, z(0-400 ms) 2.0 | S1 29u: lag -27.09 s, z 3.6, z(0-400 ms) 2.1
BH646 1500.0     S1                                                POm 1u: lag -2.38 s, z 4.3, z(0-400 ms) 3.1
BH646 3000.0   S1-6   AC 5u: lag -19.43 s, z 3.6, z(0-400 ms) 1.1 | S1 21u: lag 9.65 s, z 4.2, z(0-400 ms) 1.6
BH646 3000.0   S1-6                                               POm 2u: lag -19.04 s, z 4.2, z(0-400 ms) 1.1
BH646 4500.0     S1    AC 6u: lag 9.95 s, z 4.4, z(0-400 ms) 1.2 | S1 29u: lag 26.97 s, z 3.9, z(0-400 ms) 1.0
BH646 4500.0     S1                                                POm 2u: lag 35.28 s, z 3.9, z(0-400 ms) 3.7
BH646    NaN   none   AC 21u: lag 5.65 s, z 2.4, z(0-400 ms) 2.3 | S1 26u: lag 33.85 s, z 3.5, z(0-400 ms) 2.0
BH646    NaN   none                                                POm 9u: lag -2.63 s, z 3.2, z(0-400 ms) 2.3
BH648   30.0     S1   AC 2u: lag 7.98 s, z 4.4, z(0-400 ms) 2.1 | S1 33u: lag -12.96 s, z 4.9, z(0-400 ms) 2.1
BH648   30.0   S1-6                                                POm 4u: lag 13.97 s, z 3.8, z(0-400 ms) 1.6
BH648  300.0     S1   AC 3u: lag -3.05 s, z 3.6, z(0-400 ms) 2.2 | S1 32u: lag -5.36 s, z 3.5, z(0-400 ms) 1.4
BH648  300.0     S1                                                POm 1u: lag -7.49 s, z 4.0, z(0-400 ms) 3.6
BH648 1500.0     S1                                                 AC 2u: lag 25.44 s, z 3.8, z(0-400 ms) 1.8
BH648 1500.0     S1 POm 1u: lag 47.74 s, z 3.5, z(0-400 ms) 1.8 | S1 33u: lag -11.37 s, z 4.3, z(0-400 ms) 0.6
BH648 3000.0     S1   AC 3u: lag 17.31 s, z 3.5, z(0-400 ms) 2.1 | S1 38u: lag 12.28 s, z 3.4, z(0-400 ms) 1.4
BH648 3000.0   S1-6                                                POm 1u: lag -0.76 s, z 4.2, z(0-400 ms) 2.4
BH648 4500.0     S1     AC 4u: lag 0.53 s, z 4.0, z(0-400 ms) 1.6 | S1 36u: lag 0.32 s, z 6.0, z(0-400 ms) 6.0
BH648 4500.0     S1                                                POm 2u: lag -13.6 s, z 3.6, z(0-400 ms) 2.1
BH648    NaN   none     AC 5u: lag 7.34 s, z 3.3, z(0-400 ms) 2.8 | S1 4u: lag 21.26 s, z 3.7, z(0-400 ms) 2.1
BH648    NaN   none                                               POm 2u: lag -40.92 s, z 3.7, z(0-400 ms) 1.6
BH650   30.0   S1-6   AC 10u: lag 5.61 s, z 2.4, z(0-400 ms) 2.2 | S1 17u: lag 13.62 s, z 4.1, z(0-400 ms) 1.6
BH650   30.0   S1-6                                                POm 2u: lag -2.85 s, z 3.8, z(0-400 ms) 1.3
BH650  300.0     S1   AC 2u: lag 2.66 s, z 3.4, z(0-400 ms) 2.0 | S1 15u: lag -51.27 s, z 3.9, z(0-400 ms) 3.1
BH650  300.0     S1                                                POm 29u: lag 11.7 s, z 2.0, z(0-400 ms) 1.0
BH650 1500.0     S1    AC 2u: lag -7.28 s, z 4.0, z(0-400 ms) 2.0 | S1 10u: lag 27.0 s, z 3.6, z(0-400 ms) 1.0
BH650 1500.0     S1                                              POm 10u: lag -22.44 s, z 3.4, z(0-400 ms) 2.6
BH650 3000.0   S1-6      AC 2u: lag 3.65 s, z 3.9, z(0-400 ms) 2.5 | S1 8u: lag 7.04 s, z 3.8, z(0-400 ms) 2.1
BH650 3000.0   S1-6                                              POm 26u: lag -22.99 s, z 1.9, z(0-400 ms) 1.3
BH650 4500.0     S1   AC 3u: lag 8.57 s, z 3.5, z(0-400 ms) 1.2 | S1 11u: lag -27.31 s, z 3.8, z(0-400 ms) 3.1
BH650 4500.0     S1                                                 POm 5u: lag 0.12 s, z 3.8, z(0-400 ms) 3.8
BH650    NaN   none   AC 12u: lag 14.3 s, z 2.9, z(0-400 ms) 1.4 | S1 18u: lag -4.49 s, z 3.4, z(0-400 ms) 1.1
BH650    NaN   none                                                 POm 4u: lag 9.34 s, z 3.6, z(0-400 ms) 2.2
BH654   30.0     S1                                                 AC 2u: lag 19.88 s, z 4.0, z(0-400 ms) 2.6
BH654   30.0     S1                                                POm 7u: lag -4.45 s, z 5.0, z(0-400 ms) 2.4
BH654  300.0     S1                                                 AC 1u: lag 57.46 s, z 3.3, z(0-400 ms) 1.1
BH654  300.0    NEW                                               POm 4u: lag -31.08 s, z 3.7, z(0-400 ms) 1.5
BH654 1500.0     S1                                                 AC 2u: lag -4.86 s, z 3.9, z(0-400 ms) 2.1
BH654 1500.0    NEW                                               POm 6u: lag -12.64 s, z 4.1, z(0-400 ms) 2.1
BH654 3000.0     S1                                                 AC 3u: lag 35.29 s, z 3.7, z(0-400 ms) 2.3
BH654 3000.0     S1  POm 10u: lag 4.97 s, z 4.4, z(0-400 ms) 2.1 | S1 1u: lag -18.34 s, z 3.8, z(0-400 ms) 1.7
BH654 4500.0     S1                                                AC 2u: lag -10.31 s, z 4.6, z(0-400 ms) 4.3
BH654 4500.0     S1                                               POm 7u: lag -26.56 s, z 4.3, z(0-400 ms) 2.5
BH654    NaN   none                                                  AC 1u: lag 2.62 s, z 2.8, z(0-400 ms) 2.6
BH654    NaN   none                                                POm 4u: lag 13.42 s, z 3.6, z(0-400 ms) 2.4
BH655   30.0   S1-6  AC 4u: lag -56.93 s, z 3.1, z(0-400 ms) 2.4 | S1 3u: lag -33.07 s, z 3.7, z(0-400 ms) 3.3
BH655   30.0   S1-6                                                POm 2u: lag -1.91 s, z 4.0, z(0-400 ms) 2.6
BH655  300.0     S1   AC 7u: lag -14.53 s, z 3.4, z(0-400 ms) 2.3 | S1 6u: lag 19.33 s, z 3.4, z(0-400 ms) 1.6
BH655  300.0     S1                                                 POm 7u: lag 4.84 s, z 2.5, z(0-400 ms) 1.6
BH655 1500.0     S1    AC 14u: lag 9.04 s, z 4.3, z(0-400 ms) 1.7 | S1 7u: lag 37.84 s, z 3.5, z(0-400 ms) 1.8
BH655 1500.0    y-1                                                POm 6u: lag 13.36 s, z 3.7, z(0-400 ms) 2.7
BH655 3000.0   S1-6    AC 3u: lag -5.43 s, z 3.7, z(0-400 ms) 3.3 | S1 5u: lag -2.19 s, z 3.7, z(0-400 ms) 2.2
BH655 3000.0     S1                                                POm 4u: lag -2.43 s, z 4.3, z(0-400 ms) 2.1
BH655 4500.0     S1     AC 5u: lag 12.41 s, z 3.3, z(0-400 ms) 2.1 | S1 4u: lag 10.0 s, z 3.8, z(0-400 ms) 2.8
BH655 4500.0    CG1                                               POm 4u: lag -14.19 s, z 4.0, z(0-400 ms) 3.0
BH655    NaN   none    AC 3u: lag 21.83 s, z 4.0, z(0-400 ms) 1.7 | S1 4u: lag 12.06 s, z 3.8, z(0-400 ms) 1.8
BH655    NaN   none                                                POm 2u: lag -8.23 s, z 4.9, z(0-400 ms) 2.2
BH656 3000.0     S1                                                 POm 8u: lag 0.23 s, z 7.0, z(0-400 ms) 7.0
BH657   30.0   S1-6   AC 2u: lag -8.22 s, z 3.8, z(0-400 ms) 3.6 | S1 9u: lag -11.93 s, z 4.9, z(0-400 ms) 2.2
BH657   30.0   S1-6                                               POm 1u: lag -51.19 s, z 4.4, z(0-400 ms) 1.9
BH657  300.0     S1    AC 3u: lag 7.76 s, z 3.8, z(0-400 ms) 2.8 | S1 10u: lag 15.69 s, z 4.5, z(0-400 ms) 1.8
BH657 1500.0     S1    AC 5u: lag 26.45 s, z 4.0, z(0-400 ms) 2.7 | S1 1u: lag 38.51 s, z 4.2, z(0-400 ms) 2.5
BH657 1500.0     S1                                               POm 5u: lag -17.81 s, z 3.7, z(0-400 ms) 1.8
BH657 3000.0   S1-6   AC 3u: lag -56.21 s, z 3.8, z(0-400 ms) 2.3 | S1 10u: lag 2.25 s, z 4.0, z(0-400 ms) 2.7
BH657 3000.0   S1-6                                                POm 3u: lag -1.61 s, z 3.9, z(0-400 ms) 2.8
BH657 4500.0     S1                                                   AC 5u: lag 8.2 s, z 4.2, z(0-400 ms) 2.0
BH657 4500.0   S1-6                                                POm 1u: lag 10.76 s, z 4.2, z(0-400 ms) 2.0
BH657 4500.0    CG1                                                S1 7u: lag -19.75 s, z 4.0, z(0-400 ms) 2.7
BH657    NaN   none      AC 2u: lag 2.05 s, z 3.8, z(0-400 ms) 2.3 | S1 6u: lag 0.92 s, z 3.6, z(0-400 ms) 2.3
BH657    NaN   none                                                 POm 5u: lag 9.93 s, z 3.8, z(0-400 ms) 1.9
BH658   30.0     S1                                                 AC 13u: lag 0.06 s, z 2.9, z(0-400 ms) 2.9
BH658   30.0     S1                                               POm 13u: lag -9.57 s, z 3.8, z(0-400 ms) 1.8
BH658  300.0     S1                                                AC 8u: lag -38.08 s, z 3.3, z(0-400 ms) 2.7
BH658  300.0    CG1 POm 4u: lag -29.49 s, z 3.9, z(0-400 ms) 2.9 | S1 2u: lag -19.57 s, z 3.4, z(0-400 ms) 2.0
BH658 1500.0     S1    AC 16u: lag -8.01 s, z 3.1, z(0-400 ms) 1.5 | S1 2u: lag 6.52 s, z 3.9, z(0-400 ms) 2.5
BH658 1500.0     S1                                                POm 18u: lag 3.32 s, z 2.7, z(0-400 ms) 1.3
BH658 3000.0     S1                                                 AC 21u: lag 4.49 s, z 3.3, z(0-400 ms) 1.9
BH658 3000.0     S1    POm 11u: lag 2.09 s, z 3.9, z(0-400 ms) 2.3 | S1 1u: lag 4.81 s, z 3.4, z(0-400 ms) 3.1
BH658 4500.0     S1                                                 AC 13u: lag 5.42 s, z 3.1, z(0-400 ms) 2.9
BH658 4500.0     S1                                               POm 5u: lag -29.05 s, z 3.8, z(0-400 ms) 2.1
BH658 4500.0    CG1                                                 S1 2u: lag 29.48 s, z 3.9, z(0-400 ms) 2.7
BH658    NaN   none  AC 21u: lag -0.66 s, z 1.8, z(0-400 ms) 1.2 | S1 6u: lag -38.17 s, z 2.6, z(0-400 ms) 1.0
BH658    NaN   none                                               POm 6u: lag -30.13 s, z 2.4, z(0-400 ms) 1.4
Positive control, untyped S1 units of S1-targeted sessions:
        set  prf  units  rats  R1 mean 0-67 p T1 0-67 p T2 0-67  R1 mean 201-268 p T1 201-268 p T2 201-268
  2024, 5 V   30    101     3         105.6      0.37     0.059             95.3         0.74            1
  2024, 5 V  300     44     2         150.3   8.8e-05   2.1e-15            132.2       0.0072        0.059
  2024, 5 V 1500     52     3          83.7      0.96         1             95.9         0.83        0.036
  2024, 5 V 3000    117     4          98.9      0.67         1            106.9         0.38         0.23
  2024, 5 V 4500     19     2         115.9      0.18   0.00059            105.6         0.81            1
2024, all V   30    259     4         102.6      0.42      0.69            114.2         0.11      8.8e-10
2024, all V  300     70     2         135.1    0.0011   1.6e-14            123.4        0.021        0.041
2024, all V 1500     88     4          89.7      0.86         1            284.4      4.7e-06      4.6e-10
2024, all V 3000    381     4         107.2      0.43         1            162.5        6e-07      3.5e-38
2024, all V 4500     22     3         112.4      0.24   0.00048            133.4         0.54         0.99
       2025   30     85     6         107.5       0.2     7e-07            108.5         0.17      1.6e-12
       2025  300     90     5          99.9       0.5      0.92            100.8         0.45         0.71
       2025 1500     83     7         108.7      0.16   2.7e-12            107.0         0.27      8.1e-10
       2025 3000     84     7          97.0      0.61         1             91.7         0.77            1
       2025 4500     81     5          96.6      0.63      0.62            209.8        0.024       0.0069

Null: untyped S1 units of sham sessions (no tFUS):
cohort  window  units  R1 mean p T1 p T2
  2024    0-67     87     90.5 0.85    1
  2024 201-268     87     89.5 0.87    1
  2025    0-67     64     96.7 0.83 0.99
  2025 201-268     64     93.0 0.94    1
2025 S1 units, R1 mean (units) by rat at 30 and 1,500 Hz:
window 0-67
 prf      30.0      1500.0
rat                      
BH608   110 (1)    64 (1)
BH646  116 (22)  115 (29)
BH648  108 (33)  108 (33)
BH650  100 (17)  104 (10)
BH655    96 (3)   104 (7)
BH657   101 (9)   106 (1)
BH658       NaN    94 (2)
window 201-268
 prf      30.0      1500.0
rat                      
BH608   136 (1)    99 (1)
BH646  122 (22)  110 (29)
BH648  103 (33)  100 (33)
BH650  106 (17)  126 (10)
BH655   102 (3)    99 (7)
BH657   100 (9)   112 (1)
BH658       NaN   106 (2)

In the 2024 cohort the trial starts are the sonication onsets, as far as the spikes show. The fraction of units modulated in the 400 ms after a trial start is 0.39 on average, against 0.13 with starts shifted by 1.25 s (true above shifted in 50 of 92 stimulated files), and 0 in the sham files. Over lags of -60 to +60 s, the population correlogram of 39 of the 92 stimulated 2024 files peaks within 0 to 400 ms of the trial start, where a peak placed at random would fall there in 0.3% of files, and the mean over files peaks at 0.21 s (z = 2.74). Two BH615 sessions (300 Hz at 10 V, 3,000 Hz at 15 V) show a burst of detected spikes confined to the first three 25 ms bins (0 to 75 ms), the 67 ms of sonication, which looks like an artefact locked to the ultrasound. Some files show a delayed increase from about 200 to 300 ms (BH648 S1 at 4,500 Hz reaches 118% at 225 ms, BH615 S1 at 300 Hz 110% at 300 ms), later than the paper's; the BH594 files show no clear rise.

In the 2025 cohort, which holds all the AC recordings, this could not be established for most sessions. The trial tables and the spikes span the same times: trials start 2.5 to 3.3 s and spikes 0 to 10.9 s after zero, and in most files both end near 1,250 s (medians 1,250.1 and 1,251.7 s). The exceptions are four sham files (S1 and POm of BH648 and BH658), whose spikes end hundreds of seconds before the last trial. So the trial tables are not on a clock offset by a whole recording. But the files show no more modulation with the true starts than with shifted ones (true above shifted in 7 of 108 stimulated files), and no lag from -60 to +60 s at which the spikes lock to the trial starts: the correlogram peaks within 0 to 400 ms in 4 of 108 stimulated files, the peak lags of the others are scattered (at most 5 files share a 0.5 s bin), and the mean over files stays below z = 1. Its highest point, z = 0.79, is at 0.24 s, near the 2024 peak (z = 2.74 at 0.21 s), which hints at weak locking at the right lag but is not distinct from the other lags (0.78 at -1.41 s). The files that do peak within 0 to 400 ms are BH648 S1 at 4,500 Hz (z = 6.0, where the S1 population rises from about 200 ms, the delay of the paper's postsonication responses; its AC file shares that trial table), BH656 POm at 3,000 Hz (z = 7.0), BH650 POm at 4,500 Hz (z = 3.8) and BH658 AC at 30 Hz (z = 2.9, at 60 ms). For the other 2025 sessions the outputs cannot tell missing responses from trial times that are not the sonication onsets.

As a positive control, untyped S1 units of S1-targeted sessions were tested against baseline (R1, T1 and T2, uncorrected). In the 2025 cohort T2, the test fig11b uses, gives an increase at 30 Hz (p = 7e-07 at 0 to 67 ms, 1.6e-12 at 201 to 268 ms) and at 1,500 Hz (2.7e-12 and 8.1e-10), with mean normalized rates of 107 to 109%. The test is not biased towards an increase: sham S1 units give T2 p = 0.99 and 1 in the 2025 cohort and 1 in the 2024 cohort (means 89.5 to 96.7%), and sham AC units p = 0.57 (fig11b section). So in at least the 30 and 1,500 Hz sessions of the 2025 cohort the S1 spikes lock to the trial starts. By rat, the rise comes mostly from BH646 (110 to 122% in both windows at both PRFs) and BH648 (108% during sonication); these are means of 22 to 33 units. T1, on the rates in spikes/s, is not significant in any condition of that cohort (smallest p = 0.024, 4,500 Hz after sonication, mean 209.8%), so the locking is weak. At 300, 3,000 and 4,500 Hz the 2025 S1 units give no increase under T2 during sonication (p 0.62 to 1), and the outputs cannot tell missing responses from trial times that are not onsets. The 2024 files at 5 V, where the clock is shown, give no S1 increase at 3,000 Hz either (98.9% during, 106.9% after, T1 p = 0.67 and 0.38); with every voltage counted, 3,000 Hz S1 units rise after sonication (162.5%, T1 p = 6e-07).

In [9]:
# Units with more than 2,000 spikes, by area and condition (untyped), against the paper's typed totals.
# The claims file uses only the paper's conditions: S1-targeted tFUS at the paper's pressure (5 V), sham
# and CG1. The 2025 files state no voltage; every one is kept, so these counts are upper bounds for 5 V.
rows = []
for i in keep:
    r = info.loc[i]
    for k, s in enumerate(files[i]["spikes"]):
        if len(s) > tfus.MIN_SPIKES:
            rows.append({"cohort": r.cohort, "rat": r.rat, "area": unit_area(i, k), "target": r.target,
                         "prf": r.prf, "volt": r.volt, "file": i})
units = pd.DataFrame(rows)
print("Units with more than 2,000 spikes:", len(units), "of", int(info_u.n_units.sum()))
t = units[units.target.isin(["S1", "S1-6", "none", "CG1"])].copy()
t["cond"] = np.where(t.target == "none", "sham", np.where(t.target == "CG1", "CG1 " + t.prf.astype("Int64").astype(str),
                                                          t.prf.astype("Int64").astype(str) + " Hz"))
t5 = t[(t.cohort == "2025") | (t.volt == 5) | (t.cond == "sham") | t.cond.str.startswith("CG1")]
print("Main: 2024 files at 5 V (the paper's voltage), sham and CG1, with every 2025 file (voltage not stated):")
print(pd.crosstab([t5.area], t5.cond, margins=True).to_string())
print("\nBy cohort (main set):")
print(pd.crosstab([t5.cohort, t5.area], t5.cond).to_string())
print("\nVariant, all voltages (5, 10 and 15 V in 2024):")
print(pd.crosstab([t.area], t.cond, margins=True).to_string())
print("\nS1 units of the 2024 cohort at 30 and 3,000 Hz, by rat and voltage:")
s24 = t[(t.cohort == "2024") & (t.area == "S1") & t.cond.isin(["30 Hz", "3000 Hz"])]
print(pd.crosstab([s24.rat], [s24.cond, s24.volt]).to_string())
five = [f"{p} Hz" for p in tfus.PRFS]
print("\nSums over the five PRFs, main set:", pd.crosstab(t5.area, t5.cond)[five].sum(axis=1).to_dict(),
      "; all voltages:", pd.crosstab(t.area, t.cond)[five].sum(axis=1).to_dict())
paper = pd.DataFrame({"S1 (RSU+FSU)": [148 + 61, 312 + 54, 1050 + 247, 31 + 53, 12 + 34],
                      "POm (RSU+FSU)": [189 + 43, 233 + 17, 913 + 106, 67 + 67, 55 + 42]},
                     index=["30 Hz", "3000 Hz", "five PRFs", "sham", "CG1 at 3000 Hz"])
print("\nPaper's typed totals (Fig. 4, 5 and 6 legends), for comparison:")
print(paper.to_string())
Units with more than 2,000 spikes: 3094 of 3697
Main: 2024 files at 5 V (the paper's voltage), sham and CG1, with every 2025 file (voltage not stated):
cond  1500 Hz  30 Hz  300 Hz  3000 Hz  4500 Hz  CG1 300  CG1 4500  sham   All
area                                                                         
AC         42     45      29       40       38        0         0    65   259
POm        49     53      55       76       47        4         4    37   325
S1        135    186     134      201      100        2         9   151   918
All       226    284     218      317      185        6        13   253  1502

By cohort (main set):
cond         1500 Hz  30 Hz  300 Hz  3000 Hz  4500 Hz  CG1 300  CG1 4500  sham
cohort area                                                                   
2024   POm         4     18       3        5        0        0         0     4
       S1         52    101      44      117       19        0         0    87
2025   AC         42     45      29       40       38        0         0    65
       POm        45     35      52       71       47        4         4    33
       S1         83     85      90       84       81        2         9    64

Variant, all voltages (5, 10 and 15 V in 2024):
cond  1500 Hz  30 Hz  300 Hz  3000 Hz  4500 Hz  CG1 300  CG1 4500  sham   All
area                                                                         
AC         42     45      29       40       38        0         0    65   259
POm        66     93      72      110       55        4         4    37   441
S1        171    344     160      465      103        2         9   151  1405
All       279    482     261      615      196        6        13   253  2105

S1 units of the 2024 cohort at 30 and 3,000 Hz, by rat and voltage:
cond  30 Hz           3000 Hz          
volt   5.0  10.0 15.0    5.0  10.0 15.0
rat                                    
BH590     7    7    2      12   13   11
BH594    65   15   77      75   75   78
BH596     0    5    0       2   11    2
BH615    29   29   23      28   32   42

Sums over the five PRFs, main set: {'AC': 194, 'POm': 280, 'S1': 756} ; all voltages: {'AC': 194, 'POm': 396, 'S1': 1243}

Paper's typed totals (Fig. 4, 5 and 6 legends), for comparison:
                S1 (RSU+FSU)  POm (RSU+FSU)
30 Hz                    209            232
3000 Hz                  366            250
five PRFs               1297           1019
sham                      84            134
CG1 at 3000 Hz            46             97

Without types the totals can be set against the paper's RSU and FSU sums only as upper bounds: every RSU or FSU count is at most the untyped count of its area and condition. In the main set (2024 files at 5 V, the claims file's condition, and every 2025 file), units are fewer than the paper's typed sums at 30 Hz (186 S1 and 53 POm against 209 and 232), at 3,000 Hz (201 and 76 against 366 and 250) and over the five PRFs (756 and 280 against 1,297 and 1,019). Counting every voltage, S1 units outnumber the paper's at 30 and 3,000 Hz (344 and 465), most of the added units coming from BH594 (92 and 153 units at 10 and 15 V) and BH615 (52 and 74). Sham S1 units outnumber the paper's (151 against 84) and sham POm units fall short (37 against 134). The sections on fig4-unit-counts and fig5-unit-counts below use these bounds.

subjects¶

Simultaneous S1 and POm recordings were made in 16 rats, and S1 and auditory cortex recordings in a further 12 rats.

Criterion: counts of distinct rats with sessions of each recording pair under the paper's conditions (S1-targeted tFUS, sham or CG1 control); partially reproduced when the dataset holds a subset of the rats (fewer, none extra). A session is a file in the 2024 cohort and a group of files sharing a trial table in the 2025 cohort (data check). A session holds an area when it has a unit of that area with more than 2,000 spikes (header U); a variant counts every unit. Targets counted as the paper's conditions: S1, sham, CG1; "S1-6" is counted as S1-targeted under reading (a) and left out under reading (b), as nothing says what it is. Further variants leave out the 2025 cohort, and count any rat with files of both areas, simultaneous or not.

Whether a rat here is one of the paper's cannot be read from the files, which name no paper animal. The cell prints the evidence that bears on "none extra": the probe of each S1 file (the paper used A1x32-Poly3 probes), the recording dates against the paper's timeline, whether the rat is in dandiset 000946 (the repository the paper's Methods name), and whether one rat is in both groups (the paper's AC rats are "another group of rats", Methods, Animal surgery, paragraph 3).

In [10]:
def sessions_table(targets, min_spikes=tfus.MIN_SPIKES, cohorts=("2024", "2025")):
    rows = []
    for i in keep:
        r = info.loc[i]
        if r.target not in targets or r.cohort not in cohorts:
            continue
        areas = {unit_area(i, k) for k, s in enumerate(files[i]["spikes"]) if len(s) > min_spikes}
        key = (r.rat, r.trial_key) if r.cohort == "2025" else (r.rat, i)
        rows += [{"rat": r.rat, "session": key, "area": a} for a in areas]
    s = pd.DataFrame(rows).groupby(["rat", "session"]).area.agg(lambda x: set(x)).reset_index()
    return s


readings = {"(a) S1, S1-6, sham, CG1": {"S1", "S1-6", "none", "CG1"}, "(b) S1, sham, CG1": {"S1", "none", "CG1"}}
subject_counts, groups = {}, {}
for name, tg in readings.items():
    for unit_rule, ms in (("units > 2,000 spikes", tfus.MIN_SPIKES), ("every unit", -1)):
        for coh_name, coh in (("both cohorts", ("2024", "2025")), ("2024 only", ("2024",))):
            s = sessions_table(tg, ms, coh)
            pom = sorted(s[s.area.apply(lambda a: {"S1", "POm"} <= a)].rat.unique())
            ac = sorted(s[s.area.apply(lambda a: {"S1", "AC"} <= a)].rat.unique())
            subject_counts[(name, unit_rule, coh_name)] = (len(pom), len(ac))
            groups[(name, unit_rule, coh_name)] = (pom, ac)
            print(f"{name}; {unit_rule}; {coh_name}: S1 and POm in {len(pom)} rats {pom}; S1 and AC in {len(ac)} rats {ac}; "
                  f"in both groups: {sorted(set(pom) & set(ac))}")
by_rat = units.groupby("rat").area.agg(lambda x: set(x))
print("\nVariant, any files of both areas: S1 and POm", sorted(by_rat[by_rat.apply(lambda a: {'S1', 'POm'} <= a)].index),
      "; S1 and AC", sorted(by_rat[by_rat.apply(lambda a: {'S1', 'AC'} <= a)].index),
      "(units with more than 2,000 spikes, any target)")
print("Rats with any AC file:", sorted(info.loc[info.rec == "AC", "rat"].unique()))
s5 = info_u[(info_u.volt == 5) & (info_u.target == "S1")]
print("2024 rats with an S1-targeted 5 V session:", sorted(s5.rat.unique()))
print("Paper: 16 S1 and POm rats, 12 further S1 and AC rats.")

r946 = requests.get("https://api.dandiarchive.org/api/dandisets/000946/versions/0.250829.1249/assets/?page_size=1000",
                    timeout=60).json()
p946 = [a["path"] for a in r946["results"]]
while r946["next"]:
    r946 = requests.get(r946["next"], timeout=60).json()
    p946 += [a["path"] for a in r946["results"]]
subj946 = sorted({p.split("/")[0].replace("sub-", "") for p in p946 if not p.startswith("sub-STTC")})
dates946 = sorted({p.split("ses-")[1][:8] for p in p946 if "ses-" in p})
print(f"\nDandiset 000946 (the paper's named repository), version 0.250829.1249, asset paths only: "
      f"{len(p946)} files, rats {subj946}, session dates {dates946[0]} to {dates946[-1]}")
print("Rats of 001199 also in 000946:", sorted(set(info.rat) & set(subj946)))

# Evidence on "none extra", per rat of either group (main reading: (a), units > 2,000 spikes, both cohorts).
pom, ac_r = groups[("(a) S1, S1-6, sham, CG1", "units > 2,000 spikes", "both cohorts")]
ev = []
for rat in sorted(set(pom) | set(ac_r)):
    d = info[info.rat == rat]
    ev.append({"rat": rat, "group": "+".join(g for g, m in (("S1-POm", pom), ("S1-AC", ac_r)) if rat in m),
               "S1 probe(s)": ", ".join(sorted(set(d[d.rec == "S1"].device))), "first file": d.start.min()[:10],
               "last file": d.start.max()[:10], "in 000946": rat in subj946})
print("\nRats of the two groups, main reading:")
print(pd.DataFrame(ev).to_string(index=False))
s1f = info[info.rec == "S1"]
print("S1 files whose devices include an A1x64-Edge probe or H9:", int(s1f.device.str.contains("A1x64|H9").sum()), "of", len(s1f),
      "; S1 files listing only A1x32-Poly3 probes (the paper's):", int((~s1f.device.str.contains("A1x64|H9")).sum()),
      "; the A1x32-Poly3 listed in", int(s1f.device.str.contains("A1x32-Poly3").sum()),
      "S1 files is the POm probe of the BH596 and BH615 files, which hold S1 and POm units")
(a) S1, S1-6, sham, CG1; units > 2,000 spikes; both cohorts: S1 and POm in 6 rats ['BH596', 'BH608', 'BH615', 'BH648', 'BH654', 'BH658']; S1 and AC in 6 rats ['BH646', 'BH648', 'BH650', 'BH655', 'BH657', 'BH658']; in both groups: ['BH648', 'BH658']
(a) S1, S1-6, sham, CG1; units > 2,000 spikes; 2024 only: S1 and POm in 2 rats ['BH596', 'BH615']; S1 and AC in 0 rats []; in both groups: []
(a) S1, S1-6, sham, CG1; every unit; both cohorts: S1 and POm in 6 rats ['BH596', 'BH608', 'BH615', 'BH648', 'BH654', 'BH658']; S1 and AC in 6 rats ['BH646', 'BH648', 'BH650', 'BH655', 'BH657', 'BH658']; in both groups: ['BH648', 'BH658']
(a) S1, S1-6, sham, CG1; every unit; 2024 only: S1 and POm in 2 rats ['BH596', 'BH615']; S1 and AC in 0 rats []; in both groups: []
(b) S1, sham, CG1; units > 2,000 spikes; both cohorts: S1 and POm in 6 rats ['BH596', 'BH608', 'BH615', 'BH648', 'BH654', 'BH658']; S1 and AC in 6 rats ['BH646', 'BH648', 'BH650', 'BH655', 'BH657', 'BH658']; in both groups: ['BH648', 'BH658']
(b) S1, sham, CG1; units > 2,000 spikes; 2024 only: S1 and POm in 2 rats ['BH596', 'BH615']; S1 and AC in 0 rats []; in both groups: []
(b) S1, sham, CG1; every unit; both cohorts: S1 and POm in 6 rats ['BH596', 'BH608', 'BH615', 'BH648', 'BH654', 'BH658']; S1 and AC in 6 rats ['BH646', 'BH648', 'BH650', 'BH655', 'BH657', 'BH658']; in both groups: ['BH648', 'BH658']
(b) S1, sham, CG1; every unit; 2024 only: S1 and POm in 2 rats ['BH596', 'BH615']; S1 and AC in 0 rats []; in both groups: []

Variant, any files of both areas: S1 and POm ['BH596', 'BH608', 'BH615', 'BH646', 'BH648', 'BH650', 'BH654', 'BH655', 'BH657', 'BH658'] ; S1 and AC ['BH646', 'BH648', 'BH650', 'BH654', 'BH655', 'BH657', 'BH658'] (units with more than 2,000 spikes, any target)
Rats with any AC file: ['BH646', 'BH648', 'BH650', 'BH654', 'BH655', 'BH657', 'BH658']
2024 rats with an S1-targeted 5 V session: ['BH590', 'BH594', 'BH596', 'BH615']
Paper: 16 S1 and POm rats, 12 further S1 and AC rats.
Dandiset 000946 (the paper's named repository), version 0.250829.1249, asset paths only: 1920 files, rats ['BH494', 'BH495', 'BH499', 'BH500', 'BH501', 'BH510', 'BH511', 'BH513', 'BH528', 'BH530', 'BH532', 'BH535', 'BH537', 'BH538', 'BH539', 'BH547', 'BH551', 'BH553', 'BH558', 'BH594'], session dates 20230810 to 20240407
Rats of 001199 also in 000946: ['BH594']

Rats of the two groups, main reading:
  rat        group                                           S1 probe(s) first file  last file  in 000946
BH596       S1-POm A1x64-Edge-6mm-22.5-177 & A1x32-Poly3-10mm-50-177-A32 2024-08-23 2024-08-24      False
BH608       S1-POm                A1x64-Edge-6mm-22.5-177 with z-coating 2025-02-06 2025-07-11      False
BH615       S1-POm A1x64-Edge-6mm-22.5-177 & A1x32-Poly3-10mm-50-177-A32 2024-09-11 2024-09-12      False
BH646        S1-AC                A1x64-Edge-6mm-22.5-177 with z-coating 2025-03-08 2025-03-08      False
BH648 S1-POm+S1-AC                A1x64-Edge-6mm-22.5-177 with z-coating 2025-03-06 2025-03-07      False
BH650        S1-AC                A1x64-Edge-6mm-22.5-177 with z-coating 2025-03-08 2025-03-09      False
BH654       S1-POm                A1x64-Edge-6mm-22.5-177 with z-coating 2025-02-26 2025-02-27      False
BH655        S1-AC                A1x64-Edge-6mm-22.5-177 with z-coating 2025-02-27 2025-03-03      False
BH657        S1-AC                A1x64-Edge-6mm-22.5-177 with z-coating 2025-03-04 2025-03-05      False
BH658 S1-POm+S1-AC                A1x64-Edge-6mm-22.5-177 with z-coating 2025-03-09 2025-03-10      False
S1 files whose devices include an A1x64-Edge probe or H9: 138 of 138 ; S1 files listing only A1x32-Poly3 probes (the paper's): 0 ; the A1x32-Poly3 listed in 47 S1 files is the POm probe of the BH596 and BH615 files, which hold S1 and POm units

Result: not reproduced. The dandiset holds simultaneous S1 and POm recordings from 6 rats (paper 16) and S1 and AC recordings from 6 rats (paper 12), under both readings of the targets and whether a session's areas come from units with more than 2,000 spikes or from every unit. Both counts are below the paper's, but the criterion's partial result also needs the rats to be a subset of the paper's, none extra, and the evidence printed above goes against that. Every S1 file lists a 64-channel A1x64-Edge probe (or H9), where the paper recorded S1 with a 32-channel A1x32-Poly3. Two rats (BH648, BH658) are in both groups, where the paper's AC rats are "another group of rats". The ten rats of the two groups were recorded from August 2024 to July 2025, after the paper's preprint (June 2024), and none is in dandiset 000946, the repository the paper names, whose 20 rats were recorded from August 2023 to April 2024; of the 13 rats here only BH594, which has no POm or AC recording, is there. With the 2025 cohort left out the counts are 2 and 0.

fig4-unit-counts¶

In the constant-PD sessions at 3,000 Hz there were 312 RSUs and 54 FSUs in S1 and 233 RSUs and 17 FSUs in POm; at 30 Hz there were 148 RSUs and 61 FSUs in S1 and 189 RSUs and 43 FSUs in POm.

Criterion: units selected and typed as in U, in the 3,000 Hz/200 us and 30 Hz/200 us sessions, counted once per session; reproduced when all eight counts are within 10%, partially when at least six are. The units cannot be typed (data check), but a typed count can be no larger than the untyped count of its area and condition, so the untyped counts bound how many of the eight can be within 10% under any typing. The sessions are those of the claims file: S1-targeted (S1 and S1-6), at 5 V in the 2024 cohort; every 2025 file is kept, as none states a voltage, which can only raise the bound. The bound is also shown with every voltage, which the claims file excludes.

In [11]:
def max_within(n_untyped, expected):
    """Most of a claim's typed counts that can fall within 10%, given the untyped count of the same
    area and condition. A typed count is at most the untyped one, so an RSU count needs at least
    0.9 x its expected value of units, and both counts of a pair need 0.9 x (RSU + FSU)."""
    rows = []
    for (key, n), (e_rsu, e_fsu) in zip(n_untyped.items(), expected):
        lo_r, lo_f = 0.9 * e_rsu, 0.9 * e_fsu
        best = 2 if n >= lo_r + lo_f else (1 if n >= min(lo_r, lo_f) else 0)
        rows.append({"group": key, "untyped units": n, "RSU needs >=": round(lo_r, 1), "FSU needs >=": round(lo_f, 1),
                     "both need >=": round(lo_r + lo_f, 1), "at most within 10%": best})
    return pd.DataFrame(rows)


def cnt(df, area, cond):
    return int(((df.area == area) & (df.cond == cond)).sum())


exp4 = {("S1", "3000 Hz"): (312, 54), ("POm", "3000 Hz"): (233, 17), ("S1", "30 Hz"): (148, 61), ("POm", "30 Hz"): (189, 43)}
for label, df in (("Main (5 V and every 2025 file)", t5), ("Variant, every voltage", t)):
    b = max_within({f"{a} {c}": cnt(df, a, c) for a, c in exp4}, exp4.values())
    print(label); print(b.to_string(index=False))
    print("At most", b["at most within 10%"].sum(), "of 8 counts can be within 10% (reproduced needs 8, partially 6)\n")
print("Untyped units at 30 and 3,000 Hz by rat, main set:")
print(pd.crosstab([t5.rat], [t5.area, t5.cond])[[(a, c) for a, c in sorted(exp4) if (a, c) in pd.crosstab([t5.rat], [t5.area, t5.cond])]].to_string())
Main (5 V and every 2025 file)
      group  untyped units  RSU needs >=  FSU needs >=  both need >=  at most within 10%
 S1 3000 Hz            201         280.8          48.6         329.4                   1
POm 3000 Hz             76         209.7          15.3         225.0                   1
   S1 30 Hz            186         133.2          54.9         188.1                   1
  POm 30 Hz             53         170.1          38.7         208.8                   1
At most 4 of 8 counts can be within 10% (reproduced needs 8, partially 6)

Variant, every voltage
      group  untyped units  RSU needs >=  FSU needs >=  both need >=  at most within 10%
 S1 3000 Hz            465         280.8          48.6         329.4                   2
POm 3000 Hz            110         209.7          15.3         225.0                   1
   S1 30 Hz            344         133.2          54.9         188.1                   2
  POm 30 Hz             93         170.1          38.7         208.8                   1
At most 6 of 8 counts can be within 10% (reproduced needs 8, partially 6)

Untyped units at 30 and 3,000 Hz by rat, main set:
area    POm            S1        
cond  30 Hz 3000 Hz 30 Hz 3000 Hz
rat                              
BH590     0       0     7      12
BH594     0       0    65      75
BH596     5       2     0       2
BH608     0       6     1       0
BH615    13       3    29      28
BH646     6       2    22      21
BH648     4       1    33      38
BH650     2      26    17       8
BH654     7      10     0       1
BH655     2       4     3       5
BH656     0       8     0       0
BH657     1       3     9      10
BH658    13      11     0       1

Result: not reproduced. In the sessions the claims file uses, there are 201 S1 and 76 POm units at 3,000 Hz and 186 S1 and 53 POm units at 30 Hz with more than 2,000 spikes. These are too few for the S1 and POm RSU counts at 3,000 Hz (280.8 and 209.7 needed), for the POm RSUs at 30 Hz (170.1) and for both S1 counts at 30 Hz together (188.1). So at most 4 of the 8 typed counts can be within 10% under any typing, where a partial result needs 6. With every voltage counted, which the claims file excludes, at most 6 could be, as the POm RSU counts still fail (110 and 93 units against 209.7 and 170.1 needed). The types themselves cannot be tested (data check).

fig5-unit-counts¶

Sham sessions held 31 RSUs and 53 FSUs in S1 and 67 RSUs and 67 FSUs in POm; CG1 control sessions held 12 RSUs and 34 FSUs in S1 and 55 RSUs and 42 FSUs in POm.

Criterion: as fig4-unit-counts, for the sham and CG1 control sessions; reproduced when all eight counts are within 10%, partially when at least six are. As there, the untyped counts bound the typed ones. The paper's control is CG1 at 3,000 Hz (claims file header; paper, Results on Fig. 5: "tFUS targeting at CG1 with 3,000 Hz PRF"); the dandiset has none. Sessions at other PRFs do not bound the units of control sessions that are not deposited, so the four control counts are taken as not measurable, as fig5b-cg1-control-no-response treats the same absent condition. The cell below gives the bound on the sham half, and as a variant the bound with every CG1 session (300 and 4,500 Hz) counted as the control.

In [12]:
exp5 = {("S1", "sham"): (31, 53), ("POm", "sham"): (67, 67), ("S1", "CG1"): (12, 34), ("POm", "CG1"): (55, 42)}
t5c = t5.assign(cond=np.where(t5.cond.str.startswith("CG1"), "CG1", t5.cond))
b5 = max_within({f"{a} {c}": cnt(t5c, a, c) for a, c in exp5}, exp5.values())
print(b5.to_string(index=False))
print("At most", b5["at most within 10%"].sum(), "of 8 counts can be within 10% (reproduced needs 8, partially 6)")
print("CG1 sessions at 3,000 Hz, the paper's control:", int((t5.cond == "CG1 3000").sum()), "units")
# The CG1 sessions here are at 300 and 4,500 Hz, not the paper's 3,000 Hz, so they do not bound the units of
# the paper's control sessions, which are not deposited. Treated as absent (as fig5b treats the same absent
# condition), the four control counts cannot be measured and only the sham half bounds the claim.
b5s = b5[b5.group.str.endswith("sham")]
print("\nSham half only, the control counts not measurable:")
print(b5s.to_string(index=False))
print("Counts ruled out:", 4 - b5s["at most within 10%"].sum(), "of 8; at most", b5s["at most within 10%"].sum() + 4,
      "of 8 can be within 10% (reproduced needs 8, partially 6)")
print("\nUntyped sham and CG1 units by rat:")
print(pd.crosstab([t5c.rat], [t5c.area, t5c.cond]).loc[:, lambda d: [c for c in d.columns if c[1] in ("sham", "CG1")]].to_string())
   group  untyped units  RSU needs >=  FSU needs >=  both need >=  at most within 10%
 S1 sham            151          27.9          47.7          75.6                   2
POm sham             37          60.3          60.3         120.6                   0
  S1 CG1             11          10.8          30.6          41.4                   1
 POm CG1              8          49.5          37.8          87.3                   0
At most 3 of 8 counts can be within 10% (reproduced needs 8, partially 6)
CG1 sessions at 3,000 Hz, the paper's control: 0 units

Sham half only, the control counts not measurable:
   group  untyped units  RSU needs >=  FSU needs >=  both need >=  at most within 10%
 S1 sham            151          27.9          47.7          75.6                   2
POm sham             37          60.3          60.3         120.6                   0
Counts ruled out: 2 of 8; at most 6 of 8 can be within 10% (reproduced needs 8, partially 6)

Untyped sham and CG1 units by rat:
area    AC POm       S1     
cond  sham CG1 sham CG1 sham
rat                         
BH590    0   0    0   0   10
BH594    0   0    0   0   68
BH596    0   0    4   0    9
BH608    0   0    1   0    0
BH615    0   0    0   0    0
BH646   21   0    9   0   26
BH648    5   0    2   0    4
BH650   12   0    4   0   18
BH654    1   0    4   0    0
BH655    3   4    2   0    4
BH656    0   0    0   0    0
BH657    2   0    5   7    6
BH658   21   4    6   4    6

Result: blocked, data missing. Sham sessions hold 37 POm units with more than 2,000 spikes, where the paper's 67 RSUs and 67 FSUs each need at least 60.3, so these 2 of the 8 counts cannot be within 10%. The paper's control sessions, CG1 at 3,000 Hz, are not in the dandiset, and the CG1 sessions here, at 300 or 4,500 Hz, do not bound their units. With the four control counts not measurable, at most 6 of the 8 counts can be within 10%, which is what a partial result needs, so the claim cannot be decided from the dandiset. The types themselves cannot be tested (data check). Counting the 11 S1 and 8 POm units of the CG1 sessions at other PRFs as the control, at most 3 of the 8 counts could be within 10%.

Bounds for the count claims that stay blocked¶

fig6-unit-counts and fig7-9-unit-counts stay blocked (types; and for fig7-9 the duty-cycle series), but the same bounds show which of their outcomes the untyped counts still allow. For fig7-9 only the 200 us point of each series is in the dandiset.

In [13]:
exp6 = {"S1": (1050, 247), "POm": (913, 106)}
for label, df in (("Main (5 V and every 2025 file)", t5), ("Variant, every voltage", t)):
    n6 = {a: int(((df.area == a) & df.cond.isin(five)).sum()) for a in exp6}
    b6 = max_within(n6, exp6.values())
    print("fig6-unit-counts,", label); print(b6.to_string(index=False))
    print("At most", b6["at most within 10%"].sum(), "of 4 totals can be within 10% (reproduced needs 4, partially 2)\n")
exp79 = {"S1, 3,000 Hz DC series": (645, 171), "POm, 3,000 Hz DC series": (286, 129), "S1, 30 Hz DC series": (442, 147),
         "S1, 60% DC series": (759, 151)}
n79 = {"S1, 3,000 Hz DC series": cnt(t5, "S1", "3000 Hz"), "POm, 3,000 Hz DC series": cnt(t5, "POm", "3000 Hz"),
       "S1, 30 Hz DC series": cnt(t5, "S1", "30 Hz"), "S1, 60% DC series": cnt(t5, "S1", "3000 Hz")}
b79 = max_within(n79, exp79.values())
print("fig7-9-unit-counts, main set (the 200 us point of each series only):"); print(b79.to_string(index=False))
print("At most", b79["at most within 10%"].sum(), "of 8 totals can be within 10% (reproduced needs 8, partially 5)")
fig6-unit-counts, Main (5 V and every 2025 file)
group  untyped units  RSU needs >=  FSU needs >=  both need >=  at most within 10%
   S1            756         945.0         222.3        1167.3                   1
  POm            280         821.7          95.4         917.1                   1
At most 2 of 4 totals can be within 10% (reproduced needs 4, partially 2)

fig6-unit-counts, Variant, every voltage
group  untyped units  RSU needs >=  FSU needs >=  both need >=  at most within 10%
   S1           1243         945.0         222.3        1167.3                   2
  POm            396         821.7          95.4         917.1                   1
At most 3 of 4 totals can be within 10% (reproduced needs 4, partially 2)

fig7-9-unit-counts, main set (the 200 us point of each series only):
                  group  untyped units  RSU needs >=  FSU needs >=  both need >=  at most within 10%
 S1, 3,000 Hz DC series            201         580.5         153.9         734.4                   1
POm, 3,000 Hz DC series             76         257.4         116.1         373.5                   0
    S1, 30 Hz DC series            186         397.8         132.3         530.1                   1
      S1, 60% DC series            201         683.1         135.9         819.0                   1
At most 3 of 8 totals can be within 10% (reproduced needs 8, partially 5)

fig11b-ac-responses¶

Auditory cortex neurons respond during sonication to 1,500 and 3,000 Hz PRF and after sonication to 30, 1,500, 3,000 and 4,500 Hz, with PRF-dependent responses and the least response at 300 Hz.

Criterion: AC units with more than 2,000 spikes of the S1 and AC rats, the 200 us PD series, normalized rate (R1, R2) in 0 to 67 and 201 to 268 ms, Kruskal-Wallis across the five PRFs at p < 0.01, then the one-tailed rank-sum test against baseline per PRF (T1, T2) with Bonferroni's correction, corrected p < 0.01. Bonferroni factors: B1 = 5 (the PRFs compared with baseline in a window; 10 is shown too, for the two windows together), B2 = 15 (all pairs among the five PRFs and the baseline). Every AC file with stimulation at S1 or S1-6 is used (all 7 rats with AC files); a variant leaves out S1-6. The total is compared with the paper's 453.

The 2025 files, which hold every AC unit, state no voltage or pressure (data check). They are taken to be at the paper's pressure (5 V, 88 kPa), as nothing in the dandiset says otherwise; if they are not, these are not the paper's conditions. Whether their trial starts are the sonication onsets could not be established (data check), and the outcome below rests on taking them to be.

In [14]:
def ac_units(targets, sham=False):
    rows = []
    for i in keep:
        r = info.loc[i]
        if r.rec != "AC" or (r.target not in targets):
            continue
        sp = [s for s in files[i]["spikes"] if len(s) > tfus.MIN_SPIKES]
        if not sp:
            continue
        nr = tfus.normalized_rates(tfus.unit_counts(sp, files[i]["trial_start"], tfus.WINDOWS), tfus.WINDOWS)
        nr["rat"], nr["prf"], nr["target"], nr["file"] = r.rat, (0 if sham else r.prf), r.target, i
        rows.append(nr)
    return pd.concat(rows, ignore_index=True)


ac = ac_units({"S1", "S1-6"})
ac_sham = ac_units({"none"}, sham=True)
print("AC units with more than 2,000 spikes:", len(ac), "(paper 453); left out for no prestimulus spike:",
      int(ac["R1_0-67"].isna().sum()))
print("AC units with 2,000 spikes or fewer in these files:",
      sum(len(s) <= tfus.MIN_SPIKES for i in set(ac.file) for s in files[i]["spikes"]))
print("\nUnits per rat and PRF (paper: 30 Hz 83, 300 Hz 59 by difference, 1,500 Hz 107, 3,000 Hz 104, 4,500 Hz 100):")
print(pd.crosstab(ac.rat, ac.prf, margins=True).to_string())
print("Sham AC units (no tFUS), per rat:", ac_sham.rat.value_counts().sort_index().to_dict())


def panel(df, label):
    out = []
    for w in ("0-67", "201-268"):
        for R in ("R1", "R2"):
            g = [df[df.prf == p][f"{R}_{w}"].values for p in tfus.PRFS]
            h, pk = tfus.kruskal(g)
            for T in ("T1", "T2"):
                p = np.array([tfus.vs_baseline(df[df.prf == q], w, R, T) for q in tfus.PRFS])
                row = {"set": label, "window": w, "R": R, "T": T, "KW_H": round(h, 2), "KW_p": pk}
                for q, m, pv in zip(tfus.PRFS, [np.nanmean(x) for x in g], p):
                    row[f"mean_{q}"] = round(m, 1)
                    row[f"p_{q}"] = pv
                for B, fac in (("B1", 5), ("B1x2", 10), ("B2", 15)):
                    row[f"sig_{B}"] = ",".join(str(q) for q, pv in zip(tfus.PRFS, p) if pv * fac < 0.01)
                row["lowest"] = tfus.PRFS[int(np.nanargmin([np.nanmean(x) for x in g]))]
                out.append(row)
    return pd.DataFrame(out)


res = panel(ac, "S1 and S1-6")
fmt = res.copy()
for c in [c for c in fmt if c.startswith("p_") or c == "KW_p"]:
    fmt[c] = fmt[c].map(lambda v: f"{v:.2g}")
print("\nUncorrected one-tailed p against baseline per PRF; sig_ lists PRFs significant after each Bonferroni factor:")
print(fmt.to_string(index=False))
AC units with more than 2,000 spikes: 194 (paper 453); left out for no prestimulus spike: 0
AC units with 2,000 spikes or fewer in these files: 28

Units per rat and PRF (paper: 30 Hz 83, 300 Hz 59 by difference, 1,500 Hz 107, 3,000 Hz 104, 4,500 Hz 100):
prf    30.0  300.0  1500.0  3000.0  4500.0  All
rat                                            
BH646    12      5       1       5       6   29
BH648     2      3       2       3       4   14
BH650    10      2       2       2       3   19
BH654     2      1       2       3       2   10
BH655     4      7      14       3       5   33
BH657     2      3       5       3       5   18
BH658    13      8      16      21      13   71
All      45     29      42      40      38  194
Sham AC units (no tFUS), per rat: {'BH646': 21, 'BH648': 5, 'BH650': 12, 'BH654': 1, 'BH655': 3, 'BH657': 2, 'BH658': 21}
Uncorrected one-tailed p against baseline per PRF; sig_ lists PRFs significant after each Bonferroni factor:
        set  window  R  T  KW_H  KW_p  mean_30 p_30  mean_300 p_300  mean_1500  p_1500  mean_3000 p_3000  mean_4500 p_4500 sig_B1 sig_B1x2 sig_B2  lowest
S1 and S1-6    0-67 R1 T1  9.51  0.05    101.6 0.49     100.1  0.51      105.1    0.38      102.4   0.41      100.0   0.52                           4500
S1 and S1-6    0-67 R1 T2  9.51  0.05    101.6 0.42     100.1  0.96      105.1 6.4e-05      102.4   0.02      100.0   0.42   1500     1500   1500    4500
S1 and S1-6    0-67 R2 T1 12.63 0.013     61.3 0.49      55.9  0.51       48.6    0.38       64.5   0.41       52.4   0.52                           1500
S1 and S1-6    0-67 R2 T2 12.63 0.013     61.3    1      55.9     1       48.6       1       64.5      1       52.4      1                           1500
S1 and S1-6 201-268 R1 T1  2.00  0.74    101.6 0.49     100.9  0.47      100.3    0.55      101.9   0.46      101.5   0.54                           1500
S1 and S1-6 201-268 R1 T2  2.00  0.74    101.6  0.5     100.9   0.6      100.3    0.34      101.9  0.032      101.5    0.8                           1500
S1 and S1-6 201-268 R2 T1 12.59 0.013     60.2 0.49      52.9  0.47       47.7    0.55       62.7   0.46       53.0   0.54                           1500
S1 and S1-6 201-268 R2 T2 12.59 0.013     60.2    1      52.9     1       47.7       1       62.7      1       53.0      1                           1500
In [15]:
# Reference: the same tests on AC units of the sham sessions (no tFUS), as one group per window.
rows = []
for w in ("0-67", "201-268"):
    for R in ("R1", "R2"):
        for T in ("T1", "T2"):
            rows.append({"window": w, "R": R, "T": T, "mean": round(np.nanmean(ac_sham[f"{R}_{w}"]), 1),
                         "p_increase": f"{tfus.vs_baseline(ac_sham, w, R, T):.2g}", "n": int(ac_sham[f'{R}_{w}'].notna().sum())})
print("Sham AC units:")
print(pd.DataFrame(rows).to_string(index=False))

# Variant: S1-6 left out.
res_b = panel(ac[ac.target == "S1"], "S1 only")
print("\nVariant, S1-6 sessions left out; units per PRF:", ac[ac.target == "S1"].prf.value_counts().sort_index().to_dict())
print(res_b[["window", "R", "T", "KW_H", "KW_p", "mean_30", "mean_300", "mean_1500", "mean_3000", "mean_4500",
             "sig_B1", "sig_B2", "lowest"]].to_string(index=False))

# Variant: the 6 rats whose AC file shares a session with an S1 file (BH654 left out).
res_c = panel(ac[ac.rat != "BH654"], "without BH654")
print("\nVariant, BH654 (no S1 and AC session) left out; units:", int((ac.rat != "BH654").sum()))
print(res_c[["window", "R", "T", "KW_p", "mean_30", "mean_300", "mean_1500", "mean_3000", "mean_4500",
             "sig_B1", "sig_B2", "lowest"]].to_string(index=False))

# By rat: mean normalized rate (R1) per PRF and window, and the median, which is robust to single units.
print("\nBy rat, R1 mean (median) per PRF:")
for w in ("0-67", "201-268"):
    tab = ac.groupby(["rat", "prf"])[f"R1_{w}"].agg(lambda x: f"{x.mean():.0f} ({x.median():.0f})").unstack()
    print(f"window {w}\n", tab.to_string())
print("\nR1 0-67 ms at 3,000 Hz, largest five units:", np.round(np.sort(ac[ac.prf == 3000]["R1_0-67"].values)[-5:], 1))
print("R1 medians per PRF, 0-67:", ac.groupby("prf")["R1_0-67"].median().round(1).to_dict(),
      "; 201-268:", ac.groupby("prf")["R1_201-268"].median().round(1).to_dict())

fig, axes = plt.subplots(1, 2, figsize=(9, 3.2), sharey=True)
for ax, w in zip(axes, ("0-67", "201-268")):
    m = ac.groupby("prf")[f"R1_{w}"].agg(["mean", "sem"])
    ax.errorbar(range(5), m["mean"], m["sem"], fmt="o")
    ax.axhline(100, color="0.6", lw=0.8)
    ax.set_xticks(range(5), [str(p) for p in tfus.PRFS]); ax.set_title(f"AC, {w} ms"); ax.set_xlabel("PRF (Hz)")
axes[0].set_ylabel("normalized rate R1 (%), mean ± SEM")
print("plotted means range %.1f to %.1f %%" % (ac.groupby("prf")[["R1_0-67", "R1_201-268"]].mean().min().min(),
                                              ac.groupby("prf")[["R1_0-67", "R1_201-268"]].mean().max().max()))
Sham AC units:
 window  R  T  mean p_increase  n
   0-67 R1 T1  99.6       0.53 65
   0-67 R1 T2  99.6       0.57 65
   0-67 R2 T1  69.8       0.53 65
   0-67 R2 T2  69.8          1 65
201-268 R1 T1  99.9       0.51 65
201-268 R1 T2  99.9       0.57 65
201-268 R2 T1  69.8       0.51 65
201-268 R2 T2  69.8          1 65

Variant, S1-6 sessions left out; units per PRF: {30.0: 17, 300.0: 29, 1500.0: 42, 3000.0: 27, 4500.0: 38}
 window  R  T  KW_H     KW_p  mean_30  mean_300  mean_1500  mean_3000  mean_4500 sig_B1 sig_B2  lowest
   0-67 R1 T1  9.85 0.043049    102.8     100.1      105.1      103.7      100.0                  4500
   0-67 R1 T2  9.85 0.043049    102.8     100.1      105.1      103.7      100.0   1500   1500    4500
   0-67 R2 T1 12.45 0.014288     63.0      55.9       48.6       67.9       52.4                  1500
   0-67 R2 T2 12.45 0.014288     63.0      55.9       48.6       67.9       52.4                  1500
201-268 R1 T1  2.21 0.697565    101.2     100.9      100.3      101.9      101.5                  1500
201-268 R1 T2  2.21 0.697565    101.2     100.9      100.3      101.9      101.5                  1500
201-268 R2 T1 11.69 0.019775     60.7      52.9       47.7       66.9       53.0                  1500
201-268 R2 T2 11.69 0.019775     60.7      52.9       47.7       66.9       53.0                  1500
Variant, BH654 (no S1 and AC session) left out; units: 184
 window  R  T     KW_p  mean_30  mean_300  mean_1500  mean_3000  mean_4500 sig_B1 sig_B2  lowest
   0-67 R1 T1 0.029708    100.7     100.2      105.7      101.5      100.6                   300
   0-67 R1 T2 0.029708    100.7     100.2      105.7      101.5      100.6   1500   1500     300
   0-67 R2 T1 0.009509     62.5      54.2       49.4       66.6       53.7                  1500
   0-67 R2 T2 0.009509     62.5      54.2       49.4       66.6       53.7                  1500
201-268 R1 T1 0.863589    100.4     101.0      100.7      101.6      101.9                    30
201-268 R1 T2 0.863589    100.4     101.0      100.7      101.6      101.9                    30
201-268 R2 T1 0.006015     61.2      51.1       48.6       65.2       54.2                  1500
201-268 R2 T2 0.006015     61.2      51.1       48.6       65.2       54.2                  1500

By rat, R1 mean (median) per PRF:
window 0-67
 prf       30.0       300.0      1500.0     3000.0     4500.0
rat                                                         
BH646  103 (101)   100 (99)  110 (110)    98 (94)  102 (101)
BH648  100 (100)  106 (109)  105 (105)  111 (112)    96 (95)
BH650    98 (97)    99 (99)    97 (97)  105 (105)  102 (102)
BH654  123 (123)    98 (98)    94 (94)  114 (118)    88 (88)
BH655  104 (104)  105 (101)  111 (109)    99 (98)   99 (100)
BH657  100 (100)   101 (96)  102 (105)   100 (98)    99 (98)
BH658   100 (99)    94 (93)  103 (106)  101 (102)  102 (101)
window 201-268
 prf       30.0       300.0      1500.0     3000.0     4500.0
rat                                                         
BH646  101 (101)  105 (105)  109 (109)    96 (94)   101 (99)
BH648  103 (103)  109 (105)  103 (103)  105 (106)    94 (96)
BH650  104 (103)    99 (99)    95 (95)  105 (105)    99 (99)
BH654  127 (127)    97 (97)    92 (92)  105 (105)    94 (94)
BH655  104 (102)   104 (97)  103 (101)  112 (112)  105 (103)
BH657    96 (96)   98 (101)    96 (95)  101 (101)   98 (100)
BH658    97 (96)    95 (93)  101 (100)  101 (101)  106 (105)

R1 0-67 ms at 3,000 Hz, largest five units: [113. 115. 116. 118. 118.]
R1 medians per PRF, 0-67: {30.0: 100.8, 300.0: 96.5, 1500.0: 105.5, 3000.0: 103.1, 4500.0: 100.0} ; 201-268: {30.0: 100.0, 300.0: 99.8, 1500.0: 100.2, 3000.0: 100.8, 4500.0: 99.4}
plotted means range 100.0 to 105.1 %
No description has been provided for this image

Result: not reproduced. There are 194 AC units with more than 2,000 spikes in 7 rats, against the paper's 453. In the main set no Kruskal-Wallis test across the five PRFs is significant at 0.01 (p from 0.013 to 0.74); with BH654 left out the R2 tests give 0.0095 and 0.006, with every R2 mean below 100% (48.6 to 66.6%). Against baseline only 1,500 Hz during sonication is significant, and only under R1 and T2 (mean 105.1%, uncorrected p = 6.4e-05, below 0.01 under every factor). The paper's pattern needs 1,500 and 3,000 Hz during sonication and 30, 1,500, 3,000 and 4,500 Hz after it. Here no PRF is above baseline after sonication under any reading, and 300 Hz has the lowest mean only under R1 during sonication without BH654. Per-rat R1 means lie between 88 and 127%. Under R2 every mean is below 100%, sham included (69.8%), because R2 keeps only trials with a prestimulus spike.

The outcome rests on two assumptions about the 2025 cohort, which holds every AC file: that its sessions were at the paper's 5 V, as nothing in the files states a voltage, and that its trial starts are the sonication onsets. The second is supported only in part. The population correlogram peaks within 0 to 400 ms of the trial start in 4 of 108 stimulated 2025 files, among them the BH648 4,500 Hz S1 file, and no other lag within 60 s fits. But untyped S1 units of the same cohort rise under T2 at 30 Hz (p = 7e-07 and 1.6e-12) and 1,500 Hz (2.7e-12 and 8.1e-10), where sham S1 units give p = 0.99 and 1 and sham AC units 0.57 (data check), so the S1 spikes lock to the trial starts in at least those sessions, mostly in BH646 and BH648. At the same PRFs and in the same rats, AC units show no increase after sonication at 30 or 1,500 Hz (R1 101.6% and 100.3%, T2 p = 0.5 and 0.34; BH646 101% and 109%, BH648 103% and 103%), where the paper reports one. So the failure of the pattern does not rest only on sessions whose timing is in doubt. For 300, 3,000 and 4,500 Hz the outputs cannot tell missing responses from trial times that are not onsets.

Summary¶

Claim Outcome
subjects not reproduced
fig4-unit-counts not reproduced (at most 4 of 8 counts can be within 10%)
fig5-unit-counts blocked, data missing (no CG1 session at 3,000 Hz; at most 6 of 8 counts can be within 10%, as a partial result needs)
fig11b-ac-responses not reproduced, assuming the 2025 sessions at 5 V and their trial starts as onsets (timing supported at 30 and 1,500 Hz)
fig2-target-artifact blocked, data missing
18 other claims on RSUs and FSUs (Fig. 4 to 6, 10A to 10C, 11C, 11D) blocked, data missing
12 claims on the duty-cycle series (fig7-9-unit-counts, Fig. 7 to 9, 10D to 10F) blocked, data missing

A failure to reproduce here may be a failure of this attempt, not of the paper: see the reasoning and the differences from the paper's method.

How the analysis differs from the paper's. Sessions are taken as the dandiset gives them, with "S1-6" counted as S1-targeted (a variant leaves it out). The 2024 sessions are limited to the paper's 5 V, as the claims file says; the 2025 sessions state no voltage and are all kept, taken to be at the paper's pressure, and their trial starts are taken as the sonication onsets. The unit counts of Fig. 4 are tested, and those of Fig. 5 bounded, through upper bounds from untyped units, as the units cannot be typed. AC units are all those with more than 2,000 spikes, as the Methods say, in the 7 rats with AC files.

What was found about the dataset. The dandiset holds spike times and trial tables only: no waveforms, so no RSU or FSU types. Its celltype_label column is described as RSU and FSU codes but holds 0 or the area in every file that has it. Only the 200 us PD series is here, with sessions at 10 and 15 V, POm targeting and probe variants the paper does not describe. Its 13 rats were recorded from August 2024 to July 2025, after the paper's preprint (June 2024), with 64-channel S1 probes. Of them only BH594 has a file in 000946, the dandiset the paper names for its data. Session start times do not date the sessions of the 2025 cohort. Two files are the same recording. Several target labels are unexplained. In most 2025 sessions the spikes show no locking to the trial starts at any lag within 60 s, though trial tables and spikes span the same times; untyped S1 units show weak locking at 30 and 1,500 Hz (T2, means 107 to 109%).