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 ofx
and by default return a Signal object of the same type (unless a differentsignal_type
is specified). The properties of the returned signal can be modified viasignal_kwargs
if needed.If the Signal data is contained within a Dask array,
func
will be applied to every chunk independently usingdask.array.map_blocks()
. Keyword arguments specific tomap_blocks()
can be passed viadask_kwargs
.