Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Michael Williams
bilby
Commits
e6276945
Commit
e6276945
authored
Feb 12, 2019
by
Gregory Ashton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move default args into a property to avoid calling at init
parent
26822050
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
bilby/gw/prior.py
bilby/gw/prior.py
+8
-6
No files found.
bilby/gw/prior.py
View file @
e6276945
...
...
@@ -17,12 +17,14 @@ except ImportError:
class
Cosmological
(
Interped
):
_default_args_dict
=
dict
(
redshift
=
dict
(
name
=
'redshift'
,
latex_label
=
'$z$'
,
unit
=
None
),
luminosity_distance
=
dict
(
name
=
'luminosity_distance'
,
latex_label
=
'$d_L$'
,
unit
=
'Mpc'
),
comoving_distance
=
dict
(
name
=
'comoving_distance'
,
latex_label
=
'$d_C$'
,
unit
=
'Mpc'
))
@
property
def
_default_args_dict
(
self
):
return
dict
(
redshift
=
dict
(
name
=
'redshift'
,
latex_label
=
'$z$'
,
unit
=
None
),
luminosity_distance
=
dict
(
name
=
'luminosity_distance'
,
latex_label
=
'$d_L$'
,
unit
=
units
.
Mpc
),
comoving_distance
=
dict
(
name
=
'comoving_distance'
,
latex_label
=
'$d_C$'
,
unit
=
units
.
Mpc
))
def
__init__
(
self
,
minimum
,
maximum
,
cosmology
=
None
,
name
=
None
,
latex_label
=
None
,
unit
=
None
):
...
...
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