Skip to content
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

Drop DC Harmonic from stft #157

Open
kkappler opened this issue Mar 14, 2022 · 1 comment
Open

Drop DC Harmonic from stft #157

kkappler opened this issue Mar 14, 2022 · 1 comment

Comments

@kkappler
Copy link
Collaborator

Note that the STFT object may have inf/nan in the DC harmonic, introduced by recoloring in run_ts_to_stft.

We later get RuntimeWarning happening when we calibrate this term

  stft_obj[channel_id].data /= calibration_response```

Since we don't use the DC harmonic for anything, it maybe better to just drop that term from the STFT. 
@kkappler
Copy link
Collaborator Author

The top answer in this post could also be a solution, so we just suppress that particular warning. But with xarray we should be able to just restrict the stft_obj to frequencies strictly greater than zero.
We just need to be careful that band selection is being done with frequency, and not integer indices, otherwise this will cause a bias towards higher frequency in the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant