@@ -236,28 +236,31 @@ Simple Pipeline
236
236
# Detect events
237
237
events = api.detect_events(trial, config)
238
238
try :
239
- # detect events (marker based)
240
- events = api.check_events(events, config)
241
-
242
239
# check events
243
- api.check_events(events, config )
240
+ api.check_events(events)
244
241
245
242
# write events to c3d in the same file
246
- api.write_events_to_c3d(trial, events)
243
+ api.write_events_to_c3d(" ./test_small.c3d" , events, ' ./test.c3d' )
244
+
245
+ # add events to trial
246
+ trial.events = events
247
247
248
248
# segment trial to gait cycles. (Events are already existing in the c3d file)
249
249
trial_segmented = api.segment_trial(trial)
250
250
251
251
# calculate features
252
252
features = api.calculate_features(trial_segmented, config)
253
253
254
+ # normalise time
255
+ trial_normalized = api.time_normalise_trial(trial_segmented)
256
+
254
257
# save features
255
- faetures .to_netcdf(" features.nc" )
258
+ features .to_netcdf(" features.nc" )
256
259
257
260
# export segmented trial to netcdf
258
- api.export_trial(trial_segmented, config, " output.nc" )
261
+ api.export_trial(trial_segmented, " output_segments" )
262
+ api.export_trial(trial_normalized, " output_norm" )
259
263
260
- api.export_trial(trial_segmented, config, " output.c3d" )
261
264
except ValueError as e:
262
265
print (e)
263
266
0 commit comments