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

Add multi-rate resampling #163

Open
wants to merge 16 commits into
base: dev
Choose a base branch
from

Conversation

wbenoit26
Copy link
Contributor

Adds a transform that takes a timeseries at a given sample rate and returns a timeseries with different segments at different sample rates.

Rather than splitting the timeseries into component segments and resampling each individually, this resamples the entire timeseries multiple times, splitting and concatenating to get the final result. This is less computationally efficient, but avoids having multiple resampled edges in the final product. Some kind of in-between solution is probably better, splitting the original timeseries into overlapping segments that get resampled and cropped.

Need to add testing as well.

@EthanMarx
Copy link
Collaborator

This is great. Would be curious to

  1. See some visualizations of this with raw waveforms / get idea of how much data we can save
  2. implement a prototype of this in aframe (even if its buggy) just to see if it's a bottleneck computationally

@wbenoit26
Copy link
Contributor Author

Definitely. We can play around a bit with what frequencies we go to/where the transition points are. Just messing around a bit, if we have a 5-5 system from 32 Hz, it takes about 5.5 seconds to merge, and has a final frequency of 438 Hz (at least, to whatever order lalapps_chirplen goes to). So, if we have a 6 second window with the coalescence time in the final quarter second, we can have breakpoints at [4, 5, 5.5, 5.75] with sample rates of [128, 256, 512, 1024, 2048] and keep the signal frequency below the Nyquist frequency of our sample rate the whole time.

This results in a window of size 2304, which is smaller than our current window. I did a little benchmarking and found that the resampler could process a tensor of shape (2048, 2, 6 * 2048) in 7 ms, which should be fast enough. I'll make some plots when I get chance later today.

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

Successfully merging this pull request may close these issues.

2 participants