Releases: mad-lab-fau/imucal
v2.0.1 - Bug Fix for Docker
Avoid importing tkinter when not needed
v2.0.0 Major rewrite and breaking changes (READ CHANGELOG)
[2.0] - 09.01.2021
2.0 is a rewrite of a lot of the API and requires multiple changes to legacy code using this library.
Please refer to the migration guide for more information.
During this refactoring multiple bugs were fixed as well.
Therefore, it is highly suggested upgrading to the new version, even if it takes some work!
Added
- A new
calibrate_df
method for theCalibrationInfo
that can calibrate df directly. - It is now possible to define which
CalibrationInfo
subclass should be used by theFerrarisCalibration
- A set of "management" functions to save, find, and load IMU calibrations of multiple sensors
- The ability to add a custom comment to a
CalibrationInfo
- The user is now forced to provide the units of the input data to avoid applying calibrations that were meant for unit
conversion. - Applying a calibration now checks if the units of your data match with the input unit of the calibration.
- The export format of calibration-info objects is now versioned.
This helps to make changes to the format in the future while still supporting old exports.
See the migration guide for more information. - Helper functions to load "legacy" calibration info objects. (
imucal.legacy
)
Changed
FerrarisCalibration
has a new interface.
Instead of providing all calibration and data related parameters in the__init__
, the__init__
is now only used
to configure the calibration.
The data and all data related parameter are now passed to thecompute
method (replacescompute_calibration_matrix
)- Using
from_...
constructors on a subclass ofCalibrationInfo
does not search all subclasses ofCalibrationInfo
anymore, but only the subclasses (and the class itself), it is called on.
For example,FerrarisCalibrationInfo.from_json
will only consider subclasses ofFerrarisCalibrationInfo
, but not
other subclasses ofCalibrationInfo
. - The short hand "gyro" is not replaced with "gyr" in all parameter and variable names.
This might cause an issue when loading old calibration files.
Deprecated
Removed
FerrarisCalibration
does not have anyfrom_...
constructors anymore.
The functionality of these constructors can now be accessed via theferraris_regions_from_...
helper functions.- It is not possible anymore to calibrate the acc and gyro separately.
No one was using this feature, and hence, was removed to simplify the API.
Fixed
Migration Guide
-
The main change is how
FerrarisCalibration
andTurntableCalibration
are used.
Before you would do:from imucal import FerrarisCalibration cal, section_list = FerrarisCalibration.from_interactive_plot(data, sampling_rate=sampling_rate) cal_info = cal.compute_calibration_matrix()
Now you need to first create your Ferraris sections and then provide them as arguments for the
compute
method:from imucal import FerrarisCalibration, ferraris_regions_from_interactive_plot sections, section_list = ferraris_regions_from_interactive_plot(data) cal = FerrarisCalibration() cal_info = cal.compute(sections, sampling_rate_hz=sampling_rate, from_acc_unit="m/s^2", from_gyr_unit="deg/s")
Note, that you are also forced to provide the units of the input data.
We always recommend to first turn your data into the same units you would expect after the calibration and then using
the calibrations as refinement. -
CalibrationInfot.calibrate
now requires you to specify the units of your data and validates that they match the
units expected by the calibration.
You need to add the parametersacc_unit
andgyr_unit
to all calls to calibrate.
Note, that older calibrations will not havefrom
units and hence, can not perform this check.
In this case you can set the units toNone
to avoid an error.
However, it is recommended to recreate the calibrations with properfrom
units. -
If you were using
from_json_file
before, double check, if this still works for you, as the way the correct baseclass
is selected have been chosen.
In any case, you should consider to useimucal.management.load_calibration_info
instead, as it is more flexible. -
If you were using any parameters or package variables, that contained the short hand
gyro
, replace it withgyr
.
Note that this also effects the exported calibration files.
You will not be able to load them unless you replacegyro_unit
withgyr_unit
in all files. -
The
CalibrationInfo
objects now have more fields by default.
To avoid issues with missing values, we highly recommend recreating all calibration files you have using the original
session data and the most current version ofimucal
.
Alternatively you can use the functions provided inimucal.legacy
to load the old
calibration.
Then you can modify the loaded calibration info object and save it again to replace the old calibration.
v1.1.0
v1.0.1
v1.0.0 First official release
imucal goes open-source!