pyroll-project / pyroll-core

PyRoll rolling simulation framework - core library.
https://pyroll.readthedocs.io
BSD 3-Clause "New" or "Revised" License
12 stars 7 forks source link

Provide number of rolls as numerical value #254

Open GRPlan opened 3 weeks ago

GRPlan commented 3 weeks ago

Summary

When performing customized calculations it can be beneficial to have access to the number of rolls as a numerical value.

E.g. for force or torque calculatations I use the following line to provide roll_number (probably better number_of_rolls...)

df['roll_number'] = df.apply(lambda row: 3 if row.roll_type.startswith('Three') else 2, axis=1)

axtimhaus commented 4 days ago

Maybe just use len(df["contour_lines"]) or check for "3fold" classifier