comC[dat_][n_,β_,θ0_,z_:1]:=Sort[Map[{#[[1,1]],Total[#[[All,2]]]/Total[#[[All,3]]]}&,GatherBy[Flatten[Normal[dat[Select[#N==n&&#β==β&&#θ0==θ0&],Thread[{Range[0,#l-1]#s/z,#C/((#N)^2),ConstantArray[#n,#l]}]&]],1],#[[1]]&]]]

dat=Dataset[With[{tmp=Map[ToExpression,Rest[StringSplit[FileBaseName[#],"_"]]],data=Import[#]},<|"N"->tmp[[1]],"β"->tmp[[2]],"θ0"->tmp[[3]],"l"->tmp[[4]],"s"->tmp[[5]],"n"->data[[1,1]],"x"->data[[1,2]],"x2"->data[[1,3]],"C"->data[[2]]|>]&/@FileNames["/home/pants/doc/research/hadamard/data/correlation*"]];

ListLogLinearPlot[comC[dat][32,11.0,0.01],Joined->True,PlotRange->All]

Cplot=ListLogLinearPlot[comC[dat][32,#,0.01,Exp[0 Exp[# 0.46-6]]]&/@Range[10,16],PlotRange->All,Joined->True,AxesLabel->{t,"C(t)"},PlotLegends->LineLegend[Range[10,16],LegendLabel->"β"]]

Export["~/doc/research/complex_complex/pres/simons_welcome/figs/hmm_correlations.pdf",Cplot];

ListLogPlot[comC[dat][32,#,0.01,Exp[0 Exp[# 0.46-6]]]&/@Range[10,16],PlotRange->{{1,50},{0.98,1}},Joined->True]