Commit aac5d770 authored by Gregory Ashton's avatar Gregory Ashton

Merge branch...

Merge branch '180-runtimeerror-in-bilby_pipe-data-generation-when-resampling-method-is-unspecified' into 'master'

Resolve "RuntimeError in bilby_pipe data generation when resampling method is unspecified"

Closes #180

See merge request !347
parents 006c8866 d615d772
Pipeline #144397 passed with stages
in 4 minutes and 47 seconds
......@@ -789,10 +789,16 @@ class DataGenerationInput(Input):
logger.info(
message.format(self.sampling_frequency, self.resampling_method)
)
lal_timeseries = data.to_lal()
lal.ResampleREAL8TimeSeries(
lal_timeseries, float(1 / self.sampling_frequency)
)
try:
lal_timeseries = data.to_lal()
lal.ResampleREAL8TimeSeries(
lal_timeseries, float(1 / self.sampling_frequency)
)
except Exception as e:
raise BilbyPipeError(
"The lal resampling method has failed with exception {} "
"You may wish to try a different resampling method".format(e)
)
data = gwpy.timeseries.TimeSeries(
lal_timeseries.data.data,
epoch=lal_timeseries.epoch,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment