Skip to content

Commit c578def

Browse files
authored
Merge pull request #13 from Kanchan-05/brute_bank_tdwaveform_support
added support for generating waveform in time domain. This modificati…
2 parents cb06e2b + d4073b0 commit c578def

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

bin/bank/pycbc_brute_bank

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -419,20 +419,19 @@ class GenUniformWaveform(object):
419419
else:
420420
buff_len = 1.0 / self.delta_f
421421

422+
if kwds['approximant'] in pycbc.waveform.td_approximants() or args.use_td_waveform:
423+
424+
hp, hc = pycbc.waveform.get_td_waveform(delta_t=1.0 / args.sample_rate,
425+
**kwds)
426+
427+
hp = hp.to_frequencyseries(delta_f = 1.0 / buff_len)
428+
hc = hc.to_frequencyseries(delta_f = 1.0 / buff_len)
429+
422430
if kwds['approximant'] in pycbc.waveform.fd_approximants():
423431

424-
# Optionally generate time-domain waveform
425-
if args.use_td_waveform:
426-
hp, hc = pycbc.waveform.get_td_waveform(delta_t=1.0 / args.sample_rate,
427-
**kwds)
432+
hp, hc = pycbc.waveform.get_fd_waveform(delta_f = 1.0 / buff_len,
433+
**kwds)
428434

429-
hp = hp.to_frequencyseries(delta_f = 1.0 / buff_len)
430-
hc = hc.to_frequencyseries(delta_f = 1.0 / buff_len)
431-
432-
else:
433-
hp, hc = pycbc.waveform.get_fd_waveform(delta_f = 1.0 / buff_len,
434-
**kwds)
435-
436435
if args.use_cross:
437436
hp = hc
438437

0 commit comments

Comments
 (0)