Re: Power/Phase to FFT Coefficients?
Matt Haberland <[email protected]>
| Newsgroups | gmane.comp.python.scientific.devel |
|---|---|
| Message-ID | <CADuxUiz+T9Cnmqp5-cRwGSJAsc-p1PYizFxY2g9J5=qimUgvwg@mail.gmail.com> |
Thanks Martin, Eric. Eric - interesting that you mention `scipy.signal`. The original post was about helper functions in "scipy.signal.fft" but I changed it because `scipy.signal.fft` doesn't seem to exist. I see that STFT and Welch allow different normalizations, but I liked that `scipy.fft` already has a section in the documentation called "helper functions". Where would you put these standalone conversion functions in the `scipy.signal` documentation? Or were you thinking of expanding the ability of `scipy.signal` functions to work with different representations? Looks like there's some traction here, so I've created an issue: https://github.com/scipy/scipy/issues/18319. Please feel free to chime in there, all. Thanks! Matt On Tue, Apr 18, 2023 at 10:08 AM Eric Larson <[email protected]> wrote: > A better fit might be with scipy.signal since we already deal with units a > bit there. For example for STFT > <https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.stft.html> and > Welch > <https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.welch.html> > we allow different normalizations and these typically directly relate to > units people care about. > > Eric > > > On Mon, Apr 17, 2023 at 7:25 AM Martin Reinecke < > [email protected]> wrote: > >> Hi Matt! >> >> > One of the suggestions in https://github.com/scipy/scipy/issues/16191 >> > <https://github.com/scipy/scipy/issues/16191> was to add "helper >> > functions within [scipy.fft] that 1) converts the fft coefficients to >> > power (V**2/Hz) and 2) converts power and phase to fft coefficients". >> > >> > Sometimes we avoid simple convenience functions, but there are already >> a >> > few other "helper functions" in scipy.fft. >> > https://docs.scipy.org/doc/scipy/reference/fft.html#helper-functions >> > <https://docs.scipy.org/doc/scipy/reference/fft.html#helper-functions> >> > >> > Does this sound like an appropriate addition, or too simple to justify >> > the development effort and API expansion? >> >> If the helper functions can be written in a way that is completely >> unit-agnostic (as is the case with fftshift/fftfreq), then I think that >> could be a good addition. Dealing with explicit units should not be >> scipy's job (at least that's my gut feeling). >> >> Cheers, >> Martin >> >> _______________________________________________ >> SciPy-Dev mailing list -- [email protected] >> To unsubscribe send an email to [email protected] >> https://mail.python.org/mailman3/lists/scipy-dev.python.org/ >> Member address: [email protected] >> > _______________________________________________ > SciPy-Dev mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/scipy-dev.python.org/ > Member address: [email protected] > _______________________________________________ SciPy-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/scipy-dev.python.org/ Member address: [email protected]