Test pyProfile

New class implementation (2020/06/25)

Test new implementation of class from profile methods to objects, in analogy to what is done with pySurf. Here we test and document.

The main class is Profile. Little is implemented for readers, it can be easily initialized with x and y.

Helper function make_signal (see Appendix or make_signal? for details) can be used to generate a (sinusoid-based) test profile.

Units can be set. Use Profile methods:

x and y can be retrieved as P.x and P.y, or with x,y = P()

Test profile functions

Make different test profiles.

BEWARE: units in algebraic operations are not verified, usually the ones from first term are used for result, this may change in future.

Create two similar quadratic profiles a and b with different x values:

Algebraic operations can be performed on Profile objects.

Resampling can be directly accessed by resample method, but there is usually no need to perform, because it is automatically handled by algebraic operations (resample on first by default, ):

Appendix: make_signal

Creo un segnale (reale). Ne creo una copia sottocampionata per test, ovviamente sono tutti valori reali.

Quindi ora posso creare segnali complessi arbitrari usando due segnali con stessa frequenza e fase diversa su reale e immaginario.

Questo ovviamente significa che posso usare una serie di ca N/2 armoniche per descrivere interamente il segnale, a patto di fornire anche la fase.

Option minus_one