⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xdecon4

📁 su 的源代码库
💻
字号:
#! /bin/shWIDTH=600HEIGHT=400WIDTHOFF1=0WIDTHOFF2=640HEIGHTOFF1=50HEIGHTOFF2=530deconparams=deconparams4fold=8space=3		# 3 null traces between panelstpow=1		# gain power before examining autocorrelations		# tpow=2 would often be better for field datamix=1,1,1pnoise=.0005###PURPOSE#### We use the same data described in the first demo.  But here# we illustrate how to set up a series of tests to determine the# optimal length for spiking deconvolution.# First make the synthetic data for the deconvolution demo.######START OF MODEL######I=${CWPROOT}/includeL=${CWPROOT}/libmake./traces |suaddhead ns=512 |sushw key=dt a=4000 |suaddnoise sn=2000 |suconv filter=1152,-384,-904,288,174,-34,-12 >modeldatarm traces######END OF MODEL####### Plot the model suxwigb <modeldata title="Data: 64ms reverbs" \	windowtitle="Data" \	label1="Time (sec)" label2="Trace" \	wbox=$WIDTH hbox=$HEIGHT xbox=$WIDTHOFF1 ybox=$HEIGHTOFF1 & # Plot the autocorrelation with gainsugain <modeldata tpow=$tpow |suacor nt=31 |suxwigb title="Autocorrelation" \	windowtitle="AutoCorr" \	label1="Time (sec)" label2="Trace" \	wbox=$WIDTH hbox=$HEIGHT xbox=$WIDTHOFF2 ybox=$HEIGHTOFF1 &#!# Determine range of decon parameters (use milliseconds to run loop)gapmin=4 gapmax=4lenmin=8 lenmax=64gapincrement=0 gapexpand=1lenincrement=0 lenexpand=2tmin=0.5 tmax=1.0	# auto-corr windowpanelnumber=0  # test panel number### Determine ns, and dt from data (for sunull)nt=`sugethw ns <modeldata | sed 1q | sed 's/.*ns=//'`dt=`sugethw dt <modeldata | sed 1q | sed 's/.*dt=//'`### Convert dt to seconds from header value in microsecondsdt=`bc -l <<-END	scale=3	$dt / 1000000END`# Loop over deconvolution parameters>deconpanel  # zero output files# zeroth panel is w/o deconcp modeldata deconpanelsunull ntr=$space nt=$nt dt=$dt >>deconpanelecho "Making deconvolution test panels.  Takes a few seconds ..."echo "Zeroth panel is data without deconvolution."echo "Test minlag maxlag tmin tmax" >$deconparamsgap=$gapminlen=$lenminwhile [ $gap -le $gapmax -a $len -le $lenmax ]do	panelnumber=`expr $panelnumber + 1`	minlag=`bc -l <<-END		scale=5; $gap / 1000	END`	maxlag=`bc -l <<-END		scale=5; $minlag + $len / 1000	END`	sugain <modeldata tpow=$tpow |	supef pnoise=$pnoise mix=$mix minlag=$minlag maxlag=$maxlag \		mincorr=$tmin maxcorr=$tmax >>deconpanel	sunull ntr=$space nt=$nt dt=$dt >>deconpanel	echo "$panelnumber $minlag $maxlag $tmin $tmax" >>$deconparams	gap=`bc <<-END		scale=5		$gap*$gapexpand + $gapincrement	END`	len=`bc -l <<-END		scale=5		$len*$lenexpand + $lenincrement	END`doneecho "The parameter values are recorded in $deconparams:"cat $deconparams### Plot deconvolution test panelsf2=0d2=`bc -l <<-END	scale=5	1/($fold + $space)END`### Additional display gaining and plot### Some might like tpow=1 pbal=1 instead of gpow=.5, etc.suresamp tmin=0.38 nt=55 <deconpanel |sugain  gpow=.5 |suxwigb f2=$f2 d2=$d2 title="Spiking Deconvolution Test"  \	windowtitle="DeconTest" \	label1="Time (s)"  label2="Deconvolution Test Number" \	f2num=0 d2num=1 perc=99 \	wbox=900 hbox=$HEIGHT xbox=150 ybox=$HEIGHTOFF2 &exit 0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -