iamlikeme / rainflow

Implementation of the rainflow-counting algorythm in Python
MIT License
105 stars 34 forks source link

Add optional arguments 'left' and 'right'. #10

Closed iamlikeme closed 6 years ago

iamlikeme commented 6 years ago

The optional arguments allow user to treat the first and/or the last point in a series as a reversal. This functionality is based on feedback in #4 and #9.

marscarl59 commented 6 years ago

Appreciate your prompt implementation.

SaetreS commented 6 years ago

Does this produce the same result as inserting 0 at the beginning and/or at the end of the time series?

I also see more changes that is not related to commit name (documentation). I would consider splitting the changes you have done into two commits; 1) changes related to start/end point calculations, 2) documentation.

iamlikeme commented 6 years ago

Yes @SaetreS, that is how it works. Before, in order to reproduce the test case from ASME, it was necessary to prepend one point and append one point to the series. Now, by setting left=True and right=True, it is possible to get the exact cycle counts as in ASME without changing the series.

Regarding the commits - I will do squash-merge to master, so the changes will appear as a single commit anyway. I will keep it as it is then.