Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Lewis Lakerink
bilby_pipe
Commits
01fce5db
Commit
01fce5db
authored
Nov 01, 2021
by
Gregory Ashton
Browse files
Merge branch 'add-noconversion' into 'master'
Add option to use noconversion See merge request
lscsoft/bilby_pipe!420
parents
a8c56aa3
9f51c215
Changes
2
Hide whitespace changes
Inline
Side-by-side
bilby_pipe/input.py
View file @
01fce5db
...
...
@@ -1157,11 +1157,16 @@ class Input(object):
@
property
def
parameter_conversion
(
self
):
if
self
.
conversion_function
is
not
None
:
logger
.
info
(
f
"Using user-specified conversion_function
{
self
.
conversion_function
}
"
)
return
get_function_from_string_path
(
self
.
conversion_function
)
cf
=
self
.
conversion_function
_lookups
=
dict
(
noconvert
=
None
)
if
isinstance
(
cf
,
str
)
and
cf
.
lower
()
in
_lookups
:
logger
.
info
(
f
"Using conversion function
{
cf
}
from lookups"
)
return
_lookups
[
cf
.
lower
()]
elif
cf
is
not
None
:
logger
.
info
(
f
"Using user-specified conversion_function
{
cf
}
"
)
return
get_function_from_string_path
(
cf
)
elif
"binary_neutron_star"
in
self
.
_frequency_domain_source_model
:
logger
.
info
(
"Using conversion_function convert_to_lal_binary_neutron_star_parameters"
...
...
@@ -1236,8 +1241,16 @@ class Input(object):
@
property
def
parameter_generation
(
self
):
if
self
.
generation_function
is
not
None
:
logger
.
info
(
f
"Using user-specified generation
{
self
.
generation_function
}
"
)
gf
=
self
.
generation_function
_lookups
=
dict
(
noconvert
=
None
)
if
isinstance
(
gf
,
str
)
and
gf
.
lower
()
in
_lookups
:
logger
.
info
(
f
"Using generation function
{
gf
}
from lookups"
)
return
_lookups
[
gf
.
lower
()]
elif
gf
is
not
None
:
logger
.
info
(
f
"Using user-specified generation
{
gf
}
"
)
return
get_function_from_string_path
(
self
.
generation_function
)
elif
"binary_neutron_star"
in
self
.
_frequency_domain_source_model
:
logger
.
info
(
"Using generation_function generate_all_bns_parameters"
)
...
...
bilby_pipe/parser.py
View file @
01fce5db
...
...
@@ -975,7 +975,8 @@ def create_parser(top_level=True):
"the conversion function is bilby.gw.conversion.convert_to_lal_binary_black_hole_parameters. "
"If the source-model contains binary_neutron_star, "
"the generation function is bilby.gw.conversion.convert_to_lal_binary_black_hole_parameters. "
"If you specify your own function, you may wish to use the I/O of those functions as templates"
"If you specify your own function, you may wish to use the I/O of those functions as templates."
"If given as 'noconvert' (case insensitive), no conversion is used'"
),
)
waveform_parser
.
add
(
...
...
@@ -990,6 +991,7 @@ def create_parser(top_level=True):
"If the source-model contains binary_neutron_star, "
"the generation function is bilby.gw.conversion.generate_all_bns_parameters. "
"If you specify your own function, you may wish to use the I/O of those functions as templates"
"If given as 'noconvert' (case insensitive), no generation is used'"
),
)
...
...
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