Commit 5ec0b49d authored by David Keitel's avatar David Keitel
Browse files

transient examples: split into long and short cases

parent 0ec129e9
......@@ -37,8 +37,8 @@ nwalkers = 100
nsteps = [100, 100]
mcmc = pyfstat.MCMCTransientSearch(
label='transient_search', outdir='data',
sftfilepattern='data/*simulated_transient_signal*sft',
label='transient_search', outdir='data_l',
sftfilepattern='data_l/*simulated_transient_signal*sft',
theta_prior=theta_prior, tref=tref, minStartTime=minStartTime,
maxStartTime=maxStartTime, nsteps=nsteps, nwalkers=nwalkers, ntemps=ntemps,
log10beta_min=log10beta_min,
......
......@@ -19,7 +19,7 @@ h0 = 1e-23
sqrtSX = 1e-22
transient = pyfstat.Writer(
label='simulated_transient_signal', outdir='data', tref=tref,
label='simulated_transient_signal', outdir='data_l', tref=tref,
tstart=transient_tstart, F0=F0, F1=F1, F2=F2, duration=transient_duration,
Alpha=Alpha, Delta=Delta, h0=h0, sqrtSX=sqrtSX, minStartTime=minStartTime,
maxStartTime=maxStartTime, transientWindowType='rect')
......
#!/usr/bin/env python
import pyfstat
F0 = 30.0
F1 = -1e-10
F2 = 0
Alpha = 0.5
Delta = 1
minStartTime = 1000000000
maxStartTime = minStartTime + 2*86400
Tspan = maxStartTime - minStartTime
tref = minStartTime
Tsft = 1800
DeltaF0 = 1e-2
DeltaF1 = 1e-9
theta_prior = {'F0': {'type': 'unif',
'lower': F0-DeltaF0/2.,
'upper': F0+DeltaF0/2.},
'F1': {'type': 'unif',
'lower': F1-DeltaF1/2.,
'upper': F1+DeltaF1/2.},
'F2': F2,
'Alpha': Alpha,
'Delta': Delta,
'transient_tstart': {'type': 'unif',
'lower': minStartTime,
'upper': maxStartTime-2*Tsft},
'transient_duration': {'type': 'unif',
'lower': 2*Tsft,
'upper': Tspan-2*Tsft}
}
ntemps = 2
log10beta_min = -1
nwalkers = 100
nsteps = [100, 100]
mcmc = pyfstat.MCMCTransientSearch(
label='transient_search', outdir='data_s',
sftfilepattern='data_s/*simulated_transient_signal*sft',
theta_prior=theta_prior, tref=tref, minStartTime=minStartTime,
maxStartTime=maxStartTime, nsteps=nsteps, nwalkers=nwalkers, ntemps=ntemps,
log10beta_min=log10beta_min,
transientWindowType='rect')
mcmc.run()
mcmc.plot_corner(label_offset=0.7)
mcmc.print_summary()
#!/usr/bin/env python
import pyfstat
import numpy as np
import matplotlib.pyplot as plt
F0 = 30.0
F1 = -1e-10
F2 = 0
Alpha = 0.5
Delta = 1
minStartTime = 1000000000
maxStartTime = minStartTime + 2*86400
Tspan = maxStartTime - minStartTime
tref = minStartTime
Tsft = 1800
m = 0.001
dF0 = np.sqrt(12*m)/(np.pi*Tspan)
DeltaF0 = 100*dF0
F0s = [F0-DeltaF0/2., F0+DeltaF0/2., dF0]
F1s = [F1]
F2s = [F2]
Alphas = [Alpha]
Deltas = [Delta]
search = pyfstat.GridSearch(
label='grid_search', outdir='data_s',
sftfilepattern='data_s/*simulated_transient_signal*sft',
F0s=F0s, F1s=F1s, F2s=F2s, Alphas=Alphas, Deltas=Deltas, tref=tref,
minStartTime=minStartTime, maxStartTime=maxStartTime,
# transientWindowType='rect', t0Band=Tspan-2*Tsft, tauBand=Tspan,
BSGL=False)
search.run()
search.print_max_twoF()
search.plot_1D(xkey='F0',
xlabel='freq [Hz]', ylabel='$2\mathcal{F}$')
search.plot_2D(xkey='F0', ykey='F1')
#!/usr/bin/env python
import pyfstat
F0 = 30.0
F1 = -1e-10
F2 = 0
Alpha = 0.5
Delta = 1
minStartTime = 1000000000
maxStartTime = minStartTime + 2*86400
transient_tstart = minStartTime + 0.5*86400
transient_duration = 1*86400
tref = minStartTime
h0 = 1e-23
sqrtSX = 1e-22
detectors = 'H1,L1'
Tsft = 1800
transient = pyfstat.Writer(
label='simulated_transient_signal', outdir='data_s',
tref=tref, tstart=transient_tstart, duration=transient_duration,
F0=F0, F1=F1, F2=F2, Alpha=Alpha, Delta=Delta, h0=h0,
detectors=detectors,sqrtSX=sqrtSX,
minStartTime=minStartTime, maxStartTime=maxStartTime,
transientWindowType='rect', Tsft=Tsft)
transient.make_data()
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