Skip to content

Commit 470b629

Browse files
committed
Stile: fix mistake in lx-16a specifications
1 parent 831ac29 commit 470b629

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
-22 Bytes
Loading

assets/lx16a_spec.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
RPM = np.array([30, 36, 39.8, 43.3, 45.8, 50.5, 55.2, 55.6, 58.5, 62.5, 66.5, 70.5, 74.5, 76.8, 80, 85, 88.2, 90.5, 96, 99.2, 102.1])
88

99
# Additional points
10-
datacheet_values_V = np.array([6, 7.4])
11-
datacheet_values_RPM = np.array([55.6, 62.5])
10+
datasheet_values_V = np.array([6, 7.4])
11+
datasheet_values_RPM = np.array([55.6, 62.5])
1212

1313
# Linear regression function
1414
def linear_model(x, a, b):
@@ -27,7 +27,7 @@ def linear_model(x, a, b):
2727

2828
# Calculate the linear regression model shift applied to datasheet values
2929
# Compute the average vertical shift between the new points and the initial regression
30-
shifts = datacheet_values_RPM - linear_model(datacheet_values_V, a, b)
30+
shifts = datasheet_values_RPM - linear_model(datasheet_values_V, a, b)
3131
average_shift = np.mean(shifts)
3232

3333
# New intercept for the parallel line
@@ -37,7 +37,7 @@ def linear_model(x, a, b):
3737
# Plot the data
3838
plt.figure(figsize=(10, 7))
3939
plt.scatter(V, RPM, color="blue", label="Measures")
40-
plt.scatter(datacheet_values_V, datacheet_values_RPM, color="green", label="Datacheet values", marker='x', s=100)
40+
plt.scatter(datasheet_values_V, datasheet_values_RPM, color="green", label="Datasheet values", marker='x', s=100)
4141
plt.plot(V_fit, RPM_fit, color="red", label=f"Linear regression: RPM = {a:.2f} * V + {b:.2f}")
4242
plt.plot(V_fit, RPM_parallel_fit, color="orange", linestyle="--", label="Linear regression model applied to datasheet values")
4343

0 commit comments

Comments
 (0)