pulsarbat.signal_transform#

pulsarbat.signal_transform(func)[source]#

Wraps an array function and returns a signal transform.

The function being decorated must accept an array and return an array with function signature:

func(x, *args, /, **kwargs)

where x is the array being transformed. The decorated function will accept a Signal object in place of x and by default return a Signal object of the same type (unless a different signal_type is specified). The properties of the returned signal can be modified via signal_kwargs if needed.

If the Signal data is contained within a Dask array, func will be applied to every chunk independently using dask.array.map_blocks(). Keyword arguments specific to map_blocks() can be passed via dask_kwargs.