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

[bugfix] actually adjust trace_start_time in channelStopFilter #793

Merged
merged 3 commits into from
Jan 27, 2025

Conversation

sjoerd-bouma
Copy link
Collaborator

While going through the definitions of times in #773, I noticed that the channelStopFilter doesn't actually adjust the trace_start_time. This is a very minor bug, as all traces are affected the same way, but it's probably worth doing it correctly.

Copy link
Collaborator

@fschlueter fschlueter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you have to change the trace_start_time by int(np.round(prepend * sampling_rate))) / sampling_rate. And you can use add_trace_start_time(...)` instead

@fschlueter
Copy link
Collaborator

I think you have to change the trace_start_time by int(np.round(prepend * sampling_rate))) / sampling_rate. And you can use add_trace_start_time(...)` instead

or simply use prepend which should be already in units of time but not prepend * sampling_rate

@fschlueter
Copy link
Collaborator

And I guess you have to update the reference values for the failed reconstruction?

@sjoerd-bouma
Copy link
Collaborator Author

Thanks Felix, I made a mess of that one... should be correct now, I hope. I've only adjusted the signal_time in the reference.json for now, just to demonstrate that this is the only difference; however, I noticed that the tiny_reconstruction test complains about a lot of missing keys because we've added some more stationparameters since it was originally constructed (see the test output on develop, for example).

I would suggest I just generate a completely new reference file that includes all current parameters to get rid of all these warnings before merging this (and maybe reformat the json so git has an easier time comparing changes in the future...)

@sjoerd-bouma sjoerd-bouma merged commit 15631a5 into develop Jan 27, 2025
5 checks passed
@sjoerd-bouma sjoerd-bouma deleted the hotfix/channelStopFilter branch January 27, 2025 09:44
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