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

Handle ms_before and ms_after difference between waveforms and template extensions #2878

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

h-mayorquin
Copy link
Collaborator

They might be different, we can either raise an error like here or change to a warning and priviledge the ones of the waveform as we are doing right now.

What do you guys think?

@h-mayorquin h-mayorquin added the core Changes to core module label May 17, 2024
@h-mayorquin h-mayorquin self-assigned this May 17, 2024
Comment on lines +305 to +311
if ms_before != ms_before_waveforms or ms_after != ms_after_waveforms:
raise ValueError(
"templates extension parameters are inconsistent with the waveforms extension. \n"
f"waveform extension ms_before={ms_before_waveforms} ms_after={ms_after_waveforms} \n"
f"templates extension ms_before={ms_before} ms_after={ms_after}."
)

Copy link
Member

Choose a reason for hiding this comment

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

I think I prefered the previous behavior:

  • use parameters when compute directly
  • ignore parameters and hinertis from waveforms extension when this exists.

Copy link
Member

Choose a reason for hiding this comment

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

Agree with @samuelgarcia here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think privilegin the waveform is a fine default but you should let users know this otherwise they will be confused like me . My other proposal above was a warning when they don't match. What do you think?

@samuelgarcia samuelgarcia added this to the 0.101.0 milestone Jun 12, 2024
@samuelgarcia samuelgarcia removed this from the 0.101.0 milestone Jul 3, 2024
@alejoe91
Copy link
Member

alejoe91 commented Jul 3, 2024

@h-mayorquin after discussing with Sam, we think it's ok that waveforms control the ms_before/after, let's just be clearer with this in the docs without too many warnings

@h-mayorquin
Copy link
Collaborator Author

All right. Where should this behavior be written?

@alejoe91
Copy link
Member

@h-mayorquin adding a comment here in the Templates section should be enough

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

Successfully merging this pull request may close these issues.

3 participants