#! /usr/bin/env python import numpy as np import matplotlib.pyplot as plt data = np.loadtxt('./SQRTINVspectra.dat') # Coupled arm linewidth w = 38e-12 # Lorentzian value at full resonance I0 = 700 # Conversion to m/rtHz as a function of linewidths from resonance def conv(x): factor = w * np.sqrt(I0) * np.sqrt(1 + 4 * x**2) / np.sqrt(4*x) return(factor) f = data[:, 0] t2 = data[:, 1:3] t1 = data[:, 3:5] thalf = data[:, 5:7] tthird = data[:, 7:] plt.figure(1) plt.loglog(f, t2[:, 1], f, t1[:, 1], f, thalf[:, 1], f, tthird[:, 1]) plt.figure(2) plt.loglog(f, conv(2)*t2[:, 1], f, conv(1)*t1[:, 1], f, conv(.5)*thalf[:, 1], f, conv(.34)*tthird[:, 1]) plt.show()