It's strange that basic things don't reach anyone.

I'm tired of explaining that the program I'm working with turns the signal of the first period into a periodic signal, regardless of whether there is a phase gap or not.

Here is an example from a textbook of such a signal and a Fourier expansion formula. Everything is painted over 60 years ago, I think there are earlier publications. The first period just characterizes the speed distortions that are not detected by any other testing methods. Spectrum analyzers are not able to measure the instantaneous spectrum of a musical signal - they show an average value - analogous - the average temperature of patients in a hospital.

Distortion meters measure the level of distortion in a steady state.

If someone does not understand basic things, then what Graham unsuccessfully explained in his time, then there is nothing to be angry and offended - pass by, this is not for you.

It is strange that you still do not understand that you have a part of the transient process that is not periodic in the analysis window and the simulator tries to decompose it into a spectrum like a periodic signal. And so in the window on the first period, one part of the envelope falls, on the second - another and then on the descending one. And this is despite the fact that when a real signal is sent from a real source, there should not be a step at the input that provokes such a transition process.

When evaluating distortions by measuring THD or IMD, we essentially get data on the nonlinearity of the transfer characteristic of the device, that is, nonlinear distortions. And you are trying to measure linear distortions together with non-linear ones in one set, while not even being able to interpret the results obtained, since you did not give any mathematical calculations.

Taken together, these facts put you in the awkward position of a person who does not have the proper understanding for the proper use of the tools at his disposal and tries to measure angles with a caliper instead of a protractor.