|
LAT Hologramm-Software 2.0
|
Functions | |
| def | piecewise_linear_1 (x, b, k1) |
| def | piecewise_linear_2 (x, b, k1, k2) |
| def | piecewise_linear_3 (x, b, k1, k2, k3) |
| def | piecewise_linear_4 (x, b, k1, k2, k3, k4) |
Variables | |
| int | n_pieces = 4 |
| PWM_set = np.array([2,18,36,55,73,91,109,127,146,164,182,200,218,237,254], dtype=float) | |
| RPM_measured = np.array([213.,5420,7145,8282,9165,9765,10100,10500,10700,10900,11100,11250,11400,11550,11650], dtype=float) | |
| float | PWM_point1 = 20.0 |
| float | PWM_point2 = 80.0 |
| float | PWM_point3 = 150.0 |
| float | slope_i = 100.0; |
| PWM_max = max(PWM_set) | |
| PWM_min = min(PWM_set) | |
| bool | plot_figure = True |
| def | piece_func = piecewise_linear_1 |
| list | p_initial = [RPM_measured[0],slope_i] |
| p | |
| e | |
| p0 | |
| list | a = [p[1]] |
| list | b = [ p[0]-p[1]*PWM_min] |
| list | rpm |
| tuple | test_val = (1./a[0])*rpm[0] - (b[0]/a[0]) |
| fig = plt.figure() | |
| ax = fig.add_subplot(111) | |
| xd = np.linspace(PWM_min, PWM_max, 10000) | |
--------------------- The MIT License (MIT) Copyright (c) 2017-2018 Sungeun K. Jeon for Gnea Research LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---------------------
| def fit_nonlinear_spindle.piecewise_linear_1 | ( | x, | |
| b, | |||
| k1 | |||
| ) |
Definition at line 192 of file fit_nonlinear_spindle.py.
| def fit_nonlinear_spindle.piecewise_linear_2 | ( | x, | |
| b, | |||
| k1, | |||
| k2 | |||
| ) |
Definition at line 195 of file fit_nonlinear_spindle.py.
| def fit_nonlinear_spindle.piecewise_linear_3 | ( | x, | |
| b, | |||
| k1, | |||
| k2, | |||
| k3 | |||
| ) |
Definition at line 204 of file fit_nonlinear_spindle.py.
| def fit_nonlinear_spindle.piecewise_linear_4 | ( | x, | |
| b, | |||
| k1, | |||
| k2, | |||
| k3, | |||
| k4 | |||
| ) |
Definition at line 216 of file fit_nonlinear_spindle.py.
| list fit_nonlinear_spindle.a = [p[1]] |
Definition at line 252 of file fit_nonlinear_spindle.py.
| fit_nonlinear_spindle.ax = fig.add_subplot(111) |
Definition at line 353 of file fit_nonlinear_spindle.py.
Definition at line 253 of file fit_nonlinear_spindle.py.
| fit_nonlinear_spindle.e |
Definition at line 251 of file fit_nonlinear_spindle.py.
| fit_nonlinear_spindle.fig = plt.figure() |
Definition at line 352 of file fit_nonlinear_spindle.py.
| int fit_nonlinear_spindle.n_pieces = 4 |
Definition at line 156 of file fit_nonlinear_spindle.py.
| fit_nonlinear_spindle.p |
Definition at line 251 of file fit_nonlinear_spindle.py.
| fit_nonlinear_spindle.p0 |
Definition at line 251 of file fit_nonlinear_spindle.py.
| list fit_nonlinear_spindle.p_initial = [RPM_measured[0],slope_i] |
Definition at line 249 of file fit_nonlinear_spindle.py.
| def fit_nonlinear_spindle.piece_func = piecewise_linear_1 |
Definition at line 248 of file fit_nonlinear_spindle.py.
| bool fit_nonlinear_spindle.plot_figure = True |
Definition at line 187 of file fit_nonlinear_spindle.py.
Definition at line 185 of file fit_nonlinear_spindle.py.
Definition at line 186 of file fit_nonlinear_spindle.py.
| float fit_nonlinear_spindle.PWM_point1 = 20.0 |
Definition at line 174 of file fit_nonlinear_spindle.py.
| float fit_nonlinear_spindle.PWM_point2 = 80.0 |
Definition at line 175 of file fit_nonlinear_spindle.py.
| float fit_nonlinear_spindle.PWM_point3 = 150.0 |
Definition at line 176 of file fit_nonlinear_spindle.py.
| fit_nonlinear_spindle.PWM_set = np.array([2,18,36,55,73,91,109,127,146,164,182,200,218,237,254], dtype=float) |
Definition at line 162 of file fit_nonlinear_spindle.py.
| list fit_nonlinear_spindle.rpm |
Definition at line 254 of file fit_nonlinear_spindle.py.
| fit_nonlinear_spindle.RPM_measured = np.array([213.,5420,7145,8282,9165,9765,10100,10500,10700,10900,11100,11250,11400,11550,11650], dtype=float) |
Definition at line 167 of file fit_nonlinear_spindle.py.
| float fit_nonlinear_spindle.slope_i = 100.0; |
Definition at line 183 of file fit_nonlinear_spindle.py.
Definition at line 343 of file fit_nonlinear_spindle.py.
Definition at line 354 of file fit_nonlinear_spindle.py.