{"id":"independent_max_ncc","title":"Independent channel maximum NCC","family":"sliding","definition":"echotime","intro_en":"Independent channel comparison permits each paired channel to choose a different global lag. The illustration uses two channels with peaks shifted in opposite directions, then averages their individually optimized scores. For independent maximum NCC it averages the channel maxima. The upper input plot shows channel one; both channels are displayed in the computational frames.","intro_zh":"独立通道比较允许每对通道选择不同的全局滞后。本例使用两组峰值向相反方向偏移的通道，再平均各自优化后的分数。最大 NCC 型直接平均各通道最大值。上方输入图显示第一通道，计算帧依次展示两个通道。","steps_en":["Match channels explicitly and normalize each series within each channel.","Compute the full-norm NCC lag profile for channel one.","Repeat the lag scan independently for channel two.","Average the maxima; no common lag is required."],"steps_zh":["明确通道配对，并在每个通道内分别标准化。","计算第一通道的全范数 NCC 滞后曲线。","独立计算第二通道的滞后曲线。","平均各通道最大值，不要求共同滞后。"],"formula":"mean_c max_lag NCC_c(lag)","caveats_en":["Independent lags discard cross-channel timing consistency; choose a joint-lag method if synchrony matters.","Channels are averaged equally here; this is not a learned weighting.","The channel pairing must have a scientific meaning."],"caveats_zh":["独立滞后舍弃跨通道时序一致性；同步关系重要时应使用共同滞后的方法。","本例对通道等权平均，不学习权重。","通道配对必须有科学意义。"],"sources":[{"label":"EchoTime: independent_max_ncc and independent_sbd","url":"https://github.com/ZipengWu365/EchoTime/blob/main/src/echotime/similarity_methods.py"}],"x":[0.0,0.1,0.8,2.1,1.4,0.3,-0.2,-0.1,0.1,0.0],"y":[0.0,0.025244129544236896,0.02727892280477045,0.10423360024179602,0.7772959251407622,2.071232271760106,1.391617535054032,0.3197095979615637,-0.17031925260129854,-0.0876364454427473],"input_label":"Upper traces: first of two explicitly recorded channels; both appear in the animation.","parameters":{"channels_x":[[0.0,0.2],[0.1,0.9],[0.8,1.8],[2.1,1.2],[1.4,0.1],[0.3,-0.6],[-0.2,-0.3],[-0.1,0.4],[0.1,0.8],[0.0,0.2]],"channels_y":[[0.0,1.82],[0.025244129544236896,1.2108060461173626],[0.02727892280477045,0.09167706326905715],[0.10423360024179602,-0.6197998499320089],[0.7772959251407622,-0.3130728724172722],[2.071232271760106,0.40567324370926455],[1.391617535054032,0.8192034057330073],[0.3197095979615637,0.2150780450868661],[-0.17031925260129854,-0.0029100006761722708],[-0.0876364454427473,-0.018222605237693538]],"upper_plot_channel":0,"channel_best_lags":[-2,2],"aggregation":"equal channel mean"},"result":{"label":"similarity","value":0.9317827892540891,"detail":""},"frames":[{"phase":0,"caption":"Normalize channel 1 independently","panel":{"kind":"lines","title":"Channel 1: separate z-normalized input","a":[-0.6273643326097713,-0.4879500364742666,0.48795003647426666,2.3003358862358283,1.324435813287295],"a_label":"x","b":[-0.6309292202742752,-0.5952071148826826,-0.5923277484471909,-0.4834318131381829,0.4689956913641513],"b_label":"y"}},{"phase":0,"caption":"Normalize channel 1 independently","panel":{"kind":"lines","title":"Channel 1: separate z-normalized input","a":[-0.6273643326097713,-0.4879500364742666,0.48795003647426666,2.3003358862358283,1.324435813287295,-0.20912144420325715,-0.9061929248807808,-0.7667786287452761,-0.4879500364742666,-0.6273643326097713],"a_label":"x","b":[-0.6309292202742752,-0.5952071148826826,-0.5923277484471909,-0.4834318131381829,0.4689956913641513,2.3000008152663436,1.338301216642782,-0.17851908931398805,-0.8719421766124685,-0.7549405606044893],"b_label":"y"}},{"phase":0,"caption":"Normalize channel 2 independently","panel":{"kind":"lines","title":"Channel 2: separate z-normalized input","a":[-0.3971876899222231,0.6325581728390959,1.9565171392465062,1.0738778283082326,-0.5442942417452686],"a_label":"x","b":[2.095398075212444,1.2205751089569312,-0.3865316756033169,-1.4082364047162106,-0.9677661692684623],"b_label":"y"}},{"phase":0,"caption":"Normalize channel 2 independently","panel":{"kind":"lines","title":"Channel 2: separate z-normalized input","a":[-0.3971876899222231,0.6325581728390959,1.9565171392465062,1.0738778283082326,-0.5442942417452686,-1.5740401045065877,-1.132720449037451,-0.1029745862761319,0.4854516210160504,-0.3971876899222231],"a_label":"x","b":[2.095398075212444,1.2205751089569312,-0.3865316756033169,-1.4082364047162106,-0.9677661692684623,0.0643773792467634,0.6582205726534867,-0.2093237235797225,-0.5223618743808754,-0.544351288521037],"b_label":"y"}},{"phase":1,"caption":"Channel 1 chooses its own lag; current lag -9","panel":{"kind":"lines","title":"NCC lag profile of channel 1","a":[0.0473622780963682,0.09153986957876563,0.016908745212421583,-0.29145751338828363,-0.5188701195040026,-0.21711035761622904,0.49052957357582416,0.9305963101139378,0.5470463712762678,-0.0751440347915077,-0.45597650563563424,-0.5090062013168606,-0.3999215627842331,-0.1475491227071923,0.10671569667453622,0.16204499141535658,0.11458196783648032,0.06812736504384748,0.039582248920137404],"a_label":"channel 1","marker":0,"x":[-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]},"value":0.0473622780963682,"value_label":"channel NCC"},{"phase":1,"caption":"Channel 1 chooses its own lag; current lag -7","panel":{"kind":"lines","title":"NCC lag profile of channel 1","a":[0.0473622780963682,0.09153986957876563,0.016908745212421583,-0.29145751338828363,-0.5188701195040026,-0.21711035761622904,0.49052957357582416,0.9305963101139378,0.5470463712762678,-0.0751440347915077,-0.45597650563563424,-0.5090062013168606,-0.3999215627842331,-0.1475491227071923,0.10671569667453622,0.16204499141535658,0.11458196783648032,0.06812736504384748,0.039582248920137404],"a_label":"channel 1","marker":2,"x":[-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]},"value":0.016908745212421583,"value_label":"channel NCC"},{"phase":1,"caption":"Channel 1 chooses its own lag; current lag -4","panel":{"kind":"lines","title":"NCC lag profile of channel 1","a":[0.0473622780963682,0.09153986957876563,0.016908745212421583,-0.29145751338828363,-0.5188701195040026,-0.21711035761622904,0.49052957357582416,0.9305963101139378,0.5470463712762678,-0.0751440347915077,-0.45597650563563424,-0.5090062013168606,-0.3999215627842331,-0.1475491227071923,0.10671569667453622,0.16204499141535658,0.11458196783648032,0.06812736504384748,0.039582248920137404],"a_label":"channel 1","marker":5,"x":[-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]},"value":-0.21711035761622904,"value_label":"channel NCC"},{"phase":1,"caption":"Channel 1 chooses its own lag; current lag -2","panel":{"kind":"lines","title":"NCC lag profile of channel 1","a":[0.0473622780963682,0.09153986957876563,0.016908745212421583,-0.29145751338828363,-0.5188701195040026,-0.21711035761622904,0.49052957357582416,0.9305963101139378,0.5470463712762678,-0.0751440347915077,-0.45597650563563424,-0.5090062013168606,-0.3999215627842331,-0.1475491227071923,0.10671569667453622,0.16204499141535658,0.11458196783648032,0.06812736504384748,0.039582248920137404],"a_label":"channel 1","marker":7,"x":[-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]},"value":0.9305963101139378,"value_label":"channel NCC"},{"phase":1,"caption":"Channel 1 chooses its own lag; current lag +1","panel":{"kind":"lines","title":"NCC lag profile of channel 1","a":[0.0473622780963682,0.09153986957876563,0.016908745212421583,-0.29145751338828363,-0.5188701195040026,-0.21711035761622904,0.49052957357582416,0.9305963101139378,0.5470463712762678,-0.0751440347915077,-0.45597650563563424,-0.5090062013168606,-0.3999215627842331,-0.1475491227071923,0.10671569667453622,0.16204499141535658,0.11458196783648032,0.06812736504384748,0.039582248920137404],"a_label":"channel 1","marker":10,"x":[-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]},"value":-0.45597650563563424,"value_label":"channel NCC"},{"phase":1,"caption":"Channel 1 chooses its own lag; current lag +3","panel":{"kind":"lines","title":"NCC lag profile of channel 1","a":[0.0473622780963682,0.09153986957876563,0.016908745212421583,-0.29145751338828363,-0.5188701195040026,-0.21711035761622904,0.49052957357582416,0.9305963101139378,0.5470463712762678,-0.0751440347915077,-0.45597650563563424,-0.5090062013168606,-0.3999215627842331,-0.1475491227071923,0.10671569667453622,0.16204499141535658,0.11458196783648032,0.06812736504384748,0.039582248920137404],"a_label":"channel 1","marker":12,"x":[-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]},"value":-0.3999215627842331,"value_label":"channel NCC"},{"phase":1,"caption":"Channel 1 chooses its own lag; current lag +6","panel":{"kind":"lines","title":"NCC lag profile of channel 1","a":[0.0473622780963682,0.09153986957876563,0.016908745212421583,-0.29145751338828363,-0.5188701195040026,-0.21711035761622904,0.49052957357582416,0.9305963101139378,0.5470463712762678,-0.0751440347915077,-0.45597650563563424,-0.5090062013168606,-0.3999215627842331,-0.1475491227071923,0.10671569667453622,0.16204499141535658,0.11458196783648032,0.06812736504384748,0.039582248920137404],"a_label":"channel 1","marker":15,"x":[-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]},"value":0.16204499141535658,"value_label":"channel NCC"},{"phase":1,"caption":"Channel 1 chooses its own lag; current lag +9","panel":{"kind":"lines","title":"NCC lag profile of channel 1","a":[0.0473622780963682,0.09153986957876563,0.016908745212421583,-0.29145751338828363,-0.5188701195040026,-0.21711035761622904,0.49052957357582416,0.9305963101139378,0.5470463712762678,-0.0751440347915077,-0.45597650563563424,-0.5090062013168606,-0.3999215627842331,-0.1475491227071923,0.10671569667453622,0.16204499141535658,0.11458196783648032,0.06812736504384748,0.039582248920137404],"a_label":"channel 1","marker":18,"x":[-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]},"value":0.039582248920137404,"value_label":"channel NCC"},{"phase":2,"caption":"Channel 2 chooses its own lag; current lag -9","panel":{"kind":"lines","title":"NCC lag profile of channel 2","a":[0.02162096307938562,-0.01368581502606922,-0.13123160923669525,-0.20004232804998587,-0.028341811604063554,0.26292882920598576,0.23327197623841664,-0.19426208866384764,-0.5568269243606624,-0.26646909505856253,0.5553404830370192,0.9329692683942403,0.3658874378083353,-0.29742759424338705,-0.4940253887700735,-0.21274967295727057,0.05302830386508275,0.05324169843826234,-0.08322663209611032],"a_label":"channel 2","marker":0,"x":[-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]},"value":0.02162096307938562,"value_label":"channel NCC"},{"phase":2,"caption":"Channel 2 chooses its own lag; current lag -7","panel":{"kind":"lines","title":"NCC lag profile of channel 2","a":[0.02162096307938562,-0.01368581502606922,-0.13123160923669525,-0.20004232804998587,-0.028341811604063554,0.26292882920598576,0.23327197623841664,-0.19426208866384764,-0.5568269243606624,-0.26646909505856253,0.5553404830370192,0.9329692683942403,0.3658874378083353,-0.29742759424338705,-0.4940253887700735,-0.21274967295727057,0.05302830386508275,0.05324169843826234,-0.08322663209611032],"a_label":"channel 2","marker":2,"x":[-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]},"value":-0.13123160923669525,"value_label":"channel NCC"},{"phase":2,"caption":"Channel 2 chooses its own lag; current lag -4","panel":{"kind":"lines","title":"NCC lag profile of channel 2","a":[0.02162096307938562,-0.01368581502606922,-0.13123160923669525,-0.20004232804998587,-0.028341811604063554,0.26292882920598576,0.23327197623841664,-0.19426208866384764,-0.5568269243606624,-0.26646909505856253,0.5553404830370192,0.9329692683942403,0.3658874378083353,-0.29742759424338705,-0.4940253887700735,-0.21274967295727057,0.05302830386508275,0.05324169843826234,-0.08322663209611032],"a_label":"channel 2","marker":5,"x":[-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]},"value":0.26292882920598576,"value_label":"channel NCC"},{"phase":2,"caption":"Channel 2 chooses its own lag; current lag -2","panel":{"kind":"lines","title":"NCC lag profile of channel 2","a":[0.02162096307938562,-0.01368581502606922,-0.13123160923669525,-0.20004232804998587,-0.028341811604063554,0.26292882920598576,0.23327197623841664,-0.19426208866384764,-0.5568269243606624,-0.26646909505856253,0.5553404830370192,0.9329692683942403,0.3658874378083353,-0.29742759424338705,-0.4940253887700735,-0.21274967295727057,0.05302830386508275,0.05324169843826234,-0.08322663209611032],"a_label":"channel 2","marker":7,"x":[-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]},"value":-0.19426208866384764,"value_label":"channel NCC"},{"phase":2,"caption":"Channel 2 chooses its own lag; current lag +1","panel":{"kind":"lines","title":"NCC lag profile of channel 2","a":[0.02162096307938562,-0.01368581502606922,-0.13123160923669525,-0.20004232804998587,-0.028341811604063554,0.26292882920598576,0.23327197623841664,-0.19426208866384764,-0.5568269243606624,-0.26646909505856253,0.5553404830370192,0.9329692683942403,0.3658874378083353,-0.29742759424338705,-0.4940253887700735,-0.21274967295727057,0.05302830386508275,0.05324169843826234,-0.08322663209611032],"a_label":"channel 2","marker":10,"x":[-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]},"value":0.5553404830370192,"value_label":"channel NCC"},{"phase":2,"caption":"Channel 2 chooses its own lag; current lag +3","panel":{"kind":"lines","title":"NCC lag profile of channel 2","a":[0.02162096307938562,-0.01368581502606922,-0.13123160923669525,-0.20004232804998587,-0.028341811604063554,0.26292882920598576,0.23327197623841664,-0.19426208866384764,-0.5568269243606624,-0.26646909505856253,0.5553404830370192,0.9329692683942403,0.3658874378083353,-0.29742759424338705,-0.4940253887700735,-0.21274967295727057,0.05302830386508275,0.05324169843826234,-0.08322663209611032],"a_label":"channel 2","marker":12,"x":[-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]},"value":0.3658874378083353,"value_label":"channel NCC"},{"phase":2,"caption":"Channel 2 chooses its own lag; current lag +6","panel":{"kind":"lines","title":"NCC lag profile of channel 2","a":[0.02162096307938562,-0.01368581502606922,-0.13123160923669525,-0.20004232804998587,-0.028341811604063554,0.26292882920598576,0.23327197623841664,-0.19426208866384764,-0.5568269243606624,-0.26646909505856253,0.5553404830370192,0.9329692683942403,0.3658874378083353,-0.29742759424338705,-0.4940253887700735,-0.21274967295727057,0.05302830386508275,0.05324169843826234,-0.08322663209611032],"a_label":"channel 2","marker":15,"x":[-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]},"value":-0.21274967295727057,"value_label":"channel NCC"},{"phase":2,"caption":"Channel 2 chooses its own lag; current lag +9","panel":{"kind":"lines","title":"NCC lag profile of channel 2","a":[0.02162096307938562,-0.01368581502606922,-0.13123160923669525,-0.20004232804998587,-0.028341811604063554,0.26292882920598576,0.23327197623841664,-0.19426208866384764,-0.5568269243606624,-0.26646909505856253,0.5553404830370192,0.9329692683942403,0.3658874378083353,-0.29742759424338705,-0.4940253887700735,-0.21274967295727057,0.05302830386508275,0.05324169843826234,-0.08322663209611032],"a_label":"channel 2","marker":18,"x":[-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0]},"value":-0.08322663209611032,"value_label":"channel NCC"},{"phase":3,"caption":"Average each channel's maximum NCC","panel":{"kind":"bars","title":"Each channel keeps its own best shift","a":[0.9305963101139378,0.9329692683942403],"a_label":"contribution","marker":0,"labels":["channel 1","channel 2"]},"value":0.9317827892540891,"value_label":"channel mean"},{"phase":3,"caption":"Average each channel's maximum NCC","panel":{"kind":"bars","title":"Each channel keeps its own best shift","a":[0.9305963101139378,0.9329692683942403],"a_label":"contribution","marker":1,"labels":["channel 1","channel 2"]},"value":0.9317827892540891,"value_label":"channel mean"},{"phase":3,"caption":"Average each channel's maximum NCC","panel":{"kind":"bars","title":"Each channel keeps its own best shift","a":[0.9305963101139378,0.9329692683942403],"a_label":"contribution","marker":0,"labels":["channel 1","channel 2"]},"value":0.9317827892540891,"value_label":"channel mean"},{"phase":3,"caption":"Average each channel's maximum NCC","panel":{"kind":"bars","title":"Each channel keeps its own best shift","a":[0.9305963101139378,0.9329692683942403],"a_label":"contribution","marker":1,"labels":["channel 1","channel 2"]},"value":0.9317827892540891,"value_label":"channel mean"}],"checks":{"api":"independent_max_ncc","expected":0.9317827892540891,"observed":0.9317827892540891,"tolerance":1e-12},"animation_steps_en":["Pair and normalize each channel separately.","Find channel one's NCC profile.","Find channel two's NCC profile independently.","Average the two channel maxima."],"echotime_status":"Implemented in EchoTime","echotime_api":"independent_max_ncc"}
