
Refine Motif Boundaries Using Segment Alignment
refine_motif_boundaries.Rd
Adjusts motif boundaries based on underlying segments and optional label-specific time adjustments. Integrates segment information to determine precise motif onsets/offsets.
Value
Returns a modified SAP object with updated motifs containing:
motif_onset - Precise start time based on segments
motif_offset - Precise end time based on segments
first_seg_index - First segment index in motif
last_seg_index - Last segment index in motif
motif_duration - Calculated motif duration
Details
Key operations:
Applies label-specific time adjustments to motif end limits
Identifies segments contained within adjusted motif boundaries
Calculates precise motif timing based on contained segments
Preserves original motif structure while adding new timing columns
Examples
if (FALSE) { # \dontrun{
# Apply 0.1s extension to "BL" motifs
sap <- refine_motif_boundaries(
sap,
adjustments_by_label = list(BL = 0.1)
)
} # }