New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add function(s) for computing a FFT #77
Comments
@CFlaniganMide suggested we could also look to optimize the welch's method computation by not "blindly" picking a bin width in samples that closest matches the Hz resolution the user-provided. There could be another parameter like |
@pscheidler asked for some test data, here are two I used in the webinar: real_accel = endaq.ide.to_pandas(endaq.ide.get_doc('https://info.endaq.com/hubfs/100Hz_shake_cal.ide').channels[80],time_mode='seconds')[4.5:9.5]
time = np.linspace(0,200,2**20,endpoint=False)
sine_waves = pd.DataFrame(index=time)
sine_waves['10g @ 100 Hz'] = 10*np.sin(2*np.pi*100 * time)
sine_waves['8g @ 99 Hz'] = 8*np.sin(2*np.pi*99 * time)
sine_waves['6g @ 100.25 Hz'] = 6*np.sin(2*np.pi*100.25 * time) Also totally open to making this one function, changing the name, and slight tweaks to the API but overall I'm looking for:
|
At some point I remember someone writing some code to do speed tests for the possible FFT approaches we're considering, can someone link me to it? I have an additional FFT function I'd like to evaluate against our approaches. |
Here's what I did for the webinar: https://colab.research.google.com/drive/1cuZa5Yx55qXLhhnBMdzsJ0iiklwVi5Mq#scrollTo=p6xZVN152WKG But I know @CFlaniganMide did some too. |
Issue: Even though this all returns the FFT data most folks want, it is a different return type from what most provide. I think we should give it a different name to make that difference more obvious. I don't have great ideas, but maybe Are you sure you don't want the phase to be in the same dataframe as the magnitude? |
Suggest a function using scipy's welch which allows specifying the bin width, but won't return phase angle, and another function using Numpy's rfft that would return phase.
Here are two examples:
The text was updated successfully, but these errors were encountered: