bilby.core.sampler.base_sampler.signal_wrapper

bilby.core.sampler.base_sampler.signal_wrapper(method)[source]

Decorator to wrap a method of a class to set system signals before running and reset them after.

Parameters:
method: callable

The method to call, this assumes the first argument is self and that self has a write_current_state_and_exit method.

Returns:
output: callable

The wrapped method.