Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gregory Ashton
PyFstat
Commits
55930f23
Commit
55930f23
authored
Apr 10, 2017
by
Gregory Ashton
Browse files
New examples on using the glitch_robust search
parent
a09a1bbe
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/glitch_robust_search.py
0 → 100644
View file @
55930f23
import
numpy
as
np
import
pyfstat
outdir
=
'data'
label
=
'glitch_robust_search'
# Properties of the GW data
tstart
=
1000000000
Tspan
=
60
*
86400
# Fixed properties of the signal
F0s
=
30
F1s
=
-
1e-8
F2s
=
0
Alpha
=
np
.
radians
(
83.6292
)
Delta
=
np
.
radians
(
22.0144
)
tref
=
tstart
+
.
5
*
Tspan
sftfilepath
=
'data/*glitching_signal*sft'
F0_width
=
np
.
sqrt
(
3
)
/
(
np
.
pi
*
Tspan
)
F1_width
=
np
.
sqrt
(
45
/
4.
)
/
(
np
.
pi
*
Tspan
**
2
)
DeltaF0
=
50
*
F0_width
DeltaF1
=
50
*
F1_width
theta_prior
=
{
'F0'
:
{
'type'
:
'unif'
,
'lower'
:
F0s
-
DeltaF0
,
'upper'
:
F0s
+
DeltaF0
},
'F1'
:
{
'type'
:
'unif'
,
'lower'
:
F1s
-
DeltaF1
,
'upper'
:
F1s
+
DeltaF1
},
'F2'
:
F2s
,
'delta_F0'
:
{
'type'
:
'unif'
,
'lower'
:
0
,
'upper'
:
1e-5
},
'delta_F1'
:
{
'type'
:
'unif'
,
'lower'
:
-
1e-11
,
'upper'
:
1e-11
},
'tglitch'
:
{
'type'
:
'unif'
,
'lower'
:
tstart
+
0.1
*
Tspan
,
'upper'
:
tstart
+
0.9
*
Tspan
},
'Alpha'
:
Alpha
,
'Delta'
:
Delta
,
}
search
=
pyfstat
.
MCMCGlitchSearch
(
label
=
label
,
outdir
=
outdir
,
sftfilepath
=
sftfilepath
,
theta_prior
=
theta_prior
,
nglitch
=
1
,
tref
=
tref
,
nsteps
=
[
500
,
500
],
ntemps
=
3
,
log10temperature_min
=-
0.5
,
minStartTime
=
tstart
,
maxStartTime
=
tstart
+
Tspan
)
search
.
run
()
search
.
plot_corner
(
label_offset
=
0.8
,
add_prior
=
True
)
search
.
print_summary
()
examples/glitch_robust_search_make_simulated_data.py
0 → 100644
View file @
55930f23
import
numpy
as
np
import
pyfstat
outdir
=
'data'
label
=
'simulated_glitching_signal'
# Properties of the GW data
tstart
=
1000000000
Tspan
=
60
*
86400
tref
=
tstart
+
.
5
*
Tspan
# Fixed properties of the signal
F0s
=
30
F1s
=
-
1e-8
F2s
=
0
Alpha
=
np
.
radians
(
83.6292
)
Delta
=
np
.
radians
(
22.0144
)
h0
=
1e-25
sqrtSX
=
1e-24
psi
=
-
0.1
phi
=
0
cosi
=
0.5
# Glitch properties
dtglitch
=
0.45
*
Tspan
# time (in secs) after minStartTime
dF0
=
5e-6
dF1
=
1e-12
detectors
=
'H1'
glitch_data
=
pyfstat
.
Writer
(
label
=
label
,
outdir
=
outdir
,
tref
=
tref
,
tstart
=
tstart
,
F0
=
F0s
,
F1
=
F1s
,
F2
=
F2s
,
duration
=
Tspan
,
Alpha
=
Alpha
,
Delta
=
Delta
,
sqrtSX
=
sqrtSX
,
dtglitch
=
dtglitch
,
h0
=
h0
,
cosi
=
cosi
,
phi
=
phi
,
psi
=
psi
,
delta_F0
=
dF0
,
delta_F1
=
dF1
,
add_noise
=
True
)
glitch_data
.
make_data
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment