Commit d615d772 authored by Gregory Ashton's avatar Gregory Ashton

Improve the exception error message from resampling

parent e6223dea
Pipeline #143630 passed with stage
in 3 minutes and 56 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