add_motif: Add Motif to Base Curve

View source: R/S4_utilities.R

add_motifR Documentation

Add Motif to Base Curve

Description

This function adds specified motifs to a base curve, adjusting coefficients and applying noise as needed. It also computes the signal-to-noise ratio (SNR) for the motifs.

Usage

add_motif(
  base_curve,
  mot_pattern,
  mot_len,
  dist_knots,
  mot_order,
  mot_weights,
  noise_str,
  only_der,
  coeff_min_shift,
  coeff_max_shift
)

Arguments

base_curve

A list representing the base curve structure with coefficients and basis.

mot_pattern

A data frame containing information about the motif patterns to add.

mot_len

A matrix specifying the lengths of the motifs.

dist_knots

A numeric value indicating the distance between knots for the motifs.

mot_order

An integer specifying the order of the B-spline for the motifs.

mot_weights

A list of numeric vectors containing weights for each motif.

noise_str

A list of structures defining the noise to be added to motifs.

only_der

A logical value indicating whether to add only derivatives.

coeff_min_shift

A numeric value for the minimum shift to apply to coefficients.

coeff_max_shift

A numeric value for the maximum shift to apply to coefficients.

Details

Add Motif to Base Curve

Value

A list containing the updated base curve, background information, motifs with and without noise, and SNR data.


funMoDisco documentation built on April 16, 2025, 1:10 a.m.