Reproducing Heeringa (2024) from dandiset 001262¶

Paper. Heeringa AN (2024). Single-unit data for sensory neuroscience: Responses from the auditory nerve of young-adult and aging gerbils. Scientific Data 11, 411. doi:10.1038/s41597-024-03259-3. The claims file was written from the version of record (open access, PMC11035566), which has no supplement, and from the paper's MATLAB toolbox on Zenodo (doi:10.5281/zenodo.10370064).

Dandiset. DANDI:001262, version 0.241205.0959. The paper cites no DANDI version: its data statement points to the Dryad deposit (doi:10.5061/dryad.qv9s4mwn4), which the dandiset lists as a variant form. Two versions were published on 2024-12-05, 30 minutes apart; this is the more recent. The data check below shows that both hold the same 1160 files (same blobs), so the choice changes no number; the later one adds metadata only (the paper as relatedResource and protocol, keywords, funder, ethics).

What the dandiset holds. One NWB file per single unit, 1160 units from 104 gerbils, with per trial the spike times, the stimulus (frequency, level, delay, duration), the raw voltage trace, and per recording type one row of analysed outcomes (best frequency, spontaneous rate, threshold). The other analysed outcomes the paper describes (characteristic frequency, vector strength and its p-value, click latencies) are not in the files, so they are recomputed here from the spike times with the paper's own functions (named in its Methods), as described in the helper gerbil_an.py. Raw voltage traces are read only for the trials that hold very short inter-spike intervals (isi-exclusion).

Outside inputs. None. Method details come from the paper's Methods and from its code (Zenodo record 10370064), as cited in the helper and under each claim.

Claim Tested
table1-animals-units tested
table1-age-abr-weight tested
table1-bf-range tested
fig3-abr-age tested
females-fewer-in-old tested
oxygen-78 tested
complex-stimuli-experiments tested
recording-type-counts tested
fig7-sampling-by-age tested
isi-exclusion tested
no-prepotentials blocked (methods underspecified)
rlf-monotonic blocked (methods underspecified); description shown
fig5b-example tested
fig6a-young-two-sensitive-regions tested
fig6b-young-bf-gap tested
fig6c-sr-distributions tested
fig6d-max-phase-locking-bf tested
fig6d-highest-vs-low-bf-low-sr tested
fig7a-cf-matches-bf tested
fig7b-click-latency-bf tested
fig7ab-representative-sampling tested
old-success-rate blocked (data missing)
psth-primary-like blocked (methods underspecified)
In [1]:
import time
import warnings

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

import gerbil_an as g

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

started = time.time()
assets = g.list_assets()
units = g.load_all(assets)
print(f"read {len(units)} files of dandiset {g.DANDISET_ID} version {g.DANDISET_VERSION} "
      f"in {time.time() - started:.0f} s")
read 1160 files of dandiset 001262 version 0.241205.0959 in 49 s

Data check¶

One row per unit, with the animal metadata parsed from the file and the analysed outcomes from its analysis table. Each check of the metadata against the values is stated under its output.

In [2]:
earlier = g.list_assets("0.241205.0929")
same = (set(zip(assets.path, assets.blob)) == set(zip(earlier.path, earlier.blob)))
print(f"Versions 0.241205.0929 and {g.DANDISET_VERSION}: {len(earlier)} and {len(assets)} files; "
      f"same paths and blobs: {same}")
meta = requests.get(
    f"{g.API}/dandisets/{g.DANDISET_ID}/versions/{g.DANDISET_VERSION}/", timeout=60).json()
summ = meta["assetsSummary"]
print("Archive summary: subjects", summ["numberOfSubjects"], "; files", summ["numberOfFiles"],
      "; species", [s["name"] for s in summ["species"]],
      "; variableMeasured", summ["variableMeasured"],
      "; measurementTechnique", [m["name"] for m in summ["measurementTechnique"]])
Versions 0.241205.0929 and 0.241205.0959: 1160 and 1160 files; same paths and blobs: True
Archive summary: subjects 104 ; files 1160 ; species ['Meriones unguiculatus'] ; variableMeasured ['VoltageClampStimulusSeries', 'Units'] ; measurementTechnique ['voltage clamp technique', 'spike sorting technique']
In [3]:
rows = []
for u in units:
    a = u["analysis"].set_index("experiment")
    sr_best, sr_source = np.nan, None
    for k in ["SR", "PH", "RLF", "BF"]:          # best estimate of SR, check_dataset_units.m
        if k in a.index and not np.isnan(a.sr[k]):
            sr_best, sr_source = a.sr[k], k
            break
    t = u["trials"]
    rows.append({
        "path": u["path"], "animal": u["subject_id"], "unit": u["identifier"].split(":", 1)[1],
        "age_days": g.age_days(u["age"]), "sex": u["sex"], "weight_g": g.weight_g(u["weight"]),
        "abr_field": g.abr_field(u["notes"]), "oxygen": g.oxygen(u["surgery"]),
        "speaker": g.speaker(u["stimulus_description"]),
        "types": tuple(sorted(t.experiment.unique())),
        "analysis_rows": tuple(u["analysis"].experiment),
        "bf": a.bf.get("BF", np.nan), "rlf_threshold": a.threshold.get("RLF", np.nan),
        "sr_best": sr_best, "sr_source": sr_source, "sr_SR": a.sr.get("SR", np.nan),
        "n_trials": len(t), "n_spikes": int(t.n_spikes.sum()), "nan_placeholders": u["n_nan_spikes"],
        "tags_match": bool(all(tag.startswith(e + "_") for tag, e in zip(t.tag, t.experiment))),
    })
U = pd.DataFrame(rows)
U["abr"] = U.abr_field.map(g.abr_decoded)
U["group"] = U.age_days.map(g.age_group)
by_path = {u["path"]: u for u in units}
print("Units:", len(U), "; animals:", U.animal.nunique(), "; species in files:",
      sorted({u["species"] for u in units}))
print("Each file's subject folder matches its subject_id:",
      bool((U.path.str.split("/").str[0] == "sub-" + U.animal).all()))
print("Animal metadata constant within each animal (age, sex, weight, ABR, oxygen, speaker):",
      bool((U.groupby("animal")[["age_days", "sex", "weight_g", "abr_field", "oxygen", "speaker"]]
            .nunique(dropna=False) <= 1).all().all()))
print("Every trial's tag starts with its recording type:", bool(U.tags_match.all()))
print("Recording types in the analysis table and in the trials agree:",
      bool((U.analysis_rows.map(lambda x: tuple(sorted(x))) == U.types).all()),
      "; analysis rows with a repeated type:", int(U.analysis_rows.map(lambda x: len(x) != len(set(x))).sum()))
print("Analysis table columns in every file:", sorted({c for u in units for c in u["analysis_columns"]}),
      "; files with other columns:", sum(u["analysis_columns"] != units[0]["analysis_columns"] for u in units))
print("Trial (stimulus) table columns:", sorted({c for u in units for c in u["stimulus_columns"]}))
print("Units per recording type:")
print(pd.Series([t for ts in U.types for t in ts]).value_counts().to_string())
Units: 1160 ; animals: 104 ; species in files: ['Meriones unguiculatus']
Each file's subject folder matches its subject_id: True
Animal metadata constant within each animal (age, sex, weight, ABR, oxygen, speaker): True
Every trial's tag starts with its recording type: True
Recording types in the analysis table and in the trials agree: True ; analysis rows with a repeated type: 0
Analysis table columns in every file: ['experiment', 'id', 'results_bf', 'results_sr', 'results_threshold'] ; files with other columns: 0
Trial (stimulus) table columns: ['click_polarity', 'delay', 'duration', 'experiment_name', 'frequency', 'id', 'isi', 'level_dBSPL', 'level_dBSPL_index', 'presentation_number', 'radVary', 'ramp', 'side', 'stimtype', 'stimulus']
Units per recording type:
BF       1152
RLF       952
PH        281
CLICK     275
SR        203
NOISE     143
CVC       135
CF        119
SPS        22

Every file opens, every subject folder matches the file's subject_id, and the animal metadata are the same in all files of an animal, so animals are counted by subject_id. The archive's summary of 104 subjects matches. Each unit is in one file, so no unit has to be matched across files. The trial table and the spike-time table have one row per trial in the same order (every tag begins with the trial's recording type), and each recording type appears once per unit in the analysis table. The analysis table has only the columns experiment, id, results_bf, results_sr and results_threshold in every file: the CF, vector strength with its p-value and the click latencies are not stored.

In [4]:
print("Ages (days), by group:")
print(U.groupby("group").age_days.agg(["min", "max", "size"]).to_string())
print("\nRaw weight strings, examples:", U.drop_duplicates("animal").weight_g.head(3).tolist(),
      [by_path[p]["weight"] for p in U.drop_duplicates("animal").path.head(3)])
print("Weights (g): min", U.weight_g.min(), "max", U.weight_g.max(), "; unparsed:", int(U.weight_g.isna().sum()))
print("Sex values:", U.drop_duplicates("animal").sex.value_counts().to_dict())
print("Oxygen field per animal:", U.drop_duplicates("animal").oxygen.value_counts().to_dict())
print("Speaker per animal:", U.drop_duplicates("animal").speaker.value_counts().to_dict())
print("\nNotes field, example:", repr(units[0]["notes"]))
ab = U.drop_duplicates("animal")
print("\nABR field after 'threshold (db SPL): ' per animal (repr), with its code point:")
print(ab.abr_field.map(lambda s: (repr(s), ord(s) if len(s) == 1 else None)).value_counts().to_string())
dec = ab.abr.dropna()
print("Decoded thresholds: values", sorted(dec.unique().tolist()), "; all multiples of 5:",
      bool((dec % 5 == 0).all()), "; animals with 'NaN':", int((ab.abr_field == "NaN").sum()))
Ages (days), by group:
           min     max  size
group                       
middle   382.0  1009.0    87
old     1096.0  1269.0   314
young     83.0   347.0   759

Raw weight strings, examples: [65.0, 66.6, 51.2] ['65g', '6.660000e+01g', '5.120000e+01g']
Weights (g): min 51.2 max 120.0 ; unparsed: 0
Sex values: {'M': 54, 'F': 50}
Oxygen field per animal: {'yes': 78, 'no': 26}
Speaker per animal: {'IE 800': 74, 'ER-2': 30}

Notes field, example: 'ABR: stimulus: Chirp, 0.3-10 kHz, 4.2 ms; threshold (db SPL): \x0f'

ABR field after 'threshold (db SPL): ' per animal (repr), with its code point:
abr_field
('\x0f', 15)     18
('\x14', 20)     17
('\x19', 25)     12
('NaN', None)    11
('\n', 10)        7
('\x1e', 30)      7
('#', 35)         7
('(', 40)         6
('2', 50)         4
('<', 60)         4
('-', 45)         3
('A', 65)         3
('K', 75)         3
('P', 80)         1
('U', 85)         1
Decoded thresholds: values [10.0, 15.0, 20.0, 25.0, 30.0, 35.0, 40.0, 45.0, 50.0, 60.0, 65.0, 75.0, 80.0, 85.0] ; all multiples of 5: True ; animals with 'NaN': 11

The ABR threshold is not readable as written. In every file general/notes ends with "threshold (db SPL): " followed by a single character, or by "NaN". Read as code points, the characters are 10 to 85 in steps of 5 (for example "#" is 35 and "K" is 75; some are control characters such as a line feed, 10), which is the range Table 1 gives (10 to 85 dB SPL). The number appears to have been written as a character in the conversion to NWB. This is a format error in the files; the claims that use the ABR threshold read it as the character's code point, an interpretation the data support (the values are multiples of 5 and in the paper's range) but do not prove. 11 animals have "NaN". Ages are given in days (P85D), weights as text with a unit (65g, 6.110000e+01g), and oxygen as "yes" or "no" in general/surgery.

In [5]:
print("BF (stored, Hz): min", U.bf.min(), "max", U.bf.max(), "; units with a BF recording:",
      int(U.types.map(lambda x: "BF" in x).sum()), "; BF NaN:", int(U.bf.isna().sum()))
print("RLF threshold (stored, dB SPL): min", round(U.rlf_threshold.min(), 1), "max", round(U.rlf_threshold.max(), 1),
      "; non-NaN", int(U.rlf_threshold.notna().sum()), "of", int(U.types.map(lambda x: "RLF" in x).sum()), "RLF units")
print("SR best estimate (spikes/s): min", U.sr_best.min(), "max", round(U.sr_best.max(), 1),
      "; source:", U.sr_source.value_counts(dropna=False).to_dict())
print("Spike-time NaN placeholders (trials with no spike):", int(U.nan_placeholders.sum()),
      "; trials:", int(U.n_trials.sum()))
allt = pd.concat([u["trials"].assign(path=u["path"]) for u in units], ignore_index=True)
print("\nTrial parameters by recording type:")
summary = allt.groupby("experiment").agg(
    trials=("tag", "size"), delay_ms=("delay", lambda x: sorted(set(np.round(x.dropna() * 1000, 2)))),
    duration_ms=("duration", lambda x: sorted(set(np.round(x.dropna() * 1000, 1)))[:4]),
    trial_ms=("trial_s", lambda x: sorted(set(np.round(x.dropna() * 1000, 1)))[:6]),
    level_min=("level", lambda x: x[x > -99999].min()), level_max=("level", "max"),
    delay_nan=("delay", lambda x: int(x.isna().sum())))
print(summary.to_string())
late = []
for u in units:
    for (_, tr), s in zip(u["trials"].iterrows(), u["spikes"]):
        if len(s) and (s.min() < 0 or s.max() > tr.trial_s + 1e-9):
            late.append(u["path"])
            break
print("\nUnits with a spike outside [0, trial length]:", len(late))
srt = sum(any(np.any(np.diff(s) < 0) for s in u["spikes"]) for u in units)
print("Units with unsorted spike times within a trial:", srt)
dups = U.assign(h=[hash(np.concatenate(u["spikes"] + [np.zeros(1)]).tobytes()) for u in units]).h.duplicated().sum()
print("Units whose spike times duplicate another unit's:", int(dups))
BF (stored, Hz): min 350.0 max 15825.0 ; units with a BF recording: 1152 ; BF NaN: 9
RLF threshold (stored, dB SPL): min 7.0 max 100.3 ; non-NaN 952 of 952 RLF units
SR best estimate (spikes/s): min 0.0 max 176.2 ; source: {'RLF': 744, 'BF': 204, 'SR': 203, 'PH': 9}
Spike-time NaN placeholders (trials with no spike): 48588 ; trials: 657673
Trial parameters by recording type:
            trials delay_ms       duration_ms       trial_ms  level_min   level_max  delay_nan
experiment                                                                                    
BF          133000   [7.75]            [50.0]  [80.0, 200.0]  13.565573   98.969620          0
CF           97416   [7.75]            [50.0]  [80.0, 200.0]  -0.096000  109.976618          0
CLICK       101650       []                []   [10.0, 20.0]        NaN         NaN     101650
CVC          21300       []  [2013.0, 2038.0]       [1145.8]  65.000000   80.000000      21300
NOISE        10890       []          [3038.0]       [2400.1]  20.000000   91.746188      10890
PH           59540   [7.75]            [50.0]  [80.0, 200.0]  -6.572393  107.344143          0
RLF         225367   [7.75]            [50.0]  [80.0, 200.0]  -6.572393  115.169759          0
SPS           6440       []          [3038.0]       [2000.5]  60.000000   60.000000       6440
SR            2070       []                []       [2400.1]        NaN         NaN       2070
Units with a spike outside [0, trial length]: 0
Units with unsorted spike times within a trial: 0
Units whose spike times duplicate another unit's: 0

Spike times are in seconds from the start of each trial: tone trials start the tone at 7.75 ms and last 50 ms, and no spike falls outside its trial's length (taken from the length of the voltage trace at 48,828.125 Hz, the rate the Methods give). Spike times are sorted within trials, and no unit's spike train duplicates another's, so no recording was deposited twice. Empty trials hold a single NaN. The CLICK trials, and the SR, NOISE and CVC trials, carry no delay (NaN): the click's onset in the trial is not in the files.

The next cell checks that spikes and the trial table share a clock, with a contrast between conditions: the rate in tone trials minus the rate in the interleaved silent trials, in 5 ms windows from the start of the trial, over the BF and RLF recordings. If the clock is shared, the difference is near zero before 7.75 ms and large from a few milliseconds after it. It then checks that the stored best frequency agrees with the frequency of the highest tone-evoked rate computed from the spike times.

In [6]:
edges = np.arange(0, 0.0801, 0.005)
diff_rows = []
for u in units:
    t = u["trials"]
    for exp in ["BF", "RLF"]:
        idx = np.flatnonzero(t.experiment.values == exp)
        if len(idx) == 0:
            continue
        tone = [u["spikes"][i] for i in idx if t.frequency.values[i] != g.SPONT]
        sil = [u["spikes"][i] for i in idx if t.frequency.values[i] == g.SPONT]
        if not tone or not sil:
            continue
        rt = np.histogram(np.concatenate(tone), edges)[0] / len(tone) / 0.005
        rs = np.histogram(np.concatenate(sil), edges)[0] / len(sil) / 0.005
        diff_rows.append(rt - rs)
diff = np.array(diff_rows)
print(f"{len(diff)} BF and RLF recordings with tone and silent trials")
print("Window (ms)  median(tone - silent)  fraction of recordings with tone > silent")
for i in range(len(edges) - 1):
    print(f"{edges[i]*1000:5.0f}-{edges[i+1]*1000:<5.0f}  {np.median(diff[:, i]):10.1f}  {np.mean(diff[:, i] > 0):10.2f}")

# stored BF against the frequency of the highest mean tone-evoked rate in the BF recording
cmp = []
for u in units:
    t, sp = g.trials_of(u, "BF")
    b = U.loc[U.path == u["path"], "bf"].iloc[0]
    if len(t) == 0 or np.isnan(b):
        continue
    t = t.assign(rate=[np.sum((s > a) & (s < a + d)) / d for s, a, d in zip(sp, t.delay, t.duration)])
    m = t[t.frequency != g.SPONT].groupby("frequency").rate.mean()
    cmp.append(np.log2(m.idxmax() / b))
cmp = np.array(cmp)
print(f"\nStored BF against the raw peak of the frequency-response curve, {len(cmp)} units: "
      f"median |log2 ratio| {np.median(np.abs(cmp)):.3f} octaves; within 0.25 octave {np.mean(np.abs(cmp) <= 0.25):.2f}")
2104 BF and RLF recordings with tone and silent trials
Window (ms)  median(tone - silent)  fraction of recordings with tone > silent
    0-5             2.9        0.57
    5-10            7.5        0.62
   10-15          147.3        0.96
   15-20          134.5        0.98
   20-25          110.5        0.95
   25-30           97.8        0.95
   30-35           95.0        0.95
   35-40           90.0        0.95
   40-45           87.4        0.94
   45-50           87.2        0.94
   50-55           82.4        0.93
   55-60           18.8        0.69
   60-65          -15.6        0.32
   65-70          -15.5        0.32
   70-75          -10.7        0.36
   75-80           -7.6        0.37
Stored BF against the raw peak of the frequency-response curve, 1151 units: median |log2 ratio| 0.010 octaves; within 0.25 octave 0.97

Before the tone (0 to 5 ms) the tone and silent trials do not differ; from 10 ms the tone trials fire far more (median difference 147 spikes/s at 10 to 15 ms, with tone above silent in 96% of recordings), and after the tone ends (57.75 ms) the tone trials fall below the silent ones, the offset suppression expected of auditory nerve fibres. The spikes and the trial table share a clock in the BF and RLF recordings, the ones whose timing matters for the claims (PH and CF use the same delay and duration). The stored BF is close to the raw peak of the spike-time frequency-response curve (the stored value is the peak of a smoothing spline, Methods), so the analysis table and the spike times describe the same recordings.

table1-animals-units¶

The dataset holds 104 experiments (gerbils) with 1160 single auditory nerve fibres; 60 young-adult (32 female), 13 middle-aged (7 female) and 31 old (11 female) gerbils, with 759, 87 and 314 single units.

Animals by subject_id, age groups by age in days as the code defines them (young <= 365, middle > 365 and <= 1095, old > 1095).

In [7]:
A = U.groupby("animal").agg(age_days=("age_days", "first"), sex=("sex", "first"),
                            weight_g=("weight_g", "first"), abr=("abr", "first"),
                            oxygen=("oxygen", "first"), group=("group", "first"), units=("path", "size"))
table = pd.DataFrame({
    "animals": A.groupby("group").size(),
    "females": A[A.sex == "F"].groupby("group").size(),
    "units": U.groupby("group").size()}).loc[["young", "middle", "old"]]
print(table.to_string())
print("Total animals:", len(A), "; total units:", len(U))
paper = {"young": (60, 32, 759), "middle": (13, 7, 87), "old": (31, 11, 314)}
match = all(tuple(table.loc[k]) == v for k, v in paper.items()) and len(A) == 104 and len(U) == 1160
print("Paper: 60 (32) 759; 13 (7) 87; 31 (11) 314; totals 104 and 1160. All eleven counts match:", match)
print("Units per animal: min", A.units.min(), "median", A.units.median(), "max", A.units.max())
        animals  females  units
group                          
young        60       32    759
middle       13        7     87
old          31       11    314
Total animals: 104 ; total units: 1160
Paper: 60 (32) 759; 13 (7) 87; 31 (11) 314; totals 104 and 1160. All eleven counts match: True
Units per animal: min 1 median 9.5 max 39

Result: reproduced. 104 animals and 1160 units; 60 young adults (32 female) with 759 units, 13 middle aged (7 female) with 87, and 31 old (11 female) with 314. All eleven counts match.

table1-age-abr-weight¶

Mean ages of the groups are 5.5, 22.5 and 38.3 months, mean ABR thresholds 18.1, 34.2 and 49.0 dB SPL, and mean weights 74.6, 83.4 and 86.4 g (young adult, middle aged, old).

Over animals, missing values left out, months = days / (365/12) (check_dataset_metadata.m). The ABR threshold is the code point of the character in the notes (data check above).

In [8]:
A["age_months"] = A.age_days / g.DAYS_PER_MONTH
rows = []
expected = {"age_months": (5.5, 22.5, 38.3), "abr": (18.1, 34.2, 49.0), "weight_g": (74.6, 83.4, 86.4)}
for var, exp in expected.items():
    for grp, e in zip(["young", "middle", "old"], exp):
        v = A.loc[A.group == grp, var].dropna()
        rows.append({"variable": var, "group": grp, "n": len(v), "mean": round(v.mean(), 3), "mean_1dp": round(v.mean(), 1), "sd": round(v.std(), 2),
                     "min": round(v.min(), 1), "max": round(v.max(), 1), "paper_mean": e,
                     "within_10pct": abs(v.mean() - e) <= 0.1 * e,
                     "equal_after_rounding": round(v.mean(), 1) == e})
res = pd.DataFrame(rows)
print(res.to_string(index=False))
print("Means within tolerance:", int(res.within_10pct.sum()), "of 9")
print("Means equal to the paper's after rounding to one decimal:", int(res.equal_after_rounding.sum()), "of 9")
print("Animals without an ABR threshold, by group:", A[A.abr.isna()].group.value_counts().to_dict())
  variable  group  n   mean  mean_1dp    sd  min   max  paper_mean  within_10pct  equal_after_rounding
age_months  young 60  5.547       5.5  2.03  2.7  11.4         5.5          True                  True
age_months middle 13 22.490      22.5  6.22 12.6  33.2        22.5          True                  True
age_months    old 31 38.328      38.3  1.70 36.0  41.7        38.3          True                  True
       abr  young 50 18.100      18.1  5.33 10.0  30.0        18.1          True                  True
       abr middle 12 34.167      34.2 10.19 20.0  50.0        34.2          True                  True
       abr    old 31 49.032      49.0 18.00 20.0  85.0        49.0          True                  True
  weight_g  young 60 74.607      74.6 11.07 51.2 100.0        74.6          True                  True
  weight_g middle 13 83.354      83.4 12.67 66.8 103.0        83.4          True                  True
  weight_g    old 31 86.413      86.4 11.60 60.0 120.0        86.4          True                  True
Means within tolerance: 9 of 9
Means equal to the paper's after rounding to one decimal: 9 of 9
Animals without an ABR threshold, by group: {'young': 10, 'middle': 1}

Result: reproduced. All nine means are within tolerance and, rounded to one decimal, equal the paper's: ages 5.547, 22.490 and 38.328 months, ABR thresholds 18.100, 34.167 and 49.032 dB SPL, weights 74.607, 83.354 and 86.413 g. The SDs and ranges printed also match Table 1 (for example ABR SD 5.33, 10.19 and 18.00, range 20 to 85 in old animals). The ABR values rest on reading the notes' character as its code point; 10 young adults and 1 middle-aged animal have "NaN" and are left out, as the code's mean(..., 'omitnan') does.

table1-bf-range¶

Best frequencies range from 428 to 15,825 Hz in young adults, 350 to 15,091 Hz in middle-aged and 620 to 15,762 Hz in old gerbils.

A unit's BF is its stored BF, or its CF when it has no BF recording (check_dataset_metadata.m). The CF is not stored in the files, so it is recomputed from the CF recording (helper, cf_from_cf_recording).

In [9]:
U["cf"] = [g.cf_from_cf_recording(by_path[p])[0] for p in U.path]
no_bf = U[~U.types.map(lambda x: "BF" in x)]
print("Units without a BF recording:", len(no_bf))
print(no_bf[["animal", "unit", "group", "types", "cf"]].to_string(index=False))
U["bf_or_cf"] = U.bf.where(U.types.map(lambda x: "BF" in x), U.cf)
rng = U.groupby("group").agg(min_bf=("bf_or_cf", "min"), max_bf=("bf_or_cf", "max"), n=("bf_or_cf", "count"),
                             min_stored=("bf", "min"), max_stored=("bf", "max")).loc[["young", "middle", "old"]]
rng["paper"] = ["428-15825", "350-15091", "620-15762"]
print(rng.to_string())
paper = {"young": (428, 15825), "middle": (350, 15091), "old": (620, 15762)}
ok = {k: abs(rng.loc[k, "min_bf"] - lo) <= 0.1 * lo and abs(rng.loc[k, "max_bf"] - hi) <= 0.1 * hi
      for k, (lo, hi) in paper.items()}
print("Within 10% of both bounds:", ok)
Units without a BF recording: 8
 animal      unit group                types     cf
G150730 6P_1425nm young (CF, CLICK, PH, RLF)  870.0
G150922  1P_695nm young        (CF, PH, RLF)  725.0
G151126     903nm young        (CF, PH, RLF)  800.0
G151126     893nm young (CF, CLICK, PH, RLF)  700.0
G151203 1P_1104nm young (CF, CLICK, PH, RLF) 4000.0
G170508       750   old            (PH, RLF)    NaN
G170512    4P_321 young         (NOISE, RLF)    NaN
G180205     820nm young               (RLF,)    NaN
        min_bf   max_bf    n  min_stored  max_stored      paper
group                                                          
young    428.0  15825.0  756       428.0     15825.0  428-15825
middle   350.0  15091.0   87       350.0     15091.0  350-15091
old      620.0  15762.0  313       620.0     15762.0  620-15762
Within 10% of both bounds: {'young': np.True_, 'middle': np.True_, 'old': np.True_}

Result: reproduced. The ranges are 428 to 15,825 Hz (young), 350 to 15,091 Hz (middle aged) and 620 to 15,762 Hz (old), the paper's values exactly, with or without the recomputed CF of the units that have no BF recording (none of those CFs is outside the range).

fig3-abr-age¶

ABR thresholds rise with age, and hearing loss varies widely among the old animals.

Over animals; reproduced when the mean ABR threshold increases from young to middle aged to old and the SD of old animals is the largest of the three.

In [10]:
s = A.groupby("group").abr.agg(["mean", "std", "min", "max", "count"]).loc[["young", "middle", "old"]].round(2)
print(s.to_string())
inc = s["mean"].is_monotonic_increasing
print("Mean increases young < middle < old:", inc, "; old SD the largest:", s["std"].idxmax() == "old")
rho = stats.spearmanr(A.age_days, A.abr, nan_policy="omit")
print(f"Spearman correlation of age with ABR threshold over {A.abr.notna().sum()} animals: "
      f"rho = {rho.statistic:.2f}, p = {rho.pvalue:.2g}")
for sex in ["F", "M"]:
    sub = A[A.sex == sex].groupby("group").abr.mean().loc[["young", "middle", "old"]].round(1)
    print(f"Mean ABR by group, {sex}:", sub.to_dict())
fig, ax = plt.subplots(figsize=(5, 3.5))
for sex, col in [("F", "tab:green"), ("M", "tab:purple")]:
    d = A[A.sex == sex]
    ax.scatter(d.age_days / g.DAYS_PER_MONTH, d.abr, s=18, color=col, label=sex)
ax.set_xlabel("Age (months)"); ax.set_ylabel("ABR threshold (dB SPL)"); ax.legend()
print("Plotted ranges: age", round(A.age_days.min() / g.DAYS_PER_MONTH, 1), "to",
      round(A.age_days.max() / g.DAYS_PER_MONTH, 1), "months; ABR", A.abr.min(), "to", A.abr.max(), "dB SPL")
         mean    std   min   max  count
group                                  
young   18.10   5.33  10.0  30.0     50
middle  34.17  10.19  20.0  50.0     12
old     49.03  18.00  20.0  85.0     31
Mean increases young < middle < old: True ; old SD the largest: True
Spearman correlation of age with ABR threshold over 93 animals: rho = 0.85, p = 5.7e-27
Mean ABR by group, F: {'young': 17.8, 'middle': 36.4, 'old': 47.7}
Mean ABR by group, M: {'young': 18.5, 'middle': 31.0, 'old': 49.8}
Plotted ranges: age 2.7 to 41.7 months; ABR 10.0 to 85.0 dB SPL
No description has been provided for this image

Result: reproduced. Mean ABR thresholds are 18.1, 34.2 and 49.0 dB SPL in young, middle-aged and old animals, and the SD of the old animals is the largest (18.0, against 5.3 and 10.2), with old thresholds from 20 to 85 dB SPL. Over 93 animals, age and threshold correlate (Spearman rho = 0.85, p = 5.7e-27). It rests on reading the ABR character as its code point.

females-fewer-in-old¶

Old gerbils are skewed towards males (11 of 31 female), which the paper attributes to ovarian cancer and early death of old females.

In [11]:
frac = A.groupby("group").apply(lambda d: pd.Series({"female": int((d.sex == "F").sum()), "animals": len(d)}))
frac["fraction_female"] = (frac.female / frac.animals).round(3)
print(frac.loc[["young", "middle", "old"]].to_string())
old_f, young_f = frac.loc["old", "fraction_female"], frac.loc["young", "fraction_female"]
print("Old fraction below one half:", old_f < 0.5, "; below young adults:", old_f < young_f)
f = stats.fisher_exact([[frac.loc["old", "female"], frac.loc["old", "animals"] - frac.loc["old", "female"]],
                        [frac.loc["young", "female"], frac.loc["young", "animals"] - frac.loc["young", "female"]]])
print(f"Fisher's exact test, old against young (not part of the criterion): odds ratio {f.statistic:.2f}, p = {f.pvalue:.3f}")
        female  animals  fraction_female
group                                   
young       32       60            0.533
middle       7       13            0.538
old         11       31            0.355
Old fraction below one half: True ; below young adults: True
Fisher's exact test, old against young (not part of the criterion): odds ratio 0.48, p = 0.125

Result: reproduced. 11 of 31 old animals are female (0.355), below one half and below the young adults (32 of 60, 0.533). The difference from young adults is not significant by Fisher's exact test (p = 0.125), which the paper does not claim. The cause is not tested.

oxygen-78¶

Of the 104 gerbils, 78 received additional oxygen throughout the experiment.

Counted once per animal from "oxygen: yes|no" in general/surgery.

In [12]:
print(A.oxygen.value_counts().to_string())
print("By group:", A.groupby("group").oxygen.apply(lambda s: int((s == "yes").sum())).to_dict())
oxygen
yes    78
no     26
By group: {'middle': 6, 'old': 31, 'young': 41}

Result: reproduced. 78 of 104 animals have "oxygen: yes".

complex-stimuli-experiments¶

Responses to paired noise bursts were recorded in 21 of 104 experiments, Schroeder-phase stimuli in 5, and consonant-vowel-consonant logatomes in 17.

An experiment counts when at least one of its units has a NOISE, SPS or CVC recording.

In [13]:
for t in ["NOISE", "SPS", "CVC"]:
    has = U[U.types.map(lambda x: t in x)]
    print(f"{t}: {has.animal.nunique()} experiments, {len(has)} units; by group of animals:",
          has.drop_duplicates("animal").group.value_counts().to_dict())
NOISE: 21 experiments, 143 units; by group of animals: {'young': 8, 'old': 8, 'middle': 5}
SPS: 5 experiments, 22 units; by group of animals: {'young': 5}
CVC: 17 experiments, 135 units; by group of animals: {'young': 11, 'old': 6}

Result: reproduced. NOISE in 21, SPS in 5 and CVC in 17 of the 104 experiments.

recording-type-counts¶

CF recordings were obtained for 119 fibres, CLICK for 261, SR for 203, NOISE for 143, SPS for 22 and CVC for 135.

Reading 1 (as check_dataset_units.m prints them): CF, units with a non-NaN CF; CLICK, units with exactly one CLICK recording and a non-NaN 2-bin latency; SR, units with a non-NaN SR from an SR recording; NOISE, SPS and CVC, units with a recording of that type. Reading 2: units with any recording of the type. The stored CF and click latency are not in the files; reading 1 uses the values recomputed with the paper's functions (helper). The click delay is not in the files: the latency uses 7.75 ms (assumption, helper docstring), with 5 ms shown as a variant.

In [14]:
U["click_latency"] = [g.click_latency_2bins(by_path[p]) for p in U.path]
U["click_latency_d5"] = [g.click_latency_2bins(by_path[p], delay=0.005) for p in U.path]
n_click_seq = pd.Series([sum(s.split("_")[0] == "CLICK" for s in by_path[p]["sequential_types"]) for p in U.path])
has = {t: U.types.map(lambda x, t=t: t in x) for t in ["CF", "CLICK", "SR", "NOISE", "SPS", "CVC"]}
click_spikes = pd.Series([sum(len(s) for s in g.trials_of(by_path[p], "CLICK")[1]) for p in U.path])
print("CLICK sequential recordings per unit:", n_click_seq[has["CLICK"]].value_counts().to_dict(),
      "; trials per CLICK recording:",
      pd.Series([len(g.trials_of(by_path[p], "CLICK")[0]) for p in U.path[has["CLICK"]]]).value_counts().to_dict())
print("CLICK units with 75 spikes or fewer (not analysed by Clickextract_func.m):", int((has["CLICK"] & (click_spikes <= 75)).sum()))
counts = pd.DataFrame({
    "paper": [119, 261, 203, 143, 22, 135],
    "reading_1": [int(U.cf.notna().sum()), int((has["CLICK"] & (n_click_seq == 1) & U.click_latency.notna()).sum()),
                  int(U.sr_SR.notna().sum()), int(has["NOISE"].sum()), int(has["SPS"].sum()), int(has["CVC"].sum())],
    "reading_2": [int(has[t].sum()) for t in ["CF", "CLICK", "SR", "NOISE", "SPS", "CVC"]],
}, index=["CF", "CLICK", "SR", "NOISE", "SPS", "CVC"])
counts["click_delay_5ms"] = counts.reading_1
counts.loc["CLICK", "click_delay_5ms"] = int((has["CLICK"] & U.click_latency_d5.notna()).sum())
print(counts.to_string())
for r in ["reading_1", "reading_2"]:
    print(f"{r}: {int((counts[r] == counts.paper).sum())} of 6 match")
CLICK sequential recordings per unit: {1: 275} ; trials per CLICK recording: {300: 178, 500: 96, 250: 1}
CLICK units with 75 spikes or fewer (not analysed by Clickextract_func.m): 1
       paper  reading_1  reading_2  click_delay_5ms
CF       119        119        119              119
CLICK    261        271        275              272
SR       203        203        203              203
NOISE    143        143        143              143
SPS       22         22         22               22
CVC      135        135        135              135
reading_1: 5 of 6 match
reading_2: 5 of 6 match

The click delay is an assumption, so the next cell checks it against the data. The CLICK trials last 10 or 20 ms. If the click comes at the same time in both, the population PSTH rises at the same time in both, and latencies computed with one delay lie on the same latency-BF relation. The cell also prints the click_polarity values, and compares the two halves of the 500-trial recordings with an odd/even split, in case two recordings were merged into one in the conversion to NWB.

In [15]:
CL = []
for p in U.path[has["CLICK"]]:
    t, sp = g.trials_of(by_path[p], "CLICK")
    CL.append({"path": p, "trials": len(t), "trial_ms": int(round(t.trial_s.iloc[0] * 1000)),
               "polarity": tuple(sorted(set(t.click_polarity))), "tags_unique": t.tag.nunique()})
CL = pd.DataFrame(CL).merge(U[["path", "animal", "bf", "click_latency"]], on="path")
print("click_polarity values:", CL.polarity.value_counts().to_dict())
print("CLICK recordings by trials and trial length (ms):", CL.groupby(["trials", "trial_ms"]).size().to_dict(),
      "; every trial tag distinct within a recording:", bool((CL.tags_unique == CL.trials).all()))
pe = np.arange(0, 0.02001, 0.00025)
n_by_delay = {d: int(sum(not np.isnan(g.click_latency_2bins(by_path[p], delay=d / 1000)) for p in CL.path))
              for d in [5.0, 6.0, 7.0, 7.5, 7.75, 8.0, 8.25]}
print("Units with a 2-bin latency, by assumed click delay (ms):", n_by_delay)
print("\nPopulation PSTH of CLICK trials (mean over units, spikes/s), 0.25 ms bins from 6.5 to 10 ms:")
for ms in [10, 20]:
    H = np.array([np.histogram(np.concatenate(g.trials_of(by_path[p], "CLICK")[1]), pe)[0]
                  / n / 0.00025 for p, n in zip(CL.path[CL.trial_ms == ms], CL.trials[CL.trial_ms == ms])])
    m = H.mean(axis=0)
    base = m[(pe[:-1] >= 0.001) & (pe[:-1] < 0.0075)]
    first = pe[np.flatnonzero((pe[:-1] >= 0.0075) & (m > base.mean() + 4 * base.std()))[0]]
    print(f"  {ms} ms trials ({len(H)} units):", {f"{pe[i]*1000:.2f}": int(m[i]) for i in range(26, 40)})
    print(f"    baseline 1 to 7.5 ms {base.mean():.0f} +/- {base.std():.0f}; first bin above baseline + 4 SD starts at {first*1000:.2f} ms")
k = CL.dropna(subset=["click_latency", "bf"])
k20 = k[k.trial_ms == 20]
fit = np.polyfit(np.log(k20.bf), k20.click_latency, 1)
res = (k.click_latency - np.polyval(fit, np.log(k.bf))) * 1000
print("\nLatency (7.75 ms delay) by trial length:")
print(k.assign(res=res).groupby("trial_ms").agg(units=("bf", "size"), animals=("animal", "nunique"),
      lat_min_ms=("click_latency", lambda x: round(x.min() * 1000, 2)), lat_max_ms=("click_latency", lambda x: round(x.max() * 1000, 2)),
      median_bf=("bf", "median"), median_residual_ms=("res", lambda x: round(x.median(), 3))).to_string())
print("Residual = latency minus the linear fit of latency on log BF in the 20 ms trials.")
print("Latency NaN by trial length:", CL[CL.click_latency.isna()].groupby("trial_ms").size().to_dict())

def sub_latency(p, idx):
    u = by_path[p]; t, sp = g.trials_of(u, "CLICK")
    v = dict(u, trials=t.iloc[idx].reset_index(drop=True), spikes=[sp[i] for i in idx])
    return g.click_latency_2bins(v), sum(len(sp[i]) for i in idx)
half = []
for p in CL.path[CL.trials == 500]:
    a = np.arange(500)
    (l1, c1), (l2, c2) = sub_latency(p, a[:250]), sub_latency(p, a[250:])
    (lo_, co), (le, ce) = sub_latency(p, a[::2]), sub_latency(p, a[1::2])
    half.append({"halves_ms": abs(l1 - l2) * 1000, "odd_even_ms": abs(lo_ - le) * 1000, "halves_ratio": c2 / c1, "odd_even_ratio": ce / co})
half = pd.DataFrame(half)
print(f"\n500-trial recordings ({len(half)}): |latency difference| median {half.halves_ms.median():.3f} ms between halves, "
      f"{half.odd_even_ms.median():.3f} ms between odd and even trials; above 0.2 ms: {int((half.halves_ms > 0.2).sum())} and {int((half.odd_even_ms > 0.2).sum())}")
print(f"  spike-count ratio outside 0.8 to 1.25: {int(((half.halves_ratio < 0.8) | (half.halves_ratio > 1.25)).sum())} between halves, "
      f"{int(((half.odd_even_ratio < 0.8) | (half.odd_even_ratio > 1.25)).sum())} between odd and even trials")
click_polarity values: {('COND',): 275}
CLICK recordings by trials and trial length (ms): {(250, 20): 1, (300, 20): 178, (500, 10): 35, (500, 20): 61} ; every trial tag distinct within a recording: True
Units with a 2-bin latency, by assumed click delay (ms): {5.0: 272, 6.0: 271, 7.0: 271, 7.5: 271, 7.75: 271, 8.0: 271, 8.25: 270}

Population PSTH of CLICK trials (mean over units, spikes/s), 0.25 ms bins from 6.5 to 10 ms:
  10 ms trials (35 units): {'6.50': 66, '6.75': 63, '7.00': 87, '7.25': 67, '7.50': 74, '7.75': 57, '8.00': 68, '8.25': 68, '8.50': 88, '8.75': 287, '9.00': 1254, '9.25': 602, '9.50': 792, '9.75': 353}
    baseline 1 to 7.5 ms 67 +/- 18; first bin above baseline + 4 SD starts at 8.75 ms
  20 ms trials (240 units): {'6.50': 53, '6.75': 54, '7.00': 59, '7.25': 54, '7.50': 52, '7.75': 54, '8.00': 56, '8.25': 156, '8.50': 592, '8.75': 740, '9.00': 538, '9.25': 430, '9.50': 497, '9.75': 335}
    baseline 1 to 7.5 ms 55 +/- 3; first bin above baseline + 4 SD starts at 8.25 ms

Latency (7.75 ms delay) by trial length:
          units  animals  lat_min_ms  lat_max_ms  median_bf  median_residual_ms
trial_ms                                                                       
10           31        9        0.71        1.84     2060.0              -0.032
20          237       59        0.42        2.78     5570.0              -0.027
Residual = latency minus the linear fit of latency on log BF in the 20 ms trials.
Latency NaN by trial length: {10: 2, 20: 2}
500-trial recordings (96): |latency difference| median 0.026 ms between halves, 0.020 ms between odd and even trials; above 0.2 ms: 2 and 5
  spike-count ratio outside 0.8 to 1.25: 5 between halves, 2 between odd and even trials

Result: partially reproduced. Five of six counts match under both readings: CF 119, SR 203, NOISE 143, SPS 22 and CVC 135. CLICK does not: 275 units have a CLICK recording (each one recording), and 271 of them give a 2-bin latency with the paper's function (272 with a 5 ms click delay), against 261 in the Fig. 7 legend. The mismatch does not rest on the assumed delay: reading 2 (275) uses no latency, and reading 1 gives 270 to 272 units for every delay printed from 5 to 8.25 ms. The checks of the delay are consistent with 7.75 ms. The population PSTH is flat up to 8.25 ms and rises in the bin from 8.25 ms in the 20 ms trials, and from 8.75 ms in the 10 ms trials. Those units have lower BFs (median 2060 against 5570 Hz), and their latencies lie on the same latency-BF line as in the 20 ms trials (median residual -0.032 against -0.027 ms). So, under the assumed delay, the click comes at the same time in both trial lengths to within about 0.05 ms; this is inferred from 31 units from 9 animals in the 10 ms trials, not measured. The latencies of the 10 ms trials (0.71 to 1.84 ms) fit inside them. These checks do not fix the absolute delay. click_polarity is "COND" in every CLICK trial and tells nothing. No sign was found that a 500-trial recording joins two recordings: its halves differ in latency by a median 0.026 ms, against 0.020 ms between odd and even trials, though 5 halves differ in spike count by more than a factor of 1.25 (2 for odd and even trials). The 10 or 14 extra units cannot be traced without the stored latencies.

fig7-sampling-by-age¶

No SR, SPS or CVC recordings were obtained in middle-aged gerbils, and SPS responses were recorded only in young adults.

In [16]:
tab = pd.DataFrame({t: U[has[t]].group.value_counts() for t in ["CF", "CLICK", "SR", "NOISE", "SPS", "CVC"]}
                   ).reindex(["young", "middle", "old"]).fillna(0).astype(int)
print("Units with a recording of each type, by age group:")
print(tab.to_string())
ok = tab.loc["middle", ["SR", "SPS", "CVC"]].sum() == 0 and tab.loc[["middle", "old"], "SPS"].sum() == 0
print("No middle-aged SR, SPS or CVC, and SPS only in young adults:", ok)
Units with a recording of each type, by age group:
        CF  CLICK   SR  NOISE  SPS  CVC
group                                  
young   83    149  122     72   22   66
middle  20     19    0     23    0    0
old     16    107   81     48    0   69
No middle-aged SR, SPS or CVC, and SPS only in young adults: True

Result: reproduced. No middle-aged unit has an SR, SPS or CVC recording, and all 22 SPS units are from young adults.

isi-exclusion¶

Units with multiple inter-spike intervals below 0.6 ms, the absolute refractoriness of auditory nerve fibres, were excluded from the dataset.

Within-trial ISIs (checkAN.m). Readings: (a) any recording of the unit with two or more ISIs < 0.6 ms; (b) two or more pooled over all the unit's recordings; (c) as (a) for the BF recording only. A recording here is a recording type of the unit (each type occurs once per unit, data check).

In [17]:
isi = {p: g.short_isis(by_path[p]) for p in U.path}
U["short_total"] = [sum(v[0] for v in isi[p].values()) for p in U.path]
U["short_max_rec"] = [max(v[0] for v in isi[p].values()) for p in U.path]
U["short_bf"] = [isi[p].get("BF", (0, 0))[0] for p in U.path]
U["isi_total"] = [sum(v[1] for v in isi[p].values()) for p in U.path]
fail = {"a": int((U.short_max_rec >= 2).sum()), "b": int((U.short_total >= 2).sum()), "c": int((U.short_bf >= 2).sum())}
print("Units failing (two or more ISIs < 0.6 ms):", fail, "of", len(U))
print("Units with at least one ISI < 0.6 ms:", int((U.short_total >= 1).sum()))
print("\nDistribution of a unit's count of short ISIs (pooled):")
print(U.short_total.value_counts().sort_index().pipe(lambda s: pd.concat([s[s.index <= 10], pd.Series({">10": s[s.index > 10].sum()})])).to_string())
frac = U.short_total / U.isi_total.where(U.isi_total > 0)
print(f"\nShort ISIs as a fraction of all ISIs, among failing units (b): median {frac[U.short_total >= 2].median():.4f}, "
      f"max {frac[U.short_total >= 2].max():.3f}")
print("Failing units (a) by age group:", U[U.short_max_rec >= 2].group.value_counts().to_dict(),
      "; by animal: in", U[U.short_max_rec >= 2].animal.nunique(), "of", U.animal.nunique(), "animals")
short = np.concatenate([np.diff(s)[np.diff(s) < g.SHORT_ISI_S] for u in units for s in u["spikes"] if len(s) > 1])
print(f"\nAll short ISIs: {len(short)}; in ms, quantiles 0, 0.25, 0.5, 0.75, 1:",
      np.round(np.quantile(short * 1000, [0, 0.25, 0.5, 0.75, 1]), 3).tolist())
print("Of them below 0.1 ms:", int((short < 0.0001).sum()), "; 0.1 to 0.3 ms:", int(((short >= 0.0001) & (short < 0.0003)).sum()),
      "; 0.3 to 0.6 ms:", int((short >= 0.0003).sum()))
for lim in [0.0003, 0.0001]:
    n = sum(any(sum(int(np.sum(np.diff(s) < lim)) for s in g.trials_of(by_path[p], e)[1]) >= 2
                for e in by_path[p]["trials"].experiment.unique()) for p in U.path)
    print(f"Variant limit {lim*1000:.1f} ms, reading (a): {n} units fail")
Units failing (two or more ISIs < 0.6 ms): {'a': 370, 'b': 391, 'c': 148} of 1160
Units with at least one ISI < 0.6 ms: 538

Distribution of a unit's count of short ISIs (pooled):
0      622
1      147
2       79
3       36
4       32
5       16
6       19
7       16
8       17
9        7
10       7
>10    162

Short ISIs as a fraction of all ISIs, among failing units (b): median 0.0013, max 0.223
Failing units (a) by age group: {'young': 279, 'old': 61, 'middle': 30} ; by animal: in 79 of 104 animals
All short ISIs: 13904; in ms, quantiles 0, 0.25, 0.5, 0.75, 1: [0.041, 0.287, 0.41, 0.512, 0.594]
Of them below 0.1 ms: 1171 ; 0.1 to 0.3 ms: 2541 ; 0.3 to 0.6 ms: 10192
Variant limit 0.3 ms, reading (a): 140 units fail
Variant limit 0.1 ms, reading (a): 5 units fail

The verifier asked whether the very short intervals are artefacts. The next cell gives the histogram of all within-trial ISIs below 0.6 ms in 0.02 ms bins, then reads the voltage trace around each pair of spikes that form a short ISI (helper, pair_dip_ratios). A dip ratio above 0.5 means that the trace does not fall back between the two spike times, so both times lie on one waveform (a double detection of one spike). Pairs with ISIs from 0.8 to 1.5 ms (a random sample of 300, seed 3) are the reference for two separate spikes.

In [18]:
hh, he = np.histogram(short * 1000, np.arange(0, 0.6001, 0.02))
print("Short ISIs per 0.02 ms bin from 0 to 0.6 ms:", hh.tolist())
ex_of = {i: by_path[p]["trials"].experiment.values for i, p in enumerate(U.path)}
unit_list = [by_path[p] for p in U.path]
pairs = {i: g.short_isi_pairs(u, 0, g.SHORT_ISI_S) for i, u in enumerate(unit_list)}
pairs = {i: v for i, v in pairs.items() if v}
dr = g.dip_ratios(unit_list, pairs)
isi_ms = np.array([(t2 - t1) * 1000 for v in pairs.values() for _, t1, t2 in v])
rng_isi = np.random.default_rng(3)
ref_all = [(i, pr) for i, u in enumerate(unit_list) for pr in g.short_isi_pairs(u, 0.0008, 0.0015)]
ref = {}
for j in rng_isi.choice(len(ref_all), 300, replace=False):
    ref.setdefault(ref_all[j][0], []).append(ref_all[j][1])
dref = g.dip_ratios(unit_list, ref)
print(f"\nPairs with a dip ratio (spike peaks found): {np.isfinite(dr).sum()} of {len(dr)}")
for lo_, hi_ in [(0, 0.1), (0.1, 0.3), (0.3, 0.6)]:
    m = (isi_ms >= lo_) & (isi_ms < hi_)
    print(f"ISI {lo_} to {hi_} ms: {int(m.sum())} pairs; one waveform (dip ratio > 0.5): {np.nanmean(dr[m] > 0.5):.2f}; median ratio {np.nanmedian(dr[m]):.2f}")
print(f"Reference, ISI 0.8 to 1.5 ms: {len(dref)} pairs from {len(ref)} units; one waveform: {np.nanmean(dref > 0.5):.2f}; median ratio {np.nanmedian(dref):.2f}")
sep = {}
k = 0
for i, v in pairs.items():
    for tr, _, _ in v:
        if not dr[k] > 0.5:
            sep.setdefault(i, {}).setdefault(ex_of[i][tr], 0)
            sep[i][ex_of[i][tr]] += 1
        k += 1
sep_a = sum(max(c.values()) >= 2 for c in sep.values())
sep_b = sum(sum(c.values()) >= 2 for c in sep.values())
print(f"\nCounting only pairs that are not one waveform: {sep_a} units fail under (a), {sep_b} under (b)")
print("Units holding the ISIs below 0.1 ms:", len({i for i, v in pairs.items() for _, t1, t2 in v if t2 - t1 < 0.0001}))
Short ISIs per 0.02 ms bin from 0 to 0.6 ms: [0, 0, 92, 395, 684, 206, 41, 52, 70, 233, 213, 266, 392, 469, 599, 682, 772, 618, 501, 498, 506, 511, 565, 707, 1262, 981, 819, 681, 570, 519]
Pairs with a dip ratio (spike peaks found): 13796 of 13904
ISI 0 to 0.1 ms: 1171 pairs; one waveform (dip ratio > 0.5): 1.00; median ratio 0.95
ISI 0.1 to 0.3 ms: 2541 pairs; one waveform (dip ratio > 0.5): 0.91; median ratio 0.84
ISI 0.3 to 0.6 ms: 10192 pairs; one waveform (dip ratio > 0.5): 0.39; median ratio 0.21
Reference, ISI 0.8 to 1.5 ms: 300 pairs from 225 units; one waveform: 0.00; median ratio -1.06

Counting only pairs that are not one waveform: 176 units fail under (a), 179 under (b)
Units holding the ISIs below 0.1 ms: 9

Result: not reproduced. Units with two or more within-trial ISIs below 0.6 ms are in the dataset under every reading: 370 of 1160 under (a), 391 under (b) and 148 under (c), from 79 of the 104 animals; 538 units have at least one. In the failing units the short ISIs are a small fraction of all ISIs (median 0.0013, largest 0.223), and 162 units have more than 10. Of the 13,904 short ISIs, 10,192 are between 0.3 and 0.6 ms and 1171 below 0.1 ms. With a limit of 0.3 ms, 140 units still fail under (a); with 0.1 ms, 5 do. The paper's check was visual and does not say what "multiple" means; under the three readings the claims file names, the dataset holds units the stated rule would exclude.

Many short intervals appear to be double detections of one spike. The ISIs below 0.1 ms fall in the bins from 0.04 to 0.10 ms (two to four samples at 48,828 Hz), come from 9 units, and are followed by a dip at 0.12 to 0.18 ms (41 to 70 per bin, against 684 at 0.08 to 0.10 ms). All of them, 91% of those from 0.1 to 0.3 ms and 39% of those from 0.3 to 0.6 ms lie on one waveform, against none of 300 reference pairs from 0.8 to 1.5 ms. For the ISIs below 0.1 ms (median dip ratio 0.95) this shows a double detection. The rule was checked only against the 0.8 to 1.5 ms reference, not at 0.3 to 0.6 ms, so there the 39% is a plausible reading, not a demonstration. This does not change the outcome. The paper's check (checkAN.m) counts ISIs from the same spike times. Counting only the pairs that are not one waveform, 176 units still fail under (a) and 179 under (b).

no-prepotentials¶

No median spike waveform showed a prepotential, which would mark a ventral cochlear nucleus bushy cell.

Blocked: methods underspecified. The check was a visual inspection of the median spike waveform (checkAN.m); neither the paper nor its code gives a rule for a prepotential, so no criterion fixed from the paper can judge it (claims file). The raw voltage traces are in the files (acquisition), so the waveforms could be inspected; they are not read here.

rlf-monotonic¶

Rate-level functions were checked for atypical shapes ..., and units whose rate-level function was nonmonotonic at levels below 80 dB SPL were excluded.

Blocked: methods underspecified. The check was visual and the paper gives no rule for nonmonotonicity. As a description only (claims file): the stored rates and SDs are not in the files, so the rate per level is computed from the spike times in the stimulus window (helper, rlf_rates), and the units are counted whose mean rate falls between successive levels below 80 dB SPL by more than the SD at the lower level.

In [19]:
drops, n_rlf = [], 0
for p in U.path[U.types.map(lambda x: "RLF" in x)]:
    r = g.rlf_rates(by_path[p])
    if r is None or len(r) < 2:
        continue
    n_rlf += 1
    r = r[r.index < 80]
    d = r["mean"].diff().shift(-1)            # next level minus this level
    drops.append(int(((-d) > r["std"]).sum()))
drops = np.array(drops)
print(f"RLF recordings: {n_rlf}; with a drop larger than the SD below 80 dB SPL: {int((drops >= 1).sum())} "
      f"({np.mean(drops >= 1):.2f}); with two or more such drops: {int((drops >= 2).sum())}")
RLF recordings: 952; with a drop larger than the SD below 80 dB SPL: 249 (0.26); with two or more such drops: 104

fig5b-example¶

The example fibre of Fig. 5b (animal G220908, unit 3p_181) had a best frequency of 7.6 kHz and a threshold of 19 dB SPL.

In [20]:
row = U[(U.animal == "G220908") & (U.unit == "3p_181")]
print(row[["path", "group", "bf", "rlf_threshold", "sr_best", "types"]].to_string(index=False))
u = by_path[row.path.iloc[0]]
t = u["trials"]
bf_t = t[(t.experiment == "BF") & (t.frequency != g.SPONT)]
rlf_t = t[(t.experiment == "RLF") & (t.frequency != g.SPONT)]
print("BF recording: levels (dB SPL)", sorted(np.round(bf_t.level.unique(), 1)), "; repetitions per frequency",
      sorted(bf_t.groupby("frequency").size().unique()))
print("RLF recording: frequency", sorted(rlf_t.frequency.unique()), "; levels", sorted(np.round(rlf_t.level.unique(), 1)),
      "; repetitions per level", sorted(rlf_t.groupby("level").size().unique()))
print("BF within 10% of 7.6 kHz:", abs(row.bf.iloc[0] / 1000 - 7.6) <= 0.76,
      "; threshold within 10% of 19 dB:", abs(row.rlf_threshold.iloc[0] - 19) <= 1.9)
                                                  path group     bf  rlf_threshold  sr_best     types
sub-G220908/sub-G220908_ses-G220908-3p-181_icephys.nwb young 7620.0           19.0     3.75 (BF, RLF)
BF recording: levels (dB SPL) [np.float64(30.0)] ; repetitions per frequency [np.int64(5)]
RLF recording: frequency [np.float64(7700.0)] ; levels [np.float64(10.0), np.float64(13.0), np.float64(16.0), np.float64(19.0), np.float64(22.0), np.float64(25.0), np.float64(28.0), np.float64(31.0), np.float64(34.0), np.float64(37.0), np.float64(40.0), np.float64(43.0), np.float64(46.0), np.float64(49.0), np.float64(52.0), np.float64(55.0), np.float64(58.0), np.float64(61.0), np.float64(64.0), np.float64(67.0), np.float64(70.0), np.float64(73.0), np.float64(76.0), np.float64(79.0)] ; repetitions per level [np.int64(10)]
BF within 10% of 7.6 kHz: True ; threshold within 10% of 19 dB: True

Result: reproduced. The unit's stored BF is 7620 Hz and its RLF threshold 19 dB SPL. As the legend says, its BF recording is at 30 dB SPL with 5 repetitions per frequency, and its RLF recording (at 7700 Hz) has 10 repetitions per level and includes 40 dB SPL.

fig6a-young-two-sensitive-regions¶

Fibres of young-adult gerbils show two regions of best sensitivity separated by a region around 3 to 4 kHz with higher thresholds and fewer fibres; the highest thresholds are at 3.5 kHz.

Young-adult units with a stored BF and RLF threshold; mean threshold in 24 logarithmic BF bins from 0.3 to 20 kHz (a bin includes its upper edge), each plotted at its upper edge (check_dataset_units.m). Readings: (a) the largest bin mean over all bins; (b) the largest bin mean between the two sensitive regions, a local maximum with lower bin means on each side.

In [21]:
y = U[U.group == "young"]
e = np.logspace(np.log10(0.3), np.log10(20), 25)
k = y.bf / 1000
bins = []
for i in range(24):
    m = (k > e[i]) & (k <= e[i + 1])
    bins.append({"lower_khz": round(e[i], 2), "plotted_at_khz": round(e[i + 1], 2), "units": int(m.sum()),
                 "with_threshold": int(y.rlf_threshold[m].notna().sum()), "mean_threshold": y.rlf_threshold[m].mean()})
B6a = pd.DataFrame(bins)
print(B6a.round({"mean_threshold": 1}).to_string(index=False))
filled = B6a[B6a.mean_threshold.notna()].reset_index(drop=True)
a_top = filled.loc[filled.mean_threshold.idxmax()]
print(f"\nReading (a): highest bin mean {a_top.mean_threshold:.1f} dB at {a_top.plotted_at_khz} kHz (n = {a_top.with_threshold})")
# the two sensitive regions: the lowest bin mean below 3.48 kHz and the lowest above it
low = filled[filled.plotted_at_khz < 3.48]; high = filled[filled.plotted_at_khz > 3.48]
lo_min, hi_min = low.mean_threshold.idxmin(), high.mean_threshold.idxmin()
mid = filled.loc[lo_min + 1:hi_min - 1]
b_top = mid.mean_threshold.idxmax()
print(f"Sensitive regions: lowest means {filled.mean_threshold[lo_min]:.1f} dB at {filled.plotted_at_khz[lo_min]} kHz and "
      f"{filled.mean_threshold[hi_min]:.1f} dB at {filled.plotted_at_khz[hi_min]} kHz")
print(f"Reading (b): highest mean between them {filled.mean_threshold[b_top]:.1f} dB at {filled.plotted_at_khz[b_top]} kHz; "
      f"neighbours {filled.mean_threshold[b_top-1]:.1f} and {filled.mean_threshold[b_top+1]:.1f} dB")
two_low = filled.nsmallest(2, "mean_threshold")
print("Two lowest bin means of all bins:", [(r.plotted_at_khz, round(r.mean_threshold, 1)) for r in two_low.itertuples()],
      "; the same bins as the sensitive regions above:", set(two_low.index) == {lo_min, hi_min})
print("Units per bin around it (2.06 to 4.93 kHz):", B6a[(B6a.plotted_at_khz > 2) & (B6a.plotted_at_khz < 5)].units.tolist())
fig, ax = plt.subplots(figsize=(5, 3.5))
for grp, col in [("young", "b"), ("middle", "orange"), ("old", "r")]:
    d = U[U.group == grp]
    ax.scatter(d.bf / 1000, d.rlf_threshold, s=6, color=col, alpha=0.5, label=grp)
ax.plot(B6a.plotted_at_khz, B6a.mean_threshold, "b-")
ax.set_xscale("log"); ax.set_xlim(0.3, 20); ax.set_ylim(0, 100)
ax.set_xlabel("Best frequency (kHz)"); ax.set_ylabel("Threshold (dB SPL)"); ax.legend(fontsize=7)
out = U[(U.rlf_threshold.notna()) & ((U.bf / 1000 < 0.3) | (U.bf / 1000 > 20) | (U.rlf_threshold > 100) | (U.rlf_threshold < 0))]
print("Points outside the axes:", len(out), "; thresholds range", round(U.rlf_threshold.min(), 1), "to", round(U.rlf_threshold.max(), 1))
 lower_khz  plotted_at_khz  units  with_threshold  mean_threshold
      0.30            0.36      0               0             NaN
      0.36            0.43      0               0             NaN
      0.43            0.51      6               4            31.3
      0.51            0.60      9               5            31.8
      0.60            0.72      6               3            36.7
      0.72            0.86     21              18            28.7
      0.86            1.02     36              26            29.1
      1.02            1.22     36              31            28.9
      1.22            1.45     36              31            26.5
      1.45            1.73     33              25            20.9
      1.73            2.06     33              22            21.8
      2.06            2.45     31              22            24.7
      2.45            2.92     32              25            25.4
      2.92            3.48     34              24            27.6
      3.48            4.14     30              25            24.4
      4.14            4.93     52              41            24.4
      4.93            5.88     66              54            24.3
      5.88            7.00     56              52            22.6
      7.00            8.34     83              70            21.2
      8.34            9.93     59              49            26.2
      9.93           11.83     43              34            29.4
     11.83           14.09     33              26            30.8
     14.09           16.79     16              14            22.0
     16.79           20.00      0               0             NaN

Reading (a): highest bin mean 36.7 dB at 0.72 kHz (n = 3.0)
Sensitive regions: lowest means 20.9 dB at 1.73 kHz and 21.2 dB at 8.34 kHz
Reading (b): highest mean between them 27.6 dB at 3.48 kHz; neighbours 25.4 and 24.4 dB
Two lowest bin means of all bins: [(1.73, 20.9), (8.34, 21.2)] ; the same bins as the sensitive regions above: True
Units per bin around it (2.06 to 4.93 kHz): [33, 31, 32, 34, 30, 52]
Points outside the axes: 1 ; thresholds range 7.0 to 100.3
No description has been provided for this image

Result: reproduced. Under reading (b) the young-adult mean threshold between the two sensitive regions is highest in the bin plotted at 3.48 kHz (27.6 dB SPL), with lower means on both sides (25.4 and 24.4 dB), and the two regions of best sensitivity have their lowest means at 1.73 kHz (20.9 dB) and 8.34 kHz (21.2 dB). These are also the two lowest bin means of all bins, so the regions are not chosen around the answer. Under reading (a) the highest bin mean of all is 36.7 dB at 0.72 kHz, from 3 units. The bins plotted at 2.06 to 4.14 kHz hold 30 to 34 units, fewer than those plotted at 4.93 to 11.83 kHz (43 to 83) but about as many as those plotted at 1.02 to 1.73 kHz (33 to 36).

fig6b-young-bf-gap¶

Among young-adult fibres, the fewest best frequencies fall in the bin bordered by 2.5 and 3.0 kHz.

Histogram of young-adult stored BFs, edges logspace(log10(200), log10(20000), 25) Hz; the named bin is 2423 to 2936 Hz. Readings: (a) fewest of all bins between the lowest and highest non-empty bins (ties allowed); (b) fewer units than both neighbours.

In [22]:
e = np.logspace(np.log10(200), np.log10(20000), 25)
h, _ = np.histogram(y.bf.dropna(), e)
H = pd.DataFrame({"lower_hz": np.round(e[:-1]).astype(int), "upper_hz": np.round(e[1:]).astype(int), "units": h})
print(H.to_string(index=False))
i = int(np.flatnonzero(H.lower_hz == 2423)[0])
nz = np.flatnonzero(h)
span = h[nz[0]:nz[-1] + 1]
print(f"\nBin 2423-2936 Hz: {h[i]} units; neighbours {h[i-1]} and {h[i+1]}")
print(f"Reading (a): fewest in the non-empty span is {span.min()} (bin {H.lower_hz[nz[0] + span.argmin()]} Hz); holds: {h[i] == span.min()}")
print(f"Reading (b): fewer than both neighbours: {h[i] < h[i-1] and h[i] < h[i+1]}")
mid = H[(H.lower_hz >= 1363) & (H.upper_hz <= 4309)]
print("Bins from 1363 to 4309 Hz:", mid.units.tolist(), "; the fewest there:", mid.units.min(),
      "in bins", mid[mid.units == mid.units.min()].lower_hz.tolist())
print("\nThe same bins (units per bin) for other populations:")
pops = {"middle": U[U.group == "middle"].bf, "old": U[U.group == "old"].bf, "all ages": U.bf,
        "young, BF or CF": U[U.group == "young"].bf_or_cf}
for name, v in pops.items():
    hv = np.histogram(v.dropna(), e)[0]
    nzv = np.flatnonzero(hv); spv = hv[nzv[0]:nzv[-1] + 1]
    print(f"  {name}: {hv.tolist()}; bin 2423-2936 Hz {hv[i]}, neighbours {hv[i-1]} and {hv[i+1]}; "
          f"(a) {hv[i] == spv.min()}, (b) {hv[i] < hv[i-1] and hv[i] < hv[i+1]}")
print("Total young units with a BF:", int(h.sum()), "; plotted range", int(y.bf.min()), "to", int(y.bf.max()), "Hz")
 lower_hz  upper_hz  units
      200       242      0
      242       294      0
      294       356      0
      356       431      1
      431       522      5
      522       632     11
      632       766      9
      766       928     37
      928      1125     28
     1125      1363     49
     1363      1651     34
     1651      2000     38
     2000      2423     34
     2423      2936     34
     2936      3557     35
     3557      4309     38
     4309      5220     62
     5220      6325     75
     6325      7662     81
     7662      9283     69
     9283     11247     51
    11247     13626     41
    13626     16508     19
    16508     20000      0

Bin 2423-2936 Hz: 34 units; neighbours 34 and 35
Reading (a): fewest in the non-empty span is 1 (bin 356 Hz); holds: False
Reading (b): fewer than both neighbours: False
Bins from 1363 to 4309 Hz: [34, 38, 34, 34, 35, 38] ; the fewest there: 34 in bins [1363, 2000, 2423]

The same bins (units per bin) for other populations:
  middle: [0, 0, 1, 0, 3, 0, 0, 0, 6, 5, 1, 7, 6, 0, 5, 8, 5, 10, 5, 7, 10, 4, 4, 0]; bin 2423-2936 Hz 0, neighbours 6 and 5; (a) True, (b) True
  old: [0, 0, 0, 0, 0, 1, 11, 19, 9, 12, 5, 6, 10, 23, 22, 27, 31, 36, 31, 26, 30, 8, 6, 0]; bin 2423-2936 Hz 23, neighbours 10 and 22; (a) False, (b) False
  all ages: [0, 0, 1, 1, 8, 12, 20, 56, 43, 66, 40, 51, 50, 57, 62, 73, 98, 121, 117, 102, 91, 53, 29, 0]; bin 2423-2936 Hz 57, neighbours 50 and 62; (a) False, (b) False
  young, BF or CF: [0, 0, 0, 1, 5, 11, 11, 39, 28, 49, 34, 38, 34, 34, 35, 39, 62, 75, 81, 69, 51, 41, 19, 0]; bin 2423-2936 Hz 34, neighbours 34 and 35; (a) False, (b) False
Total young units with a BF: 751 ; plotted range 428 to 15825 Hz

Result: not reproduced. The bin from 2423 to 2936 Hz holds 34 young-adult units. It is not the fewest of the non-empty span (the lowest bin, 356 Hz, holds 1, and the bins below 766 Hz hold 1 to 11), and it is not a local minimum: its neighbours hold 34 and 35. Among the bins from 1363 to 4309 Hz it ties for the fewest (34) with two others, so the dip in the histogram is shallow; with the code's bins the stated bin is not the one with the fewest fibres. Adding the CF of young units without a BF recording changes no count in this bin (34). Among the other populations printed, the bin is the fewest and a local minimum only in the middle-aged units (0 units, neighbours 6 and 5); in old units (23) and over all ages (57) it is neither.

fig6c-sr-distributions¶

Among high-frequency fibres (BF above 3.5 kHz) there is a cluster with low spontaneous rates, and low-frequency fibres have a bimodal distribution of spontaneous rate with modes near 5 and 60 spikes/s.

Young-adult units, SR as the code's best estimate, split at BF 3.5 kHz, histogram of 5 spikes/s bins from 0 to 200. A mode is a local maximum (more units than both neighbours, or the first bin when it exceeds the second; the last bin is not one); the two largest are taken, separated by a bin with fewer units than both.

In [23]:
def local_maxima(h):
    out = []
    for i in range(len(h)):
        left = h[i - 1] if i > 0 else -1
        right = h[i + 1] if i < len(h) - 1 else np.inf   # the last bin is never a mode (criterion)
        if h[i] > left and h[i] > right:
            out.append(i)
    return out

edges = np.arange(0, 205, 5)
res6c = {}
for name, m in [("low BF (<= 3.5 kHz)", y.bf <= 3500), ("high BF (> 3.5 kHz)", y.bf > 3500)]:
    h, _ = np.histogram(y.sr_best[m].dropna(), edges)
    lm = local_maxima(h)
    top2 = sorted(sorted(lm, key=lambda i: -h[i])[:2])
    res6c[name] = (h, lm, top2)
    print(f"{name}: {int(m.sum())} units, {int(y.sr_best[m].notna().sum())} with an SR; counts per 5 spikes/s bin (0 to 150):")
    print("  ", h[:30].tolist())
    print("   local maxima (bin start, count):", [(int(edges[i]), int(h[i])) for i in lm])
    print("   two largest:", [(int(edges[i]), int(h[i])) for i in top2],
          "; fewest between them:", int(h[top2[0]:top2[1] + 1].min()) if len(top2) == 2 else None)
h, lm, top2 = res6c["low BF (<= 3.5 kHz)"]
low_ok = len(top2) == 2 and edges[top2[0]] in (0, 5) and 50 <= edges[top2[1]] and edges[top2[1] + 1] <= 70 \
    and h[top2[0]:top2[1] + 1].min() < min(h[top2[0]], h[top2[1]])
hh, lmh, _ = res6c["high BF (> 3.5 kHz)"]
largest_high = max(lmh, key=lambda i: hh[i])
high_ok = edges[largest_high + 1] <= 18
print("\nLow BF bimodal with modes in 0-10 and 50-70 spikes/s:", low_ok)
print(f"High BF largest local maximum at {int(edges[largest_high])}-{int(edges[largest_high+1])} spikes/s, below 18: {high_ok}")
print("Fraction below 18 spikes/s: low BF", round(float((y.sr_best[y.bf <= 3500] < 18).mean()), 3),
      "; high BF", round(float((y.sr_best[y.bf > 3500] < 18).mean()), 3))
print("SR range (young):", y.sr_best.min(), "to", round(y.sr_best.max(), 1), "; above 200:", int((y.sr_best > 200).sum()))
low BF (<= 3.5 kHz): 314 units, 314 with an SR; counts per 5 spikes/s bin (0 to 150):
   [27, 13, 10, 8, 5, 9, 12, 7, 12, 16, 12, 21, 20, 19, 19, 18, 14, 13, 10, 14, 11, 7, 3, 4, 1, 6, 2, 0, 1, 0]
   local maxima (bin start, count): [(0, 27), (30, 12), (45, 16), (55, 21), (95, 14), (115, 4), (125, 6), (140, 1)]
   two largest: [(0, 27), (55, 21)] ; fewest between them: 5
high BF (> 3.5 kHz): 437 units, 437 with an SR; counts per 5 spikes/s bin (0 to 150):
   [66, 8, 27, 15, 13, 12, 7, 7, 14, 6, 17, 7, 14, 14, 13, 17, 7, 21, 12, 12, 15, 21, 20, 14, 15, 12, 7, 6, 5, 1]
   local maxima (bin start, count): [(0, 66), (10, 27), (40, 14), (50, 17), (75, 17), (85, 21), (105, 21), (120, 15), (150, 6), (160, 3)]
   two largest: [(0, 66), (10, 27)] ; fewest between them: 8

Low BF bimodal with modes in 0-10 and 50-70 spikes/s: True
High BF largest local maximum at 0-5 spikes/s, below 18: True
Fraction below 18 spikes/s: low BF 0.185 ; high BF 0.261
SR range (young): 0.0 to 176.2 ; above 200: 0

Result: reproduced. In low-BF young-adult units the two largest modes of spontaneous rate are the bins 0 to 5 spikes/s (27 units) and 55 to 60 spikes/s (21 units), separated by bins of fewer units (the fewest between them is 5); both lie in the bins the criterion allows. In high-BF units the largest local maximum is the 0 to 5 spikes/s bin (66 units), below the 18 spikes/s cutoff.

fig6d-max-phase-locking-bf¶

The highest best frequency at which significant phase locking was recorded in young-adult gerbils was 4.6 kHz.

Vector strength and its p-value per level of the PH recording, recomputed from the spike times with PHextract_func.m and TytoView_calcVS.m (helper); significant when p is not NaN and < 0.001. p is NaN when N < 50 spikes, as the Methods say; the code's rule (NaN when N <= 50) is shown as a variant.

In [24]:
U["max_vs"] = [g.max_significant_vs(by_path[p]) for p in U.path]
ph = U[U.types.map(lambda x: "PH" in x)]
nfreq = pd.Series([g.vector_strength_by_level(by_path[p]).n_freqs.max() for p in ph.path])
print("Units with a PH recording:", len(ph), "; PH recordings with more than one tone frequency:", int((nfreq > 1).sum()))
print("With a significant vector strength:", int(ph.max_vs.notna().sum()), "; by group:",
      ph[ph.max_vs.notna()].group.value_counts().to_dict())
sig = ph[ph.max_vs.notna() & ph.bf.notna()]
for grp in ["young", "middle", "old"]:
    s = sig[sig.group == grp].sort_values("bf")
    print(f"{grp}: highest BF with significant phase locking {s.bf.max():.0f} Hz; next highest {s.bf.iloc[-4:-1].tolist()}")
ys = ph[ph.group == "young"]
print("Young PH units with BF above 4.6 kHz:", ys[ys.bf > 4600][["bf", "max_vs"]].to_dict("records"))
top = sig[sig.group == "young"].bf.max() / 1000
print(f"Within 10% of 4.6 kHz: {abs(top - 4.6) <= 0.46}")
n50 = [(p, r) for p in ph.path for r in g.vector_strength_by_level(by_path[p]).itertuples() if r.n_spikes == 50]
print("PH levels with exactly 50 spikes (where the Methods and the code differ):", len(n50),
      [(U.loc[U.path == p, "group"].iloc[0], round(r.vs, 3), round(r.p, 5)) for p, r in n50])
code_vs = pd.Series([g.max_significant_vs(by_path[p], min_n=51) for p in ph.path], index=ph.index)
print("Units whose maximum significant vs changes under the code's rule:",
      int(((code_vs != ph.max_vs) & ~(code_vs.isna() & ph.max_vs.isna())).sum()))
for p_lim in [0.01, 0.0001]:
    alt = []
    for p in ph.path[ph.group == "young"]:
        v = g.vector_strength_by_level(by_path[p])
        if ((v.p < p_lim) & v.p.notna()).any():
            alt.append(U.loc[U.path == p, "bf"].iloc[0])
    print(f"Variant p < {p_lim}: highest young BF {np.nanmax(alt):.0f} Hz")
Units with a PH recording: 281 ; PH recordings with more than one tone frequency: 0
With a significant vector strength: 193 ; by group: {'young': 131, 'old': 39, 'middle': 23}
young: highest BF with significant phase locking 4598 Hz; next highest [4121.0, 4244.0, 4377.0]
middle: highest BF with significant phase locking 3819 Hz; next highest [2218.0, 2339.0, 3707.0]
old: highest BF with significant phase locking 3272 Hz; next highest [2768.0, 3097.0, 3120.0]
Young PH units with BF above 4.6 kHz: [{'bf': 12359.0, 'max_vs': nan}, {'bf': 5253.0, 'max_vs': nan}, {'bf': 6126.0, 'max_vs': nan}, {'bf': 4718.0, 'max_vs': nan}, {'bf': 5635.0, 'max_vs': nan}, {'bf': 4981.0, 'max_vs': nan}, {'bf': 4964.0, 'max_vs': nan}, {'bf': 5070.0, 'max_vs': nan}, {'bf': 5911.0, 'max_vs': nan}, {'bf': 4843.0, 'max_vs': nan}, {'bf': 5487.0, 'max_vs': nan}, {'bf': 5449.0, 'max_vs': nan}, {'bf': 6539.0, 'max_vs': nan}, {'bf': 5318.0, 'max_vs': nan}, {'bf': 4958.0, 'max_vs': nan}, {'bf': 4903.0, 'max_vs': nan}, {'bf': 5229.0, 'max_vs': nan}, {'bf': 5631.0, 'max_vs': nan}, {'bf': 4895.0, 'max_vs': nan}, {'bf': 4841.0, 'max_vs': nan}, {'bf': 5534.0, 'max_vs': nan}, {'bf': 4881.0, 'max_vs': nan}, {'bf': 5486.0, 'max_vs': nan}, {'bf': 7037.0, 'max_vs': nan}, {'bf': 10047.0, 'max_vs': nan}, {'bf': 7395.0, 'max_vs': nan}, {'bf': 10042.0, 'max_vs': nan}]
Within 10% of 4.6 kHz: True
PH levels with exactly 50 spikes (where the Methods and the code differ): 1 [('middle', 0.388, 0.00053)]
Units whose maximum significant vs changes under the code's rule: 0
Variant p < 0.01: highest young BF 6539 Hz
Variant p < 0.0001: highest young BF 4377 Hz

Result: reproduced. With vector strength recomputed by the paper's function, the highest BF of a young-adult unit with significant phase locking (p < 0.001, the Methods' threshold) is 4598 Hz, 4.6 kHz; the next highest are 4121 to 4377 Hz. One PH level (a middle-aged unit) has exactly 50 spikes, the only case where the Methods' rule and the code's differ, and no unit's maximum significant vector strength changes between them. The value depends on the threshold: with p < 0.01 it is 6539 Hz, with p < 0.0001 it is 4377 Hz. No young unit with a higher BF (27 PH units from 4718 to 12,359 Hz) reaches p < 0.001.

fig6d-highest-vs-low-bf-low-sr¶

The highest vector strengths are found among fibres with low best frequencies (below 1.5 kHz) and low spontaneous rates (below 18 spikes/s).

Maximum significant vector strength per unit, SR best estimate, stored BF. Readings, for young adults and for all ages: (a) the unit with the largest maximum vector strength has BF < 1.5 kHz and SR < 18; (b) of the four groups the two cutoffs form, the median is highest in low-BF low-SR.

In [25]:
res = []
for name, s in [("young", sig[sig.group == "young"]), ("all ages", sig)]:
    grp4 = np.where(s.bf < 1500, "BF<1.5k", "BF>=1.5k") + " / " + np.where(s.sr_best < 18, "SR<18", "SR>=18")
    tab = s.groupby(grp4).max_vs.agg(["median", "max", "size"]).round(3)
    topu = s.loc[s.max_vs.idxmax()]
    ra = bool(topu.bf < 1500 and topu.sr_best < 18)
    rb = tab["median"].idxmax() == "BF<1.5k / SR<18"
    res.append((name, ra, rb))
    print(f"{name}:\n{tab.to_string()}")
    print(f"  largest: vs {topu.max_vs:.3f}, BF {topu.bf:.0f} Hz, SR {topu.sr_best} spikes/s; reading (a) holds: {ra}; reading (b) holds: {rb}")
    print("  five largest:", s.nlargest(5, "max_vs")[["bf", "sr_best", "max_vs"]].round(3).to_dict("records"))
low = sig[(sig.group == "young")]
lo = low[(low.bf < 1500) & (low.sr_best < 18)].max_vs; hi = low[(low.bf < 1500) & (low.sr_best >= 18)].max_vs
print(f"Young, BF < 1.5 kHz: low-SR against high-SR, Mann-Whitney p = {stats.mannwhitneyu(lo, hi).pvalue:.3g} "
      f"(n {len(lo)} and {len(hi)}; not part of the criterion)")
print("All readings hold:", all(a and b for _, a, b in res))
young:
                   median    max  size
BF<1.5k / SR<18     0.821  0.882     6
BF<1.5k / SR>=18    0.695  0.846    51
BF>=1.5k / SR<18    0.402  0.703     6
BF>=1.5k / SR>=18   0.470  0.703    63
  largest: vs 0.882, BF 428 Hz, SR 1.25 spikes/s; reading (a) holds: True; reading (b) holds: True
  five largest: [{'bf': 428.0, 'sr_best': 1.25, 'max_vs': 0.882}, {'bf': 1342.0, 'sr_best': 52.5, 'max_vs': 0.846}, {'bf': 1188.0, 'sr_best': 10.0, 'max_vs': 0.838}, {'bf': 794.0, 'sr_best': 12.5, 'max_vs': 0.837}, {'bf': 723.0, 'sr_best': 78.25, 'max_vs': 0.83}]
all ages:
                   median    max  size
BF<1.5k / SR<18     0.804  0.882    19
BF<1.5k / SR>=18    0.702  0.863    70
BF>=1.5k / SR<18    0.402  0.728    20
BF>=1.5k / SR>=18   0.467  0.703    78
  largest: vs 0.882, BF 428 Hz, SR 1.25 spikes/s; reading (a) holds: True; reading (b) holds: True
  five largest: [{'bf': 428.0, 'sr_best': 1.25, 'max_vs': 0.882}, {'bf': 510.0, 'sr_best': 6.25, 'max_vs': 0.879}, {'bf': 508.0, 'sr_best': 25.0, 'max_vs': 0.863}, {'bf': 517.0, 'sr_best': 15.0, 'max_vs': 0.86}, {'bf': 846.0, 'sr_best': 2.5, 'max_vs': 0.855}]
Young, BF < 1.5 kHz: low-SR against high-SR, Mann-Whitney p = 0.00391 (n 6 and 51; not part of the criterion)
All readings hold: True

Result: reproduced. Under all four readings the highest vector strengths are in low-BF, low-SR fibres: the largest maximum vector strength (0.882) is from a unit with BF 428 Hz and SR 1.25 spikes/s, and the median is highest in the low-BF low-SR group (0.821 in 6 young-adult units, 0.804 in 19 over all ages), above low-BF high-SR (0.695 and 0.702). The low-SR group is small; the comparison of its values with the low-BF high-SR group is printed above.

fig7a-cf-matches-bf¶

Characteristic frequency from the CF recordings correlates strongly with best frequency from the BF recordings, with no systematic deviation towards higher or lower frequencies.

CF recomputed from the CF recording (helper; the automatic first pass of CFextract_func.m, without the experimenter's manual corrections, which are not in the files); BF stored. Pearson correlation of log CF with log BF (Spearman as a variant), median log2(CF/BF) with a 95% bootstrap interval (10,000 resamples, seed 1).

In [26]:
rng = np.random.default_rng(1)
c = U[U.cf.notna() & U.bf.notna()]
pr = stats.pearsonr(np.log(c.cf), np.log(c.bf)); sp = stats.spearmanr(c.cf, c.bf)
l2 = np.log2(c.cf / c.bf).values
boot = np.median(rng.choice(l2, size=(10000, len(l2))), axis=1)
lo, hi = np.percentile(boot, [2.5, 97.5])
print(f"Units with a CF and a BF: {len(c)} (CF units {int(has['CF'].sum())}, of which without BF {int((has['CF'] & U.bf.isna()).sum())})")
print(f"Pearson r(log CF, log BF) = {pr.statistic:.3f}, p = {pr.pvalue:.2g}; Spearman rho = {sp.statistic:.3f}, p = {sp.pvalue:.2g}")
print(f"Median log2(CF/BF) = {np.median(l2):.4f} (95% CI {lo:.4f} to {hi:.4f}); median ratio {2**np.median(l2):.4f}")
print(f"Units with CF above BF: {int((l2 > 0).sum())}, below: {int((l2 < 0).sum())}, equal: {int((l2 == 0).sum())}")
print(f"|log2(CF/BF)| > 0.5 octave: {int((np.abs(l2) > 0.5).sum())}")
print("By group:", c.assign(l2=l2).groupby("group").l2.agg(["median", "size"]).round(3).to_dict("index"))
cf_level = pd.Series([g.cf_from_cf_recording(by_path[p], level_from="level")[0] for p in U.path], index=U.index)
cl_ = U.assign(cf_l=cf_level)
cl_ = cl_[cl_.cf_l.notna() & cl_.bf.notna()]
print(f"Variant, levels from the calibrated level column: {int(cf_level.notna().sum())} units with a CF, "
      f"CF equal to the main reading in {int((cf_level == U.cf).sum())}; over {len(cl_)} units r = "
      f"{stats.pearsonr(np.log(cl_.cf_l), np.log(cl_.bf)).statistic:.3f}, median ratio {2**np.median(np.log2(cl_.cf_l / cl_.bf)):.4f}")
fig, ax = plt.subplots(figsize=(4, 4))
ax.scatter(c.bf / 1000, c.cf / 1000, s=10)
ax.plot([0.3, 20], [0.3, 20], "k--"); ax.set_xscale("log"); ax.set_yscale("log")
ax.set_xlabel("BF (kHz)"); ax.set_ylabel("CF, recomputed (kHz)")
print("Plotted ranges: BF", c.bf.min(), "to", c.bf.max(), "Hz; CF", c.cf.min(), "to", c.cf.max(), "Hz")
Units with a CF and a BF: 114 (CF units 119, of which without BF 5)
Pearson r(log CF, log BF) = 0.973, p = 2.1e-73; Spearman rho = 0.964, p = 1.8e-66
Median log2(CF/BF) = 0.0041 (95% CI -0.0111 to 0.0398); median ratio 1.0028
Units with CF above BF: 58, below: 56, equal: 0
|log2(CF/BF)| > 0.5 octave: 13
By group: {'middle': {'median': 0.032, 'size': 20}, 'old': {'median': -0.025, 'size': 16}, 'young': {'median': 0.004, 'size': 78}}
Variant, levels from the calibrated level column: 119 units with a CF, CF equal to the main reading in 119; over 114 units r = 0.973, median ratio 1.0028
Plotted ranges: BF 510.0 to 15091.0 Hz; CF 500.0 to 14416.666666666666 Hz
No description has been provided for this image

Result: reproduced. Over 114 units with a recomputed CF and a stored BF, log CF and log BF correlate with r = 0.973 (p = 2.1e-73; Spearman 0.964), and the median CF/BF ratio is 1.003 (log2 0.0041, 95% interval -0.0111 to 0.0398), within 10% of 1; 58 units have CF above BF and 56 below, and 13 differ by more than half an octave. The CF is the automatic first pass of the paper's function; the experimenter's manual corrections are not in the files. Taking the levels from the calibrated level column instead of the nominal attenuator level in the tag gives the same CF for all 119 units.

fig7b-click-latency-bf¶

Click latency is strongly negatively correlated with best frequency, reflecting the travelling wave delay along the cochlea.

Units with one CLICK recording, a 2-bin latency recomputed with the paper's function, and a stored BF; Pearson correlation of latency with log BF, Spearman as a variant. The click delay is not in the files; the main reading assumes 7.75 ms, the delay of every tone recording, and 5 ms is shown as a variant.

In [27]:
for col, label in [("click_latency", "delay 7.75 ms"), ("click_latency_d5", "delay 5 ms")]:
    k = U[U[col].notna() & U.bf.notna()]
    pr = stats.pearsonr(k[col], np.log(k.bf)); sp = stats.spearmanr(k[col], k.bf)
    print(f"{label}: {len(k)} units; latency {k[col].min()*1000:.2f} to {k[col].max()*1000:.2f} ms "
          f"(median {k[col].median()*1000:.2f}); Pearson r = {pr.statistic:.3f}, p = {pr.pvalue:.2g}; "
          f"Spearman rho = {sp.statistic:.3f}, p = {sp.pvalue:.2g}")
k = U[U.click_latency.notna() & U.bf.notna()]
print("Median latency (ms) by BF band:",
      k.groupby(pd.cut(k.bf, [0, 1000, 2000, 4000, 8000, 20000])).click_latency.median().mul(1000).round(2).to_dict())
print("By age group, Pearson r:", {grp: round(stats.pearsonr(d.click_latency, np.log(d.bf)).statistic, 3)
                                  for grp, d in k.groupby("group") if len(d) > 3})
fig, ax = plt.subplots(figsize=(5, 3.5))
ax.scatter(k.bf / 1000, k.click_latency * 1000, s=8)
ax.set_xscale("log"); ax.set_xlim(0.3, 20); ax.set_ylim(0, 3.5)
ax.set_xlabel("BF (kHz)"); ax.set_ylabel("Click latency, 2-bin (ms)")
print("Points outside the axes:", int(((k.click_latency * 1000 > 3.5) | (k.bf < 300) | (k.bf > 20000)).sum()))
delay 7.75 ms: 268 units; latency 0.42 to 2.78 ms (median 1.05); Pearson r = -0.882, p = 5.9e-89; Spearman rho = -0.864, p = 2.8e-81
delay 5 ms: 269 units; latency 0.34 to 5.53 ms (median 3.78); Pearson r = -0.662, p = 3.1e-35; Spearman rho = -0.820, p = 8.9e-67
Median latency (ms) by BF band: {Interval(0, 1000, closed='right'): 2.09, Interval(1000, 2000, closed='right'): 1.71, Interval(2000, 4000, closed='right'): 1.33, Interval(4000, 8000, closed='right'): 0.93, Interval(8000, 20000, closed='right'): 0.73}
By age group, Pearson r: {'middle': np.float64(-0.776), 'old': np.float64(-0.915), 'young': np.float64(-0.872)}
Points outside the axes: 0
No description has been provided for this image

Result: reproduced. Over 268 units the recomputed 2-bin click latency falls with BF: Pearson r = -0.882 with log BF (p = 5.9e-89), Spearman -0.864, and in each age group (-0.78 to -0.92); the median latency falls from 2.09 ms below 1 kHz to 0.73 ms above 8 kHz. With a 5 ms click delay the correlations are -0.662 and -0.820 over 269 units, both negative with p < 0.05. With 7.75 ms the latencies span 0.42 to 2.78 ms. This range does not single out 7.75 ms: other delays near it would also give positive latencies of a few ms. The check under recording-type-counts shows only that the 10 ms and 20 ms trials share one delay, so the delay stays an assumption.

fig7ab-representative-sampling¶

The best-frequency distributions of the units with CF and with CLICK recordings are representative of the distribution of the full dataset.

Reference (i) young-adult BFs or (ii) all units' BFs; comparison (a) two-sample KS test of log BF, no difference at p < 0.05, or (b) the subset's median BF within 10% of the reference's. Stored BFs. The CF subset is the units with a CF recording; the CLICK subset is the units with a recomputed latency (reading 1 of recording-type-counts), with all CLICK units as a variant.

In [28]:
refs = {"(i) young": np.log(U[U.group == "young"].bf.dropna()), "(ii) all": np.log(U.bf.dropna())}
subsets = {"CF": U[has["CF"]].bf.dropna(), "CLICK": U[U.click_latency.notna()].bf.dropna(),
           "CLICK, any recording": U[has["CLICK"]].bf.dropna()}
rows = []
for sname, s in subsets.items():
    for rname, r in refs.items():
        ks = stats.ks_2samp(np.log(s), r)
        ratio = np.exp(np.median(np.log(s))) / np.exp(np.median(r))
        rows.append({"subset": sname, "n": len(s), "reference": rname, "ks_D": round(ks.statistic, 3),
                     "ks_p": round(ks.pvalue, 4), "(a) holds": ks.pvalue >= 0.05,
                     "median_subset_hz": round(float(np.exp(np.median(np.log(s))))),
                     "median_ref_hz": round(float(np.exp(np.median(r)))), "ratio": round(ratio, 3),
                     "(b) holds": abs(ratio - 1) <= 0.1})
R = pd.DataFrame(rows)
print(R.to_string(index=False))
for reading in ["(a) holds", "(b) holds"]:
    for rname in refs:
        both = R[(R.reference == rname) & R.subset.isin(["CF", "CLICK"])][reading].all()
        print(f"Reading {reading[:3]} with reference {rname}: holds for both CF and CLICK: {both}")
print("\nCF units by age group:", U[has["CF"]].group.value_counts().to_dict(),
      "; BF quartiles (Hz) CF", np.percentile(subsets["CF"], [25, 50, 75]).round().tolist(),
      "all", np.percentile(U.bf.dropna(), [25, 50, 75]).round().tolist())
              subset   n reference  ks_D   ks_p  (a) holds  median_subset_hz  median_ref_hz  ratio  (b) holds
                  CF 114 (i) young 0.152 0.0185      False              3454           4589  0.753      False
                  CF 114  (ii) all 0.175 0.0029      False              3454           4592  0.752      False
               CLICK 268 (i) young 0.076 0.1955       True              5180           4589  1.129      False
               CLICK 268  (ii) all 0.058 0.4464       True              5180           4592  1.128      False
CLICK, any recording 272 (i) young 0.069 0.2897       True              5121           4589  1.116      False
CLICK, any recording 272  (ii) all 0.053 0.5401       True              5121           4592  1.115      False
Reading (a) with reference (i) young: holds for both CF and CLICK: False
Reading (a) with reference (ii) all: holds for both CF and CLICK: False
Reading (b) with reference (i) young: holds for both CF and CLICK: False
Reading (b) with reference (ii) all: holds for both CF and CLICK: False

CF units by age group: {'young': 83, 'middle': 20, 'old': 16} ; BF quartiles (Hz) CF [1405.0, 3454.0, 6096.0] all [1912.0, 4592.0, 7548.0]

Result: not reproduced. No reading holds for both subsets. The CF units' BFs differ from the reference under both readings: KS p = 0.018 against young adults and 0.003 against all units, and their median BF (3454 Hz) is 0.75 times the reference's (4589 and 4592 Hz). The CLICK units' BFs do not differ by the KS test (p = 0.20 and 0.45), but their median (5180 Hz) is 1.13 times the reference's, outside 10%. The criterion gives not reproduced "when none does". This notebook reads that as: no reading holds for both CF and CLICK, as the criterion's reproduced case is phrased. Under that reading the outcome does not depend on the choice between references (i) and (ii) or between tests (a) and (b), since the CF part fails all of them. If "none does" is instead checked per subset, the CLICK KS reading holds while the CF readings fail, and the claim would be blocked as methods underspecified. Whether the paper meant a visual likeness that a shift of this size would not contradict cannot be told from its text.

old-success-rate¶

Successful single-fibre recordings were obtained in 43% of old gerbils that were tried, against 88% of young adults.

Blocked: data missing. The denominators are the animals operated on, including those that gave no single units. The dataset holds only animals with recorded units (every one of the 104 subjects has at least one unit file, data check), and neither the files nor the dandiset's metadata list the animals that gave none.

In [29]:
print("Animals in the dataset with no unit file:", int((A.units == 0).sum()), "; animals:", len(A))
print("Dandiset description mentions unsuccessful experiments:",
      any(w in meta["description"].lower() for w in ["unsuccessful", "success", "failed"]))
Animals in the dataset with no unit file: 0 ; animals: 104
Dandiset description mentions unsuccessful experiments: False

psth-primary-like¶

Responses to tones at 20 and 30 dB above threshold were examined for non-primary-like shapes ... and units with clearly non-primary-like responses were excluded.

Blocked: methods underspecified. The check was visual; the paper and its code give no rule for a non-primary-like shape (claims file).

In [30]:
print(f"Notebook run time: {(time.time() - started) / 60:.1f} min")
Notebook run time: 3.4 min

Summary¶

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.

Claim Outcome
table1-animals-units reproduced
table1-age-abr-weight reproduced (ABR read as character code)
table1-bf-range reproduced
fig3-abr-age reproduced (ABR read as character code)
females-fewer-in-old reproduced
oxygen-78 reproduced
complex-stimuli-experiments reproduced
recording-type-counts partially reproduced (CLICK 271 or 275, not 261)
fig7-sampling-by-age reproduced
isi-exclusion not reproduced
no-prepotentials blocked: methods underspecified
rlf-monotonic blocked: methods underspecified
fig5b-example reproduced
fig6a-young-two-sensitive-regions reproduced (reading b)
fig6b-young-bf-gap not reproduced
fig6c-sr-distributions reproduced
fig6d-max-phase-locking-bf reproduced (recomputed vector strength)
fig6d-highest-vs-low-bf-low-sr reproduced (recomputed vector strength)
fig7a-cf-matches-bf reproduced (recomputed CF)
fig7b-click-latency-bf reproduced (recomputed latency, assumed click delay)
fig7ab-representative-sampling not reproduced
old-success-rate blocked: data missing
psth-primary-like blocked: methods underspecified

How the analysis differs from the paper's. The paper's scripts read stored analysed outcomes from the MATLAB files. The NWB files keep only the best frequency, spontaneous rate and threshold per recording, so the characteristic frequency, vector strength and click latency are recomputed from the spike times with the paper's functions, without the experimenter's manual corrections for the CF. The click delay is not in the files and is assumed to be 7.75 ms. The ABR threshold is read from a character code. The p-value of vector strength is NaN when N < 50, as the Methods say (the code uses N <= 50; one level differs, with no effect).

What was found about the dataset. All 1160 units and 104 animals of Table 1 are there, with ages, sexes, weights, oxygen, and the recording types of Fig. 7, and every count and mean of Table 1 matches. The ABR threshold is stored as a single character whose code point is the threshold. The CF, vector strength with its p-value, and click latencies that the paper describes as stored outcomes are not in the NWB files, and the click delay is missing from the trial table. Many units have within-trial inter-spike intervals below 0.6 ms; about half of these intervals lie on one spike waveform by the dip-ratio rule. Those below 0.1 ms (all on one waveform) are double detections of one spike. For those from 0.3 to 0.6 ms this is a plausible reading, not a demonstration, since the rule was checked only against pairs from 0.8 to 1.5 ms. The archive's summary lists the recordings as voltage clamp, while they are extracellular recordings of single fibres.