Model latency at catalog scale
==============================

11463 A2 models measured (23 pages of 500 spread evenly across the public
TONE3000 catalog, 11,465 unique files, 2 failed to download, every file loaded).
gear: amp-cab 5805, amp 3571, pedal 918, outboard 711, experimental 458

Passes: default (linear sweep 100 ms, -20 dBFS, click -20 dBFS); amp30 (-30 dBFS);
ms50 (50 ms sweep); exp (exponential sweep); delay37 (+37 samples injected).
'td' = time-domain cross-correlation, 'gp' = GCC-PHAT, 'im' = single click.
'peak' = lag of the biggest |c|; 'early' = earliest lobe within lobeTolerance
(1.1) of it; 'onset' = first lag at 30% of the peak (gp: on the un-whitened c).
Agreement/stability = integer lag within +-1 sample unless stated.

Ground truth: injected +37-sample delay, exact shift
-----------------------------------------------------
  td_peak    99.8%
  gp_peak    97.9%
  im_peak   100.0%
  td_early   99.7%
  gp_early   97.9%
  td_onset   98.5%
  gp_onset   98.5%
  gp misses: 238, of which lobe-ratio < 1.25 on either analyzer: 173
  td misses: 28

Agreement between methods (default pass)
-----------------------------------------
  td vs gp peak  within 1:  90.4%   exact:  76.0%
  td vs gp early within 1:  92.2%   exact:  77.1%
  td vs gp onset within 1: 100.0%   exact: 100.0%
  td vs gp polarity same:   91.6%   (early-lobe polarity:  93.4%)
  im vs gp peak  within 1:  50.1%   polarity same:  61.3%
  |td - gp| peak histogram: 0:8713  1:1650  2:134  3:14  4:58  5:338  6:374  7:75  8:11  9:5  10:5  11:5  56:7  57:5

Stability of the default answer under probe changes
---------------------------------------------------
  pass     gp_peak  td_peak  im_peak  gp_early  td_early  gp_onset  td_onset   gp_pol gp_earlypol
  amp30      94.3%    95.3%    75.7%     94.7%     96.0%     97.1%     97.1%    95.1%      95.5%
  ms50       96.7%    94.8%   100.0%     96.4%     96.2%     94.6%     94.6%    97.2%      97.1%
  exp        93.0%    53.5%   100.0%     94.0%     59.0%     25.3%     25.3%    93.7%      94.8%
  (exp + td is the known-bad pairing: pink probe, plain correlation.)

Lobe ambiguity: min(td_lobe, gp_lobe) = peak over the largest lobe 2 samples..1 ms away
--------------------------------------------------------------------------------------
  lobe-ratio        n   share | peak td~gp  polarity amp30 stable | early td~gp  polarity amp30 stable
  [1, 1.1)       1892   16.5% |      59.1%     61.8%        75.6% |       70.1%     72.9%        77.9%
  [1.1, 1.25)    1997   17.4% |      86.6%     89.2%        91.8% |       86.6%     89.2%        91.9%
  [1.25, 1.5)    2910   25.4% |      98.0%     98.9%        99.2% |       98.0%     98.9%        99.2%
  [1.5, 2)       1659   14.5% |      99.9%    100.0%        99.9% |       99.9%    100.0%       100.0%
  >= 2           3005   26.2% |     100.0%    100.0%        99.9% |      100.0%    100.0%        99.9%
  gated at lobe-ratio >= 1.1: keeps  83.5%; td~gp  96.6%, polarity  97.4%, amp30  98.0%, ms50  98.9%
  peak-ratio < 2 (the old gate) on either analyzer: 206 models
  early != peak on: td   5.3%, gp   4.2% of models

What the models look like (gp, default pass)
--------------------------------------------
  polarity inverted:  52.2%
  confidence p5 0.29  median 0.50  p95 0.90
  peak lag histogram (samples @ 48 kHz: count):
     0:271    1:386    2:93     3:98     4:945    5:1128   6:861    7:1086   8:1226   9:405 
    10:302   11:233   12:260   13:309   14:502   15:368   16:247   17:174   18:132   19:118 
    20:144   21:109   22:84    23:199   24:287   25:249   26:121   27:75    28:93    29:51  
    30:25    31:12    32:26    33:239   34:83    35:34    36:65    37:57    38:22    39:38  
  early lobe histogram (samples @ 48 kHz: count):
     0:274    1:388    2:92     3:107    4:978    5:1147   6:884    7:1136   8:1314   9:427 
    10:311   11:219   12:224   13:232   14:451   15:358   16:220   17:164   18:129   19:121 
    20:141   21:102   22:82    23:201   24:283   25:247   26:118   27:77    28:92    29:50  
    30:26    31:13    32:28    33:244   34:90    35:31    36:63    37:57    38:17    39:36  
  onset histogram (samples @ 48 kHz: count):
     0:663    1:317    2:318    3:1165   4:2141   5:1923   6:771    7:315    8:157    9:144 
    10:101   11:104   12:143   13:223   14:302   15:209   16:127   17:136   18:76    19:163 
    20:171   21:149   22:321   23:178   24:72    25:67    26:89    27:67    28:56    29:31  
    30:21    31:147   32:120   33:104   34:30    35:61    36:59    37:26    38:22    39:11  
  onset >=  4 samples (0.08 ms):  78.5%
  onset >=  8 samples (0.17 ms):  33.6%
  onset >= 12 samples (0.25 ms):  29.2%
  onset >= 20 samples (0.42 ms):  17.1%

  by gear:
  gear          n   td~gp inverted  lobe<1.1  onset med   onset>=8
  amp-cab    5805   83.6%    64.7%     26.4%          5      19.8%
  amp        3571   97.1%    52.1%      7.6%         13      61.6%
  pedal       918   98.5%    29.3%      2.9%          4      39.8%
  outboard    711   98.6%     9.1%      2.5%          0       4.8%
  experimental   458   96.1%     7.9%      9.8%          2      21.6%

Cost per model (this laptop, A2, 48 kHz)
----------------------------------------
  load                   median  3.26 ms  p95  3.65 ms
  sweep through model    median  2.80 ms  p95  3.01 ms
  click run + analysis   median  0.53 ms  p95  0.57 ms

