Command: ChnResampleFreqBased
- Updated2024-09-12
- 5 minute(s) read
Command: ChnResampleFreqBased
Command: ChnResampleFreqBased
Maps a signal onto a new sampling rate.
Input Parameters
| XW | Specifies the data channel containing the time values. If the associated y-channel is a waveform channel, you do not need to specify this channel. |
| Y | Specifies the data channel containing the y-values. |
| ResultChannel | Specifies the result channel for the converted y-values. |
SampleFrequency |
Specifies the sampling rate of the result channel in Hertz. |
ResampleMappingMode |
Specifies the mapping mode for the resampling. |
ResampleAntiAliasingFilter |
Specifies that DIAdem filters the y input channel. The default value of the variable is FALSE, so that DIAdem does not filter the input channel. |
ResampleInterpolateNovalues |
Specifies that DIAdem replaces the NoValues in the y-values by interpolating the neighboring points. The default value of the variable is FALSE so that DIAdem does not replace NoValues. |
[ResampleInterpolationMethod] |
Specifies how DIAdem interpolates the y-channels if the ResampleMappingMode variable has the value "Analog". As a default, the ResampleInterpolationMethod variable has the value "Akima", which means that DIAdem interpolates the signal with Akima subsplines if you do not specify the value. |
Return Parameters
| ChnResult | Contains the result channel with the y-values converted to the interpolation points. ElementList <Data> type return value. |
The ChnResampleFreqBased command returns a waveform result channel with the newly calculated x-values and y-values regardless of the the input channels.
![]() | Refer to the Help page Resampling and Synchronization for further information. |
Examples
The following example maps the signal defined by the channels [1]/[1] and [1]/[2] to the sampling rate of 1 Hz, and stores the result channel in the Results channel group. DIAdem specifies the type of interpolation automatically without filtering the input channel. The input channels are accessed through channel objects.
| VBScript | Python |
Dim oMyXChannel, oMyYChannel, oMyResultChn Set oMyXChannel = Data.Root.ChannelGroups(1).Channels(1) Set oMyYChannel = Data.Root.ChannelGroups(1).Channels(2) Set oMyResultChn = ChnResampleFreqBased(oMyXChannel, oMyYChannel, "Results/Resampled", 1, "Automatic", False, False, "Akima") Call MsgBox("Result channel: " & oMyResultChn(1).ChannelGroup.Name & "/" & oMyResultChn(1).Name)
The following example maps the signal defined by the channels [1]/[1] and [1]/[2] to the sampling rate of 1 Hz, and stores the result channel in the Results channel group. DIAdem specifies the type of interpolation automatically without filtering the input channel. The input channels are accessed through the channel reference.
| VBScript | Python |
Dim oMyResultChn Set oMyResultChn = ChnResampleFreqBased("[1]/[1]", "[1]/[2]", "Results/Resampled", 1, "Automatic", False, False, "Akima") Call Msgbox("Result channel: " & oMyResultChn(1).ChannelGroup.Name & "/" & oMyResultChn(1).Name)
Dialog Box Call
Call SUDDlgShow("Main", ResourceDrv & "AnaChnResample")
Related Topics
Command: ChnResampleChnBased | Command: ChnResampleChnBasedExt | Command: ChnResampleChnBasedXOffsetCalc2 | Command: ChnResampleChnBasedXOffsetCalc3 | Command: ChnResampleFreqBasedExt | Command: ChnResampleFreqBasedXOffsetCalc2 | Command: ChnResampleFreqBasedXOffsetCalc3 | Resampling


