Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PyFstat
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
David Keitel
PyFstat
Commits
37041071
Commit
37041071
authored
Apr 15, 2018
by
Gregory Ashton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up glitch examples for the paper
parent
a2e40720
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
9 deletions
+21
-9
examples/glitch_examples/semicoherent_glitch_robust_directed_MCMC_search_on_1_glitch.py
...oherent_glitch_robust_directed_MCMC_search_on_1_glitch.py
+11
-3
examples/glitch_examples/semicoherent_glitch_robust_directed_grid_search_on_1_glitch.py
...oherent_glitch_robust_directed_grid_search_on_1_glitch.py
+10
-6
No files found.
examples/glitch_examples/semicoherent_glitch_robust_directed_MCMC_search_on_1_glitch.py
View file @
37041071
...
...
@@ -43,15 +43,23 @@ mcmc = pyfstat.MCMCGlitchSearch(
nsteps
=
nsteps
,
nwalkers
=
nwalkers
,
ntemps
=
ntemps
,
log10beta_min
=
log10beta_min
,
nglitch
=
1
)
mcmc
.
transform_dictionary
[
'F0'
]
=
dict
(
subtractor
=
F0
,
symbol
=
'$f-f^\mathrm{s}$'
)
subtractor
=
F0
,
multiplier
=
1e6
,
symbol
=
'$f-f_\mathrm{s}$'
)
mcmc
.
unit_dictionary
[
'F0'
]
=
'$\mu$Hz'
mcmc
.
transform_dictionary
[
'F1'
]
=
dict
(
subtractor
=
F1
,
symbol
=
'$\dot{f}-\dot{f}^\mathrm{s}$'
)
subtractor
=
F1
,
multiplier
=
1e12
,
symbol
=
'$\dot{f}-\dot{f}_\mathrm{s}$'
)
mcmc
.
unit_dictionary
[
'F1'
]
=
'$p$Hz/s'
mcmc
.
transform_dictionary
[
'delta_F0'
]
=
dict
(
multiplier
=
1e6
,
subtractor
=
delta_F0
,
symbol
=
'$\delta f-\delta f_\mathrm{s}$'
)
mcmc
.
unit_dictionary
[
'delta_F0'
]
=
'$\mu$Hz/s'
mcmc
.
transform_dictionary
[
'tglitch'
][
'subtractor'
]
=
tstart
+
dtglitch
mcmc
.
transform_dictionary
[
'tglitch'
][
'label'
]
=
'$t^\mathrm{g}-t^\mathrm{g}_\mathrm{s}$
\n
[d]'
t1
=
time
.
time
()
mcmc
.
run
()
dT
=
time
.
time
()
-
t1
fig_and_axes
=
gridcorner
.
_get_fig_and_axes
(
4
,
2
,
0.05
)
mcmc
.
plot_corner
(
label_offset
=
0.
35
,
truths
=
[
0
,
0
,
delta_F0
,
5
0
],
mcmc
.
plot_corner
(
label_offset
=
0.
25
,
truths
=
[
0
,
0
,
0
,
0
],
fig_and_axes
=
fig_and_axes
)
mcmc
.
print_summary
()
...
...
examples/glitch_examples/semicoherent_glitch_robust_directed_grid_search_on_1_glitch.py
View file @
37041071
...
...
@@ -42,18 +42,22 @@ dT = time.time() - t1
F0_vals
=
np
.
unique
(
search
.
data
[:,
0
])
-
F0
F1_vals
=
np
.
unique
(
search
.
data
[:,
1
])
-
F1
delta_F0s_vals
=
np
.
unique
(
search
.
data
[:,
5
])
delta_F0s_vals
=
np
.
unique
(
search
.
data
[:,
5
])
-
delta_F0
tglitch_vals
=
np
.
unique
(
search
.
data
[:,
7
])
tglitch_vals_days
=
(
tglitch_vals
-
tstart
)
/
86400.
tglitch_vals_days
=
(
tglitch_vals
-
tstart
)
/
86400.
-
dtglitch
/
86400.
twoF
=
search
.
data
[:,
-
1
].
reshape
((
len
(
F0_vals
),
len
(
F1_vals
),
len
(
delta_F0s_vals
),
len
(
tglitch_vals
)))
xyz
=
[
F0_vals
,
F1_vals
,
delta_F0s_vals
,
tglitch_vals_days
]
labels
=
[
'$f - f^\mathrm{s}$
\n
[Hz]'
,
'$\dot{f} - \dot{f}^\mathrm{s}$
\n
[Hz/s]'
,
'$\delta f$
\n
[Hz]'
,
'$t^g_0$
\n
[days]'
,
'$\widehat{2\mathcal{F}}$'
]
xyz
=
[
F0_vals
*
1e6
,
F1_vals
*
1e12
,
delta_F0s_vals
*
1e6
,
tglitch_vals_days
]
labels
=
[
'$f - f_\mathrm{s}$
\n
[$\mu$Hz]'
,
'$\dot{f} - \dot{f}_\mathrm{s}$
\n
[$p$Hz/s]'
,
'$\delta f-\delta f_\mathrm{s}$
\n
[$\mu$Hz]'
,
'$t^\mathrm{g} - t^\mathrm{g}_\mathrm{s}$
\n
[d]'
,
'$\widehat{2\mathcal{F}}$'
]
fig
,
axes
=
gridcorner
(
twoF
,
xyz
,
projection
=
'log_mean'
,
labels
=
labels
,
showDvals
=
False
,
lines
=
[
0
,
0
,
delta_F0
,
dtglitch
/
86400.
],
label_offset
=
0.35
)
showDvals
=
False
,
lines
=
[
0
,
0
,
0
,
0
],
label_offset
=
0.25
,
max_n_ticks
=
4
)
fig
.
savefig
(
'{}/{}_projection_matrix.png'
.
format
(
outdir
,
label
),
bbox_inches
=
'tight'
)
...
...
Write
Preview
Markdown
is supported
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