-
Notifications
You must be signed in to change notification settings - Fork 12
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
bug in resample function messes up timing #545
Comments
oh... that sounds pretty bad. We definitely want to fix it asap. |
I just got the docs added. The python api doc is not automatic. It needs to be added to the index, which I think was overlooked when resample was added. |
The patch yesterday resolves the timing error bug but it has a minor blemish that will impact performance. I ran a minor variant of the workflow that initiated this issue. The timing problem went away but it seems every TimeSeries passed through the processing ends up with an entry like the following the elog collections:
This is being created by this section of resample:
There are two problems with this section is that it doing something it shouldn't do in testing the current value of "sampling_rate". In this function the "sampling_rate" attribute should just be set to I think this construct appears multiple times in the resample module. As I said it is harmless as it doesn't do anything bad but it will impact performance and lead to database bloat when every datum gets an elog entry. |
ahh... sorry, I overlooked this. Yes, we need to remove the elog from the resample. @Cloud1e Could you please get that fixed? Thank you! |
OK. I fixed this problem in resample.py. |
For TimeSeries2Trace, We should add a elog there if sampling_rate doesn't match 1/dt and update it. That was the original bug. Gary is only saying for resample, we don't need to check for the original sampling_rate as we should always update it to whatever rate it is we are resampling to. |
After many hours over the last 24 I have established that there is a bug in the
resample
function. Note also there is something wrong with our configuration as none of the docstrings found in algorithms/resample.py are in the sphnyx docomentation. That is just an annoyance, but the bug is serious. It definitely messes up timing. In the draft Session1 notebook for the upcoming short course I had a line to downsample the data from 40 to 20 sps. I was mystified why I wan't getting QC plots windowed around P that looked right. The reason was the window was always at the wrong time because the resample operator did something I don't quite understand. We are going to have to do some controlled test to figure this out. The resample operator wasn't essential for this class anyway so it is easy to remove it and not cause an issue. It may increase some run times since we will be handling twice as many samples but it should not be a problem.The text was updated successfully, but these errors were encountered: