Analyze Temporal Structure With an Explicit Reproducibility Profile
Source:R/temporal-profiles.R
pr_temporal_profile.Rdcorrected uses measured sampling rate and deterministic plateau handling.
legacy_method re-executes the historical fixed-50-Hz method; numerical
differences across platforms mean it is not an exact replay guarantee.
reference replays cycles bound to the measurements by pr_lock_cycles().
Its phase map uses the source workflow's central 80 percent of cycles and
an untrimmed mean. No historical analysis is silently substituted.
Usage
pr_temporal_profile(
trial,
profile = c("corrected", "legacy_method", "reference"),
reference = NULL
)Arguments
- trial
A pr_trial object.
- profile
One of corrected, legacy_method or reference.
- reference
Locked historical cycles, required for reference replay.
Examples
trial <- pr_example_trial("saddle_horse")
profile <- pr_temporal_profile(trial, "corrected")
profile$dominant_frequency
#> # A tibble: 1 × 2
#> stride_freq_Hz peak_power
#> <dbl> <dbl>
#> 1 1.4 5902.
# Replay cycles that are bound to this exact recording:
locked <- pr_lock_cycles(trial, profile$cycles)
replay <- pr_temporal_profile(trial, "reference", reference = locked)
identical(replay$cycles, profile$cycles)
#> [1] TRUE