gaitmap.zupt_detection.StrideEventZuptDetector#

class gaitmap.zupt_detection.StrideEventZuptDetector(half_region_size_s: float = 0.05)[source]#

A ZUPT detector that simply reuses the min_vel events as ZUPT events.

This can be very helpful, when wanting to enforce one ZUPT event per stride. The data is actually ignored completely and only the event list passed to the detect method is used.

Parameters:
half_region_size_s

Half the size of the region around the min_vel event that is considered a ZUPT event in seconds. The region from min_vel_event - half_region_size_s to min_vel_event + half_region_size_s is considered a ZUPT event.

Other Parameters:
data

The data passed to the detect method

stride_event_list

The stride event list passed to the detect method

sampling_rate_hz

The sampling rate of this data

Attributes:
zupts_

A dataframe with the columns start and end specifying the start and end of all static regions in samples

per_sample_zupts_

Get a bool array of length data with all Zupts as True.

half_region_size_samples_

The actual half region size in samples calculated using the data sampling rate.

min_vel_value_

Always None. Only implemented for API compatibility.

min_vel_index_

Always None. Only implemented for API compatibility.

Methods

clone()

Create a new instance of the class with all parameters copied over.

detect(data, *[, stride_event_list])

Detect the ZUPT events using the stride event list.

from_json(json_str)

Import an gaitmap object from its json representation.

get_params([deep])

Get parameters for this algorithm.

set_params(**params)

Set the parameters of this Algorithm.

to_json()

Export the current object parameters as json.

__init__(half_region_size_s: float = 0.05) None[source]#
clone() Self[source]#

Create a new instance of the class with all parameters copied over.

This will create a new instance of the class itself and all nested objects

detect(data: DataFrame, *, stride_event_list: DataFrame | None = None, sampling_rate_hz: float) Self[source]#

Detect the ZUPT events using the stride event list.

Parameters:
data

The data set holding the imu raw data. The data is ignored completly during the calculation.

stride_event_list

The stride event list to use for the detection. This must be a min_vel stride event list (i.e. all strides should start and end with a min_vel event).

sampling_rate_hz

The sampling rate of the data

Returns:
self

The class instance with all result attributes populated

classmethod from_json(json_str: str) Self[source]#

Import an gaitmap object from its json representation.

For details have a look at the this example.

You can use the to_json method of a class to export it as a compatible json string.

Parameters:
json_str

json formatted string

get_params(deep: bool = True) dict[str, Any][source]#

Get parameters for this algorithm.

Parameters:
deep

Only relevant if object contains nested algorithm objects. If this is the case and deep is True, the params of these nested objects are included in the output using a prefix like nested_object_name__ (Note the two “_” at the end)

Returns:
params

Parameter names mapped to their values.

set_params(**params: Any) Self[source]#

Set the parameters of this Algorithm.

To set parameters of nested objects use nested_object_name__para_name=.

to_json() str[source]#

Export the current object parameters as json.

For details have a look at the this example.

You can use the from_json method of any gaitmap algorithm to load the object again.

Warning

This will only export the Parameters of the instance, but not any results!

Examples using gaitmap.zupt_detection.StrideEventZuptDetector#

Advanced Kalman Filter Usage

Advanced Kalman Filter Usage

Advanced Kalman Filter Usage