run /users/swinkels/deploy/MatlabVirgoTools/trunk/startup.m %% get data g = utc2gps(2016, 7, 6, 15, 40, 10); [d, t] = getChannel('LSC_PRX_ERR', g, 600); %% filter data around resonance fres = 219.2; fsamp = 1 / (t(2) - t(1)); filt_s = tf(resonant_filter(fres, 100)); filt_z = c2d(filt_s, 1/fsamp, 'prewarp', fres * 2 * pi); B = filt_z.num{1}; A = filt_z.den{1}; df = filtfilt(B, A, d); %% calculate blrms n = 10000; % downsample to 1 Hz rms = sqrt(safe_decimate(df.^2, n)); tt = t(1:n:end); %% plot close all tau = 300; % fit by eye q = pi * fres * tau; semilogy(tt, rms, tt, 0.6e-3 * exp(-tt/tau)) xlabel(sprintf('Time (s) after %s', gps2str(g))) title(sprintf('Ring-down of PR violin mode with Q = %g', q)) legend(sprintf('BLRMS of LSC\\_PRX\\_ERR around %g Hz', fres), ... sprintf('exponential fit with tau = %g', tau))