Interface IOperationsHeatMapSTFTDataViewModel
Last update: 09.03.2026Namespace: VM.Operations.Post.Interfaces
Assembly: VM.Operations.Post.dll
The IOperationsHeatMapSTFTDataViewModel interface defines the structure and functionalities for handling heat map data specifically for Short-Time Fourier Transform (STFT).
public interface IOperationsHeatMapSTFTDataViewModel
Examples
To view the examples, refer to the location of the 'Install_Path\Motion\Document\Postprocessor API for Python.zip' file.
# IOperationsHeatMapSTFTDataViewModel.py
import sys
# Get the current file's path and set the path for external modules.
current_dir = __file__.rsplit('\\', 1)[0]
external_modules_path = current_dir + '\\..\\..\\Modules'
sys.path.append(external_modules_path)
# Import necessary modules
from OperationAPI import *
# Start the headless application interface
applicationHandler = ApplicationHandler()
# Import result file
result_file_path = get_result_file_path()
# Set array about result file
filepaths = List[str]()
filepaths.Add(result_file_path)
# Open about result files
# This will open the result file in the application.
# When the result is first opened, a Page is created and an Animation View is created on that Page.
applicationHandler.AddDocument(filepaths)
# Get Active Page
# This retrieves the currently active page in the application.
page = applicationHandler.GetActivePage()
# Creating a Chart
# Create a new Chart View on the page
# This will create a new chart view with the specified name.
chartView = page.CreateChart("Chart")
# Set array about combination of characteristic and component
curvePaths = List[str]()
curvePaths.Add(r'Displacement/Magnitude')
# Create a PlotParameters object to specify the parameters for the plot.
# Set the Entity to Plot.
# The Target is the name of the target for which you want to retrieve the curves.
# Set the paths for the curves you want to retrieve.
# This is where you specify the characteristics and components you want to plot.
parameters = PlotParameters()
parameters.Paths = curvePaths
parameters.Target = "Crank"
# Add Curves (FilePath, Curve Parameter)
# FilePath - The path of the result to access.
# parameters - The class used as a parameter of the AddCurve function.
# The instance of the curve.
curves = chartView.AddCurves(result_file_path, parameters)
# Documentation Example
# create_fft.py
# SeriesNames - The list of the curve name to perform the operation
# FFTType - Magnitude, Phase
# FFTWindowType - Rectangular, Triangular, Bartlett, Hanning, Hamming, Welch, BlackMan, None
# ScaleType - Original, Logarithm, Decibel
# Points - The number of data point for FFT
# Start - The start time for using FFT on target data series
# End - The end time for using FFT on target data series
ffts = chartView.CreateFFT(curves, FFTType.Magnitude, FFTWindowType.Rectangular, ScaleType.Original, 128, 0, 1.0)
fftNames = List[str]()
fftNames.Add(ffts[0].SeriesName)
# SamplingFrequency - the number of the interval for dividing Y direction grids on color map.
# TimeSlice - the number of the interval for dividing X direction grids on color map.
# Overlap - the value of the percentage for setting overlapped intervals.
# SelectedPoints - the number of data point for FFT.
# Start - the start time for using FFT on target data series.
# End - the end time for using FFT on target data series.
# ReferenceValue - the reference value on decibel as the type of the scale.
# ScaleFactor - the scale factor to change from time domain to another domain.
# SelectedScaleType - the scale type of STFT. STFT Scale Type has Original, Decibel.
data = HeatMapSTFTDataViewModel()
data.SamplingFrequency = 100
data.TimeSlice = 0.05
data.Overlap = 50
data.SelectedPoints = 16384
data.Start = 0
data.End = 1.000000000001
data.ReferenceValue = 1E-05
data.ScaleFactor = 1.0
data.SelectedScaleType = STFTScaleType.Original
stfts = chartView.CreateSTFT(data, fftNames)
stfts[0].STFT2DViewModel.LegendColorType = ColorSchemeType.BLACK_TO_WHITE
stfts[0].STFT2DViewModel.Start = 0.2
stfts[0].STFT2DViewModel.End = 0.9
stfts[0].STFT2DViewModel.Overlap = 80
stfts[0].STFT2DViewModel.ReferenceValue = 1E-05
stfts[0].STFT2DViewModel.SamplingFrequency = 200
stfts[0].STFT2DViewModel.SelectedPoints = 512
stfts[0].STFT2DViewModel.SelectedScaleType = STFTScaleType.Decibel
stfts[0].STFT2DViewModel.TimeSlice = 0.01
stfts[0].STFT2DViewModel.ScaleFactor = 2.0
# Close the Pages
page.Close()
# Close the Document
applicationHandler.CloseDocument(result_file_path)
Properties
End
Gets or sets the end time for using FFT (Fast Fourier Transform) on the target data series.
double End { get; set; }
Property Value
double
Examples
For an example that includes this property, see the Interface IOperationsHeatMapSTFTDataViewModel.
Remarks
This property allows you to set the end time for applying FFT on the target data series. In the UI, this property is represented under the "Source" category with the property name "End".
LegendColorType
Gets or sets the color scheme of the legend.
ColorSchemeType LegendColorType { get; set; }
Property Value
ColorSchemeType
Examples
For an example that includes this property, see the Interface IOperationsHeatMapSTFTDataViewModel.
Remarks
This property allows you to set the color scheme of the legend. The available color schemes are:
Overlap
Gets or sets the percentage value for setting overlapped intervals.
double Overlap { get; set; }
Property Value
double
Examples
For an example that includes this property, see the Interface IOperationsHeatMapSTFTDataViewModel.
Remarks
This property allows you to set the percentage value for overlapped intervals. In the UI, this property is represented under the "Source" category with the property name "Overlap".
ReferenceValue
Gets or sets the reference value for decibel scaling.
double ReferenceValue { get; set; }
Property Value
double
Examples
For an example that includes this property, see the Interface IOperationsHeatMapSTFTDataViewModel.
Remarks
This property allows you to set the reference value for decibel scaling. It is applicable only when the
SamplingFrequency
Gets or sets the sampling frequency, which is the number of intervals for dividing the Y direction grids on a color map.
int SamplingFrequency { get; set; }
Property Value
int
Examples
For an example that includes this property, see the Interface IOperationsHeatMapSTFTDataViewModel.
Remarks
This property allows you to set the number of intervals for dividing the Y direction grids on a color map. In the UI, this property is represented under the "Source" category with the property name "Sampling Frequency".
ScaleFactor
Gets or sets the scale factor for transforming from the time domain to another domain.
double ScaleFactor { get; set; }
Property Value
double
Examples
For an example that includes this property, see the Interface IOperationsHeatMapSTFTDataViewModel.
Remarks
This property allows you to set the scale factor for transforming data from the time domain to another domain. In the UI, this property is represented under the "Source" category with the property name "Scale Factor".
SelectedPoints
Gets or sets the number of data points for FFT (Fast Fourier Transform).
int SelectedPoints { get; set; }
Property Value
int
Examples
For an example that includes this property, see the Interface IOperationsHeatMapSTFTDataViewModel.
Remarks
This property allows you to set the number of data points to be used for the FFT. In the UI, this property is represented under the "Source" category with the property name "nFFT".
SelectedScaleType
Gets or sets the scale type for the Short-Time Fourier Transform (STFT).
STFTScaleType SelectedScaleType { get; set; }
Property Value
STFTScaleType
Examples
For an example that includes this property, see the Interface IOperationsHeatMapSTFTDataViewModel.
Remarks
This property allows you to set the scale type for the STFT. The supported types are:
Start
Gets or sets the start time for using FFT (Fast Fourier Transform) on the target data series.
double Start { get; set; }
Property Value
double
Examples
For an example that includes this property, see the Interface IOperationsHeatMapSTFTDataViewModel.
Remarks
This property allows you to set the start time for applying FFT on the target data series. In the UI, this property is represented under the "Source" category with the property name "Start".
TimeSlice
Gets or sets the number of intervals for dividing the X direction grids on a color map.
double TimeSlice { get; set; }
Property Value
double
Examples
For an example that includes this property, see the Interface IOperationsHeatMapSTFTDataViewModel.
Remarks
This property allows you to set the number of intervals for dividing the X direction grids on a color map. In the UI, this property is represented under the "Source" category with the property name "Time Slice".
Methods
ExportOrderTrackingCurve(string)
Exports a curve to order tracking by creating a new chart and adding the exported curve to it.
void ExportOrderTrackingCurve(string name)
Parameters
name string
The name of the curve to be exported.
Examples
For an example that includes this property, see the Interface IOperationsHeatMapSTFTDataViewModel.
Remarks
This method exports a specified curve to order tracking by creating a new chart and adding the exported curve to it.