lleocal¶
-
pylleo.lleocal.
fit1d
(lower, upper)[source]¶ Fit acceleration data at lower and upper boundaries of gravity
Parameters: - lower (pandas dataframe) – slice of lleo datafram containing points at -1g calibration position
- upper (pandas dataframe) – slice of lleo datafram containing points at -1g calibration position
Returns: p – Polynomial coefficients, highest power first. If y was 2-D, the coefficients for k-th data set are in p[:,k]. From numpy.polyfit().
Return type: ndarray
Note
This method should be compared agaist alternate linalg method, which allows for 2d for 2d poly, see - http://stackoverflow.com/a/33966967/943773
A = numpy.vstack(lower, upper).transpose() y = A[:,1] m, c = numpy.linalg.lstsq(A, y)[0]
-
pylleo.lleocal.
get_cal_data
(data_df, cal_dict, param)[source]¶ Get data along specified axis during calibration intervals
Parameters: - data_df (pandas.DataFrame) – Pandas dataframe with lleo data
- cal_dict (dict) – Calibration dictionary
Returns: - lower (pandas dataframe) – slice of lleo datafram containing points at -1g calibration position
- upper (pandas dataframe) – slice of lleo datafram containing points at -1g calibration position
See also
lleoio.read_data()
- creates pandas dataframe data_df
read_cal()
- creates cal_dict and describes fields