Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bilby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lscsoft
bilby
Commits
4e56722c
Commit
4e56722c
authored
6 years ago
by
Colm Talbot
Browse files
Options
Downloads
Patches
Plain Diff
move default latex labels out of core
parent
05bd9620
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!59
Updating priors
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tupak/core/prior.py
+4
-26
4 additions, 26 deletions
tupak/core/prior.py
tupak/gw/prior.py
+27
-0
27 additions, 0 deletions
tupak/gw/prior.py
with
31 additions
and
26 deletions
tupak/core/prior.py
+
4
−
26
View file @
4e56722c
...
...
@@ -311,36 +311,14 @@ class Prior(object):
@property
def
__default_latex_label
(
self
):
default_labels
=
{
'
mass_1
'
:
'
$m_1$
'
,
'
mass_2
'
:
'
$m_2$
'
,
'
total_mass
'
:
'
$M$
'
,
'
chirp_mass
'
:
'
$\mathcal{M}$
'
,
'
mass_ratio
'
:
'
$q$
'
,
'
symmetric_mass_ratio
'
:
'
$\eta$
'
,
'
a_1
'
:
'
$a_1$
'
,
'
a_2
'
:
'
$a_2$
'
,
'
tilt_1
'
:
'
$
\\
theta_1$
'
,
'
tilt_2
'
:
'
$
\\
theta_2$
'
,
'
cos_tilt_1
'
:
'
$\cos
\\
theta_1$
'
,
'
cos_tilt_2
'
:
'
$\cos
\\
theta_2$
'
,
'
phi_12
'
:
'
$\Delta\phi$
'
,
'
phi_jl
'
:
'
$\phi_{JL}$
'
,
'
luminosity_distance
'
:
'
$d_L$
'
,
'
dec
'
:
'
$\mathrm{DEC}$
'
,
'
ra
'
:
'
$\mathrm{RA}$
'
,
'
iota
'
:
'
$\iota$
'
,
'
cos_iota
'
:
'
$\cos\iota$
'
,
'
psi
'
:
'
$\psi$
'
,
'
phase
'
:
'
$\phi$
'
,
'
geocent_time
'
:
'
$t_c$
'
}
if
self
.
name
in
default_labels
.
keys
():
label
=
default_labels
[
self
.
name
]
if
self
.
name
in
self
.
_default_latex_labels
.
keys
():
label
=
self
.
_default_latex_labels
[
self
.
name
]
else
:
label
=
self
.
name
return
label
_default_latex_labels
=
dict
()
class
DeltaFunction
(
Prior
):
"""
Dirac delta function prior, this always returns peak.
"""
...
...
This diff is collapsed.
Click to expand it.
tupak/gw/prior.py
+
27
−
0
View file @
4e56722c
...
...
@@ -17,6 +17,8 @@ class BBHPriorSet(PriorSet):
if
dictionary
is
None
and
filename
is
None
:
filename
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
prior_files
'
,
'
binary_black_holes.prior
'
)
logging
.
info
(
'
No prior given, using default BBH priors in {}.
'
.
format
(
filename
))
elif
not
os
.
path
.
isfile
(
filename
):
filename
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
prior_files
'
,
filename
)
PriorSet
.
__init__
(
self
,
dictionary
=
dictionary
,
filename
=
filename
)
def
test_redundancy
(
self
,
key
):
...
...
@@ -64,3 +66,28 @@ class BBHPriorSet(PriorSet):
break
return
redundant
Prior
.
_default_latex_labels
=
{
'
mass_1
'
:
'
$m_1$
'
,
'
mass_2
'
:
'
$m_2$
'
,
'
total_mass
'
:
'
$M$
'
,
'
chirp_mass
'
:
'
$\mathcal{M}$
'
,
'
mass_ratio
'
:
'
$q$
'
,
'
symmetric_mass_ratio
'
:
'
$\eta$
'
,
'
a_1
'
:
'
$a_1$
'
,
'
a_2
'
:
'
$a_2$
'
,
'
tilt_1
'
:
'
$
\\
theta_1$
'
,
'
tilt_2
'
:
'
$
\\
theta_2$
'
,
'
cos_tilt_1
'
:
'
$\cos
\\
theta_1$
'
,
'
cos_tilt_2
'
:
'
$\cos
\\
theta_2$
'
,
'
phi_12
'
:
'
$\Delta\phi$
'
,
'
phi_jl
'
:
'
$\phi_{JL}$
'
,
'
luminosity_distance
'
:
'
$d_L$
'
,
'
dec
'
:
'
$\mathrm{DEC}$
'
,
'
ra
'
:
'
$\mathrm{RA}$
'
,
'
iota
'
:
'
$\iota$
'
,
'
cos_iota
'
:
'
$\cos\iota$
'
,
'
psi
'
:
'
$\psi$
'
,
'
phase
'
:
'
$\phi$
'
,
'
geocent_time
'
:
'
$t_c$
'
}
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