I'd like to change the behavaiour of the windowing generator method. Currently, its output is a List[AxisArray]. The unit then iterates over the list, yielding one at a time.
When the newaxis parameter is not None, segments / windows (even if only one) appear on a new axis named something like "step" or "win", and the generator return always has len=1. If newaxis is None then a list is returned with len for the number of windows found on this iteration.
I would like to make newaxis in the generator non-optional with a default value of "win". This means that we always get a new "win" axis. Then, if the Unit was configured with newaxis=None, it's up to the node to multiple yields of single-window AxisArray messages without the "win" axis present.
The main reason for this change is that at present the windowing generator cannot be composed with other generator functions. A common use case that this change will simplify is a STFT where the output of windowing goes into spectrum ('time' axis becomes 'freq') and modify_axis to convert the 'win' axis to 'time'.
This will not change the functioning of the Window(ez.Unit) in any way, only the generator method.
I'd like to change the behavaiour of the
windowing
generator method. Currently, its output is aList[AxisArray]
. The unit then iterates over the list, yielding one at a time.When the
newaxis
parameter is not None, segments / windows (even if only one) appear on a new axis named something like "step" or "win", and the generator return always has len=1. Ifnewaxis
is None then a list is returned with len for the number of windows found on this iteration.I would like to make
newaxis
in the generator non-optional with a default value of"win"
. This means that we always get a new "win" axis. Then, if the Unit was configured with newaxis=None, it's up to the node to multiple yields of single-window AxisArray messages without the"win"
axis present.The main reason for this change is that at present the
windowing
generator cannot be composed with other generator functions. A common use case that this change will simplify is a STFT where the output ofwindowing
goes intospectrum
('time' axis becomes 'freq') andmodify_axis
to convert the 'win' axis to 'time'.This will not change the functioning of the Window(ez.Unit) in any way, only the generator method.
Pleaset let me know what you think.