Proposition to raise a new error for the Type in matched_filter.matched_filter_core() #4599
Clouwithouta
started this conversation in
Ideas
Replies: 1 comment
-
@Clouwithouta Suggestions are welcome here. Note though that the types don't actually have to be the same. Rather they must be one of either a TimeSeries or FrequencySeries instance, however the length requirements are different in each case. If they are the same domain, then the length should be the same. If they are different, then the freuqency and time must be related by flen = tlen // 2 + 1 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
When using pycbc for the first time, in order to generate simulated gravitational waves waveform, I used the pycbc.filter.matched_filter.matched_filter_core() function (that can be found here). I got a ValueError saying the length of template and data must match, except my template and data were indeed the same length. I eventually figured out that the problem was in fact that my template and data were not the same type; therefore my proposition for a new error in this function, that could look something like:
Followed by what is already implemented (with an elif instead of if):
This could would allow newbies to rapidly and easily know what is wrong with their script :) I am very new to pycbc though, so there might be a reason for this error not to exist, don't hesitate to ignore my comment if so.
Sincerely,
Clara Plasse
Beta Was this translation helpful? Give feedback.
All reactions