Skip to content
Snippets Groups Projects
Commit 6781bb7d authored by Boi Okken's avatar Boi Okken
Browse files

added compensation for frictional force, and writing 0 to file for 0 frc

parent 45fe0c7d
No related branches found
No related tags found
1 merge request!12Dev
......@@ -66,12 +66,16 @@ def main():
df = pd.read_csv(validfileDir, sep=';',header=0)
if not df.empty: # Process data further if file is sucessfully opened
findZeroCrossing = findZeroCrossingInData(df)
findZeroCrossing = findZeroCrossingInData(df) - frictionForces
if findZeroCrossing > forceTolerange: # Ignore bogus data
# Save all the found data to the intermediate file
linetowrite = str(diam) + ';' + str(wght) + ';' + str(findZeroCrossing) + '\n' # Each file condenses to a single data point
f.write(linetowrite)
else:
# Save all the found data to the intermediate file
linetowrite = str(diam) + ';' + str(wght) + ';' + str(0) + '\n' # This is an indication that the weight is too low
f.write(linetowrite)
f.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment