-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
I believe the find_reversal_racetrack_filtered is returning the wrong vector.
It should return rev[ix[ixr]], ix[ixr] and not y[ix[ixr]], ix[ixr]
Here is the piece of code I was playing with to understand the behaviour of racetrack_filter:
y = np.random.normal(size=50)*10
fig = go.Figure()
time = x=[i for i, val in enumerate(y)]
fig.add_trace(go.Scatter(x=time,y=y, mode='markers', marker_size=10, name='Raw Data'))
binsDataFiltering = 6
reversal, indInit = fatpack.find_reversals(y, k=binsDataFiltering)
fig.add_trace((go.Scatter(x=indInit, y=reversal, name='find_reversal')))
reversal, indInit = fatpack.find_reversals_racetrack_filtered(y, h=0, k=binsDataFiltering)
fig.add_trace((go.Scatter(x=indInit, y=reversal, name='find_reversals_racetrack_filtered h=0')))
bound = fatpack.rainflow.get_load_class_boundaries(y, k=binsDataFiltering)
boundCouple = zip(bound[:-1], bound[1:])
for boundaryCouple in boundCouple:
fig.add_hline(y=(boundaryCouple[1]+boundaryCouple[0])/2, line_dash='dash', line_color='green')
fig.update_layout(title=dict(text="Rainflow counting with FatPack test"),xaxis=dict(title=dict(text="Time")),yaxis=dict(title=dict(text="physical value")))
fig.show()
Thanks for this great package !
Metadata
Metadata
Assignees
Labels
No labels
