Commit 76a40c73 authored by Hannah Middleton's avatar Hannah Middleton
Browse files

updating make fake data scirpts

parent 00af4df6
......@@ -8,7 +8,9 @@ import matplotlib.pyplot as plt
#import plotFFT
# the primary measured signal containing the GW, clutter line and noise
def getPrimarySignal(refSignal,gwSignal,clutterAmp=2.,noiseAmp=2.,psiRefOne=0.235,refSignalTwo=False,psiRefTwo=0.343):
def getPrimarySignal(refSignal,gwSignal,clutterAmp=2.,
noiseAmp=2.,psiRefOne=0.235,
refSignalTwo=False,psiRefTwo=0.343):
## parameters ##
# psi: this is to shift the reference signal before adding to the primary
......@@ -45,7 +47,11 @@ def getGWSignal(time,freqGW=4.0, h=0.05, phi=0.34):
# the reference signal
def getReferenceSignal(time,freqC=5.2,N=5,wn=np.array([0.41,0.04,0.22,0.57,0.35]),an = np.array([-0.03,0.10,-0.16,0.08,-0.07]),phin=np.array([0.0,0.1,0.2,0.3,0.4]),refAmp=0.1,refNoiseAmp=0.1,twoChannels=False):
def getReferenceSignal(time,freqC=5.2,N=5,
wn=np.array([0.41,0.04,0.22,0.57,0.35]),
an = np.array([-0.03,0.10,-0.16,0.08,-0.07]),
phin=np.array([0.0,0.1,0.2,0.3,0.4]),
refAmp=0.1,refNoiseAmp=0.1,twoChannels=False):
## parameters
# N: the number of weighted sinusoids
......@@ -96,7 +102,8 @@ def writeLines(times,primary,ref,inj,name='tmp.dat',ref2=False):
def saveParams(dataParams, gWParams, refSigParams, primarySigParams, name='tmp.dat',directory='./'):
def saveParams(dataParams, gWParams, refSigParams,
primarySigParams, name='tmp.dat',directory='./'):
paramFile = open('{0}{1}'.format(directory,name),'w')
for key, value in dataParams.iteritems():
......@@ -152,6 +159,8 @@ fC = float(config['clutter']['centralFreq'])
weightSines = np.atleast_1d([float(str_val) for str_val in config['clutter']['weightSines'].split(',')])
freqsSines = np.atleast_1d([float(str_val) for str_val in config['clutter']['freqSines'].split(',')])
phaseSines = np.atleast_1d([float(str_val) for str_val in config['clutter']['phaseSines'].split(',')])
noSinusoids = int(len(weightSines)) # N
noiseAmpRef = float(config['clutter']['noiseAmp']) #0.01
referenceAmp = float(config['clutter']['refAmp']) #0.1 #0.1#1.E-19
......
......@@ -3,27 +3,27 @@
[data]
start_time = 0.0
end_time = 1800.
end_time = 4096
srate = 1024
seed = 428
seed = 4123
[clutter]
centralFreq = 60.0
freqSines = -0.495, -0.496, -0.497, -0.498, -0.499, -0.5, -0.501, -0.502, -0.503, -0.504, -0.505, -0.295, -0.296, -0.297, -0.298, -0.299, -0.3, -0.301, -0.302, -0.303, -0.304, -0.305, -0.005, -0.004, -0.003, -0.002, -0.001, 0.0, 0.001, 0.002, 0.003, 0.004, 0.005, 0.295, 0.296, 0.297, 0.298, 0.299, 0.3, 0.301, 0.302, 0.303, 0.304, 0.305, 0.495, 0.496, 0.497, 0.498, 0.499, 0.5, 0.501, 0.502, 0.503, 0.504, 0.505
weightSines = 0.01, 0.01, 0.01, 0.01, 0.01, 0.1, 0.01, 0.01, 0.01, 0.01, 0.01, 0.05, 0.05, 0.05, 0.05, 0.05, 0.2, 0.05, 0.05, 0.05, 0.05, 0.05, 0.1, 0.1, 0.1, 0.1, 0.15, 2.0, 0.15, 0.1, 0.1, 0.1, 0.1, 0.05, 0.05, 0.05, 0.05, 0.05, 0.2, 0.05, 0.05, 0.05, 0.05, 0.05, 0.01, 0.01, 0.01, 0.01, 0.01, 0.1, 0.01, 0.01, 0.01, 0.01, 0.01
phaseSines = 1.88464592, 1.16476356, 0.59260117, 0.4459515 , 0.98339819, 0.35539645, 1.80759105, 0.94270568, 1.35353234, 0.55839407, 0.12532757, 0.80392952, 0.46307127, 0.40150183, 1.77987356, 2.45427921, 0.77851773, 0.46634746, 1.47223271, 2.54901271, 1.3066802 , 2.79936517, 1.56310523, 0.58387607, 2.10591965, 1.0308672 , 1.44644829, 0.79843965, 0.68986151, 1.23491135, 0.12295101, 3.0966532 , 1.87212376, 0.26505531, 1.86960676, 2.2326574 , 2.55250239, 2.01754675, 1.04635494, 1.04327534, 1.85965675, 1.41435024, 2.4473795 , 2.22478731, 2.36732106, 1.55086739, 1.74647516, 2.02080924, 0.16702836, 2.3573375 , 2.12666702, 0.37478988, 2.86760093, 2.64067115, 2.70584321
freqSines = -0.01, -0.009, -0.008, -0.007, -0.006, -0.005, -0.004, -0.003, -0.002, -0.001, 0.0, 0.001, 0.002, 0.003, 0.004, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01
weightSines = 0.1, 0.1, 0.1, 0.1, 0.1, 0.5, 0.5, 0.5, 0.7, 0.7, 2., 0.7, 0.7, 0.5, 0.5, 0.5, 0.1, 0.1, 0.1, 0.1, 0.1
phaseSines = 1.88464592, 1.16476356, 0.59260117, 0.4459515 , 0.98339819, 0.35539645, 1.80759105, 0.94270568, 1.35353234, 0.55839407, 0.12532757, 0.80392952, 0.46307127, 0.40150183, 1.77987356, 2.45427921, 0.77851773, 0.46634746, 1.47223271, 2.54901271, 1.3066802
noiseAmp = 0.5
refAmp = 0.5
[injection]
freq = 59.98
hAmp = 0.0
freq = 59.995
hAmp = 3E-19
phi= 0.0
[primary]
primNoiseAmp = 2E-17
clutterAmpInPrim = 7E-18
primNoiseAmp = 1E-17
clutterAmpInPrim = 1E-19
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment