TorchDSP / torchsig

TorchSig is an open-source signal processing machine learning toolkit based on the PyTorch data handling pipeline.
MIT License
155 stars 37 forks source link

Add np.kaiser window to spectrogram function #225

Closed Nathan-Satt closed 2 days ago

Nathan-Satt commented 10 months ago

Is your feature request related to a problem? Please describe. In the spectrogram function the window function is limited to a single parameter but, the np.kaiser window function requires two arguments. The first is nperseg which is currently being passed to the window function. The second is beta which is the Shape parameter for window. Since currently only one parameter is allowed, an execption is raised when the spectrogram function is called with np.kaiser

File "/home/rh/.local/lib/python3.9/site-packages/torchsig/transforms/expert_feature/functional.py", line 153, in spectrogram window=window_fcn(nperseg), TypeError: kaiser() missing 1 required positional argument: 'beta'

Describe the solution you'd like Add an optional parameter to the spectrogram function as well as where the window function is called to allow np.kaiser to be used as the window function.

MattCarrickPL commented 2 days ago

Issue almost 1 year old, closing out. Can revisit if still an issue later, but have had significant code changes since and unclear if still a problem.