tmdsimpy.utils.harmonic.harmonic_wise_conditioning¶
- tmdsimpy.utils.harmonic.harmonic_wise_conditioning(X, Ndof, h, delta=0.0001)¶
Function returns a conditioning vector for harmonic solutions.
Each harmonic is assigned a constant equal to the larger of delta or the mean absolute value of all components at that harmonic in X (sine and cosine components considered together).
- Parameters:
- X(Ndof*Nhc+m,) numpy.ndarray
Baseline harmonics values, consecutive sets of Ndof correspond to harmonic components as listed in h (sine and cosine for h[i] != 0). The m extra components will be individually assigned delta or their absolute value.
- Ndofint
Number of degrees of freedom associated with the model.
- h(H,) numpy.ndarray, sorted
List of harmonics.
- deltascalar or 1D array like, optional
Small value to prevent divide by zero (minimum value that will be returned in CtoP). When delta is array like, the array entries correspond to minimum values for each harmonic in h, and then a single minimum value for all terms after the harmonic unknowns. The default is 1e-4.
- Returns:
- CtoP(Ndof*Nhc+m,) numpy.ndarray
Vector of same size as X to convert Xphysical=CtoP*Xconditioned
Notes
The number of harmonic components is Nhc = tmdsimpy.utils.harmonic.Nhc(h)