Skip to content

Commit

Permalink
fixing relative import
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhooshan Gadre committed Jul 24, 2023
1 parent 481419c commit 30d5ec2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions pycbc/waveform/gwsignal_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'''
Code to covert pycbc waveform gen params to gwsignal params
'''
import lalsimulation as lalsim
# import lalsimulation as lalsim
from lalsimulation.gwsignal.core.parameter_conventions import (default_dict,
common_units_dictionary)

Expand All @@ -27,9 +27,12 @@ def to_gwsignal_dict(par):
'''
params = par.copy()
for key in par:
# if par[key]:
knew = pycbc_to_gws.get(key, key)
params[knew] = params.pop(key)
params[knew] *= gws_units.get(knew, 1.)
params.setdefault('condition', 1)
params[knew] = (params[knew]*gws_units.get(knew)) if params[knew] \
else params[knew]

_ = params.setdefault('condition', 1)

return params
2 changes: 1 addition & 1 deletion pycbc/waveform/waveform.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
zeros)
from pycbc.waveform import parameters
from pycbc.waveform import utils as wfutils
from .waveform.gwsignal_utils import to_gwsignal_dict
from .gwsignal_utils import to_gwsignal_dict

from .spa_tmplt import (spa_amplitude_factor, spa_length_in_time, spa_tmplt,
spa_tmplt_end, spa_tmplt_norm, spa_tmplt_precondition)
Expand Down
2 changes: 1 addition & 1 deletion pycbc/waveform/waveform_modes.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

from . import parameters
from .waveform import _check_lal_pars, check_args, props
from .waveform.gwsignal_utils import to_gwsignal_dict
from .gwsignal_utils import to_gwsignal_dict
from lalsimulation.gwsignal.core import waveform as wfm
from lalsimulation.gwsignal.models import gwsignal_get_waveform_generator

Expand Down

0 comments on commit 30d5ec2

Please sign in to comment.