Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RDStackingProject
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yifan Wang
RDStackingProject
Commits
2d711276
Commit
2d711276
authored
4 years ago
by
Rayne Liu
Browse files
Options
Downloads
Patches
Plain Diff
Most recent pyscript
parent
e1ed09ba
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/RDGW150914_ptemcee4.py
+5
-5
5 additions, 5 deletions
code/RDGW150914_ptemcee4.py
with
5 additions
and
5 deletions
code/RDGW150914_ptemcee4.py
+
5
−
5
View file @
2d711276
...
...
@@ -33,17 +33,17 @@ from scipy.optimize import minimize
#tshift: time shift after the strain peak
#vary_fund: whether you vary the fundamental frequency. Works in the model_dv function.
rootpath
=
"
/
Users/R
ayne
L
iu
"
#"/
work/r
ayne
.l
iu"
rootpath
=
"
/
work/r
ayne
.l
iu
"
#
"/
Users/R
ayne
L
iu"
nmax
=
1
tshift
=
19
vary_fund
=
False
#sampler parameters
npoints
=
100
2
npoints
=
100
0000
nwalkers
=
42
ntemps
=
12
ndim
=
int
(
4
*
(
nmax
+
1
))
burnin
=
2
00
#How many points do you burn before doing the corner plot. You need to watch the convergence of the chain plot a bit.
burnin
=
4200
00
#How many points do you burn before doing the corner plot. You need to watch the convergence of the chain plot a bit.
#This is trivial but often forgotten: this cannot be more than npoints! Usually 1/5~1/4 npoints is what I observe.
numbins
=
42
#corner plot parameter - how many bins you want
datacolor
=
'
#105670
'
#'#4fa3a7'
...
...
@@ -172,8 +172,8 @@ def log_probability(theta):
#Fit with ptemcee
#Set the number of cores of your processors
pool
=
choose_pool
(
6
)
pool
.
size
=
6
pool
=
choose_pool
(
12
)
pool
.
size
=
12
vary_param
=
float
(
vary_fund
)
pos
=
np
.
array
([[
random
.
uniform
(
-
0.1
,
0.1
),
random
.
uniform
(
-
0.1
,
0.1
),
4.28313743e-01
,
random
.
uniform
(
2.5
,
2.6
)
+
(
1
-
vary_param
)
*
np
.
pi
]])
for
i
in
range
(
1
,
nmax
+
1
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment