In this chapter, you'll find examples demonstrating how to accomplish various tasks using the DewesoftX software.
The following examples cover a range of common procedures and goals, showing you step-by-step how to navigate the necessary features and settings to achieve the desired results. While the processes may seem straightforward, they often involve several steps to gather and analyze the information you need. We've included examples that illustrate how the same tasks can be performed using ChatGPT. You’ll notice that ChatGPT can often simplify and streamline these procedures, making it a more efficient tool for achieving your objectives. Our goal is to empower you with the knowledge to use DewesoftX effectively while also highlighting how AI, like ChatGPT, can enhance your workflow.
When provided with a file, ChatGPT will make several attempts to analyze it. If an error is encountered during the process, it will adapt by following a different procedure, continuously adjusting its approach until the final result is successfully delivered.
What is the duration of the data file?
DATA FILE: FFT-analyzer_Electric-engine.dxd
In DewesoftX you can see the duration of the file in the Analyze grid

In the data file, you can see the time if you add the formula which presents relative time

But for some files, this might be problematic because the relative time doesn’t start with zero. 
One way to calculate the duration is to add the following formulas

Let’s see how to do it with the AI
Open the file, and export just the first channel with it a resample, for example, 1024 Hz to have a smaller file
Open with the AI and just ask the question: What is the duration of the data file?
After some attempts the result will be:
The data is now correctly loaded, with "Time (s)" and "AI 1/2RO (g)" as the columns. I will now calculate the duration of the dataset by finding the difference between the last and first timestamps in the "Time (s)" column. The duration of the data in the file is approximately 26.74 seconds. This is the time span covered by the data, from the first recorded timestamp to the last.
What is the maximum value amplitude and at which frequency of the “2RO/AmplFFT” channel within the frequency range of 5672 Hz to 6239?
DATA FILE: FFT-analyzer_Electric-engine.dxd (see description of the datafile)
Add MAX marker on 2D graf. Enable marker table. The frequency and the amplitude are visible in the table
We have to export the FFT channel, which when exported has a different file format than the standard channel, it is organized in 2 rows one for the Freq (Hz) and one for the FFT analyzer 1/2RO/AmplFFT (g (Z peak)) Voltage. So we must give this information to the AI to correctly use the file.
Let’s do it with the AI:
The data in the file starts with 8 lines of headers that are not required for the analysis. We begin by skipping these lines and loading the remaining data into a format that can be manipulated.
Transformation: The data is initially arranged with frequencies in the first row and amplitude values in the second row. Our goal is to convert these two rows into two separate columns: one for frequency and one for amplitude.
Result: After the transformation, we generate a plot with the frequency on the x-axis and amplitude on the y-axis to visualize the data.
Step-by-Step Instructions with the Exact Prompts:
Begin by uploading the file to the system. Once the file is uploaded, use this prompt to read and skip the first 8 lines. In the next section you will see an optimized version of this prompt that works with multiple channels:
Skip the first 8 lines of the file during loading (if you don’t flag the export header you can avoid it)
Use the first value in the first row as the header for the first column (Frequency).
Use the first value in the second row as the header for the second column (Amplitude).
The remaining values in the first row become the values for the "Frequency" column.
The remaining values in the second row become the values for the "Amplitude" column.
Remove any unnecessary rows and clean the data.
Now the AI has a clean dataset to work on. Let’s ask: What is the maximum value amplitude and at which frequency within the range of 5672 Hz to 6239 Hz?
The answer will be something like:
The maximum amplitude within the frequency range of 5672 Hz to 6239 Hz is approximately 0.0691, and it occurs at a frequency of 5910.94 Hz
Let’s ask for a graph: Please plot a graph with the peak:
Here is the plot of amplitude versus frequency within the specified range (5672 Hz to 6239 Hz), with the peak amplitude highlighted. Let me know if you need any further adjustments!

Now please plot the max peak for the full dataset

Can we get the maximum of all the FFT channels (“2RO/AmplFFT”, “2AX/AmplFFT”, “3RV/AmplFFT”, “3AX/AmplFFT”?
DATA FILE: FFT-analyzer_Electric-engine.dxd (see description of the datafile)
Enable Max hold.

This will create “Overall Max FFT” channels for all inputs. You can present this data on a 2D graph. Note that this will be calculated on the whole spectrum so you have to limit Frequency to a similar frequency as on FFT Graph.

Cross-channel array statistics will allow you to get MAX. (But you have to enable this in the Settings first). The same as before the output will be named as “Max value”. This will be vector from 0Hz to 12798Hz which is not out interest as we know that the operating frequencies are between 5672Hz and 6239Hz.

You can find the maximum of the “Max value” vector with Math. MAX searches for the maximum value in the vector. MAXPOS searches for the position (in our case Frequency) at which the MAX appears.

… but the result will be biased as the beginning and end of the data file have values that don't interest you. You will add those formulas

To limit the searching area you will limit the input vector to that region

5672 / 1,56 = 3635,897
6239 / 1,56 = 3999,359
1,56 is Df or the resolution of FFT

So you will modify formulas according to this.

In the screenshot, you can see that the overall amplitude value belongs to “2RO/AmplFFT” channel and complies with the MAX marker.

Let’s try with the AI with the right prompt:
Skip Initial Rows: Skip the first 8 lines while loading the file.
Reshape Data: Use the first value of each row as the header for the columns. Place the remaining values of each row under their corresponding new column headers.
Data Cleaning: Remove any unnecessary or incomplete rows (e.g., rows with missing values or NaNs).
Output: Return the cleaned and structured data.

Please, Plot a graph between 5672Hz and 6239Hz
Here is the graph showing the FFT analysis between 5672Hz and 6239Hz for the different channels.

Can you calculate the max amplitude?
The maximum amplitudes for each FFT channel within the frequency range of 5672Hz to 6239Hz are as follows:
FFT analyser 1/2RO/AmplFFT (g (Z peak)): 0.069116
FFT analyser 1/2AX/AmplFFT (g (Z peak)): 0.052397
FFT analyser 1/3RV/AmplFFT (g (Z peak)): 0.004412
FFT analyser 1/3AX/AmplFFT (g (Z peak)): 0.004497
Let me know if you need further analysis!
Can you calculate the max frequency?
The frequencies corresponding to the maximum amplitudes for each FFT channel within the range of 5672Hz to 6239Hz are:
FFT analyzer 1/2RO/AmplFFT (g (Z peak)): 5910.94 Hz
FFT analyzer 1/2AX/AmplFFT (g (Z peak)): 5970.31 Hz
FFT analyser 1/3RV/AmplFFT (g (Z peak)): 5782.81 Hz
FFT analyzer 1/3AX/AmplFFT (g (Z peak)): 6101.56 Hz
Let me know if you'd like further details!
Can you visualize the amplitude distribution?
Here is the amplitude distribution for each FFT channel in the frequency range between 5672Hz and 6239Hz. The histograms show how the amplitude values are distributed for each channel

Please plot of amplitude versus frequency within the specified range (5672 Hz to 6239 Hz), with the peak amplitude highlighted and the peak values in the plot
Here is the plot of amplitude versus frequency between 5672 Hz and 6239 Hz, with the peak amplitudes highlighted and their corresponding frequency and amplitude values labeled on the graph.

How many peaks are above 2 Volts?
DATAFILE: Sound_signal.dxd The data file has a lot of peaks at different amplitudes.

We’re wondering how many peaks are above 2 Volts. Firstly we have to create a formula that will return rising edges when the peak is higher than 2 V.

The red signal represents rising edges.

The next step is to count the number of red peaks and output this as a single value, so no matter the yellow cursor the value will be the same.

The formula will return 4.

Let’s try with the AI:
Let’ export as usual the data, for the channels we need, in this case just the first channel AI 1
This export is not an FFT so is already in column and the header is made of just 7 lines (but during the export you can avoid it removing the flag), so the prompt will be extra simple. Let’ ask first for all the peaks above 2 Volts (21):
Skip the first 7 lines while loading the file.
Plot a graph showing the relationship between Time (s) and AI 1 Voltage, highlighting the peaks above the 2 Volts and tell me how many are
The graph shows the relationship between Time (s) and AI 1 Voltage, with the peaks above 2 volts highlighted in red. The number of peaks above 2 volts is 21.

Now ask just for the max peaks (4) if you like:
Plot highlighting the max peaks above the 2 Volts and tell me how many are
The graph highlights the maximum peaks above 2 volts, marked in red. The number of maximum peaks above 2 volts is 4.

What is the value of the AI 1 signal at the third peak?
DATAFILE: Sound_signal.dxd
Following the previous post-processing you have to create a formula that will count peaks but this time the output shouldn’t be a single value but rather a normal sync value. 
The next step is to latch/hold the value at the third peak. We can output the value as a single value.

You can see the same value comparing the digital meter if you manually position to third peak with your mouse pointer.

Let’s try with the AI:
Let's export as usual the data, for the channels we need, in this case just the first channel AI 1
This export is not an FFT so is already in the column and the header is made of just 7 lines (but during the export you can avoid removing the flag), so the prompt will be extra simple :
Skip the first 7 lines while loading the file.
Plot a graph showing the relationship between Time (s) and AI 1 Voltage, highlighting only the top peaks
Find the value of the third max voltage peak from the left in the graph, based on the voltage over 2 volts?
Here is the plot showing the relationship between Time (s) and AI 1 Voltage, with the top peaks highlighted.

The value of the third maximum voltage peak from the left, based on the voltage being over 2 volts, is approximately 2.06 volts. Let me know if you need anything else!
What is the exact number?
The exact value of the third maximum voltage peak is 2.05535888671875 volts.
Please, plot a graph and highlight it
Here is the plot with the third maximum voltage peak highlighted in red. If you need any further analysis or adjustments, feel free to let me know!
