[ENH] - Add one sided asymmetric option to asine cycle #254
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This update adds support for creating an asymmetric cycle with only one asymmetric extrema, to
sim_asine_cycle
.For example, this code:
Would now work, to have a 'peak-only asymmetric cycle', and gives this:
As a limitation of this - it seems unideal that there is an abrupt shift from the asymmetric to symmetric regime at the zero crossing point (ideally this might be smoother), but broadly I think this should be okay, and this update can still be useful for some things.
Edit: I've been playing around with those code for awhile, including poking at different ways to do the offsets, and if there's a way to refactor what looks to be duplicated code. At this point, I think it's probably easiest to stick with it as is, but one way or another I'm moving this to review stage to get some more eyes on it!