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 adaptative rounding in InterpolatedWaveform #592

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

HGSilveri
Copy link
Collaborator

Fixes #590 .

@HGSilveri HGSilveri requested review from a-corni and CdeTerra October 5, 2023 08:17
), # Rounds to the order of Hz
)
samples = self._interp_func(np.arange(self._duration))
value_range = np.max(np.abs(samples))
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: np.abs(samples).max() seems to be more concise and faster...
image
image
image

Copy link
Collaborator

@a-corni a-corni left a comment

Choose a reason for hiding this comment

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

Looks good to me !

@CdeTerra
Copy link
Collaborator

CdeTerra commented Oct 5, 2023

Sounds good!

@HGSilveri HGSilveri merged commit fcd488a into develop Oct 5, 2023
6 checks passed
@HGSilveri HGSilveri deleted the hs/interp-rounding branch October 5, 2023 13:38
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.

Interpolated waveforms can fail on negative amplitudes
3 participants