User Tools

Site Tools


visual3d:documentation:pipeline:signal_commands:gcvspl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
visual3d:documentation:pipeline:signal_commands:gcvspl [2024/10/24 15:05] wikisysopvisual3d:documentation:pipeline:signal_commands:gcvspl [2024/10/24 15:15] (current) wikisysop
Line 3: Line 3:
 GCVSPL was implemented based on the following article: GCVSPL was implemented based on the following article:
  
-\\ 
 **H.J. Woltring** (1986), A FORTRAN package for generalized, cross-validatory spline smoothing and differentiation. Advances in Engineering Software 8(2):104-113 (U.K.). **H.J. Woltring** (1986), A FORTRAN package for generalized, cross-validatory spline smoothing and differentiation. Advances in Engineering Software 8(2):104-113 (U.K.).
  
-\\ 
 The command is used like all other filter commands in Visual3D. The command is used like all other filter commands in Visual3D.
  
Line 32: Line 30:
  
 ==== Num_Spline_Order ==== ==== Num_Spline_Order ====
 +<code>
 1 = linear 1 = linear
 2 = cubic 2 = cubic
 3 = quintic 3 = quintic
 4 = heptic splines. 4 = heptic splines.
 +</code>
 ==== Error_Variance ==== ==== Error_Variance ====
 +<code>
 0 = an interpolating spline is calculated. 0 = an interpolating spline is calculated.
 <0 & Optimization Mode= 2 the smoothing parameter is determined by minimizing the Generalized Cross-Validation function <0 & Optimization Mode= 2 the smoothing parameter is determined by minimizing the Generalized Cross-Validation function
 >0 & Optimization Mode= 1 the smoothing parameter is specified by the variance >0 & Optimization Mode= 1 the smoothing parameter is specified by the variance
->0 & Optimization Mode= 3 the smoothing parameter is determined so as to minimize an estimate of the true mean squared error, which depends on the variance.+>0 & Optimization Mode= 3 the smoothing parameter is determined so as to minimize an estimate of the true mean squared error,  
 +                  which depends on the variance.
 Woltring's optimization mode= 4 has not been implemented. Woltring's optimization mode= 4 has not been implemented.
 +</code>
  
 The default value of the error variance is 0.01 The default value of the error variance is 0.01
Line 54: Line 55:
 The relationship between the variance and the cutoff frequency was declared here: The relationship between the variance and the cutoff frequency was declared here:
  
-[[[http://isbweb.org/software/sigproc/gcvspl/gcvspl.memo|[1]]] and further described here:+[[http://isbweb.org/software/sigproc/gcvspl/gcvspl.memo|Isbweb.org]] and further described here:
 [[http://biomch-l.isbweb.org/threads/17045-Re-Woltring-Filter-cutt-off-frequency-VAL-P-value?highlight=spline+filter|From Biomch-L]] [[http://biomch-l.isbweb.org/threads/17045-Re-Woltring-Filter-cutt-off-frequency-VAL-P-value?highlight=spline+filter|From Biomch-L]]
-\\ 
- 
  
 +<code>
 First account for a pass butterworth filter (e.g. a fourth order butterworth filter) First account for a pass butterworth filter (e.g. a fourth order butterworth filter)
 Modified_cut_off_freq= cut_off_freq / 0.802 Modified_cut_off_freq= cut_off_freq / 0.802
 Variance = sampling_freq/(2*PI*Modified_cut_off_freq)^(2*order) Variance = sampling_freq/(2*PI*Modified_cut_off_freq)^(2*order)
 +</code>
 === Cutoff Frequency Test === === Cutoff Frequency Test ===
  
-Create a SIN wave +Create a SIN wave\\ 
-Filter the SIN wave with a cutoff frequency equal to the SIN wave frequency +Filter the SIN wave with a cutoff frequency equal to the SIN wave frequency\\ 
-The resulting signal should have a magnitude (1/sqrt(2)) times the original magnitude.+The resulting signal should have a magnitude (1/sqrt(2)) times the original magnitude.\\
 And should yield the same result as a LOWPASS filter with a 12 Hz cutoff And should yield the same result as a LOWPASS filter with a 12 Hz cutoff
 +
 An example test script in Visual3D An example test script in Visual3D
 +<code>
 ! create a 12 Hz SIN wave at the ANALOG frequency of the file opened in the Visual3D workspace. ! create a 12 Hz SIN wave at the ANALOG frequency of the file opened in the Visual3D workspace.
-**Set_Pipeline_Parameter_From_Expression**+Set_Pipeline_Parameter_From_Expression
 /PARAMETER_NAME=CUTOFF /PARAMETER_NAME=CUTOFF
 /EXPRESSION= 12/0.802 /EXPRESSION= 12/0.802
 /AS_INTEGER=FALSE /AS_INTEGER=FALSE
-**;** +
-**Set_Pipeline_Parameter_From_Expression**+ 
 +Set_Pipeline_Parameter_From_Expression
 /PARAMETER_NAME=VARIANCE /PARAMETER_NAME=VARIANCE
 /EXPRESSION=PARAMETERS::ANALOG::RATE/(2*pi()*&::CUTOFF&)^4 /EXPRESSION=PARAMETERS::ANALOG::RATE/(2*pi()*&::CUTOFF&)^4
 /AS_INTEGER=FALSE /AS_INTEGER=FALSE
-**;** +
-**Evaluate_Expression**+ 
 +Evaluate_Expression
 /EXPRESSION=SIN(2*PI()*12*FRAME_NUMBERS::ORIGINAL::ANALOGTIME) /EXPRESSION=SIN(2*PI()*12*FRAME_NUMBERS::ORIGINAL::ANALOGTIME)
 ! /SIGNAL_TYPES= ! /SIGNAL_TYPES=
Line 89: Line 94:
 /RESULT_NAME=SCOTT /RESULT_NAME=SCOTT
 ! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE ! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
-**;** +
-**GCVSPL**+ 
 +GCVSPL
 /SIGNAL_TYPES=DERIVED /SIGNAL_TYPES=DERIVED
 /SIGNAL_FOLDER=PROCESSED /SIGNAL_FOLDER=PROCESSED
Line 104: Line 110:
 ! /MAX_GAP=0 ! /MAX_GAP=0
 ! /FILL_GAPS=FALSE ! /FILL_GAPS=FALSE
-**;** +
-**Lowpass_Filter**+ 
 +Lowpass_Filter
 /SIGNAL_TYPES=DERIVED /SIGNAL_TYPES=DERIVED
 /SIGNAL_FOLDER=PROCESSED /SIGNAL_FOLDER=PROCESSED
Line 117: Line 124:
 /TOTAL_BUFFER_SIZE=0 /TOTAL_BUFFER_SIZE=0
 ! /NUM_BIDIRECTIONAL_PASSES=1 ! /NUM_BIDIRECTIONAL_PASSES=1
-**;**+; 
 +</code>
 ==== ISB Information ==== ==== ISB Information ====
  
 The ISB website contains the following information on the algorithm The ISB website contains the following information on the algorithm
  
-\\ 
 For large datasets (N >> 0) and negligible boundary artefacts, the behaviour of a natural spline approximates that of a periodic spline. For the latter case, the frequency characteristic in the equidistantly sampled, uniformly weighted case is that of a double, phase-symmetric Butterworth filter, with transfer function H(w) = [1 + (w/wo)^2M]^-1, where w is the frequency, wo = (p*T)^(-0.5/M) the filter's cut-off frequency, p the smoothing parameter, T the sampling interval, and 2M the order of the spline. If T is expressed in seconds, the frequen- cies are expressed in radians/second. For large datasets (N >> 0) and negligible boundary artefacts, the behaviour of a natural spline approximates that of a periodic spline. For the latter case, the frequency characteristic in the equidistantly sampled, uniformly weighted case is that of a double, phase-symmetric Butterworth filter, with transfer function H(w) = [1 + (w/wo)^2M]^-1, where w is the frequency, wo = (p*T)^(-0.5/M) the filter's cut-off frequency, p the smoothing parameter, T the sampling interval, and 2M the order of the spline. If T is expressed in seconds, the frequen- cies are expressed in radians/second.
  
-\\ 
 It has been found empirically, that the effective number of estimated spline parameters Np is related to the Butterworth cut-off frequency wo as Np ~ M/2 + KM * wo * N * T, where Np ranges between M and N, and where KM is the integral over x from 0 to infinity of (1 + x^2M)^-1 divided by PI. For large M, KM approaches 1/PI from above; values for small M are: K1 = 1/2, K2 = 1/V8, K3 = 1/3. This relation has also been found to apply for uniformly weighted data which are sampled slightly anequidistantly, with T taken as the average sampling inter- val. For large Np, the relation with wo * N * T becomes nonlinear. It has been found empirically, that the effective number of estimated spline parameters Np is related to the Butterworth cut-off frequency wo as Np ~ M/2 + KM * wo * N * T, where Np ranges between M and N, and where KM is the integral over x from 0 to infinity of (1 + x^2M)^-1 divided by PI. For large M, KM approaches 1/PI from above; values for small M are: K1 = 1/2, K2 = 1/V8, K3 = 1/3. This relation has also been found to apply for uniformly weighted data which are sampled slightly anequidistantly, with T taken as the average sampling inter- val. For large Np, the relation with wo * N * T becomes nonlinear.
  
visual3d/documentation/pipeline/signal_commands/gcvspl.1729782355.txt.gz · Last modified: 2024/10/24 15:05 by wikisysop