Analysis of OFIS Vertical Mode Ringdown Data, 4/23/14, Mark Barton and Gerardo

Set 4, final configuration

data = Import["/Users/mbarton/Desktop/OFIS/OFIS4.txt","TSV"]

ListPlot[data]

evens = data[[1;;-1;;2]]

odds = data[[2;;-1;;2]]

ListPlot[odds]

mean = Mean[data[[-6;;-1,2]]]

diff = Join[odds/.{x_,y_}:>{x,y-mean},evens/.{x_,y_}:>{x,mean-y}]

ListPlot[diff]

log = diff/.{x_,y_}:>{x,Log[y]}

lp = ListPlot[log]

fit = Fit[log,{1,x},x]

Show[Plot[fit,{x,0,10}],lp]

peaks =  Riffle[evens/.{x_,y_}:>mean-y,odds/.{x_,y_}:>y-mean]

ListPlot[Log[peaks]]

fitp = Fit[Log[peaks],{1,n},n]

logdec = -2 Coefficient[fitp,n]

Q = Sqrt[1+(2 Pi/logdec)^2]/2