Reproducing ten Brinke et al. (2017) from CRCNS cb-1¶

Paper. ten Brinke MM, Heiney SA, Wang X, Proietti-Onori M, Boele HJ, Bakermans J, Medina JF, Gao Z, De Zeeuw CI (2017). Dynamic modulation of activity in cerebellar nuclei neurons during pavlovian eyeblink conditioning in mice. eLife 6:e28132. doi:10.7554/eLife.28132. The claims file (claims/brinke-2017.yaml) was written from the version of record (PMC5760204) with its figure legends, Methods and Supplementary file 1; this attempt read the same text.

Data set. CRCNS cb-1, "Eyelid behavior and spike activity of cerebellar interpositus nucleus neurons during eyeblink conditioning in awake behaving mice", doi:10.6080/K0B85697, read anonymously from the public S3 bucket crcnsarchive under cb-1/live/. CRCNS does not version its data sets and the paper cites the data set's DOI without a version, so the version is recorded as unversioned: the files as published under cb-1/live/ (last modified 2026-02-11 in the bucket; the description is version 0.6 of 13 Dec 2017). There is no other version to choose. The one data file is eLife_dataset.mat, MD5 511cf0f257240365977d2c5960766f5d in the data set's checksums.md5; the notebook streams it into memory and checks the MD5 (the description PDF is fa19108c9385b7e66d6df95e68a30c99 and the example script eLife_dataset.m dce22a5c204e00f10b692f1b07a3eae0). A later change to the file would show as a mismatch in the first cell.

What the data set holds. 372 recordings of interpositus nucleus neurons: 270 of the first dataset (recorded over training, CS-US interval 250 ms) and 102 of the second (after training, 212 ms by the description), each with per-trial eyelid traces, spike density traces, spike times, a per-trial facilitation and CR amplitude, the mouse and the training day. It holds no recording depth, no US-only trials, no optogenetic sessions and no Purkinje cell recordings.

Outside data. Recording depth is taken from the paper's Source data 1 (Additional files of doi:10.7554/eLife.28132), the file of the version of record on the eLife site (elife-28132-data1-v2.mat, MD5 3ca8f91c5371e88c12f5eb32b3b209c6, checked when it is streamed), as the claims file's opening comment names it. Only its Depth is used; the link claim source-data-1-link matches its cells to the data set's by order and checks the values both hold. Source data 1 gives no depth for the second dataset's 102 cells.

Method details taken from the paper, and readings. The helper module ipn.py says where each parameter comes from. Where the claims file names readings, every one is run; the class of a cell (facilitation, suppression, none) is run under the claims file's two baseline-correction readings, (a) and (b), and under a variant of this attempt's own, (a+), the Methods' "mean above-baseline activity within the baseline itself" averaged over the above-baseline bins only; no outcome rests on (a+) alone. Reading (b) on each cell's average trace gives the authors' per-cell facilitation in Source data 1. The second dataset's classes use the claims file's two windows, 12-212 ms (adopted) and 0-200 ms; 0-212 ms is shown as a variant where the verifier asked for it. CR amplitude at US onset is run as the data set's own crAmplitude (which this notebook finds is the eyelid 13 ms before the stated US onset) and as computed at the stated US onset. The CS pause and peak are run under the four threshold readings of the claims file, the two windows (50-125 ms in the Methods, 50-130 ms in the Results) and two places to look for the rebound (within the window, or up to 50 ms after the trough, marked "+50", this attempt's variant). The spike-eyelid cross-correlation lags use an estimator the paper does not name: the adopted one is the cross-covariance of the two mean-subtracted traces over the segment (as MATLAB's xcov, 'coeff'), and the Pearson r of the spike segment with the eyelid re-cut at each lag is shown as a variant. The Methods' trial exclusions are not applied again: Source data 1 lists exactly the deposited trials of each cell as its valid trials. The Statistics rule for correlations needs a normality test the paper does not name; Lilliefors is used, and a Spearman-only count is printed beside each trial-by-trial count. Bootstrap p-values are fractions of 500 random datasets, so 0.000 means below 1/500. Each claim's section has its own random generator with a fixed seed.

Claim Data Status
source-data-1-link with_inputs (link) tested
firing-rate-depth with_inputs tested
fig1ijk-modulation-classes dataset tested
modulation-absolute-not-rate-dependent dataset tested
fig1l-cells-with-behavior dataset tested
fig1m-modulation-grows-with-training dataset tested
fig1no-modulation-more-with-behavior dataset tested
fig2a-facilitation-properties-ds1 dataset tested
fig2b-facilitation-trial-correlations-ds1 dataset tested
fig2b-lmm-ds1 dataset tested
fig2d-facilitation-leads-eyelid-ds1 dataset tested
fig2-s1-correlation-matrix-offsets dataset tested
fig2e-facilitation-ds2 dataset tested
fig2f-facilitation-trial-correlations-ds2 dataset tested
fig2f-lmm-ds2 dataset tested
fig2h-facilitation-leads-eyelid-ds2 dataset tested
fig2-suppression-properties-ds1 dataset tested
suppression-smaller-shorter-than-facilitation dataset tested
suppression-same-timing-as-facilitation dataset tested
fig2j-suppression-trial-correlations-ds1 dataset tested
fig2l-suppression-no-lead-ds1 dataset tested
fig2n-suppression-ds2 dataset tested
ds2-stronger-facilitation-same-suppression dataset tested
fig2p-suppression-no-lead-ds2 dataset tested
ds2-modulation-proportion dataset tested
fig3-optogenetic-inhibition-abolishes-crs dataset blocked: data missing
fig4b-cs-pause-ds1 dataset tested
fig4c-cs-pause-ds2 dataset tested
fig4g-cs-pause-latency-cr-latency dataset tested
fig4s1-cs-peak-cells dataset tested
fig4s1-cs-peak-suppression-not-different with_inputs tested
fig4h-transient-responses-after-day-3 dataset tested
fig5cd-cs-pause-faster-facilitation-ds1 dataset tested
fig5hi-cs-pause-faster-facilitation-ds2 dataset tested
fig5ej-cs-pause-cells-shallower with_inputs first dataset tested; blocked: data missing (second-dataset depth)
fig5s1-model-timing with_inputs blocked: data missing
fig6-us-peak-prevalence dataset tested
fig6c-us-peak-declines-with-training dataset tested
us-peak-anticorrelates-with-behavior dataset tested
fig6d-us-peak-trial-correlations dataset tested
us-peak-cooccurs-with-facilitation dataset tested
fig6s1a-eyelid-opening-us-peak dataset tested
fig6s1bc-purkinje-us-complex-spike-opening dataset blocked: data missing
us-pause-prevalence dataset tested
cs-pause-cells-have-us-pause dataset tested
fig6b-us-peak-pause-overlap dataset tested
fig6g-us-response-depth with_inputs tested
us-pause-declines-with-training dataset tested
fig6h-us-pause-trial-correlations dataset tested
fig7-second-us-peak dataset tested
fig7-second-us-peak-dynamics dataset tested
fig7c-second-peak-cells-lower-cr dataset tested
fig7b-first-second-peak-correlated dataset tested
us-only-trials-ds2 dataset blocked: data missing
fig7s1c-us-only-second-peak-cs-pause-cells dataset blocked: data missing (US-only trials)
fig7fg-us-pause-resembles-cs-pause dataset blocked: data missing (US-only trials)
In [1]:
import resource
import time
import warnings

import numpy as np
import pandas as pd
from scipy import stats

import ipn

warnings.filterwarnings("ignore", category=RuntimeWarning)
pd.set_option("display.width", 200)
pd.set_option("display.max_columns", 40)
t_start = time.time()
sums = ipn.checksums()
D = ipn.load()
print("data set", ipn.DATASET, ipn.VERSION, "doi", ipn.DOI)
print("MD5 of", ipn.FILE, D["md5"], "published", sums[ipn.FILE], "match", D["md5"] == sums[ipn.FILE])
df = ipn.cell_table(D)
t = D["t"]
d1, d2 = df[df.dset == 1], df[df.dset == 2]
print("loaded in", round(time.time() - t_start, 1), "s")
data set cb-1 unversioned doi 10.6080/K0B85697
MD5 of eLife_dataset.mat 511cf0f257240365977d2c5960766f5d published 511cf0f257240365977d2c5960766f5d match True
loaded in 8.5 s

Data check¶

In [2]:
print("recordings:", len(df), "set 1:", len(d1), "set 2:", len(d2))
print("US onset (ms) by set:", sorted(set(d1.us)), sorted(set(d2.us)))
print("time axis:", t[0], "to", t[-1], "ms, step", np.unique(np.diff(t)))
print("mice: set 1", d1.mouse.nunique(), sorted(int(m) for m in d1.mouse.unique()), "| set 2", d2.mouse.nunique(), sorted(int(m) for m in d2.mouse.unique()))
print("shared mice between sets:", sorted(set(d1.mouse) & set(d2.mouse)))
print("recordings per day code, set 1:", d1.day.value_counts().sort_index().to_dict())
print("day codes, set 2:", d2.day.value_counts().to_dict())
print("days 1-3:", (d1.day <= 3).sum(), " days 1-4:", (d1.day <= 4).sum(), " later:", (d1.day > 4).sum())
print("trials per recording: set 1 min", d1.n_trials.min(), "max", d1.n_trials.max(), "total", d1.n_trials.sum(),
      "| set 2 min", d2.n_trials.min(), "max", d2.n_trials.max(), "total", d2.n_trials.sum())
print("recordings per mouse, set 1:", d1.mouse.value_counts().sort_index().to_dict())
# value ranges
ey = np.concatenate([e[:, ~np.isnan(e).all(0)].ravel() for e in D["eyelid"]])
sd_all = np.concatenate([s[:, ~np.isnan(s).all(0)].ravel() for s in D["sdf"]])
print(f"eyelid (normalized, 0 open, 1 full blink): {np.nanmin(ey):.3f} to {np.nanmax(ey):.3f}, "
      f"1st/99th percentile {np.nanpercentile(ey, 1):.3f}/{np.nanpercentile(ey, 99):.3f}")
print(f"spike density (Hz): {np.nanmin(sd_all):.1f} to {np.nanmax(sd_all):.1f}")
valid2 = ~np.isnan(D["eyelid"][300]).all(0)
print("set 2 samples present:", t[valid2][0], "to", t[valid2][-1], "ms (the rest NaN padding)")
sp = np.concatenate([np.concatenate(s) for s in D["spikes"][:270]])
print(f"spike times set 1: {sp.min():.1f} to {sp.max():.1f} ms")
print("mean baseline rate (Hz), set 1: %.1f +/- %.1f, range %.1f to %.1f" % (
    d1.rate_base.mean(), d1.rate_base.std(), d1.rate_base.min(), d1.rate_base.max()))
# eyelid baseline: trial exclusions of the Methods (eye at least half open; Grubbs on baseline SD)
half = sum(int((np.nanmean(e[:, t < 0], 1) >= 0.5).sum()) for e in D["eyelid"])
grubbs = sum(int((~ipn.grubbs_keep(np.nanstd(e[:, t < 0], 1))).sum()) for e in D["eyelid"])
print("trials with baseline eyelid at or past half closed:", half,
      "| trials a Grubbs test on baseline SD would still remove:", grubbs, "of", df.n_trials.sum())
recordings: 372 set 1: 270 set 2: 102
US onset (ms) by set: [250] [212]
time axis: -500 to 1500 ms, step [1]
mice: set 1 18 [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19] | set 2 6 [20, 21, 22, 23, 24, 25]
shared mice between sets: []
recordings per day code, set 1: {1.0: 25, 2.0: 34, 3.0: 40, 4.0: 41, 5.0: 23, 6.0: 23, 7.5: 84}
day codes, set 2: {10.5: 102}
days 1-3: 99  days 1-4: 140  later: 130
trials per recording: set 1 min 10 max 105 total 9398 | set 2 min 11 max 138 total 3629
recordings per mouse, set 1: {1: 23, 2: 3, 3: 14, 4: 14, 5: 37, 6: 18, 7: 13, 8: 38, 9: 24, 11: 26, 12: 9, 13: 10, 14: 8, 15: 8, 16: 4, 17: 5, 18: 4, 19: 12}
eyelid (normalized, 0 open, 1 full blink): -0.432 to 2.084, 1st/99th percentile -0.005/1.035
spike density (Hz): 0.0 to 717.3
set 2 samples present: -200 to 799 ms (the rest NaN padding)
spike times set 1: -500.0 to 1500.0 ms
mean baseline rate (Hz), set 1: 68.3 +/- 26.4, range 7.2 to 168.0
trials with baseline eyelid at or past half closed: 282 | trials a Grubbs test on baseline SD would still remove: 402 of 13027

The deposited spike density traces (ephys) are compared with the deposited spike times convolved here with Gaussians of several widths, the stored mean traces with the trial means, and the deposited per-trial facilitation and crAmplitude with the definitions they could follow.

In [3]:
from scipy.ndimage import gaussian_filter1d
rs = {}
for sdv in (3, 4, 5, 6):
    vals = []
    for i in range(0, 372, 37):
        for tr in range(3):
            s = D["spikes"][i][tr]
            b = np.zeros(len(t))
            k = np.round(s).astype(int) - t[0]
            np.add.at(b, k[(k >= 0) & (k < len(t))], 1000.0)
            g = gaussian_filter1d(b, sdv, mode="constant")
            ok = ~np.isnan(D["sdf"][i][tr])
            vals.append(np.mean(np.abs(g[ok] - D["sdf"][i][tr][ok])))
    rs[sdv] = np.mean(vals)
print("mean abs difference (Hz) between deposited SDF and spikes convolved with a Gaussian of SD:",
      {k: round(v, 2) for k, v in rs.items()})
dm = max(np.nanmax(np.abs(np.nanmean(D["sdf"][i], 0) - D["sdf_mean"][i])) for i in range(372))
de = max(np.nanmax(np.abs(np.nanmean(D["eyelid"][i], 0) - D["eyelid_mean"][i])) for i in range(372))
print(f"largest difference of stored mean traces from trial means: spikes {dm:.3g} Hz, eyelid {de:.3g}")
dmed = [np.nanmedian(np.abs(np.nanmean(D["sdf"][i], 0) - D["sdf_mean"][i])) for i in range(372)]
print("stored ephysMean against the trial mean of ephys: median abs difference per recording, median over recordings"
      f" {np.median(dmed):.3g} Hz, recordings with a median difference above 1 Hz: {int(np.sum(np.array(dmed) > 1))}")
bad = [i for i in range(372) if dmed[i] > 1]
print("those recordings (cell number, set, trials deposited, median and largest abs difference in Hz):")
print([(i + 1, int(D["dset"][i]), D["sdf"][i].shape[0], round(float(dmed[i]), 1),
        round(float(np.nanmax(np.abs(np.nanmean(D["sdf"][i], 0) - D["sdf_mean"][i]))), 1)) for i in bad])
# duplicates: identical mean traces or identical first trials across recordings
keys = {}
dups = []
for i in range(372):
    k = (D["sdf"][i].shape, np.round(np.nansum(D["sdf"][i]), 3), np.round(np.nansum(D["eyelid"][i]), 5))
    if k in keys:
        dups.append((keys[k] + 1, i + 1))
    keys[k] = i
print("recordings deposited twice (same trial count and same sums of spike and eyelid traces):", dups)
mean abs difference (Hz) between deposited SDF and spikes convolved with a Gaussian of SD: {3: np.float64(19.75), 4: np.float64(8.77), 5: np.float64(3.82), 6: np.float64(6.17)}
largest difference of stored mean traces from trial means: spikes 158 Hz, eyelid 0
stored ephysMean against the trial mean of ephys: median abs difference per recording, median over recordings 0.537 Hz, recordings with a median difference above 1 Hz: 26
those recordings (cell number, set, trials deposited, median and largest abs difference in Hz):
[(3, 1, 19, 1.1, 38.3), (16, 1, 51, 1.2, 5.8), (20, 1, 23, 1.1, 13.1), (21, 1, 14, 1.2, 52.3), (27, 1, 12, 1.2, 10.0), (41, 1, 12, 1.2, 8.9), (78, 1, 22, 1.1, 140.9), (79, 1, 10, 1.1, 13.1), (105, 1, 18, 1.0, 13.8), (146, 1, 12, 1.0, 9.0), (159, 1, 37, 1.5, 59.5), (163, 1, 49, 1.1, 37.3), (170, 1, 16, 1.1, 46.2), (209, 1, 12, 1.1, 34.0), (211, 1, 14, 7.3, 17.5), (216, 1, 50, 1.9, 14.1), (218, 1, 12, 1.2, 16.5), (219, 1, 46, 1.6, 8.4), (224, 1, 31, 2.4, 7.1), (244, 1, 13, 1.1, 53.9), (245, 1, 13, 1.3, 8.1), (250, 1, 20, 4.1, 27.6), (256, 1, 29, 3.6, 62.0), (259, 1, 48, 2.8, 13.6), (262, 1, 53, 2.0, 8.4), (263, 1, 30, 2.5, 22.2)]
recordings deposited twice (same trial count and same sums of spike and eyelid traces): []
In [4]:
# The data set's per-trial crAmplitude ("eyelid amplitude at US onset ... from baseline (all datapoints where
# timeIndex < 0)") against the eyelid traces, at the stated US onset and at other times.
def crmatch(off):
    out = {1: [], 2: []}
    for i in range(372):
        e = D["eyelid"][i]
        v = (e[:, t == D["us"][i] + off][:, 0] - np.nanmean(e[:, t < 0], 1)) * 100
        out[int(D["dset"][i])].append(np.max(np.abs(v - D["cramp"][i])))
    return {k: (round(float(np.median(v)), 3), round(float(np.max(v)), 3)) for k, v in out.items()}
for off in (0, -12, -13, -14):
    print(f"crAmplitude vs eyelid at US onset {off:+d} ms: per-recording max abs difference (median, max) by set", crmatch(off))
# The data set's per-trial facilitation against readings (a), (a+) and (b) of the modulation measure on single trials
def facmatch(win_of):
    out = {1: [], 2: []}
    for i in range(372):
        ds, us = int(D["dset"][i]), int(D["us"][i])
        mod = ipn.modulation(D["sdf"][i], t, ipn.baseline_window(ds), win_of(ds, us))
        out[ds].append([np.max(np.abs(mod[f"fac_{rd}"] - D["fac"][i])) for rd in ("a", "ap", "b")])
    return {k: np.round(np.median(np.array(v), 0), 3).tolist() for k, v in out.items()}
print("facilitation, median per-recording max abs difference (Hz) for readings a, a+, b;",
      "window = last 200 ms:", facmatch(lambda ds, us: (us - 200, us)))
print("   window = CS onset to US onset:", facmatch(lambda ds, us: (0, us)))
crAmplitude vs eyelid at US onset +0 ms: per-recording max abs difference (median, max) by set {1: (5.306, 37.635), 2: (13.506, 36.157)}
crAmplitude vs eyelid at US onset -12 ms: per-recording max abs difference (median, max) by set {1: (1.129, 12.943), 2: (1.143, 2.338)}
crAmplitude vs eyelid at US onset -13 ms: per-recording max abs difference (median, max) by set {1: (1.069, 11.73), 2: (0.041, 0.113)}
crAmplitude vs eyelid at US onset -14 ms: per-recording max abs difference (median, max) by set {1: (1.198, 13.336), 2: (1.112, 2.337)}
facilitation, median per-recording max abs difference (Hz) for readings a, a+, b; window = last 200 ms: {1: [34.864, 50.333, 4.474], 2: [28.194, 46.018, 4.594]}
   window = CS onset to US onset: {1: [32.574, 49.646, 8.885], 2: [28.351, 46.485, 0.0]}

Clock check. The traces are cut around CS onset, so there is no separate trial table; the check is that the responses to the CS and the US occur after the stated times, by set: the eyelid's unconditioned blink and the spike response to the US, and the same quantities in time-shifted windows as a contrast.

In [5]:
for ds, sub in ((1, d1), (2, d2)):
    us = int(sub.us.iloc[0])
    ems = np.array([np.nanmean(D["eyelid"][i] - np.nanmean(D["eyelid"][i][:, t < 0], 1, keepdims=True), 0)
                    for i in sub.index])
    g = np.nanmean(ems, 0)
    v = np.diff(g)
    w = ipn.idx(t[1:], us - 100, us + 100)
    print(f"set {ds}: grand-mean eyelid velocity is highest {t[1:][w][np.nanargmax(v[w])] - us:+d} ms from US onset"
          f" (searched -100 to +100 ms)")
    z = np.array([(np.nanmean(D["sdf"][i], 0) - df.mu[i]) / df.sd[i] for i in sub.index])
    gz = np.nanmean(np.abs(z), 0)
    for a, b in ((-30, 0), (0, 15), (15, 30), (30, 60)):
        print(f"   mean |z| of spike traces {a:+d} to {b:+d} ms around US: {np.mean(gz[ipn.idx(t, us + a, us + b)]):.2f};"
              f" around CS: {np.mean(gz[ipn.idx(t, a, b)]):.2f}")
print("first US peak latency (ms after US), cells with a peak, set 1: median",
      np.median(d1.peak1_t[d1.peak1]), "| set 2:", np.median(d2.peak1_t[d2.peak1]))
set 1: grand-mean eyelid velocity is highest +23 ms from US onset (searched -100 to +100 ms)
   mean |z| of spike traces -30 to +0 ms around US: 2.35; around CS: 0.82
   mean |z| of spike traces +0 to +15 ms around US: 11.51; around CS: 0.84
   mean |z| of spike traces +15 to +30 ms around US: 8.78; around CS: 0.87
   mean |z| of spike traces +30 to +60 ms around US: 6.32; around CS: 0.92
set 2: grand-mean eyelid velocity is highest +13 ms from US onset (searched -100 to +100 ms)
   mean |z| of spike traces -30 to +0 ms around US: 15.61; around CS: 0.79
   mean |z| of spike traces +0 to +15 ms around US: 12.48; around CS: 1.01
   mean |z| of spike traces +15 to +30 ms around US: 9.67; around CS: 0.89
   mean |z| of spike traces +30 to +60 ms around US: 8.35; around CS: 1.32
first US peak latency (ms after US), cells with a peak, set 1: median 10.0 | set 2: 11.5

source-data-1-link¶

The cells of the paper's Source data 1 are the cells of CRCNS cb-1 in the same order, so that the recording depth Source data 1 gives can be attached to the data set's cells.

Source: Additional files, Source data 1. Data: with_inputs. A link claim (Author, step 4).

Criterion (claims file): Added by the author of attempt brinke-2017-01 (Author, step 4). Cell i of the data set is matched to cell i of Source data 1, the order both use. The matched cells are compared on what both hold, the number of trials, the per-trial eyelid closure at US onset ('CR @ US ms' against the data set's crAmplitude) and the per-trial baseline rate ('Baseline Hz' against the spike count in the pre-CS baseline), and the same comparisons are shown with the cells shifted by one as a reference. Reproduced when at least 99% of the 372 cells agree on all three and the shifted match does not; the number of cells with a depth is reported.

In [6]:
SD1, sd1_md5 = ipn.load_source_data1()
print("Source data 1:", ipn.SOURCE_DATA1)
print("  MD5", sd1_md5, "pinned", ipn.SOURCE_DATA1_MD5, "match", sd1_md5 == ipn.SOURCE_DATA1_MD5)
print("  variables:", len(SD1), "| cells per variable:", sorted({len(v) for v in SD1.values()}))


def base_hz(i):
    """Per-trial spike count in the cell's baseline window (ipn.baseline_window), in Hz."""
    lo, hi = ipn.baseline_window(int(df.dset[i]))
    return np.array([np.sum((s >= lo) & (s < hi)) for s in D["spikes"][i]]) / ((hi - lo) / 1000)


def link_checks(shift=0):
    """Match data set cell i to Source data 1 cell i + shift; per-cell agreement on what both hold."""
    out = []
    for i in range(len(df)):
        j = i + shift
        if not 0 <= j < len(df):
            continue
        n = D["sdf"][i].shape[0]
        same_n = len(SD1["# Valid Trials"][j]) == n
        cr = same_n and np.allclose(SD1["CR @ US ms"][j], D["cramp"][i], atol=1e-9, equal_nan=True)
        bh = same_n and np.allclose(SD1["Baseline Hz"][j], base_hz(i), atol=1e-6)
        out.append({"cell": i, "dset": int(df.dset[i]), "trials": same_n, "CR @ US = crAmplitude": cr, "Baseline Hz = spike count": bh})
    return pd.DataFrame(out)


lk = link_checks()
ids = np.array([np.unique(SD1["Cell"][i]).tolist() == [i + 1] for i in range(len(df))])
print("Source data 1 'Cell' is the cell's position (1-372), constant over its trials:", int(ids.sum()), "of", len(df))
print("cells matched by order that agree (of 270 first-dataset, 102 second-dataset cells):")
print(lk.groupby("dset")[["trials", "CR @ US = crAmplitude", "Baseline Hz = spike count"]].sum().to_string())
for sh in (-1, 1):
    l2 = link_checks(sh)
    print(f"  reference, cells shifted by {sh:+d}: same trial count {int(l2.trials.sum())}, same CR @ US {int(l2['CR @ US = crAmplitude'].sum())},"
          f" same baseline Hz {int(l2['Baseline Hz = spike count'].sum())} of {len(l2)}")
dep = [np.unique(SD1["Depth"][i][~np.isnan(SD1["Depth"][i])]) for i in range(len(df))]
print("cells whose Depth is one value over all trials:", sum(len(v) == 1 for v in dep), "| all NaN:", sum(len(v) == 0 for v in dep))
df["depth"] = [float(v[0]) if len(v) == 1 else np.nan for v in dep]
d1, d2 = df[df.dset == 1], df[df.dset == 2]
for ds, sub in ((1, d1), (2, d2)):
    v = sub.depth.dropna()
    print(f"set {ds}: depth given for {len(v)} of {len(sub)} cells" + (f", {v.min():.0f} to {v.max():.0f} um, mean {v.mean():.0f} +/- {v.std():.0f}" if len(v) else ""))
print("set 1 depth by mouse (mean, n):", {int(m): (round(g.depth.mean()), len(g)) for m, g in d1.groupby("mouse")})
Source data 1: https://cdn.elifesciences.org/articles/28132/elife-28132-data1-v2.mat
  MD5 3ca8f91c5371e88c12f5eb32b3b209c6 pinned 3ca8f91c5371e88c12f5eb32b3b209c6 match True
  variables: 51 | cells per variable: [372]
Source data 1 'Cell' is the cell's position (1-372), constant over its trials: 372 of 372
cells matched by order that agree (of 270 first-dataset, 102 second-dataset cells):
      trials  CR @ US = crAmplitude  Baseline Hz = spike count
dset                                                          
1        270                    270                        270
2        102                    102                        102
  reference, cells shifted by -1: same trial count 9, same CR @ US 0, same baseline Hz 0 of 371
  reference, cells shifted by +1: same trial count 9, same CR @ US 0, same baseline Hz 0 of 371
cells whose Depth is one value over all trials: 270 | all NaN: 102
set 1: depth given for 270 of 270 cells, 1500 to 3000 um, mean 2119 +/- 355
set 2: depth given for 0 of 102 cells
set 1 depth by mouse (mean, n): {1: (1881, 23), 2: (2258, 3), 3: (1932, 14), 4: (2036, 14), 5: (2001, 37), 6: (2187, 18), 7: (2245, 13), 8: (2004, 38), 9: (1992, 24), 11: (2142, 26), 12: (2332, 9), 13: (2216, 10), 14: (2466, 8), 15: (2730, 8), 16: (2694, 4), 17: (2735, 5), 18: (2744, 4), 19: (2016, 12)}

Result: reproduced. All 372 cells matched by order agree on the number of trials, the per-trial eyelid closure at US onset and the per-trial baseline rate (270 of 270 first-dataset and 102 of 102 second-dataset cells), and Source data 1's Cell is each cell's position. Shifted by one cell, 9 of 371 agree on the number of trials and none on the other two. Source data 1 gives one depth per cell for the 270 first-dataset cells (1500 to 3000 um, the range the Results give) and none for the 102 second-dataset cells, whose Depth is NaN.

Source data 1's per-cell values against this attempt's¶

The link above shows that the deposited trials of every cell are the trials Source data 1 lists, as # Valid Trials (one entry per trial) has the deposited trial count in all 372 cells. The Methods' trial exclusions (Grubbs test on baseline SDs, eye at least half open) are therefore taken as already applied, and are not applied again here. Source data 1 also holds the authors' own per-trial CR flags and per-cell modulation and US-response values. They are compared here with this attempt's measures, to show where the selections differ. None of these values is used by any claim below: the claims file takes only recording depth from Source data 1.

In [7]:
sd1_first = lambda k: np.array([np.nanmean(SD1[k][i]) for i in d1.index])
cr_sd1 = [SD1["CR Yes/no?"][i] > 0.5 for i in d1.index]
cr_here = [ipn.eyelid_trials(D["eyelid"][i], t, int(D["us"][i]))["cr"] for i in d1.index]
agree = np.array([np.mean(a == b) for a, b in zip(cr_sd1, cr_here)])
print(f"per-trial CR (this attempt's rule against Source data 1's 'CR Yes/no?'), set 1: agreement per recording median"
      f" {np.median(agree):.3f}, mean {agree.mean():.3f}; recordings with full agreement {int((agree == 1).sum())} of 270")
behav_sd1 = pd.Series([100 * np.mean(c) >= 20 for c in cr_sd1], index=d1.index)
print(f"recordings with CRs in at least 20% of trials: Source data 1 {int(behav_sd1.sum())}, here {int(d1.behav.sum())},"
      f" both {int((behav_sd1 & d1.behav).sum())}, here only {int((~behav_sd1 & d1.behav).sum())}, Source data 1 only {int((behav_sd1 & ~d1.behav).sum())}")
print(f"  with Source data 1's CR flags: US peak cells with behavior {int((d1.peak1 & behav_sd1).sum())} (here {int((d1.peak1 & d1.behav).sum())};"
      f" paper 62), US pause cells with behavior {int((d1.pause & behav_sd1).sum())} (here {int((d1.pause & d1.behav).sum())}; paper 41 or 37)")
mf, ms = sd1_first("Mean Facil Hz"), sd1_first("Mean Supp Hz")
print(f"Source data 1 per-cell 'Mean Facil Hz' >= 5: {int((mf >= 5).sum())} cells; 'Mean Supp Hz' >= 5: {int((ms >= 5).sum())};"
      f" both {int(((mf >= 5) & (ms >= 5)).sum())} (paper 60 and 23)")
for rd, r in (("a", "a"), ("a+", "ap"), ("b", "b")):
    f, s = d1[f"fac_{r}_50-250"].values, d1[f"sup_{r}_50-250"].values
    print(f"  reading {rd}: Pearson r with 'Mean Facil Hz' {np.corrcoef(mf, f)[0, 1]:.4f}, median difference {np.median(mf - f):+.2f} Hz;"
          f" with 'Mean Supp Hz' {np.corrcoef(ms, s)[0, 1]:.4f}, median difference {np.median(ms - s):+.2f} Hz")
fd = sd1_first("Mean Facil Dur")
print(f"'Mean Facil Dur' against this attempt's facilitation duration: Pearson r {np.corrcoef(fd, d1.dur_fac)[0, 1]:.3f}")
clu = sd1_first("Mean US-Cluster").astype(int)
here = np.where(d1.peak1 & d1.pause, "both", np.where(d1.peak1, "peak only", np.where(d1.pause, "pause only", "neither")))
print("Source data 1 'Mean US-Cluster' code (rows; not described in the paper or the file) against this attempt's US classes (columns):")
print(pd.crosstab(pd.Series(clu, name="US-Cluster"), pd.Series(here, name="here")).to_string())
print("cells per code:", pd.Series(clu).value_counts().sort_index().to_dict())
per-trial CR (this attempt's rule against Source data 1's 'CR Yes/no?'), set 1: agreement per recording median 1.000, mean 0.974; recordings with full agreement 143 of 270
recordings with CRs in at least 20% of trials: Source data 1 103, here 111, both 102, here only 9, Source data 1 only 1
  with Source data 1's CR flags: US peak cells with behavior 65 (here 72; paper 62), US pause cells with behavior 33 (here 35; paper 41 or 37)
Source data 1 per-cell 'Mean Facil Hz' >= 5: 84 cells; 'Mean Supp Hz' >= 5: 34; both 2 (paper 60 and 23)
  reading a: Pearson r with 'Mean Facil Hz' 0.9606, median difference +1.75 Hz; with 'Mean Supp Hz' 0.3516, median difference +5.47 Hz
  reading a+: Pearson r with 'Mean Facil Hz' 0.9547, median difference +4.28 Hz; with 'Mean Supp Hz' 0.3416, median difference +7.65 Hz
  reading b: Pearson r with 'Mean Facil Hz' 0.9984, median difference -0.16 Hz; with 'Mean Supp Hz' 0.8734, median difference +1.01 Hz
'Mean Facil Dur' against this attempt's facilitation duration: Pearson r 0.944
Source data 1 'Mean US-Cluster' code (rows; not described in the paper or the file) against this attempt's US classes (columns):
here        both  neither  pause only  peak only
US-Cluster                                      
0              1       28           0          2
1              1        0           0         63
2             60        0           0          4
3             12        0           0          1
4              2        0           0         68
6              0        5          23          0
cells per code: {0: 31, 1: 64, 2: 64, 3: 13, 4: 70, 6: 28}
In [8]:
# Shared definitions for the claims below.
WIN2 = "12-212"  # adopted second-dataset window (description's 212 ms interval); 0-200 ms shown beside it
WINS2 = ("12-212", "0-200")  # the claims file's two second-dataset windows
READINGS = {"a": "a", "a+": "ap", "b": "b"}  # baseline-correction readings (a) and (b) of the claims file; a+ is this attempt's variant


def cls(rd, win2=WIN2, rule="larger"):
    """Class of every recording under baseline reading rd, second-dataset window win2."""
    r = READINGS[rd]
    c1 = df[f"cls_{r}_{rule}_50-250"].where(df.dset == 1)
    c2 = df[f"cls_{r}_{rule}_{win2}"].where(df.dset == 2)
    return c1.fillna(c2)


def mag(rd, kind, win2=WIN2):
    """Facilitation (kind 'fac') or suppression depth ('sup') in Hz under reading rd."""
    r = READINGS[rd]
    return df[f"{kind}_{r}_50-250"].where(df.dset == 1).fillna(df[f"{kind}_{r}_{win2}"].where(df.dset == 2))


def amp_trials(i, which):
    """Per-trial CR amplitude (%): 'data' the data set's crAmplitude (at US onset by its description),
    'us' computed here at the stated US onset, 'max' the CS-US maximum (Methods)."""
    if which == "data":
        return D["cramp"][i]
    e = ipn.eyelid_trials(D["eyelid"][i], t, int(D["us"][i]))
    return e["amp_us"] if which == "us" else e["amp_max"]


def fmt(x, n=3):
    return np.round(x, n)

firing-rate-depth¶

In the first dataset the IpN firing frequency averaged 67 +/- 27 Hz and did not vary with recording depth (r = 0.085, p = 0.16, n = 270, Pearson).

Source: Results, Characterization of cerebellar IpN neurons, paragraph 2. Data: with_inputs.

Criterion (claims file): Firing frequency is the cell's mean rate over the 500 ms baseline (reading a) or over the whole trial (reading b), the paper does not say which; depth is the recording depth, from Source data 1 (opening comment). A claim of absence judged on the paper's test, Pearson's r at p < 0.05. Reproduced when the correlation is not significant and the mean rate is within tolerance under one reading.

Depth from Source data 1 (see source-data-1-link).

In [9]:
print("recording depth: none of the data set's fields holds it (fields:", sorted(k for k in D if k not in ("t", "md5", "dset")), "); taken from Source data 1")
print("first dataset, n =", len(d1), "cells with a depth:", int(d1.depth.notna().sum()))
for nm, col in (("a, 500 ms baseline", "rate_base"), ("b, whole trial", "rate_trial")):
    r, p = stats.pearsonr(d1[col], d1.depth)
    rs, ps = stats.spearmanr(d1[col], d1.depth)
    print(f"reading {nm}: mean {d1[col].mean():.1f} +/- {d1[col].std():.1f} Hz; Pearson r = {r:.3f}, p = {p:.3g};"
          f" (variant) Spearman r = {rs:.3f}, p = {ps:.3g}")
print("within mouse, reading a, mice with at least 10 cells (Pearson r, p, n):")
for m, g in d1.groupby("mouse"):
    if len(g) >= 10:
        r, p = stats.pearsonr(g.rate_base, g.depth)
        print(f"  mouse {m}: r = {r:.2f}, p = {p:.2g}, n = {len(g)}")
recording depth: none of the data set's fields holds it (fields: ['cramp', 'day', 'eyelid', 'eyelid_mean', 'fac', 'mouse', 'sdf', 'sdf_mean', 'spikes', 'us'] ); taken from Source data 1
first dataset, n = 270 cells with a depth: 270
reading a, 500 ms baseline: mean 68.3 +/- 26.4 Hz; Pearson r = 0.086, p = 0.16; (variant) Spearman r = 0.097, p = 0.11
reading b, whole trial: mean 70.6 +/- 27.4 Hz; Pearson r = 0.146, p = 0.0167; (variant) Spearman r = 0.149, p = 0.0143
within mouse, reading a, mice with at least 10 cells (Pearson r, p, n):
  mouse 1: r = 0.20, p = 0.36, n = 23
  mouse 3: r = 0.25, p = 0.39, n = 14
  mouse 4: r = 0.33, p = 0.25, n = 14
  mouse 5: r = -0.04, p = 0.83, n = 37
  mouse 6: r = -0.12, p = 0.63, n = 18
  mouse 7: r = 0.14, p = 0.65, n = 13
  mouse 8: r = -0.09, p = 0.59, n = 38
  mouse 9: r = 0.31, p = 0.14, n = 24
  mouse 11: r = 0.01, p = 0.98, n = 26
  mouse 13: r = 0.06, p = 0.88, n = 10
  mouse 19: r = 0.08, p = 0.8, n = 12

Result: reproduced, under reading (a). Over the 500 ms baseline the 270 first-dataset cells fire at 68.3 +/- 26.4 Hz, within 67 +/- 6.7 Hz, and the rate does not correlate with recording depth (Pearson r = 0.086, p = 0.16; the paper gives r = 0.085, p = 0.16). Under reading (b), the whole trial, the mean is 70.6 +/- 27.4 Hz and the correlation is significant (r = 0.146, p = 0.0167). Within each of the 11 mice with at least 10 cells, the reading (a) correlation is not significant (p >= 0.14).

fig1ijk-modulation-classes¶

Of the 270 first-dataset cells, 60 showed at least 5 Hz facilitation in the CS-US interval (22.2%), 23 showed at least 5 Hz suppression (8.5%), and 187 showed no clear modulation (69.3%).

Source: Results, Characterization of cerebellar IpN neurons, paragraph 2; Figure 1I-K. Data: dataset.

Criterion (claims file): Classes as in the Methods (Spike modulation in the last 200 ms of the CS-US interval), on each cell's average trace over its valid trials, with the readings for the baseline correction and for cells meeting both thresholds named in the opening comment. Reproduced when all three counts are within tolerance under one reading.

In [10]:
rows = []
for rd in READINGS:
    for rule in ("larger", "fac_first"):
        c = cls(rd, rule=rule)[df.dset == 1]
        both = ((mag(rd, "fac") >= 5) & (mag(rd, "sup") >= 5))[df.dset == 1].sum()
        rows.append({"reading": rd, "tie rule": rule, "fac": (c == "fac").sum(), "sup": (c == "sup").sum(),
                     "none": (c == "none").sum(), "cells meeting both": both})
tab = pd.DataFrame(rows)
tab["fac in 54-66"] = tab.fac.between(54, 66)
tab["sup in 20.7-25.3"] = tab.sup.between(20.7, 25.3)
tab["none in 168.3-205.7"] = tab.none.between(168.3, 205.7)
print(tab.to_string(index=False))
print("facilitation cells per mouse (reading a):", d1[cls("a")[df.dset == 1] == "fac"].mouse.value_counts().sort_index().to_dict())
reading  tie rule  fac  sup  none  cells meeting both  fac in 54-66  sup in 20.7-25.3  none in 168.3-205.7
      a    larger   80   23   167                   0         False              True                False
      a fac_first   80   23   167                   0         False              True                False
     a+    larger   62   13   195                   0          True             False                 True
     a+ fac_first   62   13   195                   0          True             False                 True
      b    larger   88   31   151                   1         False             False                False
      b fac_first   89   30   151                   1         False             False                False
facilitation cells per mouse (reading a): {1: 6, 2: 2, 3: 4, 4: 6, 5: 14, 6: 6, 7: 2, 8: 6, 9: 6, 11: 8, 12: 4, 13: 4, 14: 4, 17: 3, 18: 1, 19: 4}

Result: not reproduced. No reading puts all three counts within tolerance. Under the claims file's readings, (a) gives 80 facilitation, 23 suppression and 167 unmodulated cells (only suppression within tolerance) and (b) gives 88, 31 and 151 (none within tolerance). This attempt's variant (a+) gives 62, 13 and 195 (facilitation and unmodulated within tolerance, suppression not). The tie rule changes at most one cell. The authors' own per-cell values in Source data 1 ('Mean Facil Hz', which reading b follows closely here, Pearson r = 0.998 with a median difference of -0.16 Hz, though reading b classes 88 cells as facilitating) give 84 cells at 5 Hz or more, so the paper's 60 cells need a criterion that neither the claims file nor the paper names (Source data 1 comparison, above).

modulation-absolute-not-rate-dependent¶

Absolute CS-US facilitation did not depend on baseline firing frequency, and absolute suppression only slightly, whereas relative modulation was more clearly linked to firing frequency.

Source: Materials and methods, Spike modulation in the last 200 ms of the CS-US interval, paragraph 1. Data: dataset.

Criterion (claims file): Over all 270 first-dataset cells, Spearman correlations of baseline firing frequency with absolute facilitation and suppression (as in fig1ijk-modulation-classes) and with the same values divided by the baseline rate. The paper does not say how suppression is signed, and its printed signs do not plainly fit one convention (r = -0.131 is read as deeper suppression in faster cells, which fits a negative signed value; r = -0.211 for relative suppression fits a positive depth better); readings (a) suppression signed negative, (b) suppression as a positive depth, each applied to both suppression measures. The facilitation test is a claim of absence judged on Spearman at p < 0.05. Reproduced when the facilitation correlation is not significant and the other three are significant, with the printed signs under one reading; the signs found are reported under both.

In [11]:
fr = d1.rate_base
for rd in READINGS:
    f, s = mag(rd, "fac")[df.dset == 1], mag(rd, "sup")[df.dset == 1]
    out = {}
    out["abs fac"] = stats.spearmanr(fr, f)
    out["abs sup, signed negative"] = stats.spearmanr(fr, -s)
    out["abs sup, positive depth"] = stats.spearmanr(fr, s)
    out["rel fac"] = stats.spearmanr(fr, f / fr)
    out["rel sup, signed negative"] = stats.spearmanr(fr, -s / fr)
    out["rel sup, positive depth"] = stats.spearmanr(fr, s / fr)
    print(f"reading {rd}: " + "; ".join(f"{k} r = {v[0]:.3f}, p = {v[1]:.2g}" for k, v in out.items()))
reading a: abs fac r = -0.036, p = 0.56; abs sup, signed negative r = -0.008, p = 0.89; abs sup, positive depth r = 0.008, p = 0.89; rel fac r = -0.003, p = 0.96; rel sup, signed negative r = -0.207, p = 0.00063; rel sup, positive depth r = 0.207, p = 0.00063
reading a+: abs fac r = -0.037, p = 0.55; abs sup, signed negative r = 0.002, p = 0.98; abs sup, positive depth r = -0.002, p = 0.98; rel fac r = 0.112, p = 0.065; rel sup, signed negative r = -0.288, p = 1.4e-06; rel sup, positive depth r = 0.288, p = 1.4e-06
reading b: abs fac r = -0.029, p = 0.63; abs sup, signed negative r = -0.008, p = 0.89; abs sup, positive depth r = 0.008, p = 0.89; rel fac r = -0.123, p = 0.044; rel sup, signed negative r = -0.112, p = 0.065; rel sup, positive depth r = 0.112, p = 0.065

Result: not reproduced. The criterion needs the facilitation test absent and the other three significant with the printed signs under one reading; at most two of the four hold. Absolute facilitation does not depend on the firing frequency under any reading (r = -0.037 to -0.029, p = 0.55 to 0.63), and relative suppression does (reading a, r = -0.207 signed negative, p = 0.00063). Absolute suppression is not related to firing frequency under any reading (|r| <= 0.008, p >= 0.89), where the paper reports r = -0.131, p = 0.03, and relative facilitation is significant only under reading (b) (r = -0.123, p = 0.044, against the paper's -0.378), where reading (a) gives r = -0.003.

fig1l-cells-with-behavior¶

CRs were present in at least 20% of trials in 103 of the 270 first-dataset recordings (38%).

Source: Results, Characterization of cerebellar IpN neurons, paragraph 3; Figure 1L. Data: dataset.

Criterion (claims file): CR per trial as in the Methods (Eyeblink conditioning), closure above 5% of the full blink range over the trial's baseline mean anywhere in the CS-US interval, after the trial exclusions there. The eyelid baseline window is not given; readings (a) the 500 ms before the CS, as for spikes, (b) all pre-CS samples. Reproduced when the count is within tolerance under one reading.

In [12]:
print("set 1 recordings with CRs in at least 20% of trials:", int(d1.behav.sum()), "of", len(d1),
      f"({100 * d1.behav.mean():.1f}%)")
print("eyelid baseline readings (a) 500 ms before the CS and (b) all pre-CS samples are the same samples in set 1")
for thr in (15, 20, 25):
    print(f"  at {thr}% CRs: {(d1.cr_pct >= thr).sum()}")
for ct in (4, 5, 6):
    n = 0
    for i in d1.index:
        e = D["eyelid"][i]
        x = e[:, ipn.idx(t, 0, 250)] - np.nanmean(e[:, t < 0], 1, keepdims=True)
        n += np.mean(np.nanmax(x, 1) * 100 > ct) >= 0.2
    print(f"  CR threshold {ct}% closure: {n}")
print("by mouse (with behavior / recordings):", {m: f"{g.behav.sum()}/{len(g)}" for m, g in d1.groupby("mouse")})
set 1 recordings with CRs in at least 20% of trials: 111 of 270 (41.1%)
eyelid baseline readings (a) 500 ms before the CS and (b) all pre-CS samples are the same samples in set 1
  at 15% CRs: 129
  at 20% CRs: 111
  at 25% CRs: 94
  CR threshold 4% closure: 132
  CR threshold 5% closure: 111
  CR threshold 6% closure: 101
by mouse (with behavior / recordings): {1: '5/23', 2: '3/3', 3: '11/14', 4: '7/14', 5: '2/37', 6: '5/18', 7: '0/13', 8: '16/38', 9: '13/24', 11: '0/26', 12: '9/9', 13: '9/10', 14: '5/8', 15: '3/8', 16: '4/4', 17: '5/5', 18: '3/4', 19: '11/12'}

Result: reproduced. 111 of 270 recordings (41.1%) have CRs in at least 20% of trials, within 103 +/- 10.3. The count moves from 129 to 94 as the CR-percentage criterion goes from 15% to 25%. Source data 1's own per-trial CR flags give 103 recordings, the paper's number; 102 recordings are in both sets (Source data 1 comparison, above).

fig1m-modulation-grows-with-training¶

The magnitude of CS-US facilitation increased over the course of conditioning (r = 0.413, p = 0.001, n = 60, Spearman); suppression showed a similar but non-significant trend (r = 0.354, p = 0.0972, n = 23).

Source: Results, Characterization of cerebellar IpN neurons, paragraph 3; Figure 1M. Data: dataset.

Criterion (claims file): Magnitude as in fig1ijk-modulation-classes (suppression as a positive depth); day is the recording's training day. The paper does not say how recordings after day 6 enter; readings (a) the day values as the dataset codes them, (b) those recordings left out. Reproduced when, under one reading, the facilitation correlation is positive with p < 0.05 and the suppression correlation is positive.

In [13]:
for rd in READINGS:
    c = cls(rd)
    for reading, keep in (("a, day codes as given", d1.day > 0), ("b, days 7-10 left out", d1.day <= 6)):
        f = d1[(c[df.dset == 1] == "fac") & keep]
        s = d1[(c[df.dset == 1] == "sup") & keep]
        rf = stats.spearmanr(mag(rd, "fac")[f.index], f.day)
        rs_ = stats.spearmanr(mag(rd, "sup")[s.index], s.day)
        print(f"class reading {rd}, day reading {reading}: facilitation r = {rf[0]:.3f}, p = {rf[1]:.3g}, n = {len(f)};"
              f" suppression r = {rs_[0]:.3f}, p = {rs_[1]:.3g}, n = {len(s)}")
class reading a, day reading a, day codes as given: facilitation r = 0.244, p = 0.0289, n = 80; suppression r = 0.228, p = 0.296, n = 23
class reading a, day reading b, days 7-10 left out: facilitation r = 0.141, p = 0.334, n = 49; suppression r = 0.317, p = 0.315, n = 12
class reading a+, day reading a, day codes as given: facilitation r = 0.369, p = 0.0032, n = 62; suppression r = -0.119, p = 0.698, n = 13
class reading a+, day reading b, days 7-10 left out: facilitation r = 0.265, p = 0.113, n = 37; suppression r = -0.359, p = 0.553, n = 5
class reading b, day reading a, day codes as given: facilitation r = 0.272, p = 0.0105, n = 88; suppression r = 0.422, p = 0.018, n = 31
class reading b, day reading b, days 7-10 left out: facilitation r = 0.137, p = 0.313, n = 56; suppression r = 0.451, p = 0.0524, n = 19

Result: partially reproduced. The criterion's tests hold: with the day codes as given, class reading (a) gives a positive facilitation correlation with training day (r = 0.244, p = 0.029, n = 80) and a positive suppression correlation (r = 0.228, n = 23), and reading (b) also gives a significant facilitation correlation (r = 0.272; the variant a+ gives 0.369). But the effect is weaker than the paper's: both r values under reading (a) are outside the tolerance of 0.413 and 0.354, and no reading puts the facilitation r within 0.372 to 0.454. With the recordings of days 7 to 10 left out, no facilitation correlation is significant (p = 0.11 to 0.33).

fig1no-modulation-more-with-behavior¶

Facilitation and suppression were both more prevalent in recordings with conditioned behavior than without (facilitation 30/103 against 30/167, p = 0.0463; suppression 16/103 against 7/167, p = 0.0025, Chi-square).

Source: Results, Characterization of cerebellar IpN neurons, paragraph 3; Figure 1N,O. Data: dataset.

Criterion (claims file): A 2 by 2 chi-square test for each modulation class. The paper does not say whether Yates' correction was applied; both readings are run. Reproduced when both tests give p < 0.05 with the higher proportion among recordings with behavior under one reading.

In [14]:
for rd in READINGS:
    c = cls(rd)[df.dset == 1]
    for kind in ("fac", "sup"):
        w = int(((c == kind) & d1.behav).sum())
        wo = int(((c == kind) & ~d1.behav).sum())
        nb, nn = int(d1.behav.sum()), int((~d1.behav).sum())
        tab = [[w, nb - w], [wo, nn - wo]]
        p_y = stats.chi2_contingency(tab, correction=True)[1]
        p_n = stats.chi2_contingency(tab, correction=False)[1]
        print(f"reading {rd} {kind}: with behavior {w}/{nb} ({100 * w / nb:.1f}%), without {wo}/{nn} ({100 * wo / nn:.1f}%),"
              f" chi-square p = {p_n:.3g} (no Yates), {p_y:.3g} (Yates)")
reading a fac: with behavior 42/111 (37.8%), without 38/159 (23.9%), chi-square p = 0.0136 (no Yates), 0.0197 (Yates)
reading a sup: with behavior 16/111 (14.4%), without 7/159 (4.4%), chi-square p = 0.00374 (no Yates), 0.0074 (Yates)
reading a+ fac: with behavior 35/111 (31.5%), without 27/159 (17.0%), chi-square p = 0.00516 (no Yates), 0.00805 (Yates)
reading a+ sup: with behavior 12/111 (10.8%), without 1/159 (0.6%), chi-square p = 0.00012 (no Yates), 0.000376 (Yates)
reading b fac: with behavior 44/111 (39.6%), without 44/159 (27.7%), chi-square p = 0.039 (no Yates), 0.0533 (Yates)
reading b sup: with behavior 20/111 (18.0%), without 11/159 (6.9%), chi-square p = 0.00488 (no Yates), 0.00877 (Yates)

Result: partially reproduced. The criterion's tests hold: under reading (a) facilitation is more common with behavior (42/111 against 38/159, chi-square p = 0.014, 0.020 with Yates) and so is suppression (16/111 against 7/159, p = 0.0037, 0.0074 with Yates). The suppression counts 16 and 7 equal the paper's, but the facilitation count with behavior is outside 30 +/- 3 under every reading (42, 35 under the variant a+, 44 under b), and the count without behavior is outside it under the claims file's readings (38 and 44) and at its edge, 27, under (a+), so the result holds in part. Reading (b) gives the same direction and loses significance for facilitation with Yates' correction (p = 0.053).

fig2a-facilitation-properties-ds1¶

The 60 first-dataset facilitation cells had durations of 104 +/- 41 ms and magnitudes of 22.5 +/- 20.2 Hz, and magnitude correlated with both percentage CRs (r = 0.534) and CR amplitude (r = 0.52).

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 1. Data: dataset.

Criterion (claims file): All tolerances are 10%; the printed SDs are the spread of cells, not an uncertainty of the means, and every other mean in this file carries 10%. Duration and magnitude as in the Methods; CR amplitude per cell is the mean over trials, at US onset (reading a) or the CS-US maximum (reading b). Reproduced when both correlations are positive at p < 0.05 and every expected value is within tolerance under one reading.

In [15]:
for rd in READINGS:
    f = d1[cls(rd)[df.dset == 1] == "fac"]
    m = mag(rd, "fac")[f.index]
    out = f"reading {rd}: n = {len(f)}, duration {f.dur_fac.mean():.1f} +/- {f.dur_fac.std():.1f} ms, magnitude {m.mean():.1f} +/- {m.std():.1f} Hz"
    r1 = stats.spearmanr(m, f.cr_pct)
    out += f"; vs % CRs r = {r1[0]:.3f} (p = {r1[1]:.2g})"
    for nm, col in (("amp at US onset (data set)", "amp_us_data"), ("amp at US onset (computed)", "amp_us"), ("CS-US max", "amp_max")):
        r2 = stats.spearmanr(m, f[col])
        out += f"; vs {nm} r = {r2[0]:.3f} (p = {r2[1]:.2g})"
    print(out)
    print("   cells with zero duration (no 10 ms run beyond 3 SD):", int((f.dur_fac == 0).sum()))
reading a: n = 80, duration 85.1 +/- 51.1 ms, magnitude 18.7 +/- 18.3 Hz; vs % CRs r = 0.421 (p = 0.0001); vs amp at US onset (data set) r = 0.388 (p = 0.00038); vs amp at US onset (computed) r = 0.373 (p = 0.00066); vs CS-US max r = 0.423 (p = 9.4e-05)
   cells with zero duration (no 10 ms run beyond 3 SD): 6
reading a+: n = 62, duration 102.5 +/- 43.0 ms, magnitude 19.6 +/- 19.4 Hz; vs % CRs r = 0.539 (p = 6.3e-06); vs amp at US onset (data set) r = 0.496 (p = 4.1e-05); vs amp at US onset (computed) r = 0.482 (p = 7.4e-05); vs CS-US max r = 0.489 (p = 5.4e-05)
   cells with zero duration (no 10 ms run beyond 3 SD): 0
reading b: n = 88, duration 79.2 +/- 52.5 ms, magnitude 18.1 +/- 18.0 Hz; vs % CRs r = 0.385 (p = 0.00021); vs amp at US onset (data set) r = 0.350 (p = 0.00084); vs amp at US onset (computed) r = 0.383 (p = 0.00023); vs CS-US max r = 0.394 (p = 0.00015)
   cells with zero duration (no 10 ms run beyond 3 SD): 9

Result: partially reproduced. Both correlations are positive and significant under every reading. Under the claims file's readings (a) and (b) the duration (85.1 and 79.2 ms) and the magnitude (18.7 and 18.1 Hz) are outside 104 +/- 10.4 ms and 22.5 +/- 2.25 Hz. Only this attempt's variant (a+) puts the duration (102.5 ms) and both correlations (0.539 and 0.496, the data set's CR amplitude) within tolerance, with the magnitude (19.6 Hz) still below it.

In [16]:
# Trial-by-trial correlations (Methods, Statistics), used by several claims below.
XREAD = ("a", "b", "c")       # per-trial firing rate readings (claims file, opening comment)
YREAD = ("data", "us", "max")  # per-trial CR amplitude: data set's crAmplitude, computed at US onset, CS-US max


def trial_test(cells, xr, yr, sign, rng, boot=True, win2=WIN2):
    """Per-cell correlations of the per-trial rate (reading xr) with CR amplitude (reading yr); counts of
    significant cells in direction `sign` and the opposite one, and the bootstrap p under both null readings."""
    pairs = [(ipn.trial_rates(D, i, None if D["dset"][i] == 1 else win2)[xr], amp_trials(i, yr)) for i in cells]
    r, p, kinds = ipn.trial_corrs(pairs)
    sig = p < 0.05
    n_dir, n_opp = int(np.sum(sig & (np.sign(r) == sign))), int(np.sum(sig & (np.sign(r) == -sign)))
    rs, ps, _ = ipn.trial_corrs(pairs, "spearman")
    out = {"x": xr, "y": yr, "cells": len(cells), "sig": n_dir, "opposite": n_opp,
           "pearson": sum(k == "pearson" for k in kinds),
           "sig, Spearman only": int(np.sum((ps < 0.05) & (np.sign(rs) == sign)))}
    if boot:
        out["p_shuffle"] = ipn.bootstrap_count(pairs, kinds, n_dir, sign, rng, reading="shuffle")[0]
        out["p_random"] = ipn.bootstrap_count(pairs, kinds, n_dir, sign, rng, reading="random")[0]
    return out, r, p, pairs


def lmm_on(cells, sig_mask, pairs, slopes=True, swap=False):
    """Mixed model of CR amplitude (y) on the per-trial rate (x) over the significant cells."""
    xs, ys, gs = [], [], []
    for c, ok, (x, y) in zip(cells, sig_mask, pairs):
        if ok:
            xs += list(x); ys += list(y); gs += [c] * len(x)
    if len(set(gs)) < 2:
        return None
    if swap:
        xs, ys = ys, xs
    return {**ipn.mixedlm(np.array(ys), np.array(xs), np.array(gs), slopes=slopes), "trials": len(xs)}


def lags_for(cells, sign):
    """Lag of the best cross-correlation per cell, for the two estimators (ipn.xcorr_lag: 'xcov' adopted, 'recut'
    variant) and segment readings (a) and (b) of the claims file; Wilcoxon signed rank against 0. Also counts the
    cells whose best lag is at the +/-100 ms edge and those whose curve is flat at its best (the best r within
    0.01 of the 21st best, so that 20 or more lags tie with it)."""
    out = {}
    for est in ("xcov", "recut"):
        for seg_name in ("a, last 200 ms", "b, whole CS-US"):
            lags, flat = [], 0
            for i in cells:
                us = int(D["us"][i])
                seg = (us - 200, us) if seg_name.startswith("a") else (0, us)
                m = np.nanmean(D["sdf"][i], 0)
                e = np.nanmean(D["eyelid"][i], 0)
                lag, r = ipn.xcorr_lag(m, e, t, seg, 100, sign, est)
                lags.append(lag)
                rr = np.sort(sign * r[~np.isnan(r)])
                flat += int(rr[-1] - rr[-21] < 0.01)
            lags = np.array(lags)
            p = stats.wilcoxon(lags).pvalue if np.any(lags != 0) else 1.0
            out[f"{est}, {seg_name}"] = (lags.mean(), lags.std(ddof=1), p, len(lags), int(np.sum(lags > 0)), int(np.sum(lags < 0)),
                                         float(np.median(lags)), int(np.sum(np.abs(lags) == 100)), flat)
    return out


def print_lags(rd, res):
    for k, (mu_, sd_, p, n, npos, nneg, med, edge, flat) in res.items():
        print(f"class {rd}, {k}: lag {mu_:.1f} +/- {sd_:.1f} ms, median {med:.0f} (n = {n}; {npos} positive, {nneg} negative,"
              f" {edge} at the +/-100 ms edge, {flat} flat at the best lag), Wilcoxon p = {p:.3g}")

fig2b-facilitation-trial-correlations-ds1¶

Of 30 first-dataset facilitation cells recorded with CRs, 17 (57%) showed significant positive trial-by-trial correlations between firing rate and CR amplitude (bootstrap p = 0.0001), and none showed negative correlations.

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 1; Figure 2A,B. Data: dataset.

Criterion (claims file): Per cell, the trial-by-trial correlation of facilitation (readings a to c of the opening comment) with CR amplitude (at US onset, or the CS-US maximum), Pearson or Spearman by the Statistics rule, at p < 0.05 two-sided. The bootstrap under readings (a) and (b) of the opening comment. Reproduced when, under one combination of readings, the count is within tolerance, no cell is significantly negative, and the bootstrap p is below 0.05.

In [17]:
rng = np.random.default_rng(21)
res_2b = {}
rows = []
for rd in READINGS:
    cells = list(d1.index[(cls(rd)[df.dset == 1] == "fac") & d1.behav])
    for xr in XREAD:
        for yr in YREAD:
            out, r, p, pairs = trial_test(cells, xr, yr, +1, rng)
            res_2b[(rd, xr, yr)] = (cells, r, p, pairs)
            rows.append({"class": rd, **out})
tab = pd.DataFrame(rows)
tab["count in 15.3-18.7"] = tab.sig.between(15.3, 18.7)
print(tab.to_string(index=False))
class x    y  cells  sig  opposite  pearson  sig, Spearman only  p_shuffle  p_random  count in 15.3-18.7
    a a data     42   22         0        9                  22        0.0       0.0               False
    a a   us     42   18         0       10                  19        0.0       0.0                True
    a a  max     42   20         0        6                  21        0.0       0.0               False
    a b data     42   19         0        7                  18        0.0       0.0               False
    a b   us     42   21         1        8                  20        0.0       0.0               False
    a b  max     42   23         0        4                  24        0.0       0.0               False
    a c data     42   22         0        5                  22        0.0       0.0               False
    a c   us     42   20         0        6                  20        0.0       0.0               False
    a c  max     42   23         0        3                  23        0.0       0.0               False
   a+ a data     35   21         0        8                  21        0.0       0.0               False
   a+ a   us     35   17         0        9                  18        0.0       0.0                True
   a+ a  max     35   19         0        5                  20        0.0       0.0               False
   a+ b data     35   17         0        6                  16        0.0       0.0                True
   a+ b   us     35   18         1        7                  17        0.0       0.0                True
   a+ b  max     35   20         0        3                  20        0.0       0.0               False
   a+ c data     35   20         0        4                  20        0.0       0.0               False
   a+ c   us     35   18         0        5                  18        0.0       0.0                True
   a+ c  max     35   20         0        2                  20        0.0       0.0               False
    b a data     44   22         0       10                  22        0.0       0.0               False
    b a   us     44   18         0       11                  19        0.0       0.0                True
    b a  max     44   20         0        6                  21        0.0       0.0               False
    b b data     44   19         0        8                  18        0.0       0.0               False
    b b   us     44   21         1        9                  20        0.0       0.0               False
    b b  max     44   23         0        4                  24        0.0       0.0               False
    b c data     44   22         0        6                  22        0.0       0.0               False
    b c   us     44   20         0        7                  20        0.0       0.0               False
    b c  max     44   23         0        3                  23        0.0       0.0               False

Result: reproduced. Several combinations of readings give a count of significant positive cells within 15.3 to 18.7 with no significant negative cell and a bootstrap p below 1/500 under both null readings (for example class a+, rate reading b, the data set's CR amplitude: 17 of 35 cells). The number of facilitation cells with behavior is 42, 35 or 44 by class reading, against the paper's 30. Across all 27 combinations the count runs from 17 to 23, and at most one cell is significantly negative.

fig2b-lmm-ds1¶

A linear mixed model with random intercepts and slopes for the 17 significant first-dataset cells predicts 0.49% more eyelid closure at US onset per Hz of facilitation (p < 0.0001).

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 1; Supplementary file 1, Fig. 2B. Data: dataset.

Criterion (claims file): Tolerance is twice the paper's standard error of the slope (0.07). Trial-level model of eyelid closure at US onset on per-trial facilitation, random intercept and slope per cell, over the cells significant in fig2b-facilitation-trial-correlations-ds1. Supplementary file 1 prints the intercept's F with 556 and the slope's with 1556 denominator degrees of freedom, so the trial count is uncertain. Reproduced when the slope is within tolerance and p < 0.05.

In [18]:
rows = []
for (rd, xr, yr), (cells, r, p, pairs) in res_2b.items():
    if yr == "max":
        continue  # the model's outcome is closure at US onset (Supplementary file 1)
    sig = (p < 0.05) & (r > 0)
    fit = lmm_on(cells, sig, pairs)
    if fit:
        rows.append({"class": rd, "x": xr, "y": yr, "cells": int(sig.sum()), "trials": fit["trials"],
                     "slope %/Hz": fmt(fit["slope"]), "SE": fmt(fit["se"]), "p": fit["p"], "fit ok": fit["ok"],
                     "warnings": fit["warnings"]})
tab = pd.DataFrame(rows)
tab["slope in 0.35-0.63"] = tab["slope %/Hz"].between(0.35, 0.63)
print(tab.to_string(index=False))
class x    y  cells  trials  slope %/Hz    SE            p  fit ok warnings  slope in 0.35-0.63
    a a data     22     693       0.393 0.055 7.405902e-13    True                         True
    a a   us     18     638       0.483 0.066 2.554075e-13    True                         True
    a b data     19     624       0.397 0.059 1.376913e-11    True                         True
    a b   us     21     667       0.403 0.062 1.043640e-10    True                         True
    a c data     22     724       0.470 0.067 1.835089e-12    True                         True
    a c   us     20     733       0.544 0.079 6.001470e-12    True                         True
   a+ a data     21     677       0.385 0.056 3.841617e-12    True                         True
   a+ a   us     17     622       0.476 0.067 1.296787e-12    True                         True
   a+ b data     17     560       0.400 0.061 5.113241e-11    True                         True
   a+ b   us     18     583       0.417 0.067 4.665872e-10    True                         True
   a+ c data     20     660       0.475 0.071 1.612127e-11    True                         True
   a+ c   us     18     669       0.554 0.083 3.133840e-11    True                         True
    b a data     22     693       0.393 0.055 7.405902e-13    True                         True
    b a   us     18     638       0.483 0.066 2.554075e-13    True                         True
    b b data     19     624       0.397 0.059 1.376913e-11    True                         True
    b b   us     21     667       0.403 0.062 1.043640e-10    True                         True
    b c data     22     724       0.470 0.067 1.835089e-12    True                         True
    b c   us     20     733       0.544 0.079 6.001470e-12    True                         True

Result: reproduced. Every combination gives a slope within 0.35 to 0.63 % closure per Hz with p < 1e-9 (0.385 to 0.554), over 17 to 22 significant cells and 560 to 733 trials, and every fit is free of convergence, singularity and boundary warnings.

fig2d-facilitation-leads-eyelid-ds1¶

Temporal cross-correlations between average spike and eyelid traces of the 30 first-dataset facilitation cells with CRs peak at positive lags, spikes leading eyelid by 25 +/- 25.6 ms (p = 0.0001, Wilcoxon signed rank).

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 1; Figure 2D. Data: dataset.

Criterion (claims file): Per cell, the lag of the maximum cross-correlation between its average spike density trace and average eyelid trace; signed rank test against zero. The paper does not give the segment or the lag range; readings (a) the last 200 ms of the CS-US interval, lags up to +/- 100 ms, (b) the whole CS-US interval, same lags. Reproduced when the mean lag is within tolerance and the test gives p < 0.05 with spikes leading, under one reading.

In [19]:
for rd in READINGS:
    cells = list(d1.index[(cls(rd)[df.dset == 1] == "fac") & d1.behav])
    print_lags(rd, lags_for(cells, +1))
class a, xcov, a, last 200 ms: lag 48.2 +/- 25.7 ms, median 54 (n = 42; 37 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 1.13e-07
class a, xcov, b, whole CS-US: lag 49.8 +/- 25.5 ms, median 56 (n = 42; 37 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 1.14e-07
class a, recut, a, last 200 ms: lag 31.8 +/- 64.4 ms, median 28 (n = 42; 35 positive, 7 negative, 17 at the +/-100 ms edge, 2 flat at the best lag), Wilcoxon p = 0.00238
class a, recut, b, whole CS-US: lag 40.4 +/- 63.7 ms, median 34 (n = 42; 36 positive, 6 negative, 20 at the +/-100 ms edge, 1 flat at the best lag), Wilcoxon p = 0.000313
class a+, xcov, a, last 200 ms: lag 47.4 +/- 23.4 ms, median 47 (n = 35; 32 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 7.91e-07
class a+, xcov, b, whole CS-US: lag 49.2 +/- 23.2 ms, median 48 (n = 35; 32 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 7.94e-07
class a+, recut, a, last 200 ms: lag 38.9 +/- 63.7 ms, median 36 (n = 35; 30 positive, 5 negative, 16 at the +/-100 ms edge, 2 flat at the best lag), Wilcoxon p = 0.00164
class a+, recut, b, whole CS-US: lag 49.3 +/- 61.2 ms, median 69 (n = 35; 31 positive, 4 negative, 19 at the +/-100 ms edge, 1 flat at the best lag), Wilcoxon p = 0.000183
class b, xcov, a, last 200 ms: lag 48.8 +/- 25.4 ms, median 54 (n = 44; 39 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 5.23e-08
class b, xcov, b, whole CS-US: lag 50.4 +/- 25.2 ms, median 56 (n = 44; 39 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 5.24e-08
class b, recut, a, last 200 ms: lag 34.4 +/- 64.1 ms, median 30 (n = 44; 37 positive, 7 negative, 18 at the +/-100 ms edge, 3 flat at the best lag), Wilcoxon p = 0.00112
class b, recut, b, whole CS-US: lag 43.1 +/- 63.4 ms, median 44 (n = 44; 38 positive, 6 negative, 22 at the +/-100 ms edge, 1 flat at the best lag), Wilcoxon p = 0.000123

Result: partially reproduced. Spikes lead the eyelid under every reading and both estimators (Wilcoxon p = 5e-08 to 0.0024), but no mean lag is within 25 +/- 2.5 ms. With the adopted estimator (xcov) the mean lag is 47.4 to 50.4 ms, no cell's best lag is at the +/-100 ms edge and no curve is flat at its best lag; with the re-cut Pearson variant it is 31.8 to 49.3 ms, with 16 to 22 cells at the edge.

fig2-s1-correlation-matrix-offsets¶

In spike-eyelid correlation matrices the strongest correlations of facilitation cells lie above the diagonal (spikes leading), at optimal offsets of 80 ms (position) and 20 ms (velocity) in the first dataset and 20 and 10 ms in the second, while suppression cells show offsets of 0 ms for position and -30 and -50 ms for velocity.

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 1; Figure 2C,G,K,O; Figure 2-figure supplement 1A-D. Data: dataset.

Criterion (claims file): Tolerance is one matrix step (10 ms), the resolution of the offsets. Per cell, across trials, the correlation of mean eyelid position (or velocity) in each bin with mean spike rate in each bin; r values of the sign opposite to the one of interest set to zero, then averaged over cells (Statistics); the optimal offset is the diagonal offset with the highest mean r in the last 200 ms of the CS-US interval (Figure 2-figure supplement 1 legend). The Results give 20 ms windows at 10 ms steps, the Statistics 20 ms bins (a 100 by 100 matrix); both readings are run. Reproduced when all eight offsets are within tolerance under one reading; partially when only the sign pattern holds (facilitation offsets positive, suppression offsets zero or negative). The paper gives no count of offsets that must match. The quote gives the first-dataset facilitation offsets; the others are in panels B to D of the same legend.

In [20]:
def offsets(cells, sign, step, velocity):
    mats = []
    for i in cells:
        us = int(D["us"][i])
        lo = -200 if D["dset"][i] == 2 else -300
        c, R = ipn.corr_matrix(D["sdf"][i], D["eyelid"][i], t, lo, us + 200, 20, step, velocity)
        mats.append(R)
    us = int(D["us"][cells[0]])
    return ipn.optimal_offset(mats, c, us, sign)


expected = {("fac", 1, "pos"): 80, ("fac", 1, "vel"): 20, ("fac", 2, "pos"): 20, ("fac", 2, "vel"): 10,
            ("sup", 1, "pos"): 0, ("sup", 1, "vel"): -30, ("sup", 2, "pos"): 0, ("sup", 2, "vel"): -50}
rows = []
for rd in READINGS:
    c = cls(rd)
    for step in (20, 10):
        found = {}
        for (kind, ds, pv), exp in expected.items():
            cells = list(df.index[(c == kind) & df.behav & (df.dset == ds)])
            best, offs, vals = offsets(cells, +1 if kind == "fac" else -1, step, pv == "vel")
            found[(kind, ds, pv)] = best
        rows.append({"class": rd, "window step": step, **{f"{k[0]} set{k[1]} {k[2]}": v for k, v in found.items()},
                     "all within 10 ms": all(abs(found[k] - expected[k]) <= 10 for k in expected),
                     "sign pattern": all((found[k] > 0) if k[0] == "fac" else (found[k] <= 0) for k in expected)})
print("expected:", {f"{k[0]} set{k[1]} {k[2]}": v for k, v in expected.items()})
print(pd.DataFrame(rows).to_string(index=False))
expected: {'fac set1 pos': 80, 'fac set1 vel': 20, 'fac set2 pos': 20, 'fac set2 vel': 10, 'sup set1 pos': 0, 'sup set1 vel': -30, 'sup set2 pos': 0, 'sup set2 vel': -50}
class  window step  fac set1 pos  fac set1 vel  fac set2 pos  fac set2 vel  sup set1 pos  sup set1 vel  sup set2 pos  sup set2 vel  all within 10 ms  sign pattern
    a           20          60.0          20.0          20.0           0.0         100.0         -20.0          20.0           0.0             False         False
    a           10          60.0          20.0          30.0          10.0         100.0         -20.0          20.0           0.0             False         False
   a+           20          60.0          20.0          20.0           0.0        -100.0         -20.0          20.0           0.0             False         False
   a+           10          50.0          20.0          30.0          10.0         100.0         -20.0          30.0           0.0             False         False
    b           20          60.0          20.0          20.0           0.0         100.0         -20.0         -40.0         -40.0             False         False
    b           10          60.0          20.0          30.0          10.0         100.0         -20.0         -30.0         -40.0             False         False

Result: not reproduced. No reading puts all eight offsets within 10 ms, and the sign pattern fails under every reading: the first-dataset suppression cells have their position offset at the +100 ms (or -100 ms) edge, not at 0. The first-dataset facilitation velocity offset (20 ms) matches under every reading, and the facilitation offsets are positive with 10 ms steps (50 to 60, 20, 30 and 10 ms).

fig2e-facilitation-ds2¶

In the second dataset 70 cells showed CS-US facilitation (59.2 +/- 38 Hz) with conditioned behavior, and 49 of them (70%) had significant positive trial-by-trial correlations with CR amplitude.

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 2; Figure 2E,F. Data: dataset.

Criterion (claims file): Classes and magnitude as in fig1ijk-modulation-classes, on the second dataset's 102 cells with its own CS-US window (readings in the opening comment), counted among recordings with conditioned behavior (CRs in at least 20% of trials, the paper's criterion throughout, Results, Characterization, paragraph 3), as the text says "in the presence of conditioned behavior". Reproduced when both values are within tolerance under one reading.

In [21]:
print("set 2 recordings with CRs in at least 20% of trials:", int(d2.behav.sum()), "of", len(d2))
for rd in READINGS:
    for win2 in ("12-212", "0-200"):
        c = cls(rd, win2)
        f = df[(c == "fac") & df.behav & (df.dset == 2)]
        m = mag(rd, "fac", win2)[f.index]
        print(f"reading {rd}, window {win2}: {len(f)} facilitation cells with behavior, magnitude {m.mean():.1f} +/- {m.std():.1f} Hz")
set 2 recordings with CRs in at least 20% of trials: 102 of 102
reading a, window 12-212: 70 facilitation cells with behavior, magnitude 60.4 +/- 40.6 Hz
reading a, window 0-200: 70 facilitation cells with behavior, magnitude 54.1 +/- 36.3 Hz
reading a+, window 12-212: 69 facilitation cells with behavior, magnitude 58.9 +/- 40.3 Hz
reading a+, window 0-200: 67 facilitation cells with behavior, magnitude 54.0 +/- 35.6 Hz
reading b, window 12-212: 71 facilitation cells with behavior, magnitude 61.8 +/- 40.6 Hz
reading b, window 0-200: 70 facilitation cells with behavior, magnitude 56.5 +/- 36.0 Hz

Result: reproduced. All 102 second-dataset recordings have CRs in at least 20% of trials. Under reading (a) with the 12-212 ms window, 70 cells show facilitation with a magnitude of 60.4 +/- 40.6 Hz, both within tolerance; the other readings give 67 to 71 cells and 54.0 to 61.8 Hz.

fig2f-facilitation-trial-correlations-ds2¶

Of the 70 second-dataset facilitation cells, 49 (70%) showed significant positive trial-by-trial correlations between firing rate and CR amplitude.

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 2; Figure 2F. Data: dataset.

Criterion (claims file): As in fig2b-facilitation-trial-correlations-ds1, on the second dataset. Reproduced when the count is within tolerance under one combination of readings.

In [22]:
rng = np.random.default_rng(22)
res_2f = {}
rows = []
for rd in READINGS:
    for win2 in WINS2:
        cells = list(d2.index[(cls(rd, win2)[df.dset == 2] == "fac") & d2.behav])
        for xr in XREAD:
            for yr in YREAD:
                # the bootstrap is run on the adopted window only, to keep the run short; the 0-200 ms counts are shown
                out, r, p, pairs = trial_test(cells, xr, yr, +1, rng, boot=(win2 == WIN2), win2=win2)
                res_2f[(rd, win2, xr, yr)] = (cells, r, p, pairs)
                rows.append({"class": rd, "window": win2, **out})
tab = pd.DataFrame(rows)
tab["count in 44.1-53.9"] = tab.sig.between(44.1, 53.9)
print(tab.to_string(index=False))
class window x    y  cells  sig  opposite  pearson  sig, Spearman only  p_shuffle  p_random  count in 44.1-53.9
    a 12-212 a data     70   51         0       10                  50        0.0       0.0                True
    a 12-212 a   us     70   49         1        9                  49        0.0       0.0                True
    a 12-212 a  max     70   50         1        8                  49        0.0       0.0                True
    a 12-212 b data     70   50         0        9                  50        0.0       0.0                True
    a 12-212 b   us     70   48         0        8                  48        0.0       0.0                True
    a 12-212 b  max     70   48         0        6                  48        0.0       0.0                True
    a 12-212 c data     70   51         1        8                  50        0.0       0.0                True
    a 12-212 c   us     70   50         1        8                  50        0.0       0.0                True
    a 12-212 c  max     70   49         1        7                  48        0.0       0.0                True
    a  0-200 a data     70   48         0        8                  48        NaN       NaN                True
    a  0-200 a   us     70   48         0        9                  48        NaN       NaN                True
    a  0-200 a  max     70   47         0        7                  46        NaN       NaN                True
    a  0-200 b data     70   51         0        9                  51        NaN       NaN                True
    a  0-200 b   us     70   47         0        7                  47        NaN       NaN                True
    a  0-200 b  max     70   48         0        6                  48        NaN       NaN                True
    a  0-200 c data     70   51         1        8                  50        NaN       NaN                True
    a  0-200 c   us     70   50         1        8                  50        NaN       NaN                True
    a  0-200 c  max     70   49         1        7                  48        NaN       NaN                True
   a+ 12-212 a data     69   51         0       10                  50        0.0       0.0                True
   a+ 12-212 a   us     69   49         1        9                  49        0.0       0.0                True
   a+ 12-212 a  max     69   50         1        8                  49        0.0       0.0                True
   a+ 12-212 b data     69   50         0        9                  50        0.0       0.0                True
   a+ 12-212 b   us     69   48         0        8                  48        0.0       0.0                True
   a+ 12-212 b  max     69   48         0        6                  48        0.0       0.0                True
   a+ 12-212 c data     69   51         1        8                  50        0.0       0.0                True
   a+ 12-212 c   us     69   50         1        8                  50        0.0       0.0                True
   a+ 12-212 c  max     69   49         1        7                  48        0.0       0.0                True
   a+  0-200 a data     67   48         0        8                  48        NaN       NaN                True
   a+  0-200 a   us     67   48         0        9                  48        NaN       NaN                True
   a+  0-200 a  max     67   47         0        7                  46        NaN       NaN                True
   a+  0-200 b data     67   51         0        9                  51        NaN       NaN                True
   a+  0-200 b   us     67   47         0        7                  47        NaN       NaN                True
   a+  0-200 b  max     67   48         0        6                  48        NaN       NaN                True
   a+  0-200 c data     67   51         0        8                  50        NaN       NaN                True
   a+  0-200 c   us     67   50         0        8                  50        NaN       NaN                True
   a+  0-200 c  max     67   49         0        7                  48        NaN       NaN                True
    b 12-212 a data     71   51         0       10                  50        0.0       0.0                True
    b 12-212 a   us     71   49         1        9                  49        0.0       0.0                True
    b 12-212 a  max     71   50         1        8                  49        0.0       0.0                True
    b 12-212 b data     71   50         0        9                  50        0.0       0.0                True
    b 12-212 b   us     71   48         0        8                  48        0.0       0.0                True
    b 12-212 b  max     71   48         0        6                  48        0.0       0.0                True
    b 12-212 c data     71   51         1        8                  50        0.0       0.0                True
    b 12-212 c   us     71   50         1        8                  50        0.0       0.0                True
    b 12-212 c  max     71   49         1        7                  48        0.0       0.0                True
    b  0-200 a data     70   48         0        8                  48        NaN       NaN                True
    b  0-200 a   us     70   48         0        9                  48        NaN       NaN                True
    b  0-200 a  max     70   47         0        7                  46        NaN       NaN                True
    b  0-200 b data     70   51         0        9                  51        NaN       NaN                True
    b  0-200 b   us     70   47         0        7                  47        NaN       NaN                True
    b  0-200 b  max     70   48         0        6                  48        NaN       NaN                True
    b  0-200 c data     70   51         1        8                  50        NaN       NaN                True
    b  0-200 c   us     70   50         1        8                  50        NaN       NaN                True
    b  0-200 c  max     70   49         1        7                  48        NaN       NaN                True

Result: reproduced. Every combination gives 47 to 51 significant positive cells, within 44.1 to 53.9, with at most one significant negative cell; on the adopted 12-212 ms window the bootstrap p is below 1/500 under both nulls. The 0-200 ms window gives 47 to 51 cells.

fig2f-lmm-ds2¶

In the second dataset a linear mixed model predicts 0.64% more eyelid closure at US onset per 1 Hz of facilitation (p < 0.0001).

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 2; Supplementary file 1, Fig. 2F. Data: dataset.

Criterion (claims file): Tolerance is twice the paper's standard error (0.04). As in fig2b-lmm-ds1, over the 49 significant cells. Reproduced when the slope is within tolerance and p < 0.05.

In [23]:
rows = []
for (rd, win2, xr, yr), (cells, r, p, pairs) in res_2f.items():
    if yr == "max":
        continue
    sig = (p < 0.05) & (r > 0)
    fit = lmm_on(cells, sig, pairs)
    if fit:
        rows.append({"class": rd, "window": win2, "x": xr, "y": yr, "cells": int(sig.sum()), "trials": fit["trials"],
                     "slope %/Hz": fmt(fit["slope"]), "SE": fmt(fit["se"]), "p": fit["p"], "fit ok": fit["ok"],
                     "warnings": fit["warnings"]})
tab = pd.DataFrame(rows)
tab["slope in 0.56-0.72"] = tab["slope %/Hz"].between(0.56, 0.72)
print(tab.to_string(index=False))
class window x    y  cells  trials  slope %/Hz    SE            p  fit ok                                                     warnings  slope in 0.56-0.72
    a 12-212 a data     51    2153       0.506 0.030 9.032098e-64    True                                                                            False
    a 12-212 a   us     49    2073       0.513 0.030 4.506907e-67    True                                                                            False
    a 12-212 b data     50    2105       0.526 0.033 5.484065e-58    True                                                                            False
    a 12-212 b   us     48    2059       0.544 2.079 7.935639e-01   False The Hessian matrix at the estimated parameter values is not                False
    a 12-212 c data     51    2160       0.627 0.039 1.338313e-59    True                                                                             True
    a 12-212 c   us     50    2079       0.620 0.037 7.191991e-62    True                                                                             True
    a  0-200 a data     48    2081       0.539 0.032 2.602899e-63    True                                                                            False
    a  0-200 a   us     48    2052       0.536 0.031 5.338539e-67    True                                                                            False
    a  0-200 b data     51    2116       0.544 0.034 3.120554e-58    True                                                                            False
    a  0-200 b   us     47    2011       0.530 0.034 6.050871e-54    True                                                                            False
    a  0-200 c data     51    2160       0.627 0.039 1.338313e-59    True                                                                             True
    a  0-200 c   us     50    2079       0.620 0.037 7.191991e-62    True                                                                             True
   a+ 12-212 a data     51    2153       0.506 0.030 9.032098e-64    True                                                                            False
   a+ 12-212 a   us     49    2073       0.513 0.030 4.506907e-67    True                                                                            False
   a+ 12-212 b data     50    2105       0.526 0.033 5.484065e-58    True                                                                            False
   a+ 12-212 b   us     48    2059       0.544 2.079 7.935639e-01   False The Hessian matrix at the estimated parameter values is not                False
   a+ 12-212 c data     51    2160       0.627 0.039 1.338313e-59    True                                                                             True
   a+ 12-212 c   us     50    2079       0.620 0.037 7.191991e-62    True                                                                             True
   a+  0-200 a data     48    2081       0.539 0.032 2.602899e-63    True                                                                            False
   a+  0-200 a   us     48    2052       0.536 0.031 5.338539e-67    True                                                                            False
   a+  0-200 b data     51    2116       0.544 0.034 3.120554e-58    True                                                                            False
   a+  0-200 b   us     47    2011       0.530 0.034 6.050871e-54    True                                                                            False
   a+  0-200 c data     51    2160       0.627 0.039 1.338313e-59    True                                                                             True
   a+  0-200 c   us     50    2079       0.620 0.037 7.191991e-62    True                                                                             True
    b 12-212 a data     51    2153       0.506 0.030 9.032098e-64    True                                                                            False
    b 12-212 a   us     49    2073       0.513 0.030 4.506907e-67    True                                                                            False
    b 12-212 b data     50    2105       0.526 0.033 5.484065e-58    True                                                                            False
    b 12-212 b   us     48    2059       0.544 2.079 7.935639e-01   False The Hessian matrix at the estimated parameter values is not                False
    b 12-212 c data     51    2160       0.627 0.039 1.338313e-59    True                                                                             True
    b 12-212 c   us     50    2079       0.620 0.037 7.191991e-62    True                                                                             True
    b  0-200 a data     48    2081       0.539 0.032 2.602899e-63    True                                                                            False
    b  0-200 a   us     48    2052       0.536 0.031 5.338539e-67    True                                                                            False
    b  0-200 b data     51    2116       0.544 0.034 3.120554e-58    True                                                                            False
    b  0-200 b   us     47    2011       0.530 0.034 6.050871e-54    True                                                                            False
    b  0-200 c data     51    2160       0.627 0.039 1.338313e-59    True                                                                             True
    b  0-200 c   us     50    2079       0.620 0.037 7.191991e-62    True                                                                             True

Result: reproduced, under the data set's own per-trial facilitation (rate reading c). That reading gives slopes of 0.627 and 0.620 % per Hz (p < 1e-58), within 0.56 to 0.72, in both windows. Rate readings (a) and (b) give 0.506 to 0.544, below the tolerance. The fit-ok column says which fits had a singular, Hessian or boundary warning.

fig2h-facilitation-leads-eyelid-ds2¶

In the second dataset the best fit between facilitation and eyelid behavior is at positive offsets, 33.4 +/- 19.3 ms (p < 0.0001, Wilcoxon signed rank).

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 2; Figure 2H. Data: dataset.

Criterion (claims file): As in fig2d-facilitation-leads-eyelid-ds1, on the 70 second-dataset cells.

In [24]:
for rd in READINGS:
    for win2 in WINS2:
        cells = list(d2.index[(cls(rd, win2)[df.dset == 2] == "fac") & d2.behav])
        print_lags(f"{rd}, window {win2}", lags_for(cells, +1))
class a, window 12-212, xcov, a, last 200 ms: lag 28.1 +/- 20.2 ms, median 27 (n = 70; 64 positive, 0 negative, 0 at the +/-100 ms edge, 5 flat at the best lag), Wilcoxon p = 3.5e-12
class a, window 12-212, xcov, b, whole CS-US: lag 28.4 +/- 20.3 ms, median 28 (n = 70; 64 positive, 0 negative, 0 at the +/-100 ms edge, 5 flat at the best lag), Wilcoxon p = 3.5e-12
class a, window 12-212, recut, a, last 200 ms: lag 74.0 +/- 36.3 ms, median 83 (n = 70; 68 positive, 2 negative, 26 at the +/-100 ms edge, 26 flat at the best lag), Wilcoxon p = 4.42e-12
class a, window 12-212, recut, b, whole CS-US: lag 73.6 +/- 35.5 ms, median 82 (n = 70; 68 positive, 2 negative, 24 at the +/-100 ms edge, 27 flat at the best lag), Wilcoxon p = 3.53e-12
class a, window 0-200, xcov, a, last 200 ms: lag 28.1 +/- 20.2 ms, median 27 (n = 70; 64 positive, 0 negative, 0 at the +/-100 ms edge, 5 flat at the best lag), Wilcoxon p = 3.5e-12
class a, window 0-200, xcov, b, whole CS-US: lag 28.4 +/- 20.3 ms, median 28 (n = 70; 64 positive, 0 negative, 0 at the +/-100 ms edge, 5 flat at the best lag), Wilcoxon p = 3.5e-12
class a, window 0-200, recut, a, last 200 ms: lag 74.0 +/- 36.3 ms, median 83 (n = 70; 68 positive, 2 negative, 26 at the +/-100 ms edge, 26 flat at the best lag), Wilcoxon p = 4.42e-12
class a, window 0-200, recut, b, whole CS-US: lag 73.6 +/- 35.5 ms, median 82 (n = 70; 68 positive, 2 negative, 24 at the +/-100 ms edge, 27 flat at the best lag), Wilcoxon p = 3.53e-12
class a+, window 12-212, xcov, a, last 200 ms: lag 27.9 +/- 20.3 ms, median 27 (n = 69; 63 positive, 0 negative, 0 at the +/-100 ms edge, 5 flat at the best lag), Wilcoxon p = 5.13e-12
class a+, window 12-212, xcov, b, whole CS-US: lag 28.2 +/- 20.4 ms, median 27 (n = 69; 63 positive, 0 negative, 0 at the +/-100 ms edge, 5 flat at the best lag), Wilcoxon p = 5.13e-12
class a+, window 12-212, recut, a, last 200 ms: lag 73.8 +/- 36.6 ms, median 83 (n = 69; 67 positive, 2 negative, 26 at the +/-100 ms edge, 26 flat at the best lag), Wilcoxon p = 6.41e-12
class a+, window 12-212, recut, b, whole CS-US: lag 73.5 +/- 35.8 ms, median 82 (n = 69; 67 positive, 2 negative, 24 at the +/-100 ms edge, 27 flat at the best lag), Wilcoxon p = 5.1e-12
class a+, window 0-200, xcov, a, last 200 ms: lag 28.2 +/- 20.5 ms, median 27 (n = 67; 61 positive, 0 negative, 0 at the +/-100 ms edge, 5 flat at the best lag), Wilcoxon p = 1.1e-11
class a+, window 0-200, xcov, b, whole CS-US: lag 28.4 +/- 20.6 ms, median 27 (n = 67; 61 positive, 0 negative, 0 at the +/-100 ms edge, 5 flat at the best lag), Wilcoxon p = 1.1e-11
class a+, window 0-200, recut, a, last 200 ms: lag 73.0 +/- 36.8 ms, median 83 (n = 67; 65 positive, 2 negative, 24 at the +/-100 ms edge, 26 flat at the best lag), Wilcoxon p = 1.57e-11
class a+, window 0-200, recut, b, whole CS-US: lag 72.7 +/- 36.0 ms, median 82 (n = 67; 65 positive, 2 negative, 22 at the +/-100 ms edge, 27 flat at the best lag), Wilcoxon p = 1.23e-11
class b, window 12-212, xcov, a, last 200 ms: lag 27.7 +/- 20.4 ms, median 27 (n = 71; 64 positive, 0 negative, 0 at the +/-100 ms edge, 5 flat at the best lag), Wilcoxon p = 3.5e-12
class b, window 12-212, xcov, b, whole CS-US: lag 28.0 +/- 20.5 ms, median 27 (n = 71; 64 positive, 0 negative, 0 at the +/-100 ms edge, 5 flat at the best lag), Wilcoxon p = 3.5e-12
class b, window 12-212, recut, a, last 200 ms: lag 73.7 +/- 36.2 ms, median 83 (n = 71; 69 positive, 2 negative, 26 at the +/-100 ms edge, 26 flat at the best lag), Wilcoxon p = 3.18e-12
class b, window 12-212, recut, b, whole CS-US: lag 72.8 +/- 36.0 ms, median 82 (n = 71; 69 positive, 2 negative, 24 at the +/-100 ms edge, 27 flat at the best lag), Wilcoxon p = 2.54e-12
class b, window 0-200, xcov, a, last 200 ms: lag 28.1 +/- 20.2 ms, median 27 (n = 70; 64 positive, 0 negative, 0 at the +/-100 ms edge, 5 flat at the best lag), Wilcoxon p = 3.5e-12
class b, window 0-200, xcov, b, whole CS-US: lag 28.4 +/- 20.3 ms, median 28 (n = 70; 64 positive, 0 negative, 0 at the +/-100 ms edge, 5 flat at the best lag), Wilcoxon p = 3.5e-12
class b, window 0-200, recut, a, last 200 ms: lag 74.0 +/- 36.3 ms, median 83 (n = 70; 68 positive, 2 negative, 26 at the +/-100 ms edge, 26 flat at the best lag), Wilcoxon p = 4.42e-12
class b, window 0-200, recut, b, whole CS-US: lag 73.6 +/- 35.5 ms, median 82 (n = 70; 68 positive, 2 negative, 24 at the +/-100 ms edge, 27 flat at the best lag), Wilcoxon p = 3.53e-12

Result: partially reproduced. Spikes lead the eyelid under every reading, window and estimator (Wilcoxon p < 1e-10). With the adopted estimator (xcov) the mean lag is 27.7 to 28.4 ms, just below 33.4 +/- 3.34 ms, with no cell at the +/-100 ms edge; the re-cut Pearson variant gives 72.7 to 74.0 ms, with 22 to 26 cells at the edge and 26 or 27 flat at their best lag.

fig2-suppression-properties-ds1¶

The 23 first-dataset suppression cells dropped 11.2 +/- 6 Hz for 70 +/- 44 ms, and suppression magnitude correlated with CR percentage (r = 0.526), CR amplitude at US onset (r = 0.443) and spike irregularity (CV, r = 0.587).

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 3. Data: dataset.

Criterion (claims file): Magnitude as a positive depth. CV is the coefficient of variation of interspike intervals; the paper does not give the period, readings (a) the baseline, (b) the whole trial. Reproduced when the three correlations are positive at p < 0.05 and both values are within tolerance under one reading.

In [25]:
for rd in READINGS:
    s = d1[cls(rd)[df.dset == 1] == "sup"]
    m = mag(rd, "sup")[s.index]
    out = f"reading {rd}: n = {len(s)}, magnitude {m.mean():.1f} +/- {m.std():.1f} Hz, duration {s.dur_sup.mean():.1f} +/- {s.dur_sup.std():.1f} ms"
    for nm, col in (("% CRs", "cr_pct"), ("CR amp at US onset (data set)", "amp_us_data"), ("CR amp at US onset (computed)", "amp_us"),
                    ("CV baseline", "cv_base"), ("CV whole trial", "cv_trial")):
        r = stats.spearmanr(m, s[col], nan_policy="omit")
        out += f"; {nm} r = {r[0]:.3f} (p = {r[1]:.3g})"
    print(out)
reading a: n = 23, magnitude 10.3 +/- 5.8 Hz, duration 63.6 +/- 47.4 ms; % CRs r = 0.243 (p = 0.264); CR amp at US onset (data set) r = 0.175 (p = 0.425); CR amp at US onset (computed) r = 0.128 (p = 0.559); CV baseline r = 0.316 (p = 0.142); CV whole trial r = 0.505 (p = 0.014)
reading a+: n = 13, magnitude 11.1 +/- 5.8 Hz, duration 91.5 +/- 44.8 ms; % CRs r = -0.379 (p = 0.201); CR amp at US onset (data set) r = -0.549 (p = 0.0518); CR amp at US onset (computed) r = -0.484 (p = 0.0941); CV baseline r = 0.368 (p = 0.216); CV whole trial r = 0.505 (p = 0.078)
reading b: n = 31, magnitude 9.9 +/- 5.5 Hz, duration 53.2 +/- 44.9 ms; % CRs r = 0.388 (p = 0.0312); CR amp at US onset (data set) r = 0.364 (p = 0.0443); CR amp at US onset (computed) r = 0.325 (p = 0.0741); CV baseline r = 0.467 (p = 0.00816); CV whole trial r = 0.465 (p = 0.00847)

Result: partially reproduced. Under reading (b) the three correlations are positive and significant (% CRs r = 0.388, p = 0.031; CR amplitude at US onset r = 0.364, p = 0.044; baseline CV r = 0.467, p = 0.008), but the magnitude (9.9 Hz) and duration (53.2 ms) are outside 11.2 +/- 1.12 Hz and 70 +/- 7 ms. Under reading (a) the magnitude (10.3 Hz) and duration (63.6 ms) are within tolerance but only the whole-trial CV correlation is significant. Reading (a+) gives no significant correlation (13 cells).

suppression-smaller-shorter-than-facilitation¶

Compared with facilitation, suppression had lower amplitudes (baseline z-score 5.3 +/- 1.5 against 7.6 +/- 4.7, p = 0.0007) and shorter durations (53 +/- 38.4 against 95.5 +/- 36.2 ms, p = 0.0012, Mann-Whitney U).

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 3. Data: dataset.

Criterion (claims file): The durations printed here (53 and 95.5 ms) differ from those given for all 23 and 60 cells (70 and 104 ms), so the cells compared are not the full classes. Readings (a) all 23 suppression and 60 facilitation cells, (b) the 16 and 30 cells recorded with behavior. Amplitude is the peak absolute baseline z-score in the last 200 ms of the CS-US interval (reading i) or its mean there (reading ii). Reproduced when both tests give p < 0.05 with suppression lower, under one combination of readings; the expected values are reported against tolerance.

In [26]:
rows = []
for rd in READINGS:
    c = cls(rd)[df.dset == 1]
    for cells_name, keep in (("a, all", d1.behav | ~d1.behav), ("b, with behavior", d1.behav)):
        f, s = d1[(c == "fac") & keep], d1[(c == "sup") & keep]
        for amp_name, (cf, cs) in (("i, peak z", ("zpeak_fac", "zpeak_sup")), ("ii, mean z", ("zmean_fac", "zmean_sup"))):
            rows.append({"class": rd, "cells": cells_name, "amplitude": amp_name, "n sup": len(s), "n fac": len(f),
                         "sup z": f"{s[cs].mean():.2f} +/- {s[cs].std():.2f}", "fac z": f"{f[cf].mean():.2f} +/- {f[cf].std():.2f}",
                         "p amp": ipn.mwu(s[cs], f[cf]),
                         "sup dur": f"{s.dur_sup.mean():.1f} +/- {s.dur_sup.std():.1f}", "fac dur": f"{f.dur_fac.mean():.1f} +/- {f.dur_fac.std():.1f}",
                         "p dur": ipn.mwu(s.dur_sup, f.dur_fac)})
print(pd.DataFrame(rows).to_string(index=False))
class            cells  amplitude  n sup  n fac         sup z          fac z    p amp       sup dur        fac dur    p dur
    a           a, all  i, peak z     23     80 5.71 +/- 2.06  9.47 +/- 6.14 0.000920 63.6 +/- 47.4  85.1 +/- 51.1 0.061568
    a           a, all ii, mean z     23     80 2.18 +/- 0.96  3.69 +/- 3.33 0.009723 63.6 +/- 47.4  85.1 +/- 51.1 0.061568
    a b, with behavior  i, peak z     16     42 6.23 +/- 2.24 10.84 +/- 7.13 0.014513 79.9 +/- 46.9  97.2 +/- 53.3 0.197846
    a b, with behavior ii, mean z     16     42 2.49 +/- 0.99  4.68 +/- 4.19 0.050325 79.9 +/- 46.9  97.2 +/- 53.3 0.197846
   a+           a, all  i, peak z     13     62 6.43 +/- 2.41 10.35 +/- 6.42 0.014035 91.5 +/- 44.8 102.5 +/- 43.0 0.429023
   a+           a, all ii, mean z     13     62 2.73 +/- 0.95  4.32 +/- 3.54 0.074336 91.5 +/- 44.8 102.5 +/- 43.0 0.429023
   a+ b, with behavior  i, peak z     12     35 6.56 +/- 2.47 12.14 +/- 7.11 0.004148 94.3 +/- 45.6 112.4 +/- 43.7 0.183553
   a+ b, with behavior ii, mean z     12     35 2.79 +/- 0.96  5.35 +/- 4.29 0.022539 94.3 +/- 45.6 112.4 +/- 43.7 0.183553
    b           a, all  i, peak z     31     88 5.46 +/- 1.99  9.14 +/- 6.00 0.000160 53.2 +/- 44.9  79.2 +/- 52.5 0.012673
    b           a, all ii, mean z     31     88 1.86 +/- 1.00  3.45 +/- 3.27 0.000823 53.2 +/- 44.9  79.2 +/- 52.5 0.012673
    b b, with behavior  i, peak z     20     44 5.90 +/- 2.12 10.63 +/- 7.04 0.004039 70.0 +/- 46.7  94.2 +/- 53.9 0.077156
    b b, with behavior ii, mean z     20     44 2.16 +/- 1.13  4.51 +/- 4.17 0.008939 70.0 +/- 46.7  94.2 +/- 53.9 0.077156

Result: reproduced, under class reading (b) over all cells. Suppression has lower peak z-scores (5.46 against 9.14, p = 0.00016) and shorter durations (53.2 against 79.2 ms, p = 0.013). The suppression values (5.46 and 53.2 ms) are within tolerance and the facilitation values (9.14 and 79.2 ms) are not. Under class readings (a) and (a+), and under every reading over the cells with behavior, the duration test is not significant (p = 0.062 to 0.43).

suppression-same-timing-as-facilitation¶

Suppression and facilitation had similar onset times (132 +/- 21.2 against 136.5 +/- 19.9 ms, p = 0.6) and modulation peak times (176 +/- 37.2 against 166 +/- 34.2 ms, p = 0.6).

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 3. Data: dataset.

Criterion (claims file): A claim of absence, judged on the paper's test, Mann-Whitney U at p < 0.05, on the cells of the reading that suppression-smaller-shorter-than-facilitation adopts. The paper does not define onset or peak time; the reading, taken from the duration threshold of the Methods (Spike modulation), is onset as the first bin beyond 3 baseline SDs in the CS-US interval held for at least 10 ms, and peak time as the time of the extreme value there. Reproduced when neither test is significant; the differences are reported.

In [27]:
for rd in READINGS:
    c = cls(rd)[df.dset == 1]
    for cells_name, keep in (("a, all", d1.behav | ~d1.behav), ("b, with behavior", d1.behav)):
        f, s = d1[(c == "fac") & keep], d1[(c == "sup") & keep]
        print(f"class {rd}, cells {cells_name}: onset sup {s.onset_sup.mean():.1f} +/- {s.onset_sup.std():.1f} (n = {s.onset_sup.notna().sum()})"
              f" vs fac {f.onset_fac.mean():.1f} +/- {f.onset_fac.std():.1f} ms (n = {f.onset_fac.notna().sum()}), p = {ipn.mwu(s.onset_sup, f.onset_fac):.3g};"
              f" peak time sup {s.peaktime_sup.mean():.1f} +/- {s.peaktime_sup.std():.1f} vs fac {f.peaktime_fac.mean():.1f} +/- {f.peaktime_fac.std():.1f} ms,"
              f" p = {ipn.mwu(s.peaktime_sup, f.peaktime_fac):.3g}")
class a, cells a, all: onset sup 149.5 +/- 40.7 (n = 21) vs fac 111.6 +/- 28.7 ms (n = 74), p = 0.00014; peak time sup 176.5 +/- 45.6 vs fac 186.6 +/- 53.8 ms, p = 0.351
class a, cells b, with behavior: onset sup 143.0 +/- 37.7 (n = 15) vs fac 109.2 +/- 29.7 ms (n = 39), p = 0.00627; peak time sup 185.1 +/- 37.4 vs fac 183.6 +/- 51.3 ms, p = 0.937
class a+, cells a, all: onset sup 124.8 +/- 22.1 (n = 12) vs fac 111.8 +/- 28.2 ms (n = 62), p = 0.135; peak time sup 175.7 +/- 41.4 vs fac 185.3 +/- 51.3 ms, p = 0.489
class a+, cells b, with behavior: onset sup 125.1 +/- 23.1 (n = 11) vs fac 109.7 +/- 30.8 ms (n = 35), p = 0.172; peak time sup 179.5 +/- 40.8 vs fac 183.0 +/- 50.9 ms, p = 0.844
class b, cells a, all: onset sup 144.9 +/- 43.3 (n = 28) vs fac 115.5 +/- 33.8 ms (n = 79), p = 0.000741; peak time sup 167.7 +/- 47.8 vs fac 190.3 +/- 53.5 ms, p = 0.0355
class b, cells b, with behavior: onset sup 141.4 +/- 40.0 (n = 19) vs fac 111.6 +/- 31.1 ms (n = 41), p = 0.00957; peak time sup 177.3 +/- 43.5 vs fac 183.2 +/- 50.3 ms, p = 0.777

Result: not reproduced. On the cells of the reading the previous claim adopts (class b, all cells), suppression starts later than facilitation (144.9 against 115.5 ms, p = 0.00074) and peaks earlier (167.7 against 190.3 ms, p = 0.036). Under class reading (a+) neither test is significant (p = 0.135 and 0.489), and under reading (a) the onset differs (p = 0.00014).

fig2j-suppression-trial-correlations-ds1¶

Of 16 first-dataset suppression cells with conditioned behavior, three (19%) showed significant negative trial-by-trial correlations between firing rate and CR amplitude (bootstrap p < 0.0001), none positive; a mixed model over them estimated 0.27% more closure per Hz of suppression (p = 0.0272).

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 3; Figure 2I,J; Supplementary file 1, Fig. 2J. Data: dataset.

Criterion (claims file): Tolerance on the count is one cell (10% is below one); on the slope twice the paper's standard error (0.12). Per-cell correlations, bootstrap and mixed model as in fig2b-facilitation-trial-correlations-ds1 and fig2b-lmm-ds1. Reproduced when the count and the slope are within tolerance and no cell is significantly positive, under one combination of readings.

In [28]:
rng = np.random.default_rng(23)
rows = []
for rd in READINGS:
    cells = list(d1.index[(cls(rd)[df.dset == 1] == "sup") & d1.behav])
    for xr in XREAD:
        for yr in YREAD:
            out, r, p, pairs = trial_test(cells, xr, yr, -1, rng)
            fit = lmm_on(cells, (p < 0.05) & (r < 0), pairs) if yr != "max" else None
            rows.append({"class": rd, **out, "slope %/Hz": fmt(fit["slope"]) if fit else np.nan,
                         "SE": fmt(fit["se"]) if fit else np.nan, "p slope": fit["p"] if fit else np.nan,
                         "fit ok": fit["ok"] if fit else np.nan, "warnings": fit["warnings"] if fit else ""})
tab = pd.DataFrame(rows)
tab["count in 2-4"] = tab.sig.between(2, 4)
tab["slope in -0.51 to -0.03"] = tab["slope %/Hz"].between(-0.51, -0.03)
print(tab.to_string(index=False))
class x    y  cells  sig  opposite  pearson  sig, Spearman only  p_shuffle  p_random  slope %/Hz    SE      p slope fit ok                                                                                                                                                                                                           warnings  count in 2-4  slope in -0.51 to -0.03
    a a data     16    4         0        6                   4      0.002     0.000      -0.381 0.169 2.386961e-02   True                                                                                                                      Maximum Likelihood optimization failed to converge; Retrying MixedLM optimization with powell          True                     True
    a a   us     16    4         0        7                   4      0.000     0.000      -0.397 0.184 3.136073e-02   True                                                                                                                      Maximum Likelihood optimization failed to converge; Retrying MixedLM optimization with powell          True                     True
    a a  max     16    4         0        4                   4      0.000     0.000         NaN   NaN          NaN    NaN                                                                                                                                                                                                                             True                    False
    a b data     16    2         0        6                   2      0.056     0.070      -0.868 0.576 1.319150e-01  False                                                                                                                                                       The Hessian matrix at the estimated parameter values is not           True                    False
    a b   us     16    2         0        7                   2      0.050     0.054      -0.891 0.994 3.698604e-01  False Maximum Likelihood optimization failed to converge; Retrying MixedLM optimization with powell; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space          True                    False
    a b  max     16    2         0        4                   2      0.038     0.060         NaN   NaN          NaN    NaN                                                                                                                                                                                                                             True                    False
    a c data     16    2         0        5                   2      0.050     0.050      -0.705 0.582 2.253767e-01  False                                                        Maximum Likelihood optimization failed to converge; Retrying MixedLM optimization with powell; The Hessian matrix at the estimated parameter values is not           True                    False
    a c   us     16    4         0        5                   3      0.000     0.000      -0.513 0.293 7.972437e-02   True                                                                                                                                                                                                                             True                    False
    a c  max     16    2         0        4                   2      0.056     0.072         NaN   NaN          NaN    NaN                                                                                                                                                                                                                             True                    False
   a+ a data     12    3         0        5                   3      0.004     0.004      -0.190 0.110 8.344931e-02   True                                                                                                                                                                                                                             True                     True
   a+ a   us     12    3         0        6                   3      0.002     0.004      -0.188 0.102 6.581768e-02   True                                                                                                                      Maximum Likelihood optimization failed to converge; Retrying MixedLM optimization with powell          True                     True
   a+ a  max     12    3         0        3                   3      0.002     0.002         NaN   NaN          NaN    NaN                                                                                                                                                                                                                             True                    False
   a+ b data     12    1         0        5                   1      0.250     0.272         NaN   NaN          NaN    NaN                                                                                                                                                                                                                            False                    False
   a+ b   us     12    1         0        6                   1      0.262     0.262         NaN   NaN          NaN    NaN                                                                                                                                                                                                                            False                    False
   a+ b  max     12    1         0        3                   1      0.254     0.280         NaN   NaN          NaN    NaN                                                                                                                                                                                                                            False                    False
   a+ c data     12    1         0        4                   1      0.262     0.266         NaN   NaN          NaN    NaN                                                                                                                                                                                                                            False                    False
   a+ c   us     12    3         0        4                   2      0.004     0.004      -0.256 0.147 8.171175e-02  False                                                        Maximum Likelihood optimization failed to converge; Retrying MixedLM optimization with powell; The Hessian matrix at the estimated parameter values is not           True                     True
   a+ c  max     12    1         0        3                   1      0.258     0.236         NaN   NaN          NaN    NaN                                                                                                                                                                                                                            False                    False
    b a data     20    5         0        7                   5      0.000     0.000      -0.326 0.116 5.010674e-03   True                                                                                                                                                                                                                            False                     True
    b a   us     20    5         0        7                   5      0.000     0.000      -0.350 0.152 2.162070e-02   True                                                                                                                                                                                                                            False                     True
    b a  max     20    5         0        5                   5      0.000     0.000         NaN   NaN          NaN    NaN                                                                                                                                                                                                                            False                    False
    b b data     20    3         0        7                   3      0.020     0.022      -0.653 0.080 2.656370e-16  False                                                        Maximum Likelihood optimization failed to converge; Retrying MixedLM optimization with powell; The Hessian matrix at the estimated parameter values is not           True                    False
    b b   us     20    3         0        7                   3      0.016     0.012      -0.687   NaN          NaN  False                                                        Maximum Likelihood optimization failed to converge; Retrying MixedLM optimization with powell; The Hessian matrix at the estimated parameter values is not           True                    False
    b b  max     20    3         0        5                   3      0.004     0.006         NaN   NaN          NaN    NaN                                                                                                                                                                                                                             True                    False
    b c data     20    2         0        6                   3      0.062     0.080      -0.705 0.582 2.253767e-01  False                                                        Maximum Likelihood optimization failed to converge; Retrying MixedLM optimization with powell; The Hessian matrix at the estimated parameter values is not           True                    False
    b c   us     20    5         0        5                   4      0.000     0.000      -0.470 0.245 5.471642e-02   True                                                                                                                                                                                                                            False                     True
    b c  max     20    2         0        5                   3      0.092     0.100         NaN   NaN          NaN    NaN                                                                                                                                                                                                                             True                    False

Result: reproduced. Under class reading (a) with rate reading (a) there are 16 suppression cells with behavior, 4 with significant negative correlations, none positive, and a mixed-model slope of -0.381 % per Hz (p = 0.024), all within tolerance; the bootstrap p is 0.002 or below. Under class (a), rate readings (b) and (c) give 2 to 4 cells and slopes of -0.51 to -0.89, outside the slope tolerance, and several of those fits have singular or boundary warnings (fit-ok column).

fig2l-suppression-no-lead-ds1¶

For first-dataset suppression cells with behavior, cross-correlation offsets between spike and eyelid traces were close to zero on average (6.4 +/- 23 ms, p = 0.2336).

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 3; Figure 2L. Data: dataset.

Criterion (claims file): A claim of absence, judged on the paper's test, a Wilcoxon signed rank test of the lags against zero at p < 0.05, with lags as in fig2d-facilitation-leads-eyelid-ds1 (the cross-correlation taken with the suppression sign of interest, readings as there). Reproduced when the test is not significant; the mean lag is reported.

In [29]:
for rd in READINGS:
    cells = list(d1.index[(cls(rd)[df.dset == 1] == "sup") & d1.behav])
    print_lags(rd, lags_for(cells, -1))
class a, xcov, a, last 200 ms: lag 31.2 +/- 23.4 ms, median 36 (n = 16; 15 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.000652
class a, xcov, b, whole CS-US: lag 31.6 +/- 23.4 ms, median 37 (n = 16; 15 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.000652
class a, recut, a, last 200 ms: lag 56.1 +/- 46.7 ms, median 70 (n = 16; 15 positive, 1 negative, 8 at the +/-100 ms edge, 2 flat at the best lag), Wilcoxon p = 0.00104
class a, recut, b, whole CS-US: lag 69.8 +/- 38.4 ms, median 98 (n = 16; 16 positive, 0 negative, 8 at the +/-100 ms edge, 2 flat at the best lag), Wilcoxon p = 0.000362
class a+, xcov, a, last 200 ms: lag 33.4 +/- 24.2 ms, median 37 (n = 12; 11 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.000977
class a+, xcov, b, whole CS-US: lag 33.8 +/- 24.2 ms, median 38 (n = 12; 11 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.000977
class a+, recut, a, last 200 ms: lag 65.5 +/- 43.4 ms, median 100 (n = 12; 12 positive, 0 negative, 7 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.000488
class a+, recut, b, whole CS-US: lag 70.9 +/- 39.0 ms, median 100 (n = 12; 12 positive, 0 negative, 7 at the +/-100 ms edge, 1 flat at the best lag), Wilcoxon p = 0.000488
class b, xcov, a, last 200 ms: lag 31.6 +/- 30.6 ms, median 36 (n = 20; 18 positive, 1 negative, 1 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.000621
class b, xcov, b, whole CS-US: lag 34.0 +/- 26.7 ms, median 37 (n = 20; 19 positive, 0 negative, 1 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.000131
class b, recut, a, last 200 ms: lag 48.0 +/- 59.9 ms, median 70 (n = 20; 17 positive, 3 negative, 11 at the +/-100 ms edge, 2 flat at the best lag), Wilcoxon p = 0.00358
class b, recut, b, whole CS-US: lag 65.8 +/- 43.4 ms, median 98 (n = 20; 19 positive, 1 negative, 10 at the +/-100 ms edge, 2 flat at the best lag), Wilcoxon p = 0.000164

Result: not reproduced. The Wilcoxon test is significant under every reading and both estimators (p = 0.00013 to 0.0036), so the claimed absence of a lead fails. With the adopted estimator (xcov) the most negative cross-correlation is at a mean lag of 31.2 to 34.0 ms, with at most one cell at the +/-100 ms edge; the re-cut Pearson variant gives 48.0 to 70.9 ms, with 7 to 11 cells at the edge.

fig2n-suppression-ds2¶

In the second dataset 16 cells showed CS-US suppression (12.1 +/- 5 Hz) with conditioned behavior; 8 had significant negative trial-by-trial correlations with CR amplitude (bootstrap p < 0.0001), and a mixed model estimated 1.01% more closure per Hz of deeper suppression (p < 0.0001).

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 4; Figure 2M,N; Supplementary file 1, Fig. 2N. Data: dataset.

Criterion (claims file): Tolerance on the slope is twice the paper's standard error (0.1); on the count one cell. Here the firing rate is "relative"; readings (a) the trial rate minus the baseline mean, (b) as in the first-dataset claims. Supplementary file 1 says this model had random intercepts only. Reproduced when the four values are within tolerance under one combination of readings.

In [30]:
rng = np.random.default_rng(24)
rows = []
# 12-212 and 0-200 are the claims file's windows; 0-212, the whole CS-US interval of the data set, is a variant
# (the window over which the data set's own facilitation variable is computed in the second dataset), shown
# because the verifier asked for it; it does not decide the outcome.
for rd in READINGS:
    for win2 in WINS2 + ("0-212",):
        c = cls(rd, win2)
        cells = list(df.index[(c == "sup") & df.behav & (df.dset == 2)])
        m = mag(rd, "sup", win2)[cells]
        for xr in XREAD:
            for yr in ("data", "us"):
                out, r, p, pairs = trial_test(cells, xr, yr, -1, rng, win2=win2)
                fit = lmm_on(cells, (p < 0.05) & (r < 0), pairs, slopes=False)
                rows.append({"class": rd, "window": win2, "magnitude": f"{m.mean():.1f} +/- {m.std():.1f}", **out,
                             "slope %/Hz": fmt(fit["slope"]) if fit else np.nan, "SE": fmt(fit["se"]) if fit else np.nan,
                             "p slope": fit["p"] if fit else np.nan, "fit ok": fit["ok"] if fit else np.nan,
                             "warnings": fit["warnings"] if fit else ""})
tab = pd.DataFrame(rows)
tab["all four in tolerance"] = (tab.cells.between(14.4, 17.6) & tab.magnitude.str.split().str[0].astype(float).between(10.89, 13.31)
                                & tab.sig.between(7, 9) & tab["slope %/Hz"].between(-1.21, -0.81))
print(tab.to_string(index=False))
print("expected: 16 +/- 1.6 cells, 12.1 +/- 1.21 Hz, 8 +/- 1 significant, slope -1.01 +/- 0.2")
class window    magnitude x    y  cells  sig  opposite  pearson  sig, Spearman only  p_shuffle  p_random  slope %/Hz    SE      p slope  fit ok                                                                                                                                                                                                     warnings  all four in tolerance
    a 12-212 11.2 +/- 5.3 a data     18    6         2        0                   6      0.000     0.000      -0.620 0.078 2.050136e-15   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    a 12-212 11.2 +/- 5.3 a   us     18    6         2        0                   6      0.000     0.000      -0.628 0.079 2.538252e-15   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    a 12-212 11.2 +/- 5.3 b data     18    3         2        0                   3      0.004     0.012      -0.876 0.127 5.182597e-12   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    a 12-212 11.2 +/- 5.3 b   us     18    4         2        0                   4      0.004     0.000      -0.850 0.123 5.610389e-12    True                                                                                                                                                                                                                               False
    a 12-212 11.2 +/- 5.3 c data     18    2         1        0                   2      0.084     0.084      -1.080 0.261 3.534169e-05   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    a 12-212 11.2 +/- 5.3 c   us     18    3         2        0                   3      0.008     0.008      -1.003 0.247 5.080179e-05    True                                                                                                                                                                                                                               False
    a  0-200 11.6 +/- 4.4 a data     14    7         1        0                   7      0.000     0.000      -0.603 0.076 3.086528e-15   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    a  0-200 11.6 +/- 4.4 a   us     14    6         0        0                   6      0.000     0.000      -0.592 0.080 1.792035e-13    True                                                                                                                                                                                                                               False
    a  0-200 11.6 +/- 4.4 b data     14    2         1        0                   2      0.040     0.062      -0.854 0.155 3.774789e-08   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    a  0-200 11.6 +/- 4.4 b   us     14    3         1        0                   3      0.006     0.008      -0.797 0.147 5.739566e-08    True                                                                                                                                                                                                                               False
    a  0-200 11.6 +/- 4.4 c data     14    2         1        0                   2      0.038     0.032      -1.080 0.261 3.534169e-05   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    a  0-200 11.6 +/- 4.4 c   us     14    3         1        0                   3      0.002     0.012      -1.003 0.247 5.080179e-05    True                                                                                                                                                                                                                               False
    a  0-212 11.1 +/- 4.9 a data     16    5         1        0                   5      0.000     0.000      -0.598 0.084 1.405965e-12    True                                                                                                                                                                                                                               False
    a  0-212 11.1 +/- 4.9 a   us     16    5         1        0                   5      0.000     0.000      -0.608 0.086 1.472104e-12    True                                                                                                                                                                                                                               False
    a  0-212 11.1 +/- 4.9 b data     16    3         2        0                   3      0.008     0.012      -0.868 0.131 4.104494e-11   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    a  0-212 11.1 +/- 4.9 b   us     16    4         2        0                   4      0.000     0.000      -0.840 0.127 4.507495e-11    True                                                                                                                                                                                                                               False
    a  0-212 11.1 +/- 4.9 c data     16    2         1        0                   2      0.052     0.062      -1.080 0.261 3.534169e-05   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    a  0-212 11.1 +/- 4.9 c   us     16    3         1        0                   3      0.004     0.010      -1.003 0.247 5.080179e-05    True                                                                                                                                                                                                                               False
   a+ 12-212 11.7 +/- 4.6 a data     12    6         0        0                   6      0.000     0.000      -0.620 0.078 2.050136e-15   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
   a+ 12-212 11.7 +/- 4.6 a   us     12    6         0        0                   6      0.000     0.000      -0.628 0.079 2.538252e-15   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
   a+ 12-212 11.7 +/- 4.6 b data     12    3         0        0                   3      0.004     0.002      -0.876 0.127 5.182597e-12   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
   a+ 12-212 11.7 +/- 4.6 b   us     12    4         0        0                   4      0.000     0.000      -0.850 0.123 5.610389e-12    True                                                                                                                                                                                                                               False
   a+ 12-212 11.7 +/- 4.6 c data     12    2         0        0                   2      0.034     0.030      -1.080 0.261 3.534169e-05   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
   a+ 12-212 11.7 +/- 4.6 c   us     12    3         0        0                   3      0.002     0.000      -1.003 0.247 5.080179e-05    True                                                                                                                                                                                                                               False
   a+  0-200 10.9 +/- 3.6 a data     11    7         0        0                   7      0.000     0.000      -0.603 0.076 3.086528e-15   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
   a+  0-200 10.9 +/- 3.6 a   us     11    6         0        0                   6      0.000     0.000      -0.592 0.080 1.792035e-13    True                                                                                                                                                                                                                               False
   a+  0-200 10.9 +/- 3.6 b data     11    2         0        0                   2      0.026     0.032      -0.854 0.155 3.774789e-08   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
   a+  0-200 10.9 +/- 3.6 b   us     11    3         0        0                   3      0.006     0.004      -0.797 0.147 5.739566e-08    True                                                                                                                                                                                                                               False
   a+  0-200 10.9 +/- 3.6 c data     11    2         0        0                   2      0.022     0.040      -1.080 0.261 3.534169e-05   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
   a+  0-200 10.9 +/- 3.6 c   us     11    3         0        0                   3      0.000     0.000      -1.003 0.247 5.080179e-05    True                                                                                                                                                                                                                               False
   a+  0-212 11.2 +/- 4.2 a data     11    5         0        0                   5      0.000     0.000      -0.598 0.084 1.405965e-12    True                                                                                                                                                                                                                               False
   a+  0-212 11.2 +/- 4.2 a   us     11    5         0        0                   5      0.000     0.000      -0.608 0.086 1.472104e-12    True                                                                                                                                                                                                                               False
   a+  0-212 11.2 +/- 4.2 b data     11    3         0        0                   3      0.000     0.000      -0.868 0.131 4.104494e-11   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
   a+  0-212 11.2 +/- 4.2 b   us     11    4         0        0                   4      0.000     0.000      -0.840 0.127 4.507495e-11    True                                                                                                                                                                                                                               False
   a+  0-212 11.2 +/- 4.2 c data     11    2         0        0                   2      0.042     0.030      -1.080 0.261 3.534169e-05   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
   a+  0-212 11.2 +/- 4.2 c   us     11    3         0        0                   3      0.002     0.004      -1.003 0.247 5.080179e-05    True                                                                                                                                                                                                                               False
    b 12-212 11.5 +/- 5.3 a data     21    7         2        0                   7      0.000     0.000      -0.600 0.071 4.211684e-17   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    b 12-212 11.5 +/- 5.3 a   us     21    6         2        0                   6      0.000     0.000      -0.628 0.079 2.538252e-15   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    b 12-212 11.5 +/- 5.3 b data     21    3         2        0                   3      0.026     0.012      -0.876 0.127 5.182597e-12   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    b 12-212 11.5 +/- 5.3 b   us     21    4         2        0                   4      0.002     0.004      -0.850 0.123 5.610389e-12    True                                                                                                                                                                                                                               False
    b 12-212 11.5 +/- 5.3 c data     21    2         1        0                   2      0.106     0.084      -1.080 0.261 3.534169e-05   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    b 12-212 11.5 +/- 5.3 c   us     21    3         2        0                   3      0.016     0.020      -1.003 0.247 5.080179e-05    True                                                                                                                                                                                                                               False
    b  0-200 11.4 +/- 4.8 a data     18    7         1        0                   7      0.000     0.000      -0.603 0.076 3.086528e-15   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    b  0-200 11.4 +/- 4.8 a   us     18    6         0        0                   6      0.000     0.000      -0.592 0.080 1.792035e-13    True                                                                                                                                                                                                                               False
    b  0-200 11.4 +/- 4.8 b data     18    2         2        0                   2      0.072     0.086      -0.854 0.155 3.774789e-08   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    b  0-200 11.4 +/- 4.8 b   us     18    3         2        0                   3      0.008     0.008      -0.797 0.147 5.739566e-08    True                                                                                                                                                                                                                               False
    b  0-200 11.4 +/- 4.8 c data     18    2         1        0                   2      0.090     0.086      -1.080 0.261 3.534169e-05   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    b  0-200 11.4 +/- 4.8 c   us     18    3         2        0                   3      0.012     0.012      -1.003 0.247 5.080179e-05    True                                                                                                                                                                                                                               False
    b  0-212 11.2 +/- 4.9 a data     20    5         1        0                   5      0.000     0.000      -0.598 0.084 1.405965e-12    True                                                                                                                                                                                                                               False
    b  0-212 11.2 +/- 4.9 a   us     20    5         1        0                   5      0.000     0.000      -0.608 0.086 1.472104e-12    True                                                                                                                                                                                                                               False
    b  0-212 11.2 +/- 4.9 b data     20    3         2        0                   3      0.024     0.020      -0.868 0.131 4.104494e-11   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    b  0-212 11.2 +/- 4.9 b   us     20    4         2        0                   4      0.000     0.000      -0.840 0.127 4.507495e-11    True                                                                                                                                                                                                                               False
    b  0-212 11.2 +/- 4.9 c data     20    2         1        0                   2      0.104     0.102      -1.080 0.261 3.534169e-05   False Random effects covariance is singular; The Hessian matrix at the estimated parameter values is not ; The MLE may be on the boundary of the parameter space; The random effects covariance matrix is singular                  False
    b  0-212 11.2 +/- 4.9 c   us     20    3         2        0                   3      0.014     0.014      -1.003 0.247 5.080179e-05    True                                                                                                                                                                                                                               False
expected: 16 +/- 1.6 cells, 12.1 +/- 1.21 Hz, 8 +/- 1 significant, slope -1.01 +/- 0.2

Result: partially reproduced. Negative trial-by-trial correlations and a negative slope are present under every combination, but no combination of the claims file's windows and readings puts all four values within tolerance. The magnitude (10.9 to 11.7 Hz) is within tolerance throughout; the cell count is 11 to 21 (none of the claims file's readings gives 15 to 17; class (a), 0-200 ms gives 14, just below 14.4); rate reading (a) gives 6 or 7 significant cells with a slope near -0.6 % per Hz, rate reading (c) 2 or 3 cells with a slope near -1.0. Most of the random-intercept fits have a singular random-effects covariance (fit-ok column), including the -0.620 of class (a), rate (a). The variant window 0-212 ms, which the verifier asked for, gives 16 cells under class (a) but 5 significant cells and a slope of -0.60, so it does not put all four values within tolerance either. Class (a), 0-200 ms, rate (a) with the data set's CR amplitude gives 7 significant cells, within 8 +/- 1 (bootstrap p below 1/500), among 14 cells, just below 14.4, with a slope of -0.603 from a singular fit (-0.592 from the clean fit with the computed CR amplitude), outside -1.01 +/- 0.2: the effect is present and some of its values are within tolerance.

ds2-stronger-facilitation-same-suppression¶

The second dataset showed stronger facilitation than the first (59.2 +/- 38.1 against 30.1 +/- 25.3 Hz, p = 0.0009), with high CR performance (86.2 +/- 17.3% CRs, CR amplitude 43.5 +/- 17%), while suppression did not differ (11.9 +/- 5 against 12.9 +/- 6.4 Hz, p = 0.864).

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 4. Data: dataset.

Criterion (claims file): The first-dataset facilitation mean (30.1 Hz) differs from that of all 60 cells (22.5 Hz); readings for the groups are (a) the cells with behavior (30 and 70 facilitation, 16 and 16 suppression), (b) all cells of each class. Facilitation is reproduced when the Mann-Whitney test gives p < 0.05 with the second dataset higher; suppression is a claim of absence judged on the same test. Reproduced when both hold and the expected values are within tolerance under one reading; partially when only the tests hold.

In [31]:
for rd, win2 in [(rd, w) for rd in READINGS for w in WINS2]:
    c = cls(rd, win2)
    for grp, keep in (("a, with behavior", df.behav), ("b, all cells", df.behav | ~df.behav)):
        f1, f2 = mag(rd, "fac", win2)[(c == "fac") & keep & (df.dset == 1)], mag(rd, "fac", win2)[(c == "fac") & keep & (df.dset == 2)]
        s1, s2 = mag(rd, "sup", win2)[(c == "sup") & keep & (df.dset == 1)], mag(rd, "sup", win2)[(c == "sup") & keep & (df.dset == 2)]
        print(f"class {rd}, window {win2}, groups {grp}: facilitation set 2 {f2.mean():.1f} +/- {f2.std():.1f} (n = {len(f2)}) vs set 1 {f1.mean():.1f} +/- {f1.std():.1f} Hz"
              f" (n = {len(f1)}), p = {ipn.mwu(f2, f1):.3g}; suppression set 2 {s2.mean():.1f} +/- {s2.std():.1f} (n = {len(s2)}) vs set 1"
              f" {s1.mean():.1f} +/- {s1.std():.1f} Hz (n = {len(s1)}), p = {ipn.mwu(s2, s1):.3g}")
print(f"set 2 mean % CRs {d2.cr_pct.mean():.1f} +/- {d2.cr_pct.std():.1f}; mean CR amplitude at US onset: data set's"
      f" {d2.amp_us_data.mean():.1f} +/- {d2.amp_us_data.std():.1f}, computed at 212 ms {d2.amp_us.mean():.1f} +/- {d2.amp_us.std():.1f} %")
class a, window 12-212, groups a, with behavior: facilitation set 2 60.4 +/- 40.6 (n = 70) vs set 1 24.8 +/- 23.0 Hz (n = 42), p = 6.89e-08; suppression set 2 11.2 +/- 5.3 (n = 18) vs set 1 11.7 +/- 6.4 Hz (n = 16), p = 0.986
class a, window 12-212, groups b, all cells: facilitation set 2 60.4 +/- 40.6 (n = 70) vs set 1 18.7 +/- 18.3 Hz (n = 80), p = 8.11e-15; suppression set 2 11.2 +/- 5.3 (n = 18) vs set 1 10.3 +/- 5.8 Hz (n = 23), p = 0.503
class a, window 0-200, groups a, with behavior: facilitation set 2 54.1 +/- 36.3 (n = 70) vs set 1 24.8 +/- 23.0 Hz (n = 42), p = 1.11e-06; suppression set 2 11.6 +/- 4.4 (n = 14) vs set 1 11.7 +/- 6.4 Hz (n = 16), p = 0.633
class a, window 0-200, groups b, all cells: facilitation set 2 54.1 +/- 36.3 (n = 70) vs set 1 18.7 +/- 18.3 Hz (n = 80), p = 4.17e-13; suppression set 2 11.6 +/- 4.4 (n = 14) vs set 1 10.3 +/- 5.8 Hz (n = 23), p = 0.205
class a+, window 12-212, groups a, with behavior: facilitation set 2 58.9 +/- 40.3 (n = 69) vs set 1 25.8 +/- 23.6 Hz (n = 35), p = 2.14e-06; suppression set 2 11.7 +/- 4.6 (n = 12) vs set 1 11.4 +/- 6.0 Hz (n = 12), p = 0.707
class a+, window 12-212, groups b, all cells: facilitation set 2 58.9 +/- 40.3 (n = 69) vs set 1 19.6 +/- 19.4 Hz (n = 62), p = 8.26e-12; suppression set 2 11.7 +/- 4.6 (n = 12) vs set 1 11.1 +/- 5.8 Hz (n = 13), p = 0.605
class a+, window 0-200, groups a, with behavior: facilitation set 2 54.0 +/- 35.6 (n = 67) vs set 1 25.8 +/- 23.6 Hz (n = 35), p = 6.24e-06; suppression set 2 10.9 +/- 3.6 (n = 11) vs set 1 11.4 +/- 6.0 Hz (n = 12), p = 0.782
class a+, window 0-200, groups b, all cells: facilitation set 2 54.0 +/- 35.6 (n = 67) vs set 1 19.6 +/- 19.4 Hz (n = 62), p = 1.27e-11; suppression set 2 10.9 +/- 3.6 (n = 11) vs set 1 11.1 +/- 5.8 Hz (n = 13), p = 0.643
class b, window 12-212, groups a, with behavior: facilitation set 2 61.8 +/- 40.6 (n = 71) vs set 1 24.6 +/- 23.0 Hz (n = 44), p = 6.28e-09; suppression set 2 11.5 +/- 5.3 (n = 21) vs set 1 11.5 +/- 6.2 Hz (n = 20), p = 0.784
class b, window 12-212, groups b, all cells: facilitation set 2 61.8 +/- 40.6 (n = 71) vs set 1 18.1 +/- 18.0 Hz (n = 88), p = 7.8e-17; suppression set 2 11.5 +/- 5.3 (n = 21) vs set 1 9.9 +/- 5.5 Hz (n = 31), p = 0.179
class b, window 0-200, groups a, with behavior: facilitation set 2 56.5 +/- 36.0 (n = 70) vs set 1 24.6 +/- 23.0 Hz (n = 44), p = 4.85e-08; suppression set 2 11.4 +/- 4.8 (n = 18) vs set 1 11.5 +/- 6.2 Hz (n = 20), p = 0.759
class b, window 0-200, groups b, all cells: facilitation set 2 56.5 +/- 36.0 (n = 70) vs set 1 18.1 +/- 18.0 Hz (n = 88), p = 4.57e-16; suppression set 2 11.4 +/- 4.8 (n = 18) vs set 1 9.9 +/- 5.5 Hz (n = 31), p = 0.181
set 2 mean % CRs 91.0 +/- 12.2; mean CR amplitude at US onset: data set's 43.5 +/- 17.0, computed at 212 ms 48.6 +/- 16.5 %

Result: partially reproduced. Facilitation is stronger in the second dataset under every reading and window (60.4 against 24.8 Hz under reading a with behavior, p = 6.9e-08), and suppression does not differ (p = 0.18 to 0.99). The second-dataset facilitation (54.0 to 61.8 Hz over both windows), mean % CRs (91.0) and mean CR amplitude (43.5%, the data set's values) are within tolerance, but the first-dataset facilitation (18.1 to 25.8 Hz) is below 30.1 +/- 3.01 Hz under every reading.

fig2p-suppression-no-lead-ds2¶

In the second dataset the time difference between suppression and eyelid movement was not different from zero (6.9 +/- 25 ms, p = 0.2439).

Source: Results, IpN facilitation but not suppression can drive conditioned eyelid behavior, paragraph 4; Figure 2P. Data: dataset.

Criterion (claims file): As in fig2l-suppression-no-lead-ds1, on the 16 second-dataset cells.

In [32]:
for rd in READINGS:
    for win2 in WINS2:
        cells = list(d2.index[(cls(rd, win2)[df.dset == 2] == "sup") & d2.behav])
        print_lags(f"{rd}, window {win2}", lags_for(cells, -1))
class a, window 12-212, xcov, a, last 200 ms: lag 20.9 +/- 20.6 ms, median 16 (n = 18; 13 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.00147
class a, window 12-212, xcov, b, whole CS-US: lag 24.5 +/- 27.4 ms, median 16 (n = 18; 13 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.00147
class a, window 12-212, recut, a, last 200 ms: lag 65.1 +/- 38.6 ms, median 84 (n = 18; 17 positive, 1 negative, 7 at the +/-100 ms edge, 7 flat at the best lag), Wilcoxon p = 0.000297
class a, window 12-212, recut, b, whole CS-US: lag 64.8 +/- 38.0 ms, median 82 (n = 18; 17 positive, 1 negative, 6 at the +/-100 ms edge, 7 flat at the best lag), Wilcoxon p = 0.000309
class a, window 0-200, xcov, a, last 200 ms: lag 22.5 +/- 18.1 ms, median 20 (n = 14; 12 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.00222
class a, window 0-200, xcov, b, whole CS-US: lag 27.1 +/- 27.0 ms, median 20 (n = 14; 12 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.00221
class a, window 0-200, recut, a, last 200 ms: lag 74.9 +/- 29.6 ms, median 88 (n = 14; 14 positive, 0 negative, 6 at the +/-100 ms edge, 5 flat at the best lag), Wilcoxon p = 0.00088
class a, window 0-200, recut, b, whole CS-US: lag 74.6 +/- 28.6 ms, median 88 (n = 14; 14 positive, 0 negative, 5 at the +/-100 ms edge, 6 flat at the best lag), Wilcoxon p = 0.000926
class a+, window 12-212, xcov, a, last 200 ms: lag 22.8 +/- 17.5 ms, median 20 (n = 12; 11 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.000977
class a+, window 12-212, xcov, b, whole CS-US: lag 28.1 +/- 27.8 ms, median 20 (n = 12; 11 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.000977
class a+, window 12-212, recut, a, last 200 ms: lag 72.7 +/- 31.6 ms, median 90 (n = 12; 12 positive, 0 negative, 6 at the +/-100 ms edge, 4 flat at the best lag), Wilcoxon p = 0.000488
class a+, window 12-212, recut, b, whole CS-US: lag 72.5 +/- 30.5 ms, median 85 (n = 12; 12 positive, 0 negative, 5 at the +/-100 ms edge, 5 flat at the best lag), Wilcoxon p = 0.000488
class a+, window 0-200, xcov, a, last 200 ms: lag 24.4 +/- 17.4 ms, median 23 (n = 11; 10 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.00195
class a+, window 0-200, xcov, b, whole CS-US: lag 30.1 +/- 28.2 ms, median 23 (n = 11; 10 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.00195
class a+, window 0-200, recut, a, last 200 ms: lag 77.4 +/- 28.5 ms, median 100 (n = 11; 11 positive, 0 negative, 6 at the +/-100 ms edge, 4 flat at the best lag), Wilcoxon p = 0.000977
class a+, window 0-200, recut, b, whole CS-US: lag 77.1 +/- 27.4 ms, median 92 (n = 11; 11 positive, 0 negative, 5 at the +/-100 ms edge, 5 flat at the best lag), Wilcoxon p = 0.000977
class b, window 12-212, xcov, a, last 200 ms: lag 17.9 +/- 20.4 ms, median 9 (n = 21; 13 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.00147
class b, window 12-212, xcov, b, whole CS-US: lag 21.0 +/- 26.7 ms, median 9 (n = 21; 13 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.00147
class b, window 12-212, recut, a, last 200 ms: lag 54.7 +/- 44.8 ms, median 57 (n = 21; 18 positive, 3 negative, 7 at the +/-100 ms edge, 7 flat at the best lag), Wilcoxon p = 0.000395
class b, window 12-212, recut, b, whole CS-US: lag 54.4 +/- 44.5 ms, median 60 (n = 21; 18 positive, 3 negative, 6 at the +/-100 ms edge, 7 flat at the best lag), Wilcoxon p = 0.000404
class b, window 0-200, xcov, a, last 200 ms: lag 20.9 +/- 20.6 ms, median 16 (n = 18; 13 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.00147
class b, window 0-200, xcov, b, whole CS-US: lag 24.5 +/- 27.4 ms, median 16 (n = 18; 13 positive, 0 negative, 0 at the +/-100 ms edge, 0 flat at the best lag), Wilcoxon p = 0.00147
class b, window 0-200, recut, a, last 200 ms: lag 65.1 +/- 38.6 ms, median 84 (n = 18; 17 positive, 1 negative, 7 at the +/-100 ms edge, 7 flat at the best lag), Wilcoxon p = 0.000297
class b, window 0-200, recut, b, whole CS-US: lag 64.8 +/- 38.0 ms, median 82 (n = 18; 17 positive, 1 negative, 6 at the +/-100 ms edge, 7 flat at the best lag), Wilcoxon p = 0.000309

Result: not reproduced. The Wilcoxon test is significant under every reading, window and estimator (p = 0.00030 to 0.0022), so the claimed absence of a lead fails. With the adopted estimator (xcov) the mean lag is 17.9 to 30.1 ms with no cell at the edge; the re-cut Pearson variant gives 54.4 to 77.4 ms.

ds2-modulation-proportion¶

In the second dataset 85% of cells showed CS-US modulation, with a facilitation to suppression ratio of 4.1 (70 to 17), against 2.6 (60 to 23) in the first.

Source: Discussion, Facilitation drives the learned response, paragraph 1. Data: dataset.

Criterion (claims file): The count of 87 is 70 plus 17 (85% of 102). Classes as in fig1ijk-modulation-classes on the second dataset. Reproduced when both counts are within tolerance under one reading.

In [33]:
for rd in READINGS:
    for win2 in WINS2 + ("0-212",):  # 0-212: variant, not a window of the claims file
        c = cls(rd, win2)[df.dset == 2]
        nf, ns = int((c == "fac").sum()), int((c == "sup").sum())
        print(f"reading {rd}, window {win2}: modulated {nf + ns} ({100 * (nf + ns) / len(c):.0f}%), facilitation {nf},"
              f" suppression {ns}, ratio {nf / max(ns, 1):.1f}; set 1 ratio {(cls(rd)[df.dset == 1] == 'fac').sum() / (cls(rd)[df.dset == 1] == 'sup').sum():.1f}")
reading a, window 12-212: modulated 88 (86%), facilitation 70, suppression 18, ratio 3.9; set 1 ratio 3.5
reading a, window 0-200: modulated 84 (82%), facilitation 70, suppression 14, ratio 5.0; set 1 ratio 3.5
reading a, window 0-212: modulated 86 (84%), facilitation 70, suppression 16, ratio 4.4; set 1 ratio 3.5
reading a+, window 12-212: modulated 81 (79%), facilitation 69, suppression 12, ratio 5.8; set 1 ratio 4.8
reading a+, window 0-200: modulated 78 (76%), facilitation 67, suppression 11, ratio 6.1; set 1 ratio 4.8
reading a+, window 0-212: modulated 80 (78%), facilitation 69, suppression 11, ratio 6.3; set 1 ratio 4.8
reading b, window 12-212: modulated 92 (90%), facilitation 71, suppression 21, ratio 3.4; set 1 ratio 2.8
reading b, window 0-200: modulated 88 (86%), facilitation 70, suppression 18, ratio 3.9; set 1 ratio 2.8
reading b, window 0-212: modulated 91 (89%), facilitation 71, suppression 20, ratio 3.5; set 1 ratio 2.8

Result: reproduced. Under reading (a) with the 12-212 ms window, 88 of 102 cells (86%) are modulated, 70 facilitating and 18 suppressing, both counts within tolerance. The other readings and the 0-200 ms window give 78 to 92 modulated and 11 to 21 suppression cells. The variant window 0-212 ms gives 86 modulated and 16 suppression cells under reading (a).

fig3-optogenetic-inhibition-abolishes-crs¶

Optogenetic stimulation of Purkinje cell terminals over the IpN during the CS-US interval disabled conditioned eyelid responses in virtually all stimulated trials in each of three trained L7cre-Ai27 mice (all p < 0.0001).

Source: Results, Optogenetic inhibition of IpN eliminates CRs, paragraph 1; Figure 3B,C. Data: dataset.

Criterion (claims file): Per mouse, eyelid closure at US onset in the 10 stimulated against the 40 unstimulated trials of its 50-trial session (Methods, Optogenetics), Mann-Whitney U. Reproduced when all three mice give p < 0.05 with lower closure in stimulated trials.

In [34]:
print("subjects in the data set:", df.mouse.nunique(), "mice, all with IpN unit recordings; no field marks stimulated trials,",
      "and the description lists only paired-trial recordings of IpN neurons")
subjects in the data set: 24 mice, all with IpN unit recordings; no field marks stimulated trials, and the description lists only paired-trial recordings of IpN neurons

Result: blocked, data missing. The optogenetic sessions of the three L7cre-Ai27 mice are not in the data set.

In [35]:
# CS transients: the four readings of the threshold (claims file), the two windows (Methods 50-125 ms,
# Results overview 50-130 ms), and where the rebound is looked for (within the window, or up to 50 ms after
# the trough, "+50"); see ipn.CS_WINDOWS.
CSREAD = [f"{a}/{b}" for a in ("mean", "drop") for b in ("trough", "mean")]


CSWIN = list(ipn.CS_WINDOWS)  # "125", "130", "125+50", "130+50": window end, and rebound within 50 ms after the trough


def cs_col(kind, rd, end="125"):
    return df[f"cs{kind}_{rd}_{end}"].astype(bool)


def fisher(a, b):
    """Two-sided Fisher exact test of the 2x2 table of boolean series a (rows) and b (columns)."""
    tab = [[int((a & b).sum()), int((a & ~b).sum())], [int((~a & b).sum()), int((~a & ~b).sum())]]
    return stats.fisher_exact(tab)[1], tab

fig4b-cs-pause-ds1¶

In the first dataset seven cells showed a CS pause at 88 +/- 12 ms after the CS, five of which also showed CS-US facilitation (71.4%, against 55/263 or 21% of the other cells, p = 0.0006, Fisher's test).

Source: Results, CS-related transient spike pauses and subsequent rapid excitation in IpN neurons, paragraph 1; Figure 4B,E. Data: dataset.

Criterion (claims file): Tolerance on the count is one cell. CS pause as in the opening comment (Methods, CS-responses), the four readings of the threshold run. Reproduced when the count and latency are within tolerance and Fisher's exact test (two-sided) gives p < 0.05 with facilitation more common among CS pause cells, under one reading.

In [36]:
rows = []
for end in CSWIN:
    for rd in CSREAD:
        cp = cs_col("pause", rd, end)[df.dset == 1]
        lat = df[f"cspause_t_{rd}_{end}"][df.dset == 1][cp]
        for crd in READINGS:
            fac = (cls(crd) == "fac")[df.dset == 1]
            p, tab = fisher(cp, fac)
            rows.append({"window end": end, "threshold reading": rd, "class": crd, "CS pause cells": int(cp.sum()),
                         "latency": f"{lat.mean():.1f} +/- {lat.std():.1f}", "with fac": tab[0][0],
                         "fac among others": f"{tab[1][0]}/{tab[1][0] + tab[1][1]}", "Fisher p": fmt(p, 4)})
print(pd.DataFrame(rows).to_string(index=False))
print("expected: 7 +/- 1 cells, latency 88 +/- 8.8 ms, 5/7 vs 55/263, p = 0.0006")
window end threshold reading class  CS pause cells        latency  with fac fac among others  Fisher p
       125       mean/trough     a               4  86.5 +/- 12.1         2           78/266    0.5843
       125       mean/trough    a+               4  86.5 +/- 12.1         2           60/266    0.2269
       125       mean/trough     b               4  86.5 +/- 12.1         2           86/266    0.5984
       125         mean/mean     a               3  87.3 +/- 14.6         2           78/267    0.2104
       125         mean/mean    a+               3  87.3 +/- 14.6         2           60/267    0.1329
       125         mean/mean     b               3  87.3 +/- 14.6         2           86/267    0.2486
       125       drop/trough     a              23  91.5 +/- 13.7         8           72/247    0.6342
       125       drop/trough    a+              23  91.5 +/- 13.7         7           55/247    0.4359
       125       drop/trough     b              23  91.5 +/- 13.7         8           80/247    0.8188
       125         drop/mean     a               9  84.6 +/- 11.3         8           72/261    0.0003
       125         drop/mean    a+               9  84.6 +/- 11.3         7           55/261    0.0006
       125         drop/mean     b               9  84.6 +/- 11.3         8           80/261    0.0007
       130       mean/trough     a               4  86.5 +/- 12.1         2           78/266    0.5843
       130       mean/trough    a+               4  86.5 +/- 12.1         2           60/266    0.2269
       130       mean/trough     b               4  86.5 +/- 12.1         2           86/266    0.5984
       130         mean/mean     a               3  87.3 +/- 14.6         2           78/267    0.2104
       130         mean/mean    a+               3  87.3 +/- 14.6         2           60/267    0.1329
       130         mean/mean     b               3  87.3 +/- 14.6         2           86/267    0.2486
       130       drop/trough     a              23  92.8 +/- 14.8         8           72/247    0.6342
       130       drop/trough    a+              23  92.8 +/- 14.8         7           55/247    0.4359
       130       drop/trough     b              23  92.8 +/- 14.8         8           80/247    0.8188
       130         drop/mean     a              11  82.7 +/- 11.9         8           72/259    0.0033
       130         drop/mean    a+              11  82.7 +/- 11.9         7           55/259    0.0038
       130         drop/mean     b              11  82.7 +/- 11.9         8           80/259    0.0065
    125+50       mean/trough     a               6  98.7 +/- 21.1         2           78/264    1.0000
    125+50       mean/trough    a+               6  98.7 +/- 21.1         2           60/264    0.6233
    125+50       mean/trough     b               6  98.7 +/- 21.1         2           86/264    1.0000
    125+50         mean/mean     a               3  87.3 +/- 14.6         2           78/267    0.2104
    125+50         mean/mean    a+               3  87.3 +/- 14.6         2           60/267    0.1329
    125+50         mean/mean     b               3  87.3 +/- 14.6         2           86/267    0.2486
    125+50       drop/trough     a              29  97.4 +/- 17.1         9           71/241    0.8326
    125+50       drop/trough    a+              29  97.4 +/- 17.1         7           55/241    0.8190
    125+50       drop/trough     b              29  97.4 +/- 17.1         9           79/241    1.0000
    125+50         drop/mean     a              13  90.8 +/- 16.1         9           71/257    0.0029
    125+50         drop/mean    a+              13  90.8 +/- 16.1         7           55/257    0.0131
    125+50         drop/mean     b              13  90.8 +/- 16.1         9           79/257    0.0114
    130+50       mean/trough     a               9 109.7 +/- 23.4         2           78/261    1.0000
    130+50       mean/trough    a+               9 109.7 +/- 23.4         2           60/261    1.0000
    130+50       mean/trough     b               9 109.7 +/- 23.4         2           86/261    0.7225
    130+50         mean/mean     a               3  87.3 +/- 14.6         2           78/267    0.2104
    130+50         mean/mean    a+               3  87.3 +/- 14.6         2           60/267    0.1329
    130+50         mean/mean     b               3  87.3 +/- 14.6         2           86/267    0.2486
    130+50       drop/trough     a              37 106.2 +/- 21.0         9           71/233    0.5620
    130+50       drop/trough    a+              37 106.2 +/- 21.0         7           55/233    0.6748
    130+50       drop/trough     b              37 106.2 +/- 21.0         9           79/233    0.3450
    130+50         drop/mean     a              14  93.6 +/- 18.7         9           71/256    0.0062
    130+50         drop/mean    a+              14  93.6 +/- 18.7         7           55/256    0.0214
    130+50         drop/mean     b              14  93.6 +/- 18.7         9           79/256    0.0161
expected: 7 +/- 1 cells, latency 88 +/- 8.8 ms, 5/7 vs 55/263, p = 0.0006

Result: partially reproduced. No reading of the claims file, with the rebound within the window, gives 6 to 8 CS pause cells. Under the drop/mean reading, 9 cells (50-125 ms) have a CS pause at 84.6 +/- 11.3 ms, 8 of them with facilitation (Fisher p = 0.0003 to 0.0007), so the association holds with one cell more than the tolerance. The mean/trough and mean/mean readings give 4 and 3 cells without a significant association, and drop/trough gives 23. With the rebound looked for up to 50 ms after the trough, mean/trough gives 6 cells (within tolerance) but at 98.7 ms, outside 88 +/- 8.8 ms, with 2 of them facilitating (Fisher p = 0.62 to 1).

fig4c-cs-pause-ds2¶

In the second dataset 41 of 102 cells showed CS pauses, and these were more likely to show CS-US facilitation than cells without (39/41 against 31/61, p < 0.0001, Fisher's test).

Source: Results, CS-related transient spike pauses and subsequent rapid excitation in IpN neurons, paragraph 2; Figure 4C,F. Data: dataset.

Criterion (claims file): As in fig4b-cs-pause-ds1, on the second dataset.

In [37]:
rows = []
for end in CSWIN:
    for rd in CSREAD:
        cp = cs_col("pause", rd, end)[df.dset == 2]
        lat = df[f"cspause_t_{rd}_{end}"][df.dset == 2][cp]
        for crd, win2 in [(c_, w) for c_ in READINGS for w in WINS2]:
            fac = (cls(crd, win2) == "fac")[df.dset == 2]
            p, tab = fisher(cp, fac)
            rows.append({"window end": end, "threshold reading": rd, "class": crd, "class window": win2, "CS pause cells": int(cp.sum()),
                         "latency": f"{lat.mean():.1f} +/- {lat.std():.1f}", "with fac": tab[0][0],
                         "fac among others": f"{tab[1][0]}/{tab[1][0] + tab[1][1]}", "Fisher p": p})
print(pd.DataFrame(rows).to_string(index=False))
print("expected: 41 +/- 4.1 cells, 39 +/- 3.9 with facilitation, 31/61 others, p < 0.0001")
window end threshold reading class class window  CS pause cells       latency  with fac fac among others     Fisher p
       125       mean/trough     a       12-212              37 78.1 +/- 13.2        32            38/65 3.771281e-03
       125       mean/trough     a        0-200              37 78.1 +/- 13.2        32            38/65 3.771281e-03
       125       mean/trough    a+       12-212              37 78.1 +/- 13.2        32            37/65 2.118491e-03
       125       mean/trough    a+        0-200              37 78.1 +/- 13.2        31            36/65 4.571129e-03
       125       mean/trough     b       12-212              37 78.1 +/- 13.2        32            39/65 6.749996e-03
       125       mean/trough     b        0-200              37 78.1 +/- 13.2        32            38/65 3.771281e-03
       125         mean/mean     a       12-212              33  75.0 +/- 9.8        32            38/69 6.814988e-06
       125         mean/mean     a        0-200              33  75.0 +/- 9.8        32            38/69 6.814988e-06
       125         mean/mean    a+       12-212              33  75.0 +/- 9.8        32            37/69 3.089396e-06
       125         mean/mean    a+        0-200              33  75.0 +/- 9.8        31            36/69 1.499318e-05
       125         mean/mean     b       12-212              33  75.0 +/- 9.8        32            39/69 8.844361e-06
       125         mean/mean     b        0-200              33  75.0 +/- 9.8        32            38/69 6.814988e-06
       125       drop/trough     a       12-212              52 78.3 +/- 12.3        44            26/50 5.503004e-04
       125       drop/trough     a        0-200              52 78.3 +/- 12.3        44            26/50 5.503004e-04
       125       drop/trough    a+       12-212              52 78.3 +/- 12.3        44            25/50 2.657525e-04
       125       drop/trough    a+        0-200              52 78.3 +/- 12.3        43            24/50 3.320296e-04
       125       drop/trough     b       12-212              52 78.3 +/- 12.3        44            27/50 1.104422e-03
       125       drop/trough     b        0-200              52 78.3 +/- 12.3        44            26/50 5.503004e-04
       125         drop/mean     a       12-212              47 76.0 +/- 10.0        44            26/55 3.201390e-07
       125         drop/mean     a        0-200              47 76.0 +/- 10.0        44            26/55 3.201390e-07
       125         drop/mean    a+       12-212              47 76.0 +/- 10.0        44            25/55 1.216408e-07
       125         drop/mean    a+        0-200              47 76.0 +/- 10.0        43            24/55 2.422788e-07
       125         drop/mean     b       12-212              47 76.0 +/- 10.0        44            27/55 8.233354e-07
       125         drop/mean     b        0-200              47 76.0 +/- 10.0        44            26/55 3.201390e-07
       130       mean/trough     a       12-212              37 78.1 +/- 13.2        32            38/65 3.771281e-03
       130       mean/trough     a        0-200              37 78.1 +/- 13.2        32            38/65 3.771281e-03
       130       mean/trough    a+       12-212              37 78.1 +/- 13.2        32            37/65 2.118491e-03
       130       mean/trough    a+        0-200              37 78.1 +/- 13.2        31            36/65 4.571129e-03
       130       mean/trough     b       12-212              37 78.1 +/- 13.2        32            39/65 6.749996e-03
       130       mean/trough     b        0-200              37 78.1 +/- 13.2        32            38/65 3.771281e-03
       130         mean/mean     a       12-212              33  75.0 +/- 9.8        32            38/69 6.814988e-06
       130         mean/mean     a        0-200              33  75.0 +/- 9.8        32            38/69 6.814988e-06
       130         mean/mean    a+       12-212              33  75.0 +/- 9.8        32            37/69 3.089396e-06
       130         mean/mean    a+        0-200              33  75.0 +/- 9.8        31            36/69 1.499318e-05
       130         mean/mean     b       12-212              33  75.0 +/- 9.8        32            39/69 8.844361e-06
       130         mean/mean     b        0-200              33  75.0 +/- 9.8        32            38/69 6.814988e-06
       130       drop/trough     a       12-212              51 78.2 +/- 12.4        44            26/51 2.213852e-04
       130       drop/trough     a        0-200              51 78.2 +/- 12.4        44            26/51 2.213852e-04
       130       drop/trough    a+       12-212              51 78.2 +/- 12.4        44            25/51 1.030724e-04
       130       drop/trough    a+        0-200              51 78.2 +/- 12.4        43            24/51 1.349012e-04
       130       drop/trough     b       12-212              51 78.2 +/- 12.4        44            27/51 4.610234e-04
       130       drop/trough     b        0-200              51 78.2 +/- 12.4        44            26/51 2.213852e-04
       130         drop/mean     a       12-212              47 76.0 +/- 10.0        44            26/55 3.201390e-07
       130         drop/mean     a        0-200              47 76.0 +/- 10.0        44            26/55 3.201390e-07
       130         drop/mean    a+       12-212              47 76.0 +/- 10.0        44            25/55 1.216408e-07
       130         drop/mean    a+        0-200              47 76.0 +/- 10.0        43            24/55 2.422788e-07
       130         drop/mean     b       12-212              47 76.0 +/- 10.0        44            27/55 8.233354e-07
       130         drop/mean     b        0-200              47 76.0 +/- 10.0        44            26/55 3.201390e-07
    125+50       mean/trough     a       12-212              37 78.1 +/- 13.2        32            38/65 3.771281e-03
    125+50       mean/trough     a        0-200              37 78.1 +/- 13.2        32            38/65 3.771281e-03
    125+50       mean/trough    a+       12-212              37 78.1 +/- 13.2        32            37/65 2.118491e-03
    125+50       mean/trough    a+        0-200              37 78.1 +/- 13.2        31            36/65 4.571129e-03
    125+50       mean/trough     b       12-212              37 78.1 +/- 13.2        32            39/65 6.749996e-03
    125+50       mean/trough     b        0-200              37 78.1 +/- 13.2        32            38/65 3.771281e-03
    125+50         mean/mean     a       12-212              33  75.0 +/- 9.8        32            38/69 6.814988e-06
    125+50         mean/mean     a        0-200              33  75.0 +/- 9.8        32            38/69 6.814988e-06
    125+50         mean/mean    a+       12-212              33  75.0 +/- 9.8        32            37/69 3.089396e-06
    125+50         mean/mean    a+        0-200              33  75.0 +/- 9.8        31            36/69 1.499318e-05
    125+50         mean/mean     b       12-212              33  75.0 +/- 9.8        32            39/69 8.844361e-06
    125+50         mean/mean     b        0-200              33  75.0 +/- 9.8        32            38/69 6.814988e-06
    125+50       drop/trough     a       12-212              52 78.3 +/- 12.3        44            26/50 5.503004e-04
    125+50       drop/trough     a        0-200              52 78.3 +/- 12.3        44            26/50 5.503004e-04
    125+50       drop/trough    a+       12-212              52 78.3 +/- 12.3        44            25/50 2.657525e-04
    125+50       drop/trough    a+        0-200              52 78.3 +/- 12.3        43            24/50 3.320296e-04
    125+50       drop/trough     b       12-212              52 78.3 +/- 12.3        44            27/50 1.104422e-03
    125+50       drop/trough     b        0-200              52 78.3 +/- 12.3        44            26/50 5.503004e-04
    125+50         drop/mean     a       12-212              47 76.0 +/- 10.0        44            26/55 3.201390e-07
    125+50         drop/mean     a        0-200              47 76.0 +/- 10.0        44            26/55 3.201390e-07
    125+50         drop/mean    a+       12-212              47 76.0 +/- 10.0        44            25/55 1.216408e-07
    125+50         drop/mean    a+        0-200              47 76.0 +/- 10.0        43            24/55 2.422788e-07
    125+50         drop/mean     b       12-212              47 76.0 +/- 10.0        44            27/55 8.233354e-07
    125+50         drop/mean     b        0-200              47 76.0 +/- 10.0        44            26/55 3.201390e-07
    130+50       mean/trough     a       12-212              40 82.0 +/- 18.8        32            38/62 5.244724e-02
    130+50       mean/trough     a        0-200              40 82.0 +/- 18.8        32            38/62 5.244724e-02
    130+50       mean/trough    a+       12-212              40 82.0 +/- 18.8        32            37/62 5.016411e-02
    130+50       mean/trough    a+        0-200              40 82.0 +/- 18.8        31            36/62 5.526991e-02
    130+50       mean/trough     b       12-212              40 82.0 +/- 18.8        32            39/62 8.018157e-02
    130+50       mean/trough     b        0-200              40 82.0 +/- 18.8        32            38/62 5.244724e-02
    130+50         mean/mean     a       12-212              33  75.0 +/- 9.8        32            38/69 6.814988e-06
    130+50         mean/mean     a        0-200              33  75.0 +/- 9.8        32            38/69 6.814988e-06
    130+50         mean/mean    a+       12-212              33  75.0 +/- 9.8        32            37/69 3.089396e-06
    130+50         mean/mean    a+        0-200              33  75.0 +/- 9.8        31            36/69 1.499318e-05
    130+50         mean/mean     b       12-212              33  75.0 +/- 9.8        32            39/69 8.844361e-06
    130+50         mean/mean     b        0-200              33  75.0 +/- 9.8        32            38/69 6.814988e-06
    130+50       drop/trough     a       12-212              56 82.8 +/- 19.0        44            26/46 1.976921e-02
    130+50       drop/trough     a        0-200              56 82.8 +/- 19.0        44            26/46 1.976921e-02
    130+50       drop/trough    a+       12-212              56 82.8 +/- 19.0        44            25/46 1.129381e-02
    130+50       drop/trough    a+        0-200              56 82.8 +/- 19.0        43            24/46 1.204098e-02
    130+50       drop/trough     b       12-212              56 82.8 +/- 19.0        44            27/46 3.344292e-02
    130+50       drop/trough     b        0-200              56 82.8 +/- 19.0        44            26/46 1.976921e-02
    130+50         drop/mean     a       12-212              47 76.0 +/- 10.0        44            26/55 3.201390e-07
    130+50         drop/mean     a        0-200              47 76.0 +/- 10.0        44            26/55 3.201390e-07
    130+50         drop/mean    a+       12-212              47 76.0 +/- 10.0        44            25/55 1.216408e-07
    130+50         drop/mean    a+        0-200              47 76.0 +/- 10.0        43            24/55 2.422788e-07
    130+50         drop/mean     b       12-212              47 76.0 +/- 10.0        44            27/55 8.233354e-07
    130+50         drop/mean     b        0-200              47 76.0 +/- 10.0        44            26/55 3.201390e-07
expected: 41 +/- 4.1 cells, 39 +/- 3.9 with facilitation, 31/61 others, p < 0.0001

Result: partially reproduced. CS pause cells are more often facilitating under every reading (Fisher p = 1.2e-07 to 0.034) except mean/trough with the 50-130 ms window and the 50 ms rebound (p = 0.050 to 0.080). Under the mean/trough readings the count (37 or 40) is within 41 +/- 4.1, but only 31 or 32 of them facilitate, below 39 +/- 3.9; the drop readings give 43 or 44 facilitating cells among 47 to 56 pause cells, above the count's tolerance. The class window (12-212 or 0-200 ms) changes the facilitating count by at most one cell.

fig4g-cs-pause-latency-cr-latency¶

Across cells, CS pause latency correlated with CR latency, in both datasets combined (n = 45, r = 0.582, p < 0.0001) and in the second dataset alone (n = 41, r = 0.403, p = 0.0089).

Source: Results, CS-related transient spike pauses and subsequent rapid excitation in IpN neurons, paragraph 2; Figure 4G. Data: dataset.

Criterion (claims file): Pause latency is the time of the trough of the cell's average trace. CR latency is, per the Figure 4G legend, the latency at which the CR passes 5% eyelid closure (reading a, on the average eyelid trace; reading b, the mean of trial values over CR trials); the Methods' CR onset (start of continuous positive velocity) is reading c. The 45 cells are those with both a CS pause and CRs. Reproduced when both correlations are positive at p < 0.05 under one reading, and the r values are reported against tolerance.

In [38]:
for end in CSWIN:
    for rd in CSREAD:
        cp = cs_col("pause", rd, end)
        lat = df[f"cspause_t_{rd}_{end}"]
        for crl in ("crlat_a", "crlat_b", "crlat_c"):
            ok = cp & df[crl].notna() & df.behav
            ok2 = ok & (df.dset == 2)
            r_all = stats.pearsonr(lat[ok], df[crl][ok]) if ok.sum() > 2 else (np.nan, np.nan)
            r_2 = stats.pearsonr(lat[ok2], df[crl][ok2]) if ok2.sum() > 2 else (np.nan, np.nan)
            print(f"window {end}, threshold {rd}, CR latency {crl[-1]}: both sets n = {int(ok.sum())}, r = {r_all[0]:.3f}, p = {r_all[1]:.3g};"
                  f" set 2 n = {int(ok2.sum())}, r = {r_2[0]:.3f}, p = {r_2[1]:.3g}")
window 125, threshold mean/trough, CR latency a: both sets n = 37, r = 0.239, p = 0.154; set 2 n = 36, r = 0.083, p = 0.632
window 125, threshold mean/trough, CR latency b: both sets n = 39, r = 0.385, p = 0.0155; set 2 n = 37, r = 0.347, p = 0.0354
window 125, threshold mean/trough, CR latency c: both sets n = 37, r = 0.296, p = 0.075; set 2 n = 36, r = 0.134, p = 0.435
window 125, threshold mean/mean, CR latency a: both sets n = 34, r = 0.385, p = 0.0246; set 2 n = 33, r = 0.205, p = 0.252
window 125, threshold mean/mean, CR latency b: both sets n = 35, r = 0.411, p = 0.0142; set 2 n = 33, r = 0.311, p = 0.0785
window 125, threshold mean/mean, CR latency c: both sets n = 34, r = 0.419, p = 0.0136; set 2 n = 33, r = 0.227, p = 0.204
window 125, threshold drop/trough, CR latency a: both sets n = 62, r = 0.470, p = 0.000116; set 2 n = 51, r = 0.223, p = 0.116
window 125, threshold drop/trough, CR latency b: both sets n = 66, r = 0.560, p = 1.02e-06; set 2 n = 52, r = 0.389, p = 0.00434
window 125, threshold drop/trough, CR latency c: both sets n = 62, r = 0.499, p = 3.71e-05; set 2 n = 51, r = 0.283, p = 0.0438
window 125, threshold drop/mean, CR latency a: both sets n = 53, r = 0.431, p = 0.00127; set 2 n = 47, r = 0.330, p = 0.0235
window 125, threshold drop/mean, CR latency b: both sets n = 54, r = 0.459, p = 0.000475; set 2 n = 47, r = 0.386, p = 0.00732
window 125, threshold drop/mean, CR latency c: both sets n = 53, r = 0.486, p = 0.000228; set 2 n = 47, r = 0.360, p = 0.013
window 130, threshold mean/trough, CR latency a: both sets n = 37, r = 0.239, p = 0.154; set 2 n = 36, r = 0.083, p = 0.632
window 130, threshold mean/trough, CR latency b: both sets n = 39, r = 0.385, p = 0.0155; set 2 n = 37, r = 0.347, p = 0.0354
window 130, threshold mean/trough, CR latency c: both sets n = 37, r = 0.296, p = 0.075; set 2 n = 36, r = 0.134, p = 0.435
window 130, threshold mean/mean, CR latency a: both sets n = 34, r = 0.385, p = 0.0246; set 2 n = 33, r = 0.205, p = 0.252
window 130, threshold mean/mean, CR latency b: both sets n = 35, r = 0.411, p = 0.0142; set 2 n = 33, r = 0.311, p = 0.0785
window 130, threshold mean/mean, CR latency c: both sets n = 34, r = 0.419, p = 0.0136; set 2 n = 33, r = 0.227, p = 0.204
window 130, threshold drop/trough, CR latency a: both sets n = 60, r = 0.469, p = 0.000157; set 2 n = 50, r = 0.231, p = 0.106
window 130, threshold drop/trough, CR latency b: both sets n = 64, r = 0.562, p = 1.38e-06; set 2 n = 51, r = 0.398, p = 0.00385
window 130, threshold drop/trough, CR latency c: both sets n = 60, r = 0.496, p = 5.52e-05; set 2 n = 50, r = 0.287, p = 0.0431
window 130, threshold drop/mean, CR latency a: both sets n = 53, r = 0.431, p = 0.00127; set 2 n = 47, r = 0.330, p = 0.0235
window 130, threshold drop/mean, CR latency b: both sets n = 54, r = 0.459, p = 0.000475; set 2 n = 47, r = 0.386, p = 0.00732
window 130, threshold drop/mean, CR latency c: both sets n = 53, r = 0.486, p = 0.000228; set 2 n = 47, r = 0.360, p = 0.013
window 125+50, threshold mean/trough, CR latency a: both sets n = 39, r = 0.464, p = 0.00295; set 2 n = 36, r = 0.083, p = 0.632
window 125+50, threshold mean/trough, CR latency b: both sets n = 41, r = 0.447, p = 0.00338; set 2 n = 37, r = 0.347, p = 0.0354
window 125+50, threshold mean/trough, CR latency c: both sets n = 39, r = 0.232, p = 0.155; set 2 n = 36, r = 0.134, p = 0.435
window 125+50, threshold mean/mean, CR latency a: both sets n = 34, r = 0.385, p = 0.0246; set 2 n = 33, r = 0.205, p = 0.252
window 125+50, threshold mean/mean, CR latency b: both sets n = 35, r = 0.411, p = 0.0142; set 2 n = 33, r = 0.311, p = 0.0785
window 125+50, threshold mean/mean, CR latency c: both sets n = 34, r = 0.419, p = 0.0136; set 2 n = 33, r = 0.227, p = 0.204
window 125+50, threshold drop/trough, CR latency a: both sets n = 66, r = 0.549, p = 1.84e-06; set 2 n = 51, r = 0.223, p = 0.116
window 125+50, threshold drop/trough, CR latency b: both sets n = 70, r = 0.571, p = 2.43e-07; set 2 n = 52, r = 0.389, p = 0.00434
window 125+50, threshold drop/trough, CR latency c: both sets n = 66, r = 0.523, p = 6.67e-06; set 2 n = 51, r = 0.283, p = 0.0438
window 125+50, threshold drop/mean, CR latency a: both sets n = 53, r = 0.431, p = 0.00127; set 2 n = 47, r = 0.330, p = 0.0235
window 125+50, threshold drop/mean, CR latency b: both sets n = 54, r = 0.459, p = 0.000475; set 2 n = 47, r = 0.386, p = 0.00732
window 125+50, threshold drop/mean, CR latency c: both sets n = 53, r = 0.486, p = 0.000228; set 2 n = 47, r = 0.360, p = 0.013
window 130+50, threshold mean/trough, CR latency a: both sets n = 43, r = 0.342, p = 0.0247; set 2 n = 39, r = -0.003, p = 0.986
window 130+50, threshold mean/trough, CR latency b: both sets n = 45, r = 0.336, p = 0.0239; set 2 n = 40, r = 0.174, p = 0.282
window 130+50, threshold mean/trough, CR latency c: both sets n = 43, r = 0.180, p = 0.249; set 2 n = 39, r = -0.005, p = 0.975
window 130+50, threshold mean/mean, CR latency a: both sets n = 34, r = 0.385, p = 0.0246; set 2 n = 33, r = 0.205, p = 0.252
window 130+50, threshold mean/mean, CR latency b: both sets n = 35, r = 0.411, p = 0.0142; set 2 n = 33, r = 0.311, p = 0.0785
window 130+50, threshold mean/mean, CR latency c: both sets n = 34, r = 0.419, p = 0.0136; set 2 n = 33, r = 0.227, p = 0.204
window 130+50, threshold drop/trough, CR latency a: both sets n = 70, r = 0.371, p = 0.00158; set 2 n = 55, r = 0.046, p = 0.738
window 130+50, threshold drop/trough, CR latency b: both sets n = 75, r = 0.398, p = 0.000406; set 2 n = 56, r = 0.157, p = 0.249
window 130+50, threshold drop/trough, CR latency c: both sets n = 70, r = 0.373, p = 0.00148; set 2 n = 55, r = 0.128, p = 0.35
window 130+50, threshold drop/mean, CR latency a: both sets n = 53, r = 0.431, p = 0.00127; set 2 n = 47, r = 0.330, p = 0.0235
window 130+50, threshold drop/mean, CR latency b: both sets n = 54, r = 0.459, p = 0.000475; set 2 n = 47, r = 0.386, p = 0.00732
window 130+50, threshold drop/mean, CR latency c: both sets n = 53, r = 0.486, p = 0.000228; set 2 n = 47, r = 0.360, p = 0.013

Result: reproduced. Under the mean/trough threshold with CR latency reading (b), both correlations are positive and significant (both datasets r = 0.385, p = 0.016, n = 39; second dataset r = 0.347, p = 0.035, n = 37), and the drop readings give stronger ones (both datasets up to r = 0.571). The r values are below the paper's 0.582 and 0.403 except under drop/trough with reading (b) (0.560 and 0.389, within tolerance). With CR latency reading (a), the mean/trough threshold gives no significant correlation.

fig4s1-cs-peak-cells¶

Four first-dataset cells showed a transient increase in firing at the CS pause latency; two of them showed CS-US suppression (50%, against 21/266 or 7.9% of other cells, p = 0.0021, Fisher's test); no such cell was seen in the second dataset.

Source: Results, CS-related transient spike pauses and subsequent rapid excitation in IpN neurons, paragraph 3; Figure 4-figure supplement 1A,B. Data: dataset.

Criterion (claims file): Tolerance on the first-dataset count is one cell; the second-dataset count is the paper's "not observed in any", so it carries none. CS peak as in the Methods (CS-responses), the four readings of the threshold run. Reproduced when the counts are within tolerance and Fisher's exact test gives p < 0.05 with suppression more common among CS peak cells, under one reading.

In [39]:
rows = []
for end in CSWIN:
    for rd in CSREAD:
        pk1, pk2 = cs_col("peak", rd, end)[df.dset == 1], cs_col("peak", rd, end)[df.dset == 2]
        for crd in READINGS:
            sup = (cls(crd) == "sup")[df.dset == 1]
            p, tab = fisher(pk1, sup)
            rows.append({"window end": end, "threshold reading": rd, "class": crd, "CS peak set 1": int(pk1.sum()),
                         "CS peak set 2": int(pk2.sum()), "with sup": tab[0][0],
                         "sup among others": f"{tab[1][0]}/{tab[1][0] + tab[1][1]}", "Fisher p": fmt(p, 4)})
print(pd.DataFrame(rows).to_string(index=False))
print("expected: 4 +/- 1 cells in set 1, 0 in set 2, 2/4 vs 21/266, p = 0.0021")
window end threshold reading class  CS peak set 1  CS peak set 2  with sup sup among others  Fisher p
       125       mean/trough     a             17             30         2           21/253    0.6452
       125       mean/trough    a+             17             30         1           12/253    0.5791
       125       mean/trough     b             17             30         2           29/253    1.0000
       125         mean/mean     a              2              0         1           22/268    0.1634
       125         mean/mean    a+              2              0         1           12/268    0.0941
       125         mean/mean     b              2              0         1           30/268    0.2168
       125       drop/trough     a             31             32         5           18/239    0.1597
       125       drop/trough    a+             31             32         3           10/239    0.1769
       125       drop/trough     b             31             32         7           24/239    0.0648
       125         drop/mean     a              4              0         3           20/266    0.0021
       125         drop/mean    a+              4              0         3           10/266    0.0003
       125         drop/mean     b              4              0         3           28/266    0.0051
       130       mean/trough     a             21             27         2           21/249    0.6961
       130       mean/trough    a+             21             27         1           12/249    1.0000
       130       mean/trough     b             21             27         3           28/249    0.7187
       130         mean/mean     a              2              0         1           22/268    0.1634
       130         mean/mean    a+              2              0         1           12/268    0.0941
       130         mean/mean     b              2              0         1           30/268    0.2168
       130       drop/trough     a             37             27         5           18/233    0.2197
       130       drop/trough    a+             37             27         3           10/233    0.3972
       130       drop/trough     b             37             27         8           23/233    0.0501
       130         drop/mean     a              4              0         3           20/266    0.0021
       130         drop/mean    a+              4              0         3           10/266    0.0003
       130         drop/mean     b              4              0         3           28/266    0.0051
    125+50       mean/trough     a             27             51         2           21/243    1.0000
    125+50       mean/trough    a+             27             51         1           12/243    1.0000
    125+50       mean/trough     b             27             51         3           28/243    1.0000
    125+50         mean/mean     a              5              0         2           21/265    0.0594
    125+50         mean/mean    a+              5              0         1           12/265    0.2201
    125+50         mean/mean     b              5              0         3           28/265    0.0118
    125+50       drop/trough     a             50             57         5           18/220    0.7784
    125+50       drop/trough    a+             50             57         3           10/220    0.7134
    125+50       drop/trough     b             50             57         8           23/220    0.3234
    125+50         drop/mean     a              8              3         4           19/262    0.0023
    125+50         drop/mean    a+              8              3         3           10/262    0.0043
    125+50         drop/mean     b              8              3         5           26/262    0.0006
    130+50       mean/trough     a             37             49         2           21/233    0.7506
    130+50       mean/trough    a+             37             49         1           12/233    1.0000
    130+50       mean/trough     b             37             49         3           28/233    0.7805
    130+50         mean/mean     a              5              0         2           21/265    0.0594
    130+50         mean/mean    a+              5              0         1           12/265    0.2201
    130+50         mean/mean     b              5              0         3           28/265    0.0118
    130+50       drop/trough     a             59             55         5           18/211    1.0000
    130+50       drop/trough    a+             59             55         3           10/211    1.0000
    130+50       drop/trough     b             59             55         8           23/211    0.6439
    130+50         drop/mean     a              9              4         4           19/261    0.0038
    130+50         drop/mean    a+              9              4         3           10/261    0.0062
    130+50         drop/mean     b              9              4         5           26/261    0.0013
expected: 4 +/- 1 cells in set 1, 0 in set 2, 2/4 vs 21/266, p = 0.0021

Result: reproduced. Under the drop/mean reading, 4 first-dataset cells and no second-dataset cell show a CS peak, and 3 of the 4 show suppression (Fisher p = 0.0021 under class reading a, 0.0003 and 0.0051 under a+ and b). The mean/mean readings with the 50 ms rebound give 5 and 0 cells, 3 of the 5 suppressing (p = 0.0118 under class b). The other readings give 2 to 59 first-dataset cells and up to 57 second-dataset cells.

fig4s1-cs-peak-suppression-not-different¶

Suppression cells with a CS peak did not differ from other suppression cells in minimum CS-US spike rate (-33.6 +/- 15.4 against -34 +/- 9.6 Hz, p = 1), spike rate velocity (p = 0.2096) or recording depth (p = 0.7348).

Source: Figure 4-figure supplement 1C-E; Results, CS-related transient spike pauses and subsequent rapid excitation in IpN neurons, paragraph 3. Data: with_inputs.

Criterion (claims file): A claim of absence, judged on the paper's tests, Mann-Whitney U at p < 0.05, between the two CS peak cells with suppression and the other 21 suppression cells. Minimum spike rate relative to baseline in the CS-US interval; velocity as in the opening comment; recording depth from Source data 1 (opening comment). Reproduced when none of the three tests is significant; the differences are reported.

Depth from Source data 1 (see source-data-1-link).

In [40]:
for end in CSWIN:
    for rd in CSREAD:
        for crd in READINGS:
            sup = d1[(cls(crd) == "sup")[df.dset == 1]]
            pk = cs_col("peak", rd, end)[sup.index]
            a, b = sup[pk], sup[~pk]
            if len(a) == 0:
                print(f"window {end}, {rd}, class {crd}: no suppression cell with a CS peak")
                continue
            print(f"window {end}, {rd}, class {crd}: n {len(a)} vs {len(b)}; min rate {a.min_csus.mean():.1f} vs {b.min_csus.mean():.1f} Hz,"
                  f" p = {ipn.mwu(a.min_csus, b.min_csus):.3g}; velocity {a.vel_min.mean():.2f} vs {b.vel_min.mean():.2f} Hz/ms,"
                  f" p = {ipn.mwu(a.vel_min, b.vel_min):.3g}; depth {a.depth.mean():.0f} +/- {a.depth.std():.0f}"
                  f" vs {b.depth.mean():.0f} +/- {b.depth.std():.0f} um, p = {ipn.mwu(a.depth, b.depth):.3g}")
window 125, mean/trough, class a: n 2 vs 21; min rate -33.6 vs -32.8 Hz, p = 0.87; velocity -3.31 vs -2.68 Hz/ms, p = 0.332; depth 2121 +/- 269 vs 1979 +/- 360 um, p = 0.354
window 125, mean/trough, class a+: n 1 vs 12; min rate -44.7 vs -34.8 Hz, p = 0.308; velocity -4.11 vs -2.42 Hz/ms, p = 0.154; depth 1931 +/- nan vs 2056 +/- 417 um, p = 0.923
window 125, mean/trough, class b: n 2 vs 29; min rate -33.6 vs -32.1 Hz, p = 0.843; velocity -3.31 vs -2.80 Hz/ms, p = 0.387; depth 2121 +/- 269 vs 1986 +/- 353 um, p = 0.398
window 125, mean/mean, class a: n 1 vs 22; min rate -44.7 vs -32.3 Hz, p = 0.174; velocity -4.11 vs -2.68 Hz/ms, p = 0.174; depth 1931 +/- nan vs 1994 +/- 358 um, p = 1
window 125, mean/mean, class a+: n 1 vs 12; min rate -44.7 vs -34.8 Hz, p = 0.308; velocity -4.11 vs -2.42 Hz/ms, p = 0.154; depth 1931 +/- nan vs 2056 +/- 417 um, p = 0.923
window 125, mean/mean, class b: n 1 vs 30; min rate -44.7 vs -31.7 Hz, p = 0.194; velocity -4.11 vs -2.79 Hz/ms, p = 0.129; depth 1931 +/- nan vs 1996 +/- 352 um, p = 1
window 125, drop/trough, class a: n 5 vs 18; min rate -32.7 vs -32.9 Hz, p = 0.971; velocity -3.28 vs -2.59 Hz/ms, p = 0.325; depth 2092 +/- 350 vs 1964 +/- 355 um, p = 0.314
window 125, drop/trough, class a+: n 3 vs 10; min rate -33.1 vs -36.3 Hz, p = 0.811; velocity -2.98 vs -2.42 Hz/ms, p = 0.692; depth 2099 +/- 438 vs 2031 +/- 412 um, p = 0.937
window 125, drop/trough, class b: n 7 vs 24; min rate -36.5 vs -30.9 Hz, p = 0.274; velocity -3.35 vs -2.69 Hz/ms, p = 0.167; depth 1950 +/- 375 vs 2007 +/- 345 um, p = 0.795
window 125, drop/mean, class a: n 3 vs 20; min rate -33.1 vs -32.8 Hz, p = 0.898; velocity -2.98 vs -2.70 Hz/ms, p = 0.83; depth 2099 +/- 438 vs 1975 +/- 346 um, p = 0.616
window 125, drop/mean, class a+: n 3 vs 10; min rate -33.1 vs -36.3 Hz, p = 0.811; velocity -2.98 vs -2.42 Hz/ms, p = 0.692; depth 2099 +/- 438 vs 2031 +/- 412 um, p = 0.937
window 125, drop/mean, class b: n 3 vs 28; min rate -33.1 vs -32.0 Hz, p = 0.777; velocity -2.98 vs -2.82 Hz/ms, p = 0.925; depth 2099 +/- 438 vs 1983 +/- 343 um, p = 0.57
window 130, mean/trough, class a: n 2 vs 21; min rate -33.6 vs -32.8 Hz, p = 0.87; velocity -3.31 vs -2.68 Hz/ms, p = 0.332; depth 2121 +/- 269 vs 1979 +/- 360 um, p = 0.354
window 130, mean/trough, class a+: n 1 vs 12; min rate -44.7 vs -34.8 Hz, p = 0.308; velocity -4.11 vs -2.42 Hz/ms, p = 0.154; depth 1931 +/- nan vs 2056 +/- 417 um, p = 0.923
window 130, mean/trough, class b: n 3 vs 28; min rate -29.9 vs -32.4 Hz, p = 0.635; velocity -3.13 vs -2.81 Hz/ms, p = 0.422; depth 2028 +/- 249 vs 1991 +/- 359 um, p = 0.57
window 130, mean/mean, class a: n 1 vs 22; min rate -44.7 vs -32.3 Hz, p = 0.174; velocity -4.11 vs -2.68 Hz/ms, p = 0.174; depth 1931 +/- nan vs 1994 +/- 358 um, p = 1
window 130, mean/mean, class a+: n 1 vs 12; min rate -44.7 vs -34.8 Hz, p = 0.308; velocity -4.11 vs -2.42 Hz/ms, p = 0.154; depth 1931 +/- nan vs 2056 +/- 417 um, p = 0.923
window 130, mean/mean, class b: n 1 vs 30; min rate -44.7 vs -31.7 Hz, p = 0.194; velocity -4.11 vs -2.79 Hz/ms, p = 0.129; depth 1931 +/- nan vs 1996 +/- 352 um, p = 1
window 130, drop/trough, class a: n 5 vs 18; min rate -32.7 vs -32.9 Hz, p = 0.971; velocity -3.28 vs -2.59 Hz/ms, p = 0.325; depth 2092 +/- 350 vs 1964 +/- 355 um, p = 0.314
window 130, drop/trough, class a+: n 3 vs 10; min rate -33.1 vs -36.3 Hz, p = 0.811; velocity -2.98 vs -2.42 Hz/ms, p = 0.692; depth 2099 +/- 438 vs 2031 +/- 412 um, p = 0.937
window 130, drop/trough, class b: n 8 vs 23; min rate -34.8 vs -31.2 Hz, p = 0.58; velocity -3.27 vs -2.69 Hz/ms, p = 0.172; depth 1937 +/- 350 vs 2014 +/- 351 um, p = 0.735
window 130, drop/mean, class a: n 3 vs 20; min rate -33.1 vs -32.8 Hz, p = 0.898; velocity -2.98 vs -2.70 Hz/ms, p = 0.83; depth 2099 +/- 438 vs 1975 +/- 346 um, p = 0.616
window 130, drop/mean, class a+: n 3 vs 10; min rate -33.1 vs -36.3 Hz, p = 0.811; velocity -2.98 vs -2.42 Hz/ms, p = 0.692; depth 2099 +/- 438 vs 2031 +/- 412 um, p = 0.937
window 130, drop/mean, class b: n 3 vs 28; min rate -33.1 vs -32.0 Hz, p = 0.777; velocity -2.98 vs -2.82 Hz/ms, p = 0.925; depth 2099 +/- 438 vs 1983 +/- 343 um, p = 0.57
window 125+50, mean/trough, class a: n 2 vs 21; min rate -33.6 vs -32.8 Hz, p = 0.87; velocity -3.31 vs -2.68 Hz/ms, p = 0.332; depth 2121 +/- 269 vs 1979 +/- 360 um, p = 0.354
window 125+50, mean/trough, class a+: n 1 vs 12; min rate -44.7 vs -34.8 Hz, p = 0.308; velocity -4.11 vs -2.42 Hz/ms, p = 0.154; depth 1931 +/- nan vs 2056 +/- 417 um, p = 0.923
window 125+50, mean/trough, class b: n 3 vs 28; min rate -29.9 vs -32.4 Hz, p = 0.635; velocity -3.13 vs -2.81 Hz/ms, p = 0.422; depth 2028 +/- 249 vs 1991 +/- 359 um, p = 0.57
window 125+50, mean/mean, class a: n 2 vs 21; min rate -33.6 vs -32.8 Hz, p = 0.87; velocity -3.31 vs -2.68 Hz/ms, p = 0.332; depth 2121 +/- 269 vs 1979 +/- 360 um, p = 0.354
window 125+50, mean/mean, class a+: n 1 vs 12; min rate -44.7 vs -34.8 Hz, p = 0.308; velocity -4.11 vs -2.42 Hz/ms, p = 0.154; depth 1931 +/- nan vs 2056 +/- 417 um, p = 0.923
window 125+50, mean/mean, class b: n 3 vs 28; min rate -29.9 vs -32.4 Hz, p = 0.635; velocity -3.13 vs -2.81 Hz/ms, p = 0.422; depth 2028 +/- 249 vs 1991 +/- 359 um, p = 0.57
window 125+50, drop/trough, class a: n 5 vs 18; min rate -32.7 vs -32.9 Hz, p = 0.971; velocity -3.28 vs -2.59 Hz/ms, p = 0.325; depth 2092 +/- 350 vs 1964 +/- 355 um, p = 0.314
window 125+50, drop/trough, class a+: n 3 vs 10; min rate -33.1 vs -36.3 Hz, p = 0.811; velocity -2.98 vs -2.42 Hz/ms, p = 0.692; depth 2099 +/- 438 vs 2031 +/- 412 um, p = 0.937
window 125+50, drop/trough, class b: n 8 vs 23; min rate -34.8 vs -31.2 Hz, p = 0.58; velocity -3.27 vs -2.69 Hz/ms, p = 0.172; depth 1937 +/- 350 vs 2014 +/- 351 um, p = 0.735
window 125+50, drop/mean, class a: n 4 vs 19; min rate -30.5 vs -33.4 Hz, p = 0.667; velocity -2.87 vs -2.71 Hz/ms, p = 0.845; depth 2152 +/- 373 vs 1958 +/- 346 um, p = 0.239
window 125+50, drop/mean, class a+: n 3 vs 10; min rate -33.1 vs -36.3 Hz, p = 0.811; velocity -2.98 vs -2.42 Hz/ms, p = 0.692; depth 2099 +/- 438 vs 2031 +/- 412 um, p = 0.937
window 125+50, drop/mean, class b: n 5 vs 26; min rate -28.9 vs -32.8 Hz, p = 0.417; velocity -2.84 vs -2.84 Hz/ms, p = 0.979; depth 2090 +/- 352 vs 1976 +/- 349 um, p = 0.347
window 130+50, mean/trough, class a: n 2 vs 21; min rate -33.6 vs -32.8 Hz, p = 0.87; velocity -3.31 vs -2.68 Hz/ms, p = 0.332; depth 2121 +/- 269 vs 1979 +/- 360 um, p = 0.354
window 130+50, mean/trough, class a+: n 1 vs 12; min rate -44.7 vs -34.8 Hz, p = 0.308; velocity -4.11 vs -2.42 Hz/ms, p = 0.154; depth 1931 +/- nan vs 2056 +/- 417 um, p = 0.923
window 130+50, mean/trough, class b: n 3 vs 28; min rate -29.9 vs -32.4 Hz, p = 0.635; velocity -3.13 vs -2.81 Hz/ms, p = 0.422; depth 2028 +/- 249 vs 1991 +/- 359 um, p = 0.57
window 130+50, mean/mean, class a: n 2 vs 21; min rate -33.6 vs -32.8 Hz, p = 0.87; velocity -3.31 vs -2.68 Hz/ms, p = 0.332; depth 2121 +/- 269 vs 1979 +/- 360 um, p = 0.354
window 130+50, mean/mean, class a+: n 1 vs 12; min rate -44.7 vs -34.8 Hz, p = 0.308; velocity -4.11 vs -2.42 Hz/ms, p = 0.154; depth 1931 +/- nan vs 2056 +/- 417 um, p = 0.923
window 130+50, mean/mean, class b: n 3 vs 28; min rate -29.9 vs -32.4 Hz, p = 0.635; velocity -3.13 vs -2.81 Hz/ms, p = 0.422; depth 2028 +/- 249 vs 1991 +/- 359 um, p = 0.57
window 130+50, drop/trough, class a: n 5 vs 18; min rate -32.7 vs -32.9 Hz, p = 0.971; velocity -3.28 vs -2.59 Hz/ms, p = 0.325; depth 2092 +/- 350 vs 1964 +/- 355 um, p = 0.314
window 130+50, drop/trough, class a+: n 3 vs 10; min rate -33.1 vs -36.3 Hz, p = 0.811; velocity -2.98 vs -2.42 Hz/ms, p = 0.692; depth 2099 +/- 438 vs 2031 +/- 412 um, p = 0.937
window 130+50, drop/trough, class b: n 8 vs 23; min rate -34.8 vs -31.2 Hz, p = 0.58; velocity -3.27 vs -2.69 Hz/ms, p = 0.172; depth 1937 +/- 350 vs 2014 +/- 351 um, p = 0.735
window 130+50, drop/mean, class a: n 4 vs 19; min rate -30.5 vs -33.4 Hz, p = 0.667; velocity -2.87 vs -2.71 Hz/ms, p = 0.845; depth 2152 +/- 373 vs 1958 +/- 346 um, p = 0.239
window 130+50, drop/mean, class a+: n 3 vs 10; min rate -33.1 vs -36.3 Hz, p = 0.811; velocity -2.98 vs -2.42 Hz/ms, p = 0.692; depth 2099 +/- 438 vs 2031 +/- 412 um, p = 0.937
window 130+50, drop/mean, class b: n 5 vs 26; min rate -28.9 vs -32.8 Hz, p = 0.417; velocity -2.84 vs -2.84 Hz/ms, p = 0.979; depth 2090 +/- 352 vs 1976 +/- 349 um, p = 0.347

Result: reproduced. Under every threshold reading, window and class reading, none of the three comparisons is significant: minimum rate p >= 0.174, velocity p >= 0.129, depth p >= 0.239. Under the drop/mean reading (50-125 ms) with class (a), the reading under which fig4s1-cs-peak-cells reproduces, the 3 suppression cells with a CS peak against the other 20 give -33.1 against -32.8 Hz (p = 0.898), -2.98 against -2.70 Hz/ms (p = 0.83) and 2099 +/- 438 against 1975 +/- 346 um (p = 0.616). The paper compares 2 cells against 21; here 1 to 8 suppression cells have a CS peak, depending on the reading.

fig4h-transient-responses-after-day-3¶

In the first dataset none of the 11 cells with a transient response at the CS-related complex spike latency (CS pause or CS peak) was recorded before day 4 of training (0/99 on days 1 to 3 against 11/171 later, p = 0.0058, Fisher's test).

Source: Results, CS-related transient spike pauses and subsequent rapid excitation in IpN neurons, paragraph 4; Figure 4H. Data: dataset.

Criterion (claims file): Reproduced when no CS pause or CS peak cell is recorded on days 1 to 3 and Fisher's exact test gives p < 0.05.

In [41]:
early = d1.day <= 3
print("set 1 recordings on days 1-3:", int(early.sum()), "later:", int((~early).sum()))
for end in CSWIN:
    for rd in CSREAD:
        tr = (cs_col("pause", rd, end) | cs_col("peak", rd, end))[df.dset == 1]
        p, tab = fisher(tr, early)
        print(f"window {end}, {rd}: transient cells {int(tr.sum())}; days 1-3 {tab[0][0]}/{int(early.sum())},"
              f" later {tab[0][1]}/{int((~early).sum())}, Fisher p = {p:.3g}; by day {d1[tr].day.value_counts().sort_index().to_dict()}")
set 1 recordings on days 1-3: 99 later: 171
window 125, mean/trough: transient cells 20; days 1-3 2/99, later 18/171, Fisher p = 0.0138; by day {1.0: 1, 3.0: 1, 4.0: 6, 5.0: 2, 6.0: 1, 7.5: 9}
window 125, mean/mean: transient cells 5; days 1-3 0/99, later 5/171, Fisher p = 0.162; by day {4.0: 3, 5.0: 1, 7.5: 1}
window 125, drop/trough: transient cells 49; days 1-3 13/99, later 36/171, Fisher p = 0.14; by day {1.0: 3, 2.0: 2, 3.0: 8, 4.0: 11, 5.0: 3, 6.0: 3, 7.5: 19}
window 125, drop/mean: transient cells 13; days 1-3 0/99, later 13/171, Fisher p = 0.00263; by day {4.0: 6, 5.0: 1, 7.5: 6}
window 130, mean/trough: transient cells 24; days 1-3 4/99, later 20/171, Fisher p = 0.0441; by day {1.0: 1, 2.0: 1, 3.0: 2, 4.0: 6, 5.0: 2, 6.0: 1, 7.5: 11}
window 130, mean/mean: transient cells 5; days 1-3 0/99, later 5/171, Fisher p = 0.162; by day {4.0: 3, 5.0: 1, 7.5: 1}
window 130, drop/trough: transient cells 55; days 1-3 16/99, later 39/171, Fisher p = 0.212; by day {1.0: 3, 2.0: 3, 3.0: 10, 4.0: 11, 5.0: 5, 6.0: 3, 7.5: 20}
window 130, drop/mean: transient cells 15; days 1-3 2/99, later 13/171, Fisher p = 0.0582; by day {1.0: 1, 3.0: 1, 4.0: 6, 5.0: 1, 7.5: 6}
window 125+50, mean/trough: transient cells 32; days 1-3 7/99, later 25/171, Fisher p = 0.0787; by day {1.0: 2, 2.0: 3, 3.0: 2, 4.0: 7, 5.0: 3, 6.0: 2, 7.5: 13}
window 125+50, mean/mean: transient cells 8; days 1-3 1/99, later 7/171, Fisher p = 0.265; by day {2.0: 1, 4.0: 3, 5.0: 2, 7.5: 2}
window 125+50, drop/trough: transient cells 72; days 1-3 20/99, later 52/171, Fisher p = 0.0863; by day {1.0: 4, 2.0: 5, 3.0: 11, 4.0: 13, 5.0: 8, 6.0: 4, 7.5: 27}
window 125+50, drop/mean: transient cells 20; days 1-3 5/99, later 15/171, Fisher p = 0.338; by day {1.0: 3, 2.0: 1, 3.0: 1, 4.0: 6, 5.0: 2, 7.5: 7}
window 130+50, mean/trough: transient cells 44; days 1-3 9/99, later 35/171, Fisher p = 0.0164; by day {1.0: 3, 2.0: 4, 3.0: 2, 4.0: 11, 5.0: 3, 6.0: 5, 7.5: 16}
window 130+50, mean/mean: transient cells 8; days 1-3 1/99, later 7/171, Fisher p = 0.265; by day {2.0: 1, 4.0: 3, 5.0: 2, 7.5: 2}
window 130+50, drop/trough: transient cells 86; days 1-3 27/99, later 59/171, Fisher p = 0.226; by day {1.0: 7, 2.0: 7, 3.0: 13, 4.0: 17, 5.0: 8, 6.0: 6, 7.5: 28}
window 130+50, drop/mean: transient cells 22; days 1-3 6/99, later 16/171, Fisher p = 0.489; by day {1.0: 4, 2.0: 1, 3.0: 1, 4.0: 6, 5.0: 2, 7.5: 8}

Result: reproduced, under the drop/mean reading (50-125 ms). None of the 13 cells with a CS pause or peak is recorded on days 1 to 3 (0/99 against 13/171, Fisher p = 0.0026); there are 99 first-dataset recordings on days 1 to 3. Under the other readings either 1 to 27 transient cells fall on days 1 to 3, or none do but the test is not significant (mean/mean without the 50 ms rebound, 0/99 against 5/171, p = 0.16).

fig5cd-cs-pause-faster-facilitation-ds1¶

In the first dataset, facilitation cells with a CS pause had higher CS-US increases in firing rate (41.5 +/- 33.1 against 15.2 +/- 8.9 Hz, p = 0.0013) and higher maximum spike rate velocities (4.9 +/- 1.6 against 1.4 +/- 0.5 Hz/ms, p = 0.0002) than those without.

Source: Results, CS-related transient spike pauses and subsequent rapid excitation in IpN neurons, paragraph 5; Figure 5C,D. Data: dataset.

Criterion (claims file): Groups are the 5 and 55 facilitation cells with and without a CS pause (Figure 5A,B). The Figure 5C legend says "Maximum spike rate in the CS-US interval" and the text "CR-related increases in firing rate"; neither gives the reference, so the readings are (a) the maximum of the average trace in the CS-US interval minus the baseline mean, (b) the CS-US facilitation of fig1ijk-modulation-classes. Velocity as in the opening comment, within the CS-US interval. Reproduced when both tests give p < 0.05 with CS pause cells higher; the values are reported against tolerance.

In [42]:
def fig5(ds, wins=(WIN2,)):
    sub = df[df.dset == ds]
    rows = []
    for end in CSWIN:
        for rd in CSREAD:
            for crd, win2 in [(c_, w) for c_ in READINGS for w in wins]:
                f = sub[(cls(crd, win2) == "fac")[sub.index]]
                cp = cs_col("pause", rd, end)[f.index]
                a, b = f[cp], f[~cp]
                if len(a) == 0:
                    continue
                ma, mb = mag(crd, "fac", win2)[a.index], mag(crd, "fac", win2)[b.index]
                rows.append({"window": end, "threshold": rd, "class": crd + ("" if ds == 1 else f", {win2}"), "n pause": len(a), "n other": len(b),
                             "(a) max-base pause": f"{a.max_csus.mean():.1f} +/- {a.max_csus.std():.1f}",
                             "other": f"{b.max_csus.mean():.1f} +/- {b.max_csus.std():.1f}", "p (a)": fmt(ipn.mwu(a.max_csus, b.max_csus), 4),
                             "(b) fac pause": f"{ma.mean():.1f}", "other ": f"{mb.mean():.1f}", "p (b)": fmt(ipn.mwu(ma, mb), 4),
                             "velocity pause": f"{a.vel_max.mean():.2f} +/- {a.vel_max.std():.2f}",
                             "other  ": f"{b.vel_max.mean():.2f} +/- {b.vel_max.std():.2f}", "p vel": fmt(ipn.mwu(a.vel_max, b.vel_max), 4)})
    print(pd.DataFrame(rows).to_string(index=False))


fig5(1)
window   threshold class  n pause  n other (a) max-base pause         other  p (a) (b) fac pause other   p (b) velocity pause       other    p vel
   125 mean/trough     a        2       78       83.2 +/- 4.0 53.0 +/- 32.0 0.0696          30.4   18.4 0.1070  8.89 +/- 3.78 6.04 +/- 3.77 0.2532
   125 mean/trough    a+        2       60       83.2 +/- 4.0 57.9 +/- 34.3 0.1163          27.5   19.4 0.1787  8.89 +/- 3.78 5.98 +/- 3.68 0.2538
   125 mean/trough     b        2       86       83.2 +/- 4.0 51.6 +/- 30.8 0.0575          34.4   17.7 0.0575  8.89 +/- 3.78 5.99 +/- 3.69 0.2414
   125   mean/mean     a        2       78       83.2 +/- 4.0 53.0 +/- 32.0 0.0696          30.4   18.4 0.1070  8.89 +/- 3.78 6.04 +/- 3.77 0.2532
   125   mean/mean    a+        2       60       83.2 +/- 4.0 57.9 +/- 34.3 0.1163          27.5   19.4 0.1787  8.89 +/- 3.78 5.98 +/- 3.68 0.2538
   125   mean/mean     b        2       86       83.2 +/- 4.0 51.6 +/- 30.8 0.0575          34.4   17.7 0.0575  8.89 +/- 3.78 5.99 +/- 3.69 0.2414
   125 drop/trough     a        8       72      94.4 +/- 60.5 49.2 +/- 23.9 0.0202          42.5   16.0 0.0304  8.91 +/- 4.59 5.80 +/- 3.58 0.0521
   125 drop/trough    a+        7       55     105.7 +/- 55.5 52.8 +/- 25.4 0.0028          45.0   16.4 0.0139  9.97 +/- 3.75 5.58 +/- 3.41 0.0040
   125 drop/trough     b        8       80      94.4 +/- 60.5 48.1 +/- 23.0 0.0142          44.4   15.4 0.0098  8.91 +/- 4.59 5.77 +/- 3.50 0.0462
   125   drop/mean     a        8       72      94.4 +/- 60.5 49.2 +/- 23.9 0.0202          42.5   16.0 0.0304  8.91 +/- 4.59 5.80 +/- 3.58 0.0521
   125   drop/mean    a+        7       55     105.7 +/- 55.5 52.8 +/- 25.4 0.0028          45.0   16.4 0.0139  9.97 +/- 3.75 5.58 +/- 3.41 0.0040
   125   drop/mean     b        8       80      94.4 +/- 60.5 48.1 +/- 23.0 0.0142          44.4   15.4 0.0098  8.91 +/- 4.59 5.77 +/- 3.50 0.0462
   130 mean/trough     a        2       78       83.2 +/- 4.0 53.0 +/- 32.0 0.0696          30.4   18.4 0.1070  8.89 +/- 3.78 6.04 +/- 3.77 0.2532
   130 mean/trough    a+        2       60       83.2 +/- 4.0 57.9 +/- 34.3 0.1163          27.5   19.4 0.1787  8.89 +/- 3.78 5.98 +/- 3.68 0.2538
   130 mean/trough     b        2       86       83.2 +/- 4.0 51.6 +/- 30.8 0.0575          34.4   17.7 0.0575  8.89 +/- 3.78 5.99 +/- 3.69 0.2414
   130   mean/mean     a        2       78       83.2 +/- 4.0 53.0 +/- 32.0 0.0696          30.4   18.4 0.1070  8.89 +/- 3.78 6.04 +/- 3.77 0.2532
   130   mean/mean    a+        2       60       83.2 +/- 4.0 57.9 +/- 34.3 0.1163          27.5   19.4 0.1787  8.89 +/- 3.78 5.98 +/- 3.68 0.2538
   130   mean/mean     b        2       86       83.2 +/- 4.0 51.6 +/- 30.8 0.0575          34.4   17.7 0.0575  8.89 +/- 3.78 5.99 +/- 3.69 0.2414
   130 drop/trough     a        8       72      94.4 +/- 60.5 49.2 +/- 23.9 0.0202          42.5   16.0 0.0304  8.91 +/- 4.59 5.80 +/- 3.58 0.0521
   130 drop/trough    a+        7       55     105.7 +/- 55.5 52.8 +/- 25.4 0.0028          45.0   16.4 0.0139  9.97 +/- 3.75 5.58 +/- 3.41 0.0040
   130 drop/trough     b        8       80      94.4 +/- 60.5 48.1 +/- 23.0 0.0142          44.4   15.4 0.0098  8.91 +/- 4.59 5.77 +/- 3.50 0.0462
   130   drop/mean     a        8       72      94.4 +/- 60.5 49.2 +/- 23.9 0.0202          42.5   16.0 0.0304  8.91 +/- 4.59 5.80 +/- 3.58 0.0521
   130   drop/mean    a+        7       55     105.7 +/- 55.5 52.8 +/- 25.4 0.0028          45.0   16.4 0.0139  9.97 +/- 3.75 5.58 +/- 3.41 0.0040
   130   drop/mean     b        8       80      94.4 +/- 60.5 48.1 +/- 23.0 0.0142          44.4   15.4 0.0098  8.91 +/- 4.59 5.77 +/- 3.50 0.0462
125+50 mean/trough     a        2       78       83.2 +/- 4.0 53.0 +/- 32.0 0.0696          30.4   18.4 0.1070  8.89 +/- 3.78 6.04 +/- 3.77 0.2532
125+50 mean/trough    a+        2       60       83.2 +/- 4.0 57.9 +/- 34.3 0.1163          27.5   19.4 0.1787  8.89 +/- 3.78 5.98 +/- 3.68 0.2538
125+50 mean/trough     b        2       86       83.2 +/- 4.0 51.6 +/- 30.8 0.0575          34.4   17.7 0.0575  8.89 +/- 3.78 5.99 +/- 3.69 0.2414
125+50   mean/mean     a        2       78       83.2 +/- 4.0 53.0 +/- 32.0 0.0696          30.4   18.4 0.1070  8.89 +/- 3.78 6.04 +/- 3.77 0.2532
125+50   mean/mean    a+        2       60       83.2 +/- 4.0 57.9 +/- 34.3 0.1163          27.5   19.4 0.1787  8.89 +/- 3.78 5.98 +/- 3.68 0.2538
125+50   mean/mean     b        2       86       83.2 +/- 4.0 51.6 +/- 30.8 0.0575          34.4   17.7 0.0575  8.89 +/- 3.78 5.99 +/- 3.69 0.2414
125+50 drop/trough     a        9       71      90.2 +/- 57.9 49.1 +/- 24.0 0.0168          38.6   16.2 0.0940  8.59 +/- 4.39 5.79 +/- 3.60 0.0531
125+50 drop/trough    a+        7       55     105.7 +/- 55.5 52.8 +/- 25.4 0.0028          45.0   16.4 0.0139  9.97 +/- 3.75 5.58 +/- 3.41 0.0040
125+50 drop/trough     b        9       79      90.2 +/- 57.9 48.0 +/- 23.1 0.0113          40.6   15.5 0.0239  8.59 +/- 4.39 5.77 +/- 3.52 0.0458
125+50   drop/mean     a        9       71      90.2 +/- 57.9 49.1 +/- 24.0 0.0168          38.6   16.2 0.0940  8.59 +/- 4.39 5.79 +/- 3.60 0.0531
125+50   drop/mean    a+        7       55     105.7 +/- 55.5 52.8 +/- 25.4 0.0028          45.0   16.4 0.0139  9.97 +/- 3.75 5.58 +/- 3.41 0.0040
125+50   drop/mean     b        9       79      90.2 +/- 57.9 48.0 +/- 23.1 0.0113          40.6   15.5 0.0239  8.59 +/- 4.39 5.77 +/- 3.52 0.0458
130+50 mean/trough     a        2       78       83.2 +/- 4.0 53.0 +/- 32.0 0.0696          30.4   18.4 0.1070  8.89 +/- 3.78 6.04 +/- 3.77 0.2532
130+50 mean/trough    a+        2       60       83.2 +/- 4.0 57.9 +/- 34.3 0.1163          27.5   19.4 0.1787  8.89 +/- 3.78 5.98 +/- 3.68 0.2538
130+50 mean/trough     b        2       86       83.2 +/- 4.0 51.6 +/- 30.8 0.0575          34.4   17.7 0.0575  8.89 +/- 3.78 5.99 +/- 3.69 0.2414
130+50   mean/mean     a        2       78       83.2 +/- 4.0 53.0 +/- 32.0 0.0696          30.4   18.4 0.1070  8.89 +/- 3.78 6.04 +/- 3.77 0.2532
130+50   mean/mean    a+        2       60       83.2 +/- 4.0 57.9 +/- 34.3 0.1163          27.5   19.4 0.1787  8.89 +/- 3.78 5.98 +/- 3.68 0.2538
130+50   mean/mean     b        2       86       83.2 +/- 4.0 51.6 +/- 30.8 0.0575          34.4   17.7 0.0575  8.89 +/- 3.78 5.99 +/- 3.69 0.2414
130+50 drop/trough     a        9       71      90.2 +/- 57.9 49.1 +/- 24.0 0.0168          38.6   16.2 0.0940  8.59 +/- 4.39 5.79 +/- 3.60 0.0531
130+50 drop/trough    a+        7       55     105.7 +/- 55.5 52.8 +/- 25.4 0.0028          45.0   16.4 0.0139  9.97 +/- 3.75 5.58 +/- 3.41 0.0040
130+50 drop/trough     b        9       79      90.2 +/- 57.9 48.0 +/- 23.1 0.0113          40.6   15.5 0.0239  8.59 +/- 4.39 5.77 +/- 3.52 0.0458
130+50   drop/mean     a        9       71      90.2 +/- 57.9 49.1 +/- 24.0 0.0168          38.6   16.2 0.0940  8.59 +/- 4.39 5.79 +/- 3.60 0.0531
130+50   drop/mean    a+        7       55     105.7 +/- 55.5 52.8 +/- 25.4 0.0028          45.0   16.4 0.0139  9.97 +/- 3.75 5.58 +/- 3.41 0.0040
130+50   drop/mean     b        9       79      90.2 +/- 57.9 48.0 +/- 23.1 0.0113          40.6   15.5 0.0239  8.59 +/- 4.39 5.77 +/- 3.52 0.0458

Result: reproduced, under the drop readings with class reading (b) or the variant (a+). Under class (b), with the 50-125 ms window, the 8 facilitation cells with a CS pause have a higher maximum rate than the 80 without (reading a, 94.4 against 48.1 Hz, p = 0.014; reading b, 44.4 against 15.4 Hz, p = 0.0098) and a higher maximum velocity (8.91 against 5.77 Hz/ms, p = 0.046). The reading (b) rates are within the tolerance of 41.5 and 15.2 Hz; the velocities are outside that of 4.9 and 1.4 Hz/ms, on a scale two to four times the paper's. Under the variant (a+) the 7 CS pause cells against 55 give 105.7 against 52.8 Hz (p = 0.0028), 45.0 against 16.4 Hz (p = 0.014) and 9.97 against 5.58 Hz/ms (p = 0.004). Under the mean readings only 2 facilitation cells have a pause and no test is significant.

fig5hi-cs-pause-faster-facilitation-ds2¶

In the second dataset, maximum facilitation was not significantly higher in cells with a CS pause (65.1 +/- 39.5 against 51.7 +/- 35.4 Hz, p = 0.1594), but maximum spike rate velocity was (5.6 +/- 2.5 against 3.6 +/- 1.5 Hz/ms, p = 0.0004).

Source: Results, CS-related transient spike pauses and subsequent rapid excitation in IpN neurons, paragraph 5; Figure 5H,I. Data: dataset.

Criterion (claims file): As in fig5cd-cs-pause-faster-facilitation-ds1, on the 39 and 31 second-dataset facilitation cells. The facilitation comparison is a claim of absence, judged on the same Mann-Whitney test at p < 0.05. Reproduced when the facilitation test is not significant and the velocity test is, with CS pause cells higher.

In [43]:
fig5(2, WINS2)
window   threshold      class  n pause  n other (a) max-base pause          other  p (a) (b) fac pause other   p (b) velocity pause       other    p vel
   125 mean/trough  a, 12-212       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          57.6   62.7 0.5437  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
   125 mean/trough   a, 0-200       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          51.5   56.4 0.5595  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
   125 mean/trough a+, 12-212       32       37     142.2 +/- 80.8 141.3 +/- 79.7 0.9185          55.5   61.9 0.4030  9.01 +/- 4.49 7.21 +/- 3.65 0.0665
   125 mean/trough  a+, 0-200       31       36     145.4 +/- 80.1 144.5 +/- 78.4 0.9349          50.8   56.8 0.4543  9.16 +/- 4.48 7.35 +/- 3.60 0.0673
   125 mean/trough  b, 12-212       32       39     142.2 +/- 80.8 136.1 +/- 80.9 0.8217          61.3   62.2 0.8397  9.01 +/- 4.49 7.13 +/- 3.57 0.0437
   125 mean/trough   b, 0-200       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          55.4   57.5 0.7727  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
   125   mean/mean  a, 12-212       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          57.6   62.7 0.5437  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
   125   mean/mean   a, 0-200       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          51.5   56.4 0.5595  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
   125   mean/mean a+, 12-212       32       37     142.2 +/- 80.8 141.3 +/- 79.7 0.9185          55.5   61.9 0.4030  9.01 +/- 4.49 7.21 +/- 3.65 0.0665
   125   mean/mean  a+, 0-200       31       36     145.4 +/- 80.1 144.5 +/- 78.4 0.9349          50.8   56.8 0.4543  9.16 +/- 4.48 7.35 +/- 3.60 0.0673
   125   mean/mean  b, 12-212       32       39     142.2 +/- 80.8 136.1 +/- 80.9 0.8217          61.3   62.2 0.8397  9.01 +/- 4.49 7.13 +/- 3.57 0.0437
   125   mean/mean   b, 0-200       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          55.4   57.5 0.7727  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
   125 drop/trough  a, 12-212       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          62.6   56.5 0.4999  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
   125 drop/trough   a, 0-200       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          56.1   50.7 0.4621  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
   125 drop/trough a+, 12-212       44       25     147.9 +/- 80.9 130.9 +/- 77.7 0.4729          60.5   56.1 0.6758  9.35 +/- 4.39 5.76 +/- 2.29 0.0003
   125 drop/trough  a+, 0-200       43       24     150.3 +/- 80.3 135.2 +/- 76.2 0.5345          55.2   51.9 0.6804  9.46 +/- 4.37 5.91 +/- 2.21 0.0003
   125 drop/trough  b, 12-212       44       27     147.9 +/- 80.9 124.1 +/- 78.6 0.2433          65.5   55.6 0.2838  9.35 +/- 4.39 5.74 +/- 2.21 0.0001
   125 drop/trough   b, 0-200       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          59.3   51.9 0.3525  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
   125   drop/mean  a, 12-212       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          62.6   56.5 0.4999  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
   125   drop/mean   a, 0-200       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          56.1   50.7 0.4621  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
   125   drop/mean a+, 12-212       44       25     147.9 +/- 80.9 130.9 +/- 77.7 0.4729          60.5   56.1 0.6758  9.35 +/- 4.39 5.76 +/- 2.29 0.0003
   125   drop/mean  a+, 0-200       43       24     150.3 +/- 80.3 135.2 +/- 76.2 0.5345          55.2   51.9 0.6804  9.46 +/- 4.37 5.91 +/- 2.21 0.0003
   125   drop/mean  b, 12-212       44       27     147.9 +/- 80.9 124.1 +/- 78.6 0.2433          65.5   55.6 0.2838  9.35 +/- 4.39 5.74 +/- 2.21 0.0001
   125   drop/mean   b, 0-200       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          59.3   51.9 0.3525  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
   130 mean/trough  a, 12-212       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          57.6   62.7 0.5437  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
   130 mean/trough   a, 0-200       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          51.5   56.4 0.5595  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
   130 mean/trough a+, 12-212       32       37     142.2 +/- 80.8 141.3 +/- 79.7 0.9185          55.5   61.9 0.4030  9.01 +/- 4.49 7.21 +/- 3.65 0.0665
   130 mean/trough  a+, 0-200       31       36     145.4 +/- 80.1 144.5 +/- 78.4 0.9349          50.8   56.8 0.4543  9.16 +/- 4.48 7.35 +/- 3.60 0.0673
   130 mean/trough  b, 12-212       32       39     142.2 +/- 80.8 136.1 +/- 80.9 0.8217          61.3   62.2 0.8397  9.01 +/- 4.49 7.13 +/- 3.57 0.0437
   130 mean/trough   b, 0-200       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          55.4   57.5 0.7727  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
   130   mean/mean  a, 12-212       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          57.6   62.7 0.5437  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
   130   mean/mean   a, 0-200       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          51.5   56.4 0.5595  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
   130   mean/mean a+, 12-212       32       37     142.2 +/- 80.8 141.3 +/- 79.7 0.9185          55.5   61.9 0.4030  9.01 +/- 4.49 7.21 +/- 3.65 0.0665
   130   mean/mean  a+, 0-200       31       36     145.4 +/- 80.1 144.5 +/- 78.4 0.9349          50.8   56.8 0.4543  9.16 +/- 4.48 7.35 +/- 3.60 0.0673
   130   mean/mean  b, 12-212       32       39     142.2 +/- 80.8 136.1 +/- 80.9 0.8217          61.3   62.2 0.8397  9.01 +/- 4.49 7.13 +/- 3.57 0.0437
   130   mean/mean   b, 0-200       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          55.4   57.5 0.7727  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
   130 drop/trough  a, 12-212       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          62.6   56.5 0.4999  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
   130 drop/trough   a, 0-200       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          56.1   50.7 0.4621  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
   130 drop/trough a+, 12-212       44       25     147.9 +/- 80.9 130.9 +/- 77.7 0.4729          60.5   56.1 0.6758  9.35 +/- 4.39 5.76 +/- 2.29 0.0003
   130 drop/trough  a+, 0-200       43       24     150.3 +/- 80.3 135.2 +/- 76.2 0.5345          55.2   51.9 0.6804  9.46 +/- 4.37 5.91 +/- 2.21 0.0003
   130 drop/trough  b, 12-212       44       27     147.9 +/- 80.9 124.1 +/- 78.6 0.2433          65.5   55.6 0.2838  9.35 +/- 4.39 5.74 +/- 2.21 0.0001
   130 drop/trough   b, 0-200       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          59.3   51.9 0.3525  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
   130   drop/mean  a, 12-212       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          62.6   56.5 0.4999  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
   130   drop/mean   a, 0-200       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          56.1   50.7 0.4621  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
   130   drop/mean a+, 12-212       44       25     147.9 +/- 80.9 130.9 +/- 77.7 0.4729          60.5   56.1 0.6758  9.35 +/- 4.39 5.76 +/- 2.29 0.0003
   130   drop/mean  a+, 0-200       43       24     150.3 +/- 80.3 135.2 +/- 76.2 0.5345          55.2   51.9 0.6804  9.46 +/- 4.37 5.91 +/- 2.21 0.0003
   130   drop/mean  b, 12-212       44       27     147.9 +/- 80.9 124.1 +/- 78.6 0.2433          65.5   55.6 0.2838  9.35 +/- 4.39 5.74 +/- 2.21 0.0001
   130   drop/mean   b, 0-200       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          59.3   51.9 0.3525  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
125+50 mean/trough  a, 12-212       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          57.6   62.7 0.5437  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
125+50 mean/trough   a, 0-200       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          51.5   56.4 0.5595  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
125+50 mean/trough a+, 12-212       32       37     142.2 +/- 80.8 141.3 +/- 79.7 0.9185          55.5   61.9 0.4030  9.01 +/- 4.49 7.21 +/- 3.65 0.0665
125+50 mean/trough  a+, 0-200       31       36     145.4 +/- 80.1 144.5 +/- 78.4 0.9349          50.8   56.8 0.4543  9.16 +/- 4.48 7.35 +/- 3.60 0.0673
125+50 mean/trough  b, 12-212       32       39     142.2 +/- 80.8 136.1 +/- 80.9 0.8217          61.3   62.2 0.8397  9.01 +/- 4.49 7.13 +/- 3.57 0.0437
125+50 mean/trough   b, 0-200       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          55.4   57.5 0.7727  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
125+50   mean/mean  a, 12-212       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          57.6   62.7 0.5437  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
125+50   mean/mean   a, 0-200       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          51.5   56.4 0.5595  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
125+50   mean/mean a+, 12-212       32       37     142.2 +/- 80.8 141.3 +/- 79.7 0.9185          55.5   61.9 0.4030  9.01 +/- 4.49 7.21 +/- 3.65 0.0665
125+50   mean/mean  a+, 0-200       31       36     145.4 +/- 80.1 144.5 +/- 78.4 0.9349          50.8   56.8 0.4543  9.16 +/- 4.48 7.35 +/- 3.60 0.0673
125+50   mean/mean  b, 12-212       32       39     142.2 +/- 80.8 136.1 +/- 80.9 0.8217          61.3   62.2 0.8397  9.01 +/- 4.49 7.13 +/- 3.57 0.0437
125+50   mean/mean   b, 0-200       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          55.4   57.5 0.7727  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
125+50 drop/trough  a, 12-212       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          62.6   56.5 0.4999  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
125+50 drop/trough   a, 0-200       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          56.1   50.7 0.4621  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
125+50 drop/trough a+, 12-212       44       25     147.9 +/- 80.9 130.9 +/- 77.7 0.4729          60.5   56.1 0.6758  9.35 +/- 4.39 5.76 +/- 2.29 0.0003
125+50 drop/trough  a+, 0-200       43       24     150.3 +/- 80.3 135.2 +/- 76.2 0.5345          55.2   51.9 0.6804  9.46 +/- 4.37 5.91 +/- 2.21 0.0003
125+50 drop/trough  b, 12-212       44       27     147.9 +/- 80.9 124.1 +/- 78.6 0.2433          65.5   55.6 0.2838  9.35 +/- 4.39 5.74 +/- 2.21 0.0001
125+50 drop/trough   b, 0-200       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          59.3   51.9 0.3525  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
125+50   drop/mean  a, 12-212       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          62.6   56.5 0.4999  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
125+50   drop/mean   a, 0-200       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          56.1   50.7 0.4621  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
125+50   drop/mean a+, 12-212       44       25     147.9 +/- 80.9 130.9 +/- 77.7 0.4729          60.5   56.1 0.6758  9.35 +/- 4.39 5.76 +/- 2.29 0.0003
125+50   drop/mean  a+, 0-200       43       24     150.3 +/- 80.3 135.2 +/- 76.2 0.5345          55.2   51.9 0.6804  9.46 +/- 4.37 5.91 +/- 2.21 0.0003
125+50   drop/mean  b, 12-212       44       27     147.9 +/- 80.9 124.1 +/- 78.6 0.2433          65.5   55.6 0.2838  9.35 +/- 4.39 5.74 +/- 2.21 0.0001
125+50   drop/mean   b, 0-200       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          59.3   51.9 0.3525  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
130+50 mean/trough  a, 12-212       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          57.6   62.7 0.5437  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
130+50 mean/trough   a, 0-200       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          51.5   56.4 0.5595  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
130+50 mean/trough a+, 12-212       32       37     142.2 +/- 80.8 141.3 +/- 79.7 0.9185          55.5   61.9 0.4030  9.01 +/- 4.49 7.21 +/- 3.65 0.0665
130+50 mean/trough  a+, 0-200       31       36     145.4 +/- 80.1 144.5 +/- 78.4 0.9349          50.8   56.8 0.4543  9.16 +/- 4.48 7.35 +/- 3.60 0.0673
130+50 mean/trough  b, 12-212       32       39     142.2 +/- 80.8 136.1 +/- 80.9 0.8217          61.3   62.2 0.8397  9.01 +/- 4.49 7.13 +/- 3.57 0.0437
130+50 mean/trough   b, 0-200       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          55.4   57.5 0.7727  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
130+50   mean/mean  a, 12-212       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          57.6   62.7 0.5437  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
130+50   mean/mean   a, 0-200       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          51.5   56.4 0.5595  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
130+50   mean/mean a+, 12-212       32       37     142.2 +/- 80.8 141.3 +/- 79.7 0.9185          55.5   61.9 0.4030  9.01 +/- 4.49 7.21 +/- 3.65 0.0665
130+50   mean/mean  a+, 0-200       31       36     145.4 +/- 80.1 144.5 +/- 78.4 0.9349          50.8   56.8 0.4543  9.16 +/- 4.48 7.35 +/- 3.60 0.0673
130+50   mean/mean  b, 12-212       32       39     142.2 +/- 80.8 136.1 +/- 80.9 0.8217          61.3   62.2 0.8397  9.01 +/- 4.49 7.13 +/- 3.57 0.0437
130+50   mean/mean   b, 0-200       32       38     142.2 +/- 80.8 138.9 +/- 80.0 0.9671          55.4   57.5 0.7727  9.01 +/- 4.49 7.18 +/- 3.60 0.0554
130+50 drop/trough  a, 12-212       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          62.6   56.5 0.4999  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
130+50 drop/trough   a, 0-200       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          56.1   50.7 0.4621  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
130+50 drop/trough a+, 12-212       44       25     147.9 +/- 80.9 130.9 +/- 77.7 0.4729          60.5   56.1 0.6758  9.35 +/- 4.39 5.76 +/- 2.29 0.0003
130+50 drop/trough  a+, 0-200       43       24     150.3 +/- 80.3 135.2 +/- 76.2 0.5345          55.2   51.9 0.6804  9.46 +/- 4.37 5.91 +/- 2.21 0.0003
130+50 drop/trough  b, 12-212       44       27     147.9 +/- 80.9 124.1 +/- 78.6 0.2433          65.5   55.6 0.2838  9.35 +/- 4.39 5.74 +/- 2.21 0.0001
130+50 drop/trough   b, 0-200       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          59.3   51.9 0.3525  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
130+50   drop/mean  a, 12-212       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          62.6   56.5 0.4999  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
130+50   drop/mean   a, 0-200       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          56.1   50.7 0.4621  9.35 +/- 4.39 5.76 +/- 2.25 0.0002
130+50   drop/mean a+, 12-212       44       25     147.9 +/- 80.9 130.9 +/- 77.7 0.4729          60.5   56.1 0.6758  9.35 +/- 4.39 5.76 +/- 2.29 0.0003
130+50   drop/mean  a+, 0-200       43       24     150.3 +/- 80.3 135.2 +/- 76.2 0.5345          55.2   51.9 0.6804  9.46 +/- 4.37 5.91 +/- 2.21 0.0003
130+50   drop/mean  b, 12-212       44       27     147.9 +/- 80.9 124.1 +/- 78.6 0.2433          65.5   55.6 0.2838  9.35 +/- 4.39 5.74 +/- 2.21 0.0001
130+50   drop/mean   b, 0-200       44       26     147.9 +/- 80.9 127.8 +/- 77.8 0.3525          59.3   51.9 0.3525  9.35 +/- 4.39 5.76 +/- 2.25 0.0002

Result: reproduced. Under every threshold reading and class window the maximum facilitation does not differ (p = 0.24 to 0.97); under the drop readings the velocity is higher in CS pause cells (9.35 against 5.76 Hz/ms, p = 0.0002, class a), and under the mean readings only with class (b) on the 12-212 ms window (p = 0.044; 0.055 on 0-200 ms). The velocities are outside the tolerance of 5.6 and 3.6 Hz/ms. Under the mean/trough reading, the one whose count fits fig4c-cs-pause-ds2, the velocity test holds only with class (b) on the 12-212 ms window.

fig5ej-cs-pause-cells-shallower¶

CS pause cells were recorded less deeply than cells without, in the first (1840 +/- 320 against 2130 +/- 350 um, p = 0.0298) and second dataset (2350 +/- 140 against 2450 +/- 211 um, p = 0.0372).

Source: Results, CS-related transient spike pauses and subsequent rapid excitation in IpN neurons, paragraph 5; Figure 5E,J. Data: with_inputs.

Criterion (claims file): Groups as in Figure 5 (facilitation cells with and without a CS pause, Figure 5E,J legend). Recording depth from Source data 1 (opening comment). Reproduced when both tests give p < 0.05 with CS pause cells shallower.

Groups as in fig5cd-cs-pause-faster-facilitation-ds1 and fig5hi-cs-pause-faster-facilitation-ds2, under every threshold, window and class reading. Depth from Source data 1 (see source-data-1-link), which gives none for the second dataset.

In [44]:
rows = []
for ds in (1, 2):
    sub = df[df.dset == ds]
    for end in CSWIN:
        for rd in CSREAD:
            for crd in READINGS:
                f = sub[(cls(crd) == "fac")[sub.index]]
                cp = cs_col("pause", rd, end)[f.index]
                a, b = f[cp].depth.dropna(), f[~cp].depth.dropna()
                rows.append({"set": ds, "window": end, "threshold": rd, "class": crd, "n pause": int(cp.sum()), "n other": int((~cp).sum()),
                             "with depth": f"{len(a)}/{len(b)}",
                             "depth pause": f"{a.mean():.0f} +/- {a.std():.0f}" if len(a) else "-",
                             "depth other": f"{b.mean():.0f} +/- {b.std():.0f}" if len(b) else "-",
                             "p": fmt(ipn.mwu(a, b), 4) if len(a) and len(b) else np.nan})
print(pd.DataFrame(rows).to_string(index=False))
 set window   threshold class  n pause  n other with depth  depth pause  depth other      p
   1    125 mean/trough     a        2       78       2/78  1673 +/- 23 2124 +/- 335 0.0540
   1    125 mean/trough    a+        2       60       2/60  1673 +/- 23 2133 +/- 334 0.0532
   1    125 mean/trough     b        2       86       2/86  1673 +/- 23 2139 +/- 325 0.0483
   1    125   mean/mean     a        2       78       2/78  1673 +/- 23 2124 +/- 335 0.0540
   1    125   mean/mean    a+        2       60       2/60  1673 +/- 23 2133 +/- 334 0.0532
   1    125   mean/mean     b        2       86       2/86  1673 +/- 23 2139 +/- 325 0.0483
   1    125 drop/trough     a        8       72       8/72 1938 +/- 341 2132 +/- 335 0.1702
   1    125 drop/trough    a+        7       55       7/55 1976 +/- 348 2136 +/- 336 0.3387
   1    125 drop/trough     b        8       80       8/80 1938 +/- 341 2147 +/- 324 0.1329
   1    125   drop/mean     a        8       72       8/72 1938 +/- 341 2132 +/- 335 0.1702
   1    125   drop/mean    a+        7       55       7/55 1976 +/- 348 2136 +/- 336 0.3387
   1    125   drop/mean     b        8       80       8/80 1938 +/- 341 2147 +/- 324 0.1329
   1    130 mean/trough     a        2       78       2/78  1673 +/- 23 2124 +/- 335 0.0540
   1    130 mean/trough    a+        2       60       2/60  1673 +/- 23 2133 +/- 334 0.0532
   1    130 mean/trough     b        2       86       2/86  1673 +/- 23 2139 +/- 325 0.0483
   1    130   mean/mean     a        2       78       2/78  1673 +/- 23 2124 +/- 335 0.0540
   1    130   mean/mean    a+        2       60       2/60  1673 +/- 23 2133 +/- 334 0.0532
   1    130   mean/mean     b        2       86       2/86  1673 +/- 23 2139 +/- 325 0.0483
   1    130 drop/trough     a        8       72       8/72 1938 +/- 341 2132 +/- 335 0.1702
   1    130 drop/trough    a+        7       55       7/55 1976 +/- 348 2136 +/- 336 0.3387
   1    130 drop/trough     b        8       80       8/80 1938 +/- 341 2147 +/- 324 0.1329
   1    130   drop/mean     a        8       72       8/72 1938 +/- 341 2132 +/- 335 0.1702
   1    130   drop/mean    a+        7       55       7/55 1976 +/- 348 2136 +/- 336 0.3387
   1    130   drop/mean     b        8       80       8/80 1938 +/- 341 2147 +/- 324 0.1329
   1 125+50 mean/trough     a        2       78       2/78  1673 +/- 23 2124 +/- 335 0.0540
   1 125+50 mean/trough    a+        2       60       2/60  1673 +/- 23 2133 +/- 334 0.0532
   1 125+50 mean/trough     b        2       86       2/86  1673 +/- 23 2139 +/- 325 0.0483
   1 125+50   mean/mean     a        2       78       2/78  1673 +/- 23 2124 +/- 335 0.0540
   1 125+50   mean/mean    a+        2       60       2/60  1673 +/- 23 2133 +/- 334 0.0532
   1 125+50   mean/mean     b        2       86       2/86  1673 +/- 23 2139 +/- 325 0.0483
   1 125+50 drop/trough     a        9       71       9/71 1947 +/- 320 2133 +/- 337 0.1566
   1 125+50 drop/trough    a+        7       55       7/55 1976 +/- 348 2136 +/- 336 0.3387
   1 125+50 drop/trough     b        9       79       9/79 1947 +/- 320 2149 +/- 326 0.1132
   1 125+50   drop/mean     a        9       71       9/71 1947 +/- 320 2133 +/- 337 0.1566
   1 125+50   drop/mean    a+        7       55       7/55 1976 +/- 348 2136 +/- 336 0.3387
   1 125+50   drop/mean     b        9       79       9/79 1947 +/- 320 2149 +/- 326 0.1132
   1 130+50 mean/trough     a        2       78       2/78  1673 +/- 23 2124 +/- 335 0.0540
   1 130+50 mean/trough    a+        2       60       2/60  1673 +/- 23 2133 +/- 334 0.0532
   1 130+50 mean/trough     b        2       86       2/86  1673 +/- 23 2139 +/- 325 0.0483
   1 130+50   mean/mean     a        2       78       2/78  1673 +/- 23 2124 +/- 335 0.0540
   1 130+50   mean/mean    a+        2       60       2/60  1673 +/- 23 2133 +/- 334 0.0532
   1 130+50   mean/mean     b        2       86       2/86  1673 +/- 23 2139 +/- 325 0.0483
   1 130+50 drop/trough     a        9       71       9/71 1947 +/- 320 2133 +/- 337 0.1566
   1 130+50 drop/trough    a+        7       55       7/55 1976 +/- 348 2136 +/- 336 0.3387
   1 130+50 drop/trough     b        9       79       9/79 1947 +/- 320 2149 +/- 326 0.1132
   1 130+50   drop/mean     a        9       71       9/71 1947 +/- 320 2133 +/- 337 0.1566
   1 130+50   drop/mean    a+        7       55       7/55 1976 +/- 348 2136 +/- 336 0.3387
   1 130+50   drop/mean     b        9       79       9/79 1947 +/- 320 2149 +/- 326 0.1132
   2    125 mean/trough     a       32       38        0/0            -            -    NaN
   2    125 mean/trough    a+       32       37        0/0            -            -    NaN
   2    125 mean/trough     b       32       39        0/0            -            -    NaN
   2    125   mean/mean     a       32       38        0/0            -            -    NaN
   2    125   mean/mean    a+       32       37        0/0            -            -    NaN
   2    125   mean/mean     b       32       39        0/0            -            -    NaN
   2    125 drop/trough     a       44       26        0/0            -            -    NaN
   2    125 drop/trough    a+       44       25        0/0            -            -    NaN
   2    125 drop/trough     b       44       27        0/0            -            -    NaN
   2    125   drop/mean     a       44       26        0/0            -            -    NaN
   2    125   drop/mean    a+       44       25        0/0            -            -    NaN
   2    125   drop/mean     b       44       27        0/0            -            -    NaN
   2    130 mean/trough     a       32       38        0/0            -            -    NaN
   2    130 mean/trough    a+       32       37        0/0            -            -    NaN
   2    130 mean/trough     b       32       39        0/0            -            -    NaN
   2    130   mean/mean     a       32       38        0/0            -            -    NaN
   2    130   mean/mean    a+       32       37        0/0            -            -    NaN
   2    130   mean/mean     b       32       39        0/0            -            -    NaN
   2    130 drop/trough     a       44       26        0/0            -            -    NaN
   2    130 drop/trough    a+       44       25        0/0            -            -    NaN
   2    130 drop/trough     b       44       27        0/0            -            -    NaN
   2    130   drop/mean     a       44       26        0/0            -            -    NaN
   2    130   drop/mean    a+       44       25        0/0            -            -    NaN
   2    130   drop/mean     b       44       27        0/0            -            -    NaN
   2 125+50 mean/trough     a       32       38        0/0            -            -    NaN
   2 125+50 mean/trough    a+       32       37        0/0            -            -    NaN
   2 125+50 mean/trough     b       32       39        0/0            -            -    NaN
   2 125+50   mean/mean     a       32       38        0/0            -            -    NaN
   2 125+50   mean/mean    a+       32       37        0/0            -            -    NaN
   2 125+50   mean/mean     b       32       39        0/0            -            -    NaN
   2 125+50 drop/trough     a       44       26        0/0            -            -    NaN
   2 125+50 drop/trough    a+       44       25        0/0            -            -    NaN
   2 125+50 drop/trough     b       44       27        0/0            -            -    NaN
   2 125+50   drop/mean     a       44       26        0/0            -            -    NaN
   2 125+50   drop/mean    a+       44       25        0/0            -            -    NaN
   2 125+50   drop/mean     b       44       27        0/0            -            -    NaN
   2 130+50 mean/trough     a       32       38        0/0            -            -    NaN
   2 130+50 mean/trough    a+       32       37        0/0            -            -    NaN
   2 130+50 mean/trough     b       32       39        0/0            -            -    NaN
   2 130+50   mean/mean     a       32       38        0/0            -            -    NaN
   2 130+50   mean/mean    a+       32       37        0/0            -            -    NaN
   2 130+50   mean/mean     b       32       39        0/0            -            -    NaN
   2 130+50 drop/trough     a       44       26        0/0            -            -    NaN
   2 130+50 drop/trough    a+       44       25        0/0            -            -    NaN
   2 130+50 drop/trough     b       44       27        0/0            -            -    NaN
   2 130+50   drop/mean     a       44       26        0/0            -            -    NaN
   2 130+50   drop/mean    a+       44       25        0/0            -            -    NaN
   2 130+50   drop/mean     b       44       27        0/0            -            -    NaN

Result: blocked, data missing (second-dataset depth). Source data 1 gives no depth for the 102 second-dataset cells, so the second test cannot be run. In the first dataset CS pause cells lie shallower than the other facilitation cells under every reading (1673 to 1976 um against 2124 to 2149 um), and every mean depth is within the tolerances (1840 +/- 184 and 2130 +/- 213 um). The difference is significant only under the mean readings with class (b), where 2 cells have a CS pause (1673 +/- 23 against 2139 +/- 325 um, p = 0.0483; class a, p = 0.054); under the drop readings, with 7 to 9 CS pause cells, p = 0.11 to 0.34.

fig5s1-model-timing¶

IpN neurons modeled from Purkinje cell simple spike suppression align better with recorded facilitation cells without a CS pause, with earlier onset (73 +/- 19 against 88 +/- 25 ms, p = 0.0098) and peak times (144 +/- 55 against 171 +/- 43 ms, p = 0.0221), and lower peak amplitude and velocity than CS pause cells.

Source: Figure 5-figure supplement 1E-H; Results, CS-related transient spike pauses and subsequent rapid excitation in IpN neurons, paragraph 6. Data: with_inputs.

Criterion (claims file): Needs the 26 Purkinje cells of ten Brinke et al. (2015) and the model of Figure 5-source data 1 (Methods, Simple spike-based model of IpN neurons), neither of which the paper deposits with the IpN data. Values in baseline z-scores (z/ms for velocity). Reproduced when the model's facilitation onset and peak are earlier than those of cells without a CS pause at p < 0.05 and CS pause cells exceed both in peak amplitude at p < 0.05.

In [45]:
print("The data set holds IpN recordings only (", len(df), "recordings); no Purkinje cell recordings and no model output.")
The data set holds IpN recordings only ( 372 recordings); no Purkinje cell recordings and no model output.

Result: blocked, data missing. The Purkinje cell recordings of ten Brinke et al. (2015) that drive the model are not in this data set, and the paper does not say where they are.

fig6-us-peak-prevalence¶

About 10.6 +/- 4.7 ms after US onset, 211 of the 270 first-dataset cells (78.2%) showed a marked increase in spikes (99 +/- 59 Hz) exceeding five baseline SDs, the US peak.

Source: Results, IpN responses to the US, paragraph 1; Figure 6A,B. Data: dataset.

Criterion (claims file): First US peak as in the Methods (US-responses), window 1 to 30 ms after the US, both of its alternative criteria applied. Amplitude is not said to be from baseline or from the last 50 ms of the CS-US interval; both readings are run. Reproduced when the count and latency are within tolerance, and the amplitude under one reading.

In [46]:
pk = d1[d1.peak1]
print(f"set 1 cells with a first US peak: {len(pk)} of {len(d1)} ({100 * len(pk) / len(d1):.1f}%)")
print(f"  latency {pk.peak1_t.mean():.1f} +/- {pk.peak1_t.std():.1f} ms after the US (range {pk.peak1_t.min():.0f} to {pk.peak1_t.max():.0f})")
print(f"  amplitude from baseline {pk.peak1_base.mean():.1f} +/- {pk.peak1_base.std():.1f} Hz;"
      f" from the last 50 ms of the CS-US interval {pk.peak1_l50.mean():.1f} +/- {pk.peak1_l50.std():.1f} Hz")
L = d1.L
P = (d1.peak1_base / d1.sd)
c1 = (P - L > 5)
c2 = (P - L > 2) & (P > 5)
print("  cells meeting the first criterion only:", int((c1 & ~c2).sum()), "the second only:", int((c2 & ~c1).sum()), "both:", int((c1 & c2).sum()))
for k in (4, 5, 6):
    n = int(((P - L > k) | ((P - L > 2) & (P > k))).sum())
    print(f"  with {k} SD in place of 5: {n}")
print("  by mouse:", {int(m): f"{int(g.peak1.sum())}/{len(g)}" for m, g in d1.groupby("mouse")})
set 1 cells with a first US peak: 214 of 270 (79.3%)
  latency 11.8 +/- 5.3 ms after the US (range 4 to 30)
  amplitude from baseline 104.3 +/- 59.6 Hz; from the last 50 ms of the CS-US interval 96.7 +/- 57.1 Hz
  cells meeting the first criterion only: 8 the second only: 8 both: 198
  with 4 SD in place of 5: 224
  with 5 SD in place of 5: 214
  with 6 SD in place of 5: 206
  by mouse: {1: '14/23', 2: '2/3', 3: '12/14', 4: '14/14', 5: '34/37', 6: '18/18', 7: '13/13', 8: '29/38', 9: '15/24', 11: '26/26', 12: '2/9', 13: '7/10', 14: '7/8', 15: '5/8', 16: '3/4', 17: '3/5', 18: '4/4', 19: '6/12'}

Result: partially reproduced. 214 of 270 cells (79.3%) show a first US peak, within 211 +/- 21.1, with an amplitude of 104.3 Hz from baseline (96.7 Hz from the last 50 ms), within 99 +/- 9.9 Hz. The latency (11.8 +/- 5.3 ms) is just outside 10.6 +/- 1.06 ms.

fig6c-us-peak-declines-with-training¶

US peak amplitude diminished with training, from 88 +/- 48 Hz in early recordings to 29 +/- 44 Hz later (p < 0.0001).

Source: Results, IpN responses to the US, paragraph 1; Figure 6C. Data: dataset.

Criterion (claims file): The text compares days 1 to 4 with later days; the Figure 6C legend compares recordings without behavior on days 1 to 4 with recordings with behavior after day 4. Both readings are run, each over (i) all 270 cells or (ii) the 211 US peak cells. Amplitude from baseline, the maximum in the 1 to 30 ms window. Reproduced when the test gives p < 0.05 with early higher and both means within tolerance under one reading.

In [47]:
amp = d1.peak1_max_base
for name, early, late in (("text: days 1-4 vs later", d1.day <= 4, d1.day > 4),
                          ("legend: no behavior days 1-4 vs behavior after day 4", (d1.day <= 4) & ~d1.behav, (d1.day > 4) & d1.behav)):
    for cells, keep in (("i, all cells", d1.peak1 | ~d1.peak1), ("ii, US peak cells", d1.peak1)):
        a, b = amp[early & keep], amp[late & keep]
        print(f"{name}, {cells}: early {a.mean():.1f} +/- {a.std():.1f} Hz (n = {len(a)}), later {b.mean():.1f} +/- {b.std():.1f} Hz"
              f" (n = {len(b)}), MWU p = {ipn.mwu(a, b):.3g}")
text: days 1-4 vs later, i, all cells: early 94.9 +/- 60.8 Hz (n = 140), later 74.9 +/- 69.9 Hz (n = 130), MWU p = 0.00203
text: days 1-4 vs later, ii, US peak cells: early 105.2 +/- 57.2 Hz (n = 123), later 103.2 +/- 62.9 Hz (n = 91), MWU p = 0.566
legend: no behavior days 1-4 vs behavior after day 4, i, all cells: early 98.9 +/- 62.9 Hz (n = 116), later 59.4 +/- 67.2 Hz (n = 87), MWU p = 1.47e-06
legend: no behavior days 1-4 vs behavior after day 4, ii, US peak cells: early 108.1 +/- 60.2 Hz (n = 103), later 93.8 +/- 63.2 Hz (n = 52), MWU p = 0.0843

Result: partially reproduced. The US peak amplitude is lower later in training over all cells (text grouping: 94.9 against 74.9 Hz, p = 0.002; legend grouping: 98.9 against 59.4 Hz, p = 1.5e-06), but the later means are far above 29 +/- 2.9 Hz. Over the US peak cells alone the decline is not significant (p = 0.08 and 0.57).

us-peak-anticorrelates-with-behavior¶

US peak amplitude correlated negatively with CR percentage (r = -0.426) and CR amplitude at US onset (r = -0.333) across the 270 first-dataset recordings.

Source: Results, IpN responses to the US, paragraph 1. Data: dataset.

Criterion (claims file): US peak amplitude from baseline, the maximum of the average trace 1 to 30 ms after the US, for every cell whether or not it has a US peak (n = 270). Reproduced when both correlations are negative at p < 0.05; the r values are reported against tolerance.

In [48]:
amp = d1.peak1_max_base
for nm, col in (("% CRs", "cr_pct"), ("CR amplitude at US onset, data set", "amp_us_data"), ("CR amplitude at US onset, computed", "amp_us")):
    r = stats.spearmanr(amp, d1[col])
    print(f"US peak amplitude vs {nm}: Spearman r = {r[0]:.3f}, p = {r[1]:.3g}, n = {len(d1)}")
US peak amplitude vs % CRs: Spearman r = -0.381, p = 9.55e-11, n = 270
US peak amplitude vs CR amplitude at US onset, data set: Spearman r = -0.271, p = 6.44e-06, n = 270
US peak amplitude vs CR amplitude at US onset, computed: Spearman r = -0.263, p = 1.22e-05, n = 270

Result: reproduced. US peak amplitude correlates negatively with % CRs (r = -0.381, p = 1e-10) and with CR amplitude at US onset (r = -0.271, p = 6e-06), n = 270. Both r values are weaker than the paper's -0.426 and -0.333 and just outside tolerance.

In [49]:
def peak_trials(i, which):
    """Per-trial US response values: maximum (first or second peak) or minimum (pause) absolute rate in a 30 ms
    window centred on the cell's average peak or pause time (Methods, US-responses)."""
    us = int(D["us"][i])
    if which == "peak1":
        return ipn.trial_extreme(D["sdf"][i], t, us + df.peak1_t[i], "max")
    if which == "peak2":
        return ipn.trial_extreme(D["sdf"][i], t, us + df.peak2_t[i], "max")
    return ipn.trial_extreme(D["sdf"][i], t, us + df.pause_t[i], "min")


def us_trial_test(cells, which, yr, sign, rng):
    pairs = [(amp_trials(i, yr), peak_trials(i, which)) for i in cells]
    r, p, kinds = ipn.trial_corrs(pairs)
    sig = p < 0.05
    n_dir, n_opp = int(np.sum(sig & (np.sign(r) == sign))), int(np.sum(sig & (np.sign(r) == -sign)))
    pb_s = ipn.bootstrap_count(pairs, kinds, n_dir, sign, rng, reading="shuffle")[0]
    pb_r = ipn.bootstrap_count(pairs, kinds, n_dir, sign, rng, reading="random")[0]
    rs, ps, _ = ipn.trial_corrs(pairs, "spearman")
    return {"cells": len(cells), "sig": n_dir, "opposite": n_opp, "p_shuffle": pb_s, "p_random": pb_r,
            "sig, Spearman only": int(np.sum((ps < 0.05) & (np.sign(rs) == sign)))}, r, p, pairs

fig6d-us-peak-trial-correlations¶

Among 62 recordings with a US peak and CR behavior, 13 showed US peak amplitude correlating negatively with CR amplitude trial by trial (bootstrap p < 0.0001); a mixed model gives -1.79 Hz per % closure.

Source: Results, IpN responses to the US, paragraph 1; Figure 6D; Supplementary file 1, Fig. 6D. Data: dataset.

Criterion (claims file): Trial values as in the Methods (US-responses), the maximum in a 30 ms window centred on the cell's average peak time, against CR amplitude. Supplementary file 1 says the model used 15 cells where the Results say 13; the model is fitted on the significant cells found here. Slope tolerance is twice the paper's standard error (0.36). Reproduced when the counts and slope are within tolerance and the bootstrap p is below 0.05, under one combination of readings.

In [50]:
rng = np.random.default_rng(61)
cells62 = list(d1.index[d1.peak1 & d1.behav])
res_6d = {}
for yr in ("data", "us", "max"):
    out, r, p, pairs = us_trial_test(cells62, "peak1", yr, -1, rng)
    sig = (p < 0.05) & (r < 0)
    fit = lmm_on(cells62, sig, pairs) if yr != "max" else None  # pairs are (closure, peak): peak ~ closure
    res_6d[yr] = (r, p, sig)
    print(f"CR amplitude {yr}: {out}; mixed model US peak (Hz) on closure: "
          + (f"slope {fit['slope']:.2f} +/- {fit['se']:.2f} Hz per %, p = {fit['p']:.3g}, {int(sig.sum())} cells, {fit['trials']} trials,"
             f" fit ok {fit['ok']} {fit['warnings']}" if fit else "not fitted"))
print("expected: 62 +/- 6.2 cells, 13 +/- 1.3 significant negative, slope -1.79 +/- 0.72")
CR amplitude data: {'cells': 72, 'sig': 16, 'opposite': 3, 'p_shuffle': 0.0, 'p_random': 0.0, 'sig, Spearman only': 16}; mixed model US peak (Hz) on closure: slope -2.16 +/- 0.38 Hz per %, p = 1.33e-08, 16 cells, 643 trials, fit ok True 
CR amplitude us: {'cells': 72, 'sig': 17, 'opposite': 2, 'p_shuffle': 0.0, 'p_random': 0.0, 'sig, Spearman only': 17}; mixed model US peak (Hz) on closure: slope -2.10 +/- 0.37 Hz per %, p = 1.91e-08, 17 cells, 645 trials, fit ok True 
CR amplitude max: {'cells': 72, 'sig': 20, 'opposite': 3, 'p_shuffle': 0.0, 'p_random': 0.0, 'sig, Spearman only': 20}; mixed model US peak (Hz) on closure: not fitted
expected: 62 +/- 6.2 cells, 13 +/- 1.3 significant negative, slope -1.79 +/- 0.72

Result: partially reproduced. There are 72 recordings with a US peak and behavior (outside 62 +/- 6.2), of which 16 to 20 show significant negative trial-by-trial correlations (outside 13 +/- 1.3) and 2 or 3 positive ones; the bootstrap p is below 1/500. The mixed-model slope (-2.16 and -2.10 Hz per %) is within -1.79 +/- 0.72. With Source data 1's own CR flags in place of this attempt's, 65 US peak cells have behavior (Source data 1 comparison, above), so part of the gap in the cell count comes from the CR rule.

us-peak-cooccurs-with-facilitation¶

Cells with significant US peak to CR correlations were twice as likely to show significant positive facilitation to CR correlations (9/13 against 18/49, p = 0.0077), and CS-US facilitation was three times as common in cells with a US peak (55/211 against 5/59, p = 0.007).

Source: Results, IpN responses to the US, paragraph 1. Data: dataset.

Criterion (claims file): The trial-by-trial facilitation correlation is taken in every one of the 62 cells, as in fig2b-facilitation-trial-correlations-ds1. Fisher's exact test, two-sided. Reproduced when both tests give p < 0.05 in the printed direction.

In [51]:
rng = np.random.default_rng(62)
for yr in ("data", "us"):
    usneg = pd.Series(res_6d[yr][2], index=cells62)
    for xr in XREAD:
        out, r, p, pairs = trial_test(cells62, xr, yr, +1, rng, boot=False)
        facpos = pd.Series((p < 0.05) & (r > 0), index=cells62)
        pf, tab = fisher(usneg, facpos)
        print(f"CR amplitude {yr}, rate {xr}: positive facilitation correlations in {tab[0][0]}/{int(usneg.sum())} US-peak-correlated cells"
              f" vs {tab[1][0]}/{int((~usneg).sum())} others, Fisher p = {pf:.3g}")
for rd in READINGS:
    fac = (cls(rd) == "fac")[df.dset == 1]
    pf, tab = fisher(d1.peak1, fac)
    print(f"class {rd}: facilitation in {tab[0][0]}/{int(d1.peak1.sum())} US peak cells vs {tab[1][0]}/{int((~d1.peak1).sum())} others,"
          f" Fisher p = {pf:.3g}")
CR amplitude data, rate a: positive facilitation correlations in 7/16 US-peak-correlated cells vs 19/56 others, Fisher p = 0.559
CR amplitude data, rate b: positive facilitation correlations in 5/16 US-peak-correlated cells vs 19/56 others, Fisher p = 1
CR amplitude data, rate c: positive facilitation correlations in 8/16 US-peak-correlated cells vs 20/56 others, Fisher p = 0.386
CR amplitude us, rate a: positive facilitation correlations in 8/17 US-peak-correlated cells vs 15/55 others, Fisher p = 0.146
CR amplitude us, rate b: positive facilitation correlations in 5/17 US-peak-correlated cells vs 18/55 others, Fisher p = 1
CR amplitude us, rate c: positive facilitation correlations in 8/17 US-peak-correlated cells vs 18/55 others, Fisher p = 0.387
class a: facilitation in 72/214 US peak cells vs 8/56 others, Fisher p = 0.00488
class a+: facilitation in 56/214 US peak cells vs 6/56 others, Fisher p = 0.0128
class b: facilitation in 79/214 US peak cells vs 9/56 others, Fisher p = 0.00362

Result: partially reproduced. Facilitation is more common in US peak cells under every reading (class a: 72/214 against 8/56, Fisher p = 0.0049; b: 79/214 against 9/56, p = 0.0036; a+: 56/214 against 6/56, p = 0.013). Under the claims file's readings the count, 72 or 79, is outside 55 +/- 5.5; only this attempt's variant (a+) gives a count within it. Cells with a significant US-peak correlation are not more likely to show a positive facilitation correlation (for example 7/16 against 19/56, p = 0.56; p = 0.15 to 1 across readings).

fig6s1a-eyelid-opening-us-peak¶

Among 149 recordings with a US peak but without CR behavior, 17 (11.4%) showed positive trial-by-trial correlations between eyelid amplitude and US peak, more eyelid opening going with weaker US peaks (bootstrap p < 0.0001).

Source: Results, IpN responses to the US, paragraph 2; Figure 6-figure supplement 1A. Data: dataset.

Criterion (claims file): Eyelid amplitude here is signed, so opening is negative; readings, eyelid position at US onset relative to trial baseline (a) or the CS-US extreme (b). Reproduced when both counts are within tolerance and the bootstrap p is below 0.05 under one combination of readings.

In [52]:
rng = np.random.default_rng(63)
cells149 = list(d1.index[d1.peak1 & ~d1.behav])
for nm in ("a, at US onset (data set)", "b, CS-US extreme"):
    pairs = []
    for i in cells149:
        y = D["cramp"][i] if nm.startswith("a") else ipn.eyelid_trials(D["eyelid"][i], t, int(D["us"][i]))["amp_ext"]
        pairs.append((y, peak_trials(i, "peak1")))
    r, p, kinds = ipn.trial_corrs(pairs)
    n_pos = int(np.sum((p < 0.05) & (r > 0)))
    pb_s = ipn.bootstrap_count(pairs, kinds, n_pos, +1, rng, reading="shuffle")[0]
    pb_r = ipn.bootstrap_count(pairs, kinds, n_pos, +1, rng, reading="random")[0]
    print(f"eyelid {nm}: {len(cells149)} cells, {n_pos} significant positive, {int(np.sum((p < 0.05) & (r < 0)))} negative,"
          f" bootstrap p shuffle {pb_s:.3f}, random {pb_r:.3f}")
eyelid a, at US onset (data set): 142 cells, 23 significant positive, 3 negative, bootstrap p shuffle 0.000, random 0.000
eyelid b, CS-US extreme: 142 cells, 16 significant positive, 3 negative, bootstrap p shuffle 0.000, random 0.000

Result: reproduced, under eyelid reading (b). There are 142 US peak cells without behavior (within 149 +/- 14.9). With the CS-US extreme, 16 show significant positive correlations (within 17 +/- 1.7), with bootstrap p below 1/500; with the eyelid at US onset, 23 do (outside tolerance).

fig6s1bc-purkinje-us-complex-spike-opening¶

In the Purkinje cell data of ten Brinke et al. (2015), trials with eyelid opening and no US-related complex spike showed slightly more opening (-2.65 +/- 1.85%) than trials with one (-0.84 +/- 1.86%).

Source: Results, IpN responses to the US, paragraph 2; Figure 6-figure supplement 1B,C. Data: dataset.

Criterion (claims file): Uses only the Purkinje cell recordings of ten Brinke et al. (2015), which the paper does not deposit with the IpN data or locate. No IpN data enter the test, so the claim is not with_inputs; it stays data dataset (the default) unless the author finds those recordings public and pinned, when it becomes data elsewhere. Reproduced when the Mann-Whitney test gives p < 0.05 with more opening in trials without a complex spike.

In [53]:
print("No Purkinje cell recordings in the data set; every recording is an IpN unit (data description).")
No Purkinje cell recordings in the data set; every recording is an IpN unit (data description).

Result: blocked, data missing. The Purkinje cell recordings of ten Brinke et al. (2015) are not in this data set.

us-pause-prevalence¶

A transient suppression 28.2 +/- 4.9 ms after the US, the US pause, was seen in 105 first-dataset cells (39%), with magnitudes of -50 +/- 24 Hz.

Source: Results, IpN responses to the US, paragraph 3; Figure 6F. Data: dataset.

Criterion (claims file): US pause as in the Methods (US-responses), window 16 to 45 ms after the US, both alternative criteria applied. Magnitude from baseline (reading a) or from the last 50 ms of the CS-US interval (reading b). Reproduced when count and latency are within tolerance, and the magnitude under one reading.

In [54]:
pa = d1[d1.pause]
print(f"set 1 cells with a US pause: {len(pa)} of {len(d1)} ({100 * len(pa) / len(d1):.1f}%)")
print(f"  latency {pa.pause_t.mean():.1f} +/- {pa.pause_t.std():.1f} ms; magnitude from baseline {pa.pause_base.mean():.1f} +/- {pa.pause_base.std():.1f} Hz,"
      f" from the last 50 ms {pa.pause_l50.mean():.1f} +/- {pa.pause_l50.std():.1f} Hz")
for span in (20, 30, 45):
    n = 0
    for i in d1.index:
        m = np.nanmean(D["sdf"][i], 0)
        z = (m - df.mu[i]) / df.sd[i]
        n += ipn.us_responses(z, m, t, int(D["us"][i]), df.mu[i], turn_span=span)["pause"]
    print(f"  turnaround looked for within {span} ms: {n} cells")
set 1 cells with a US pause: 99 of 270 (36.7%)
  latency 28.6 +/- 5.3 ms; magnitude from baseline -48.9 +/- 18.8 Hz, from the last 50 ms -51.7 +/- 23.2 Hz
  turnaround looked for within 20 ms: 99 cells
  turnaround looked for within 30 ms: 99 cells
  turnaround looked for within 45 ms: 100 cells

Result: reproduced. 99 cells (36.7%) show a US pause, at 28.6 +/- 5.3 ms after the US, with a magnitude of -48.9 Hz from baseline (-51.7 Hz from the last 50 ms); all three values are within tolerance. The count is 99 or 100 for turnaround spans of 20 to 45 ms.

cs-pause-cells-have-us-pause¶

Most cells with a CS pause also showed a US pause (86%, against 105/263 or 40% of others, p = 0.0012, Fisher's exact test).

Source: Results, IpN responses to the US, paragraph 3. Data: dataset.

Criterion (claims file): 86% of 7 is 6 cells. The paper prints 105/263 for the other cells, though 105 is the total of US pause cells; the counts found are reported as they are. Reproduced when the test gives p < 0.05 with US pauses more common among CS pause cells.

In [55]:
for end in CSWIN:
    for rd in CSREAD:
        cp = cs_col("pause", rd, end)[df.dset == 1]
        p, tab = fisher(cp, d1.pause)
        print(f"window {end}, {rd}: US pause in {tab[0][0]}/{int(cp.sum())} CS pause cells vs {tab[1][0]}/{int((~cp).sum())} others, Fisher p = {p:.3g}")
window 125, mean/trough: US pause in 4/4 CS pause cells vs 95/266 others, Fisher p = 0.0174
window 125, mean/mean: US pause in 3/3 CS pause cells vs 96/267 others, Fisher p = 0.0483
window 125, drop/trough: US pause in 10/23 CS pause cells vs 89/247 others, Fisher p = 0.503
window 125, drop/mean: US pause in 6/9 CS pause cells vs 93/261 others, Fisher p = 0.0786
window 130, mean/trough: US pause in 4/4 CS pause cells vs 95/266 others, Fisher p = 0.0174
window 130, mean/mean: US pause in 3/3 CS pause cells vs 96/267 others, Fisher p = 0.0483
window 130, drop/trough: US pause in 10/23 CS pause cells vs 89/247 others, Fisher p = 0.503
window 130, drop/mean: US pause in 7/11 CS pause cells vs 92/259 others, Fisher p = 0.105
window 125+50, mean/trough: US pause in 6/6 CS pause cells vs 93/264 others, Fisher p = 0.0022
window 125+50, mean/mean: US pause in 3/3 CS pause cells vs 96/267 others, Fisher p = 0.0483
window 125+50, drop/trough: US pause in 13/29 CS pause cells vs 86/241 others, Fisher p = 0.415
window 125+50, drop/mean: US pause in 7/13 CS pause cells vs 92/257 others, Fisher p = 0.239
window 130+50, mean/trough: US pause in 8/9 CS pause cells vs 91/261 others, Fisher p = 0.00169
window 130+50, mean/mean: US pause in 3/3 CS pause cells vs 96/267 others, Fisher p = 0.0483
window 130+50, drop/trough: US pause in 16/37 CS pause cells vs 83/233 others, Fisher p = 0.366
window 130+50, drop/mean: US pause in 7/14 CS pause cells vs 92/256 others, Fisher p = 0.393

Result: reproduced, under the mean readings. With the 50 ms rebound (this attempt's variant) and the 50-125 ms window, all 6 mean/trough CS pause cells also have a US pause (within 6 +/- 1), against 93/264 others (Fisher p = 0.0022). Under the claims file's readings, with the rebound within the window, the test also holds, with all 4 mean/trough and all 3 mean/mean cells having a US pause (p = 0.017 and 0.048), but the count is below 6 +/- 1. Under the drop readings the association is not significant (p = 0.079 to 0.50).

The CS transient claims under one reading at a time¶

Each CS transient claim above is judged under any of the readings, as its criterion says. This table holds each reading fixed (threshold reading and window) and says, for each claim, whether its criterion is met under that reading with any class reading (and, in the second dataset, either window of the claims file). fig4b and fig4c need the count and latency or the count of facilitation cells within tolerance and the Fisher test; fig4s1 needs both counts and the Fisher test; fig4h needs no transient on days 1 to 3 and the Fisher test; fig4g needs both correlations positive at p < 0.05 under a CR latency reading; fig5cd needs both tests (either facilitation reading) and fig5hi the absence and the velocity test; cs-pause-cells-have-us-pause needs the Fisher test, and its count of 6 +/- 1 is shown beside it. The "+50" windows are this attempt's variant, not readings of the claims file.

In [56]:
def met_by_reading(end, rd):
    sub1, sub2 = df.dset == 1, df.dset == 2
    cp, pk = cs_col("pause", rd, end), cs_col("peak", rd, end)
    lat = df[f"cspause_t_{rd}_{end}"]
    out = {}
    ok = False
    for crd in READINGS:
        p, tab = fisher(cp[sub1], (cls(crd) == "fac")[sub1])
        ok |= bool(6 <= cp[sub1].sum() <= 8 and abs(lat[sub1 & cp].mean() - 88) <= 8.8 and p < 0.05 and tab[0][0] / max(cp[sub1].sum(), 1) > tab[1][0] / (tab[1][0] + tab[1][1]))
    out["fig4b"] = ok
    ok = False
    for crd in READINGS:
        for w in WINS2:
            fac2 = (cls(crd, w) == "fac")[sub2]
            p, tab = fisher(cp[sub2], fac2)
            ok |= bool(36.9 <= cp[sub2].sum() <= 45.1 and 35.1 <= tab[0][0] <= 42.9 and p < 0.05)
    out["fig4c"] = ok
    ok = False
    for crl in ("crlat_a", "crlat_b", "crlat_c"):
        a, b = cp & df[crl].notna() & df.behav, cp & df[crl].notna() & df.behav & sub2
        if a.sum() > 2 and b.sum() > 2:
            r1, r2 = stats.pearsonr(lat[a], df[crl][a]), stats.pearsonr(lat[b], df[crl][b])
            ok |= bool(r1[0] > 0 and r1[1] < 0.05 and r2[0] > 0 and r2[1] < 0.05)
    out["fig4g"] = ok
    ok = False
    for crd in READINGS:
        p, tab = fisher(pk[sub1], (cls(crd) == "sup")[sub1])
        ok |= bool(3 <= pk[sub1].sum() <= 5 and pk[sub2].sum() == 0 and p < 0.05 and tab[0][0] > 0)
    out["fig4s1"] = ok
    tr, early = (cp | pk)[sub1], d1.day <= 3
    p, tab = fisher(tr, early)
    out["fig4h"] = bool(tab[0][0] == 0 and p < 0.05)
    for ds, key in ((1, "fig5cd"), (2, "fig5hi")):
        ok = False
        for crd in READINGS:
            for w in (WINS2 if ds == 2 else (WIN2,)):
                f = df[(df.dset == ds) & (cls(crd, w) == "fac")]
                a, b = f[cp[f.index]], f[~cp[f.index]]
                if len(a) == 0:
                    continue
                pv = ipn.mwu(a.vel_max, b.vel_max)
                vel = pv < 0.05 and a.vel_max.mean() > b.vel_max.mean()
                if ds == 1:
                    for col_a, col_b in ((a.max_csus, b.max_csus), (mag(crd, "fac")[a.index], mag(crd, "fac")[b.index])):
                        ok |= bool(vel and ipn.mwu(col_a, col_b) < 0.05 and col_a.mean() > col_b.mean())
                else:
                    for col_a, col_b in ((a.max_csus, b.max_csus), (mag(crd, "fac", w)[a.index], mag(crd, "fac", w)[b.index])):
                        ok |= bool(vel and ipn.mwu(col_a, col_b) >= 0.05)
        out[key] = ok
    p, tab = fisher(cp[sub1], d1.pause)
    out["cs-us pause (test)"] = bool(p < 0.05 and tab[0][0] / max(cp[sub1].sum(), 1) > tab[1][0] / (tab[1][0] + tab[1][1]))
    out["cs-us pause count"] = f"{tab[0][0]}/{int(cp[sub1].sum())}"
    return out


rows = [{"window": end, "threshold": rd, **met_by_reading(end, rd)} for end in CSWIN for rd in CSREAD]
tab = pd.DataFrame(rows)
crit = ["fig4b", "fig4c", "fig4g", "fig4s1", "fig4h", "fig5cd", "fig5hi", "cs-us pause (test)"]
tab["criteria met (of 8)"] = tab[crit].sum(axis=1)
print(tab.to_string(index=False))
print("claims whose criterion is met under at least one reading:", {k: bool(tab[k].any()) for k in crit})
window   threshold  fig4b  fig4c  fig4g  fig4s1  fig4h  fig5cd  fig5hi  cs-us pause (test) cs-us pause count  criteria met (of 8)
   125 mean/trough  False  False   True   False  False   False    True                True               4/4                    3
   125   mean/mean  False  False  False   False  False   False    True                True               3/3                    2
   125 drop/trough  False  False   True   False  False    True    True               False             10/23                    3
   125   drop/mean  False  False   True    True   True    True    True               False               6/9                    5
   130 mean/trough  False  False   True   False  False   False    True                True               4/4                    3
   130   mean/mean  False  False  False   False  False   False    True                True               3/3                    2
   130 drop/trough  False  False   True   False  False    True    True               False             10/23                    3
   130   drop/mean  False  False   True    True  False    True    True               False              7/11                    4
125+50 mean/trough  False  False   True   False  False   False    True                True               6/6                    3
125+50   mean/mean  False  False  False    True  False   False    True                True               3/3                    3
125+50 drop/trough  False  False   True   False  False    True    True               False             13/29                    3
125+50   drop/mean  False  False   True   False  False    True    True               False              7/13                    3
130+50 mean/trough  False  False  False   False  False   False    True                True               8/9                    2
130+50   mean/mean  False  False  False    True  False   False    True                True               3/3                    3
130+50 drop/trough  False  False  False   False  False    True    True               False             16/37                    2
130+50   drop/mean  False  False   True   False  False    True    True               False              7/14                    3
claims whose criterion is met under at least one reading: {'fig4b': False, 'fig4c': False, 'fig4g': True, 'fig4s1': True, 'fig4h': True, 'fig5cd': True, 'fig5hi': True, 'cs-us pause (test)': True}

Across readings. No single reading meets the criteria of all eight CS transient tests. The drop/mean reading with the 50-125 ms window meets five (fig4g, fig4s1, fig4h, fig5cd, fig5hi) and fails fig4b (9 cells against 7 +/- 1), fig4c and the CS-US pause test; the mean readings, whose fig4c counts come closest, meet two or three. The per-claim outcomes below and in the record are each judged under any reading, as the criteria say; as a set, the CS transient results reproduce under no single reading.

fig6b-us-peak-pause-overlap¶

US peaks and pauses overlapped; a third of the cells with one response also showed the other (77 of 239, 32.2%), leaving 134 with a peak only, 28 with a pause only and 31 with neither.

Source: Results, IpN responses to the US, paragraph 3; Figure 6A,B,E,F legend. Data: dataset.

Judged on the expected values alone.

In [57]:
both = int((d1.peak1 & d1.pause).sum())
print(f"both {both}; peak only {int((d1.peak1 & ~d1.pause).sum())}; pause only {int((~d1.peak1 & d1.pause).sum())};"
      f" neither {int((~d1.peak1 & ~d1.pause).sum())}; both of those with either {both}/{int((d1.peak1 | d1.pause).sum())}")
both 76; peak only 138; pause only 23; neither 33; both of those with either 76/237

Result: partially reproduced. Three of the four counts are within tolerance: both 76 (77 +/- 7.7), peak only 138 (134 +/- 13.4) and neither 33 (31 +/- 3.1). Pause only is 23, outside 28 +/- 2.8.

fig6g-us-response-depth¶

Cells with only a US pause lay more dorsally (1939 +/- 299 um) than cells with only a US peak (2182 +/- 373 um), with cells showing both in between (2075 +/- 322 um; p = 0.0025, Kruskal-Wallis).

Source: Results, IpN responses to the US, paragraph 3; Figure 6G. Data: with_inputs.

Criterion (claims file): Kruskal-Wallis over the three groups, recording depth from Source data 1 (opening comment). Reproduced when p < 0.05 and the mean depths are ordered pause only, both, peak only, from shallow to deep.

Groups as in fig6b-us-peak-pause-overlap. Depth from Source data 1 (see source-data-1-link).

In [58]:
groups = {"pause only": d1[~d1.peak1 & d1.pause], "both": d1[d1.peak1 & d1.pause], "peak only": d1[d1.peak1 & ~d1.pause]}
for nm, g in groups.items():
    print(f"{nm}: n = {len(g)}, depth {g.depth.mean():.0f} +/- {g.depth.std():.0f} um, from {g.mouse.nunique()} mice")
h, p = stats.kruskal(*[g.depth for g in groups.values()])
print(f"Kruskal-Wallis H = {h:.2f}, p = {p:.3g}")
for a, b in (("pause only", "both"), ("both", "peak only"), ("pause only", "peak only")):
    print(f"  {a} vs {b}: MWU p = {ipn.mwu(groups[a].depth, groups[b].depth):.3g}")
# Variant: depth relative to the mean depth of the mouse's first-dataset cells, as depth differs by mouse (data check above).
rel = d1.depth - d1.groupby("mouse").depth.transform("mean")
gs = [rel[g.index] for g in groups.values()]
print(f"variant, depth relative to the mouse's mean: means {[round(g.mean()) for g in gs]} um, Kruskal-Wallis p = {stats.kruskal(*gs)[1]:.3g}")
# The US pause and second peak turnaround span is a choice (see us-pause-prevalence); the groups under 20 and 45 ms.
for span in (20, 45):
    pk, pa = [], []
    for i in d1.index:
        m = np.nanmean(D["sdf"][i], 0)
        z = (m - df.mu[i]) / df.sd[i]
        u = ipn.us_responses(z, m, t, int(D["us"][i]), df.mu[i], turn_span=span)
        pk.append(u["peak1"])
        pa.append(u["pause"])
    pk, pa = np.array(pk), np.array(pa)
    gs = [d1.depth[~pk & pa], d1.depth[pk & pa], d1.depth[pk & ~pa]]
    print(f"turnaround within {span} ms: n {[len(g) for g in gs]}, mean depth {[round(g.mean()) for g in gs]} um,"
          f" Kruskal-Wallis p = {stats.kruskal(*gs)[1]:.3g}")
pause only: n = 23, depth 1920 +/- 290 um, from 11 mice
both: n = 76, depth 2061 +/- 323 um, from 13 mice
peak only: n = 138, depth 2186 +/- 364 um, from 18 mice
Kruskal-Wallis H = 14.62, p = 0.000669
  pause only vs both: MWU p = 0.052
  both vs peak only: MWU p = 0.0187
  pause only vs peak only: MWU p = 0.000598
variant, depth relative to the mouse's mean: means [-155, -12, 44] um, Kruskal-Wallis p = 0.00566
turnaround within 20 ms: n [23, 76, 138], mean depth [1920, 2061, 2186] um, Kruskal-Wallis p = 0.000669
turnaround within 45 ms: n [23, 77, 137], mean depth [1920, 2059, 2189] um, Kruskal-Wallis p = 0.000515

Result: reproduced. Cells with only a US pause lie shallowest (1920 +/- 290 um, n = 23), cells with both in between (2061 +/- 323 um, n = 76) and cells with only a US peak deepest (2186 +/- 364 um, n = 138); all three means are within tolerance and the Kruskal-Wallis test gives p = 0.00067 (paper 0.0025). The order and significance hold with depth taken relative to each mouse's mean (p = 0.0057) and with turnaround spans of 20 and 45 ms (p = 0.00067 and 0.00052).

us-pause-declines-with-training¶

The US pause became less common and weaker with training; 47.1% of cells (66/140) on the first four training days had one against 30% (39/130) later (p = 0.0057), and magnitudes were lower from day 5 (-13 +/- 30.3 against -28.8 +/- 30.4 Hz, p = 0.0018).

Source: Results, IpN responses to the US, paragraph 3; Figure 6C, right panel. Data: dataset.

Criterion (claims file): Chi-square with and without Yates' correction (not stated). Magnitude is the minimum in 16 to 45 ms after the US, relative to the last 50 ms of the CS-US interval (reading a, as in the Figure 6C legend, which makes a different comparison, pre- against post+) or to the baseline mean (reading b; the text does not give the reference for the day comparison), over (i) all cells or (ii) US pause cells only. Reproduced when both tests give p < 0.05 with early days showing more and deeper pauses, under one reading.

In [59]:
early = d1.day <= 4
tab = [[int((d1.pause & early).sum()), int((~d1.pause & early).sum())], [int((d1.pause & ~early).sum()), int((~d1.pause & ~early).sum())]]
print(f"days 1-4: {tab[0][0]}/{int(early.sum())}; later: {tab[1][0]}/{int((~early).sum())};"
      f" chi-square p = {stats.chi2_contingency(tab, correction=False)[1]:.3g} (no Yates), {stats.chi2_contingency(tab, correction=True)[1]:.3g} (Yates)")
for ref in ("pause_l50", "pause_base"):
    for cells, keep in (("i, all cells", d1.pause | ~d1.pause), ("ii, US pause cells", d1.pause)):
        a, b = d1[ref][early & keep], d1[ref][~early & keep]
        print(f"magnitude ({ref.split('_')[1]}), {cells}: days 1-4 {a.mean():.1f} +/- {a.std():.1f} Hz (n = {len(a)}), day 5+"
              f" {b.mean():.1f} +/- {b.std():.1f} Hz (n = {len(b)}), MWU p = {ipn.mwu(a, b):.3g}")
days 1-4: 68/140; later: 31/130; chi-square p = 2.53e-05 (no Yates), 4.39e-05 (Yates)
magnitude (l50), i, all cells: days 1-4 -23.5 +/- 36.8 Hz (n = 140), day 5+ -11.4 +/- 38.6 Hz (n = 130), MWU p = 0.00142
magnitude (l50), ii, US pause cells: days 1-4 -51.9 +/- 19.1 Hz (n = 68), day 5+ -51.1 +/- 30.7 Hz (n = 31), MWU p = 0.266
magnitude (base), i, all cells: days 1-4 -19.9 +/- 39.2 Hz (n = 140), day 5+ -2.8 +/- 40.1 Hz (n = 130), MWU p = 0.000663
magnitude (base), ii, US pause cells: days 1-4 -50.2 +/- 20.7 Hz (n = 68), day 5+ -46.2 +/- 13.5 Hz (n = 31), MWU p = 0.31

Result: partially reproduced. Both tests of the criterion hold: US pauses are more common on days 1 to 4 (68/140 against 31/130, chi-square p = 2.5e-05) and, over all cells, deeper (from the last 50 ms -23.5 against -11.4 Hz, p = 0.0014; from baseline -19.9 against -2.8 Hz, p = 0.00066). The counts 140 and 68 are within tolerance, but 31 later-day pause cells is below 39 +/- 3.9. Over the US pause cells alone the depth does not differ (p = 0.27 and 0.31).

fig6h-us-pause-trial-correlations¶

Trial by trial, 4 of 41 recordings with a US pause and at least 20% CRs showed deeper pauses in trials with worse behavior (bootstrap p = 0.0017).

Source: Results, IpN responses to the US, paragraph 3; Figure 6H; Supplementary file 1, Fig. 6H. Data: dataset.

Criterion (claims file): Pause value per trial is the minimum firing rate in a 30 ms window centred on the cell's average pause time. The legend gives n = 37 where the text gives 41; both are reported. Supplementary file 1 fits a model "across IpN cells" with a T-test and no stated random effects; the slope tolerance is twice its standard error (0.06). Reproduced when the count of significant cells is within tolerance and the bootstrap p is below 0.05.

In [60]:
import statsmodels.api as sm
rng = np.random.default_rng(64)
cells41 = list(d1.index[d1.pause & d1.behav])
for yr in ("data", "us", "max"):
    out, r, p, pairs = us_trial_test(cells41, "pause", yr, +1, rng)
    sig = (p < 0.05) & (r > 0)
    xs = np.concatenate([x for (x, y), s in zip(pairs, sig) if s] + [np.array([])])
    ys = np.concatenate([y for (x, y), s in zip(pairs, sig) if s] + [np.array([])])
    ols = sm.OLS(ys, sm.add_constant(xs)).fit() if len(xs) > 2 else None
    print(f"CR amplitude {yr}: {out}" + (f"; linear model pause rate on closure: slope {ols.params[1]:.2f} +/- {ols.bse[1]:.2f} Hz per %,"
                                         f" T({int(ols.df_resid)}) = {ols.tvalues[1]:.2f}" if ols is not None else ""))
print("expected: 41 +/- 4.1 cells (37 in the legend), 4 +/- 1 significant, bootstrap p < 0.05")
CR amplitude data: {'cells': 35, 'sig': 4, 'opposite': 3, 'p_shuffle': 0.02, 'p_random': 0.014, 'sig, Spearman only': 4}; linear model pause rate on closure: slope 0.37 +/- 0.09 Hz per %, T(193) = 4.26
CR amplitude us: {'cells': 35, 'sig': 2, 'opposite': 3, 'p_shuffle': 0.228, 'p_random': 0.198, 'sig, Spearman only': 2}; linear model pause rate on closure: slope 0.43 +/- 0.08 Hz per %, T(85) = 5.09
CR amplitude max: {'cells': 35, 'sig': 4, 'opposite': 3, 'p_shuffle': 0.004, 'p_random': 0.01, 'sig, Spearman only': 4}; linear model pause rate on closure: slope 0.38 +/- 0.08 Hz per %, T(193) = 4.56
expected: 41 +/- 4.1 cells (37 in the legend), 4 +/- 1 significant, bootstrap p < 0.05

Result: partially reproduced. The criterion's count and bootstrap hold with the data set's CR amplitude or the CS-US maximum: 4 of 35 US pause cells with behavior have significant positive correlations (bootstrap p = 0.014 to 0.020; with the CS-US maximum, 4 cells, p = 0.004 to 0.010). With the CR amplitude computed at the stated US onset, 2 cells (p = 0.20 to 0.23). But 3 cells are significant in the opposite direction, the cell count (35) is outside 41 +/- 4.1 (and below the legend's 37), and the linear-model slope (0.37 Hz per %) is outside 0.66 +/- 0.12, so the result holds in part. Source data 1's CR flags give 33 US pause cells with behavior (Source data 1 comparison, above).

fig7-second-us-peak¶

In the first dataset 83 cells showed a second US peak, peaking at 46 +/- 7 ms after the US with magnitudes of 61.4 +/- 28.3 Hz (39.4%).

Source: Results, US pauses are followed by fast excitatory responses in IpN neurons after conditioning, paragraph 1; Figure 7A. Data: dataset.

Criterion (claims file): Second peak as in the Methods (US-responses), 31 to 60 ms after the US. 39.4% matches 83 of the 211 US peak cells, not of 270, and the Figure 7B legend counts cells with both a first and a second peak; readings (a) second peaks in any cell, (b) only in cells with a first peak. Reproduced when the count and peak time are within tolerance, and the magnitude, under one reading.

In [61]:
for name, keep in (("a, any cell", d1.peak2_any), ("b, cells with a first peak", d1.peak2_any & d1.peak1)):
    s = d1[keep]
    print(f"{name}: {len(s)} cells ({100 * len(s) / len(d1):.1f}% of 270, {100 * len(s) / int(d1.peak1.sum()):.1f}% of the first-peak cells);"
          f" peak time {s.peak2_t.mean():.1f} +/- {s.peak2_t.std():.1f} ms; magnitude from baseline {s.peak2_base.mean():.1f} +/- {s.peak2_base.std():.1f} Hz,"
          f" from the last 50 ms {s.peak2_l50.mean():.1f} +/- {s.peak2_l50.std():.1f} Hz")
for span in (20, 45):
    n = 0
    for i in d1.index:
        m = np.nanmean(D["sdf"][i], 0)
        z = (m - df.mu[i]) / df.sd[i]
        n += ipn.us_responses(z, m, t, int(D["us"][i]), df.mu[i], turn_span=span)["peak2_any"]
    print(f"variant: turnaround looked for within {span} ms (30 in the main analysis): {n} cells with a second peak")
a, any cell: 109 cells (40.4% of 270, 50.9% of the first-peak cells); peak time 44.0 +/- 9.2 ms; magnitude from baseline 71.0 +/- 31.3 Hz, from the last 50 ms 60.9 +/- 26.7 Hz
b, cells with a first peak: 105 cells (38.9% of 270, 49.1% of the first-peak cells); peak time 43.9 +/- 9.3 ms; magnitude from baseline 71.8 +/- 31.5 Hz, from the last 50 ms 61.4 +/- 26.9 Hz
variant: turnaround looked for within 20 ms (30 in the main analysis): 103 cells with a second peak
variant: turnaround looked for within 45 ms (30 in the main analysis): 113 cells with a second peak

Result: partially reproduced. The second US peak peaks at 44.0 ms (within 46 +/- 4.6) with a magnitude of 60.9 Hz from the last 50 ms (within 61.4 +/- 6.14), but 109 cells show it (105 with a first peak), outside 83 +/- 8.3.

fig7-second-us-peak-dynamics¶

The second US peak was stronger in recordings with poor behavior (26 +/- 32 against 13 +/- 26 Hz, p = 0.025) and did not decline over training (r = 0.102, p = 0.13, n = 224); across recordings with poor CRs it grew over training (r = 0.287, p = 0.0007, n = 138), from 16 +/- 28.3 Hz on days 1 to 4 to 46.5 +/- 33 Hz later (p = 0.0001), with higher spike rate velocity later (0.55 +/- 0.32 against 0.77 +/- 0.45 Hz/ms, p = 0.0072).

Source: Results, US pauses are followed by fast excitatory responses in IpN neurons after conditioning, paragraph 1; Figure 7D,E. Data: dataset.

Criterion (claims file): Amplitude is the maximum 30 to 60 ms after the US (the text) relative to the last 50 ms of the CS-US interval or to baseline (both run), for all cells. Poor behavior is fewer than 20% CRs. The days 1 to 4 against later comparison (121 plus 46) covers the 167 recordings without behavior (fig1l-cells-with-behavior), and the Figure 7E legend restricts the velocity comparison to recordings without behavior as well, so both are run on them. The other n values (224 for all recordings, 138 for poor behavior) match neither 270 nor 167, and the paper does not say which recordings are left out; the counts found are reported. The text's panel citations do not match the Figure 7 legend (which puts the velocity comparison in 7E); the text's values are used. The decline is a claim of absence judged on Spearman at p < 0.05. Reproduced when the four positive tests give p < 0.05 in the printed direction and the all-recordings correlation is not significant, under one reading.

In [62]:
for ref in ("peak2_max_l50", "peak2_max_base"):
    a = d1[ref]
    poor = ~d1.behav
    print(f"amplitude {ref}: poor {a[poor].mean():.1f} +/- {a[poor].std():.1f} vs good {a[~poor].mean():.1f} +/- {a[~poor].std():.1f} Hz,"
          f" MWU p = {ipn.mwu(a[poor], a[~poor]):.3g}")
    r = stats.spearmanr(a, d1.day)
    print(f"   vs day, all {len(d1)}: r = {r[0]:.3f}, p = {r[1]:.3g}")
    r = stats.spearmanr(a[poor], d1.day[poor])
    print(f"   vs day, poor behavior {int(poor.sum())}: r = {r[0]:.3f}, p = {r[1]:.3g}")
    e, l = a[poor & (d1.day <= 4)], a[poor & (d1.day > 4)]
    print(f"   poor behavior, days 1-4 {e.mean():.1f} +/- {e.std():.1f} (n = {len(e)}) vs later {l.mean():.1f} +/- {l.std():.1f} Hz (n = {len(l)}),"
          f" MWU p = {ipn.mwu(e, l):.3g}")
v = d1.peak2_vel
e, l = v[~d1.behav & (d1.day <= 4)], v[~d1.behav & (d1.day > 4)]
print(f"velocity 30-60 ms, poor behavior: days 1-4 {e.mean():.2f} +/- {e.std():.2f} vs later {l.mean():.2f} +/- {l.std():.2f} Hz/ms, MWU p = {ipn.mwu(e, l):.3g}")
amplitude peak2_max_l50: poor 30.7 +/- 39.1 vs good 18.7 +/- 34.3 Hz, MWU p = 0.0107
   vs day, all 270: r = 0.026, p = 0.676
   vs day, poor behavior 159: r = 0.202, p = 0.0105
   poor behavior, days 1-4 24.6 +/- 35.9 (n = 116) vs later 47.1 +/- 43.0 Hz (n = 43), MWU p = 0.000909
amplitude peak2_max_base: poor 35.1 +/- 41.4 vs good 26.9 +/- 44.2 Hz, MWU p = 0.0826
   vs day, all 270: r = 0.090, p = 0.141
   vs day, poor behavior 159: r = 0.246, p = 0.00174
   poor behavior, days 1-4 28.4 +/- 38.8 (n = 116) vs later 53.0 +/- 43.3 Hz (n = 43), MWU p = 0.000836
velocity 30-60 ms, poor behavior: days 1-4 3.54 +/- 2.08 vs later 4.49 +/- 2.90 Hz/ms, MWU p = 0.0525

Result: partially reproduced. Measured from the last 50 ms, the second peak is larger with poor behavior (30.7 against 18.7 Hz, p = 0.011), does not change with day over all 270 recordings (r = 0.026, p = 0.68), grows with day among the 159 poor-behavior recordings (r = 0.202, p = 0.011) and is larger after day 4 among them (47.1 against 24.6 Hz, p = 0.0009); the velocity comparison is not significant (3.54 against 4.49 Hz/ms, p = 0.053). Measured from baseline, the poor against good comparison is not significant (p = 0.083). The later-day amplitude (47.1 Hz) is within tolerance and the early one (24.6 Hz) is not. The velocity is the claims file's reading (first difference of the 1 ms spike density), whose values are several times the paper's, so the one failed test uses a measure on a different scale from the paper's.

fig7c-second-peak-cells-lower-cr¶

Cells with a second US peak showed lower CR amplitudes at US onset than cells without, in the first (p < 0.0001) and second dataset (31.3 +/- 15.9 against 44.9 +/- 16.6% closure, p = 0.021); in the second dataset only 9 cells (8.8%) had a first US peak, 24 (23.5%) a US pause and 11 (10.8%) a second US peak.

Source: Results, US pauses are followed by fast excitatory responses in IpN neurons after conditioning, paragraph 2; Figure 7C legend. Data: dataset.

Criterion (claims file): US responses as in the Methods, on paired trials. Per cell, the mean CR amplitude at US onset. Reproduced when both Mann-Whitney tests give p < 0.05 with lower CR amplitude in second peak cells and the counts are within tolerance.

In [63]:
print(f"set 2: first US peak {int(d2.peak1.sum())} ({100 * d2.peak1.mean():.1f}%), US pause {int(d2.pause.sum())} ({100 * d2.pause.mean():.1f}%),"
      f" second US peak {int(d2.peak2_any.sum())} ({100 * d2.peak2_any.mean():.1f}%)")
for ds, sub in ((1, d1), (2, d2)):
    for col in ("amp_us_data", "amp_us"):
        a, b = sub[col][sub.peak2_any], sub[col][~sub.peak2_any]
        print(f"set {ds}, {col}: second-peak cells {a.mean():.1f} +/- {a.std():.1f}% (n = {len(a)}) vs others {b.mean():.1f} +/- {b.std():.1f}%"
              f" (n = {len(b)}), MWU p = {ipn.mwu(a, b):.3g}")
set 2: first US peak 16 (15.7%), US pause 21 (20.6%), second US peak 19 (18.6%)
set 1, amp_us_data: second-peak cells 2.9 +/- 6.6% (n = 109) vs others 7.9 +/- 13.0% (n = 161), MWU p = 0.0173
set 1, amp_us: second-peak cells 2.5 +/- 8.3% (n = 109) vs others 7.8 +/- 14.4% (n = 161), MWU p = 0.0036
set 2, amp_us_data: second-peak cells 31.2 +/- 18.9% (n = 19) vs others 46.3 +/- 15.3% (n = 83), MWU p = 0.00147
set 2, amp_us: second-peak cells 36.5 +/- 18.7% (n = 19) vs others 51.4 +/- 14.7% (n = 83), MWU p = 0.000853

Result: partially reproduced. Second-peak cells have lower CR amplitudes in both datasets (first p = 0.017; second 31.2 against 46.3%, p = 0.0015, both means within tolerance). The second-dataset counts are 16 first US peaks, 21 US pauses and 19 second peaks, all outside 9, 24 and 11 with their tolerances.

fig7b-first-second-peak-correlated¶

The amplitudes of the first and second US peaks were correlated trial by trial; a mixed model over 14 cells gives 0.31 Hz of second peak per Hz of first peak (p < 0.0001).

Source: Results, US pauses are followed by fast excitatory responses in IpN neurons after conditioning, paragraph 1; Figure 7B legend; Supplementary file 1, Fig. 7B. Data: dataset.

Criterion (claims file): Per cell among the cells with both peaks, the trial-by-trial correlation of first and second peak values (30 ms windows centred on the average peak times); mixed model over the significant cells, tolerance twice the paper's standard error (0.04). The paper reports no test of the count of significant cells (the Figure 7B pie chart only shows it), so none is required. Reproduced when the slope is positive and within tolerance with p < 0.05 and the count is within tolerance.

In [64]:
cells_b = list(d1.index[d1.peak1 & d1.peak2_any])
pairs = [(peak_trials(i, "peak1"), peak_trials(i, "peak2")) for i in cells_b]
r, p, kinds = ipn.trial_corrs(pairs)
sig = (p < 0.05) & (r > 0)
fit = lmm_on(cells_b, sig, pairs)
gap = df.peak2_t[cells_b] - df.peak1_t[cells_b]
print(f"cells whose two 30 ms trial windows overlap (peak times less than 30 ms apart): {int((gap < 30).sum())} of {len(cells_b)}")
sep = np.array([g >= 30 for g in gap])
print(f"among cells with separate windows: {int(np.sum(sig & sep))} of {int(sep.sum())} significant positive")
print(f"cells with both peaks: {len(cells_b)}; significant positive {int(sig.sum())}, negative {int(np.sum((p < 0.05) & (r < 0)))}")
print(f"mixed model second peak on first peak: slope {fit['slope']:.3f} +/- {fit['se']:.3f} Hz/Hz, p = {fit['p']:.3g},"
      f" {fit['trials']} trials, fit ok {fit['ok']} {fit['warnings']}")
cells whose two 30 ms trial windows overlap (peak times less than 30 ms apart): 40 of 105
among cells with separate windows: 24 of 65 significant positive
cells with both peaks: 105; significant positive 58, negative 0
mixed model second peak on first peak: slope 0.617 +/- 0.037 Hz/Hz, p = 6.08e-61, 2112 trials, fit ok True 

Result: partially reproduced. First and second peaks are correlated trial by trial, positively and significantly (mixed-model p = 6e-61), but the values are far from the paper's: 58 of 105 cells are significant (against 14 +/- 1.4) and the mixed-model slope is 0.617 Hz/Hz (against 0.31 +/- 0.08). In 40 of the 105 cells the two 30 ms windows overlap, which inflates the correlations; among the other 65, 24 are significant.

us-only-trials-ds2¶

In 25 second-dataset cells with US-only trials, the first US peak (10/25) and US pause (10/25) were more common than in paired trials, and the second US peak was most common (18 cells, 72%) and larger than the first (94.6 +/- 82.9 against 27.8 +/- 48.7 Hz, p = 0.0012).

Source: Results, US pauses are followed by fast excitatory responses in IpN neurons after conditioning, paragraph 2; Figure 7-figure supplement 1. Data: dataset.

Criterion (claims file): US responses as in the Methods, on each cell's US-only trials; the "last 50 ms of the CS-US interval" reference has no CS here, so the readings are the 50 ms before the US (a) or the baseline alone (b). The paper does not say over which cells or from which reference the amplitudes (94.6 and 27.8 Hz) are taken; readings (i) all 25 cells, (ii) the cells showing each peak, each relative to baseline or to the 50 ms before the US. Reproduced when the counts are within tolerance and the amplitude test gives p < 0.05 with the second peak larger, under one reading.

In [65]:
print("set 2 trials per recording:", d2.n_trials.describe().round(1).to_dict())
print("The data set has no field naming a trial's type; its description says each recording holds paired CS-US trials.")
set 2 trials per recording: {'count': 102.0, 'mean': 35.6, 'std': 22.7, 'min': 11.0, '25%': 20.0, '50%': 29.5, '75%': 45.0, 'max': 138.0}
The data set has no field naming a trial's type; its description says each recording holds paired CS-US trials.

Result: blocked, data missing. The data set has no US-only trials that can be identified.

fig7s1c-us-only-second-peak-cs-pause-cells¶

In US-only trials, cells with a CS pause and CS-US facilitation had stronger post-US pause peaks than the other cells (137.3 +/- 89.4 against 55 +/- 53.9 Hz, p = 0.0133), and in them the second US peak exceeded the first (p = 0.0014), but not in the other cells (p = 0.4728).

Source: Figure 7-figure supplement 1C. Data: dataset.

In [66]:
print("The claim needs the US-only trials, and the data set has no field naming a trial's type (see us-only-trials-ds2).")
The claim needs the US-only trials, and the data set has no field naming a trial's type (see us-only-trials-ds2).

Result: blocked, data missing. The US-only trials are not in the data set (us-only-trials-ds2).

fig7fg-us-pause-resembles-cs-pause¶

In 12 second-dataset cells, the pause and rapid excitation after the US in US-only trials closely resembled the pause and rapid excitation after the CS in paired trials, the two profiles diverging only about 50 ms after the pause.

Source: Results, US pauses are followed by fast excitatory responses in IpN neurons after conditioning, paragraph 2; Figure 7F-H legend. Data: dataset.

In [67]:
print("The claim needs the US-only trials, and the data set has no field naming a trial's type (see us-only-trials-ds2).")
The claim needs the US-only trials, and the data set has no field naming a trial's type (see us-only-trials-ds2).

Result: blocked, data missing. The US-only trials are not in the data set (us-only-trials-ds2).

Summary¶

Claim Outcome
source-data-1-link (link) reproduced
firing-rate-depth reproduced
fig1ijk-modulation-classes not reproduced
modulation-absolute-not-rate-dependent not reproduced
fig1l-cells-with-behavior reproduced
fig1m-modulation-grows-with-training partially reproduced
fig1no-modulation-more-with-behavior partially reproduced
fig2a-facilitation-properties-ds1 partially reproduced
fig2b-facilitation-trial-correlations-ds1 reproduced
fig2b-lmm-ds1 reproduced
fig2d-facilitation-leads-eyelid-ds1 partially reproduced
fig2-s1-correlation-matrix-offsets not reproduced
fig2e-facilitation-ds2 reproduced
fig2f-facilitation-trial-correlations-ds2 reproduced
fig2f-lmm-ds2 reproduced
fig2h-facilitation-leads-eyelid-ds2 partially reproduced
fig2-suppression-properties-ds1 partially reproduced
suppression-smaller-shorter-than-facilitation reproduced
suppression-same-timing-as-facilitation not reproduced
fig2j-suppression-trial-correlations-ds1 reproduced
fig2l-suppression-no-lead-ds1 not reproduced
fig2n-suppression-ds2 partially reproduced
ds2-stronger-facilitation-same-suppression partially reproduced
fig2p-suppression-no-lead-ds2 not reproduced
ds2-modulation-proportion reproduced
fig3-optogenetic-inhibition-abolishes-crs blocked: data missing
fig4b-cs-pause-ds1 partially reproduced
fig4c-cs-pause-ds2 partially reproduced
fig4g-cs-pause-latency-cr-latency reproduced
fig4s1-cs-peak-cells reproduced
fig4s1-cs-peak-suppression-not-different reproduced
fig4h-transient-responses-after-day-3 reproduced
fig5cd-cs-pause-faster-facilitation-ds1 reproduced
fig5hi-cs-pause-faster-facilitation-ds2 reproduced
fig5ej-cs-pause-cells-shallower blocked: data missing (second-dataset depth)
fig5s1-model-timing blocked: data missing
fig6-us-peak-prevalence partially reproduced
fig6c-us-peak-declines-with-training partially reproduced
us-peak-anticorrelates-with-behavior reproduced
fig6d-us-peak-trial-correlations partially reproduced
us-peak-cooccurs-with-facilitation partially reproduced
fig6s1a-eyelid-opening-us-peak reproduced
fig6s1bc-purkinje-us-complex-spike-opening blocked: data missing
us-pause-prevalence reproduced
cs-pause-cells-have-us-pause reproduced
fig6b-us-peak-pause-overlap partially reproduced
fig6g-us-response-depth reproduced
us-pause-declines-with-training partially reproduced
fig6h-us-pause-trial-correlations partially reproduced
fig7-second-us-peak partially reproduced
fig7-second-us-peak-dynamics partially reproduced
fig7c-second-peak-cells-lower-cr partially reproduced
fig7b-first-second-peak-correlated partially reproduced
us-only-trials-ds2 blocked: data missing
fig7s1c-us-only-second-peak-cs-pause-cells blocked: data missing (US-only trials)
fig7fg-us-pause-resembles-cs-pause blocked: data missing (US-only trials)

Counts, over the 55 claims of the paper: 21 reproduced, 21 partially reproduced, 6 not reproduced, 7 blocked. Four of them use recording depth from Source data 1 (with_inputs): firing-rate-depth, fig4s1-cs-peak-suppression-not-different and fig6g-us-response-depth are reproduced and fig5ej-cs-pause-cells-shallower is blocked. The link claim source-data-1-link is reproduced. After the first verification round, seven outcomes changed: fig1ijk-modulation-classes and modulation-absolute-not-rate-dependent to not reproduced (no reading meets the criterion), fig1m, fig1no, us-pause-declines-with-training and fig6h-us-pause-trial-correlations to partially reproduced (the tests hold, some expected values do not), and fig7b-first-second-peak-correlated to partially reproduced (the correlation holds, the values do not). The second round agreed with all 56 outcomes; no change of outcome is proposed.

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. The paper links no analysis code, and several of its definitions are open (claims file, opening comment); every named reading is run, plus this attempt's variants (a+) of the baseline correction, a rebound span of 50 ms for the CS transients and the 0-212 ms window in the second dataset. Of these, only the 50 ms rebound decides an outcome: cs-pause-cells-have-us-pause meets its expected count of 6 +/- 1 only with it, and under the same span fig4b's association fails (2 of the 6 cells facilitate, Fisher p = 0.62 to 1), so those 6 cells do not behave like the paper's CS pause group. Under the claims file's readings that claim's Fisher test holds with 4 and 3 cells. The classification of cells does not reproduce the paper's counts under any reading (80 or 88 facilitation cells under the claims file's readings, against 60); the authors' own per-cell facilitation in Source data 1 follows reading (b) closely (Pearson r = 0.998, median difference -0.16 Hz) and gives 84 cells at 5 Hz, where reading (b) gives 88, so the paper's 60 rest on a criterion it does not state, and many downstream counts differ with it. The trial exclusions of the Methods are not applied again, since Source data 1 lists exactly the deposited trials as each cell's valid trials. This attempt's CR rule gives 111 recordings with behavior where Source data 1's CR flags give the paper's 103. The cross-correlation lags use the standard cross-covariance of the two traces, which puts at most one lag at the edge of the +/-100 ms range (one cell under class b in fig2l); the re-cut Pearson variant, used in the first round, put up to 26 cells there. Both give the same outcomes. The CS transient claims are each judged under any reading, and no single reading meets all eight of their criteria (the drop/mean reading meets five). The spike rate velocity is the first difference of the deposited 1 ms spike density, which gives values well above the paper's (for example 9.97 against 4.9 Hz/ms).

What was found about the data set. The file matches its published MD5. Recording depth, used by four claims, is not in the data set. The paper's Source data 1 on eLife gives it for the 270 first-dataset cells, which match the data set's cells by order on trial counts, per-trial eyelid closure at US onset and per-trial baseline rate, and gives none for the 102 second-dataset cells. The per-trial crAmplitude equals the eyelid position 13 ms before the stated US onset (exactly in the second dataset; in the first, the median per-recording largest difference is 1.1% closure), not at US onset as described. The per-trial facilitation follows reading (b) exactly in the second dataset over the whole 0-212 ms CS-US interval, not the last 200 ms, and only approximately in the first. The stored ephysMean is not the mean of the stored ephys trials in 26 recordings. 282 deposited trials have a baseline eyelid at or past half closure, which the Methods say were removed, although Source data 1 lists them among the valid trials. The first dataset has 18 mice, where the Results say 19 and the Methods 22. The US-only trials of 25 second-dataset cells and the optogenetic sessions are not deposited.

In [68]:
print(f"run time {time.time() - t_start:.0f} s; peak memory {resource.getrusage(resource.RUSAGE_SELF).ru_maxrss / 1e6:.2f} GB")
run time 489 s; peak memory 1.62 GB