# Seismogram Rearrangement as a Perspective Basis for Defining New Attributes
## 2 Materials and Methods
### Conversion of Seismogram into R-Envelope  
Having a sequence of elements (e.g., numbers), which differ from each other only in size, it is possible to apply a mapping that arranges the elements from a random sequence into an ordered one, which seems to be an interesting mathematical aspect, elaborated in [10]. The first step of the procedure is the decomposition of a raw seismogram \(s(t)\) into EFs and SFs, according to (9)  
\[s(t)\ =\sum_{m=1}^{N}\mathrm{EF}_{m}=\sum_{m=1}^{N}\bigl{(}\mathrm{SF}_{m}^{+}+ \mathrm{SF}_{m}^{-}\bigr{)}=\sum_{m}^{N}sf_{m}^{+}(t)\ \ +\sum_{m}^{N}sf_{m}^{-}(t) \tag{11}\]  
Approximating SFs by triangular impulses, as described earlier, we get (Figure 3):  
\[s(t)\ =\sum_{m}^{N}p_{m}\!:\!i\bigl{(}a_{m}^{+}\!\!\cdot\!t-t_{m}^{+}\bigr{)}\ +\!\sum_{m}^{N}n_{m}\!\cdot\!i\bigl{(}a_{m}^{-}\!\!\cdot\!t-t_{m}^{-}\bigr{)} \tag{12}\]  
Figure 4: An elementary fluctuation (EF) is decomposed into two alternate single fluctuations (SF), positive SF\({}^{+}\) (in red solid line) and negative SF\({}^{-}\) (in blue solid line). Key parameters of EF are indicated: peak amplitudes \(p_{k}\) (positive) and \(n_{k}\) (negative) and \(t\)-axis crossings (\(t_{k-1}\), \(t_{k}\), \(t_{k+1}\)). The shape function \(i(t)\), in this case the triangle impulse, approximates both SFs, renormalized by SFs parameters: peak amplitudes (\(p_{k}\), \(n_{k}\)) and durations (\(\Delta t_{k}{}^{+}=t_{k}-t_{k-1}\), \(\Delta t_{k}{}^{-}=t_{k+1}-t_{k}\)). Symmetrical and asymmetrical cases of approximating triangles are presented, depending on the position of peak amplitudes of SFs within \(\Delta t_{k}{}^{+}\) and \(\Delta t_{k}{}^{-}\). Numerical marks on both axes show the position of this wavelet (EF) in the seismogram on Figure 2.  
Graphical and numerical Approximations are equivalent. The graphical is more apparent to humans, while the numerical is more \"apparent\" to machines (computers). Graphical procedure is actually a combination of graphical and numerical one, very suitable in developing computer programs. Scale factor \(a_{m}\) (12) is closely related to the \"pitch\" [53] of seismic signals. Variations of \(a_{m}\) indicate a repeating rate of fluctuations. The numerical variant of Equation (12) is a sequence of numbers:  
\[S_{t}=\{(t_{51},a_{1}),(t_{52},a_{2}),(t_{53},a_{3}),\ \cdots\,(t_{5K},a_{K})\}= \{(t_{5K},a_{k})\}_{k=1}^{K=2N} \tag{13}\]  
representing time shifts (\(t_{5K}\)) and peak amplitudes (\(a_{k}\)) of respective triangles:  
\[S_{\Delta t}=\{(\Delta t_{1},a_{1}),(\Delta t_{2},a_{2}),(\Delta t_{3},a_{3}), \ \cdots\,(\Delta t_{K},a_{K})\}=\{(\Delta t_{k},a_{k})\}_{k=1}^{K} \tag{14}\]  
with durations and peak amplitudes of respective triangles. The upper limit of index \(k\) is \(2N\), since there are \(N\) EFs and \(2N\) SFs. Combining the Equations (13) and (14) we get:  
\[S=\{(a_{1},0),(a_{2},\Delta t_{1}),(a_{3},\Delta t_{1}+\Delta t_{2}),\cdots\}_ {k=1}^{K}=\left\{\left(a_{k},\ t_{5K}=\sum_{j=1}^{k-1}\Delta t_{j}\right) \right\}_{k=1}^{K} \tag{15}\]  
We then separate impulses with positive and negative amplitudes, making two subsets:  
\[S_{\Delta t}=\{(\Delta t_{k},a_{k})\}_{k=1}^{K}=S_{+}+S_{-}=\left\{\left( \Delta t_{k}^{+},a_{k}^{+}\right)\right\}_{k=1}^{N}+\left\{\left(\Delta t_{k} ^{-},a_{k}^{-}\right)\right\}_{k=1}^{K}=P+N \tag{16}\]  
The central step of transformation is rearrangement of positive and negative triangles in respective ordered sets by increasing or decreasing peak amplitudes (Figure 3):  
\[S_{+}^{(a)}=\{a_{1},a_{2},a_{3},\cdots,a_{K}\}\stackrel{{ sort}}{{\to}}\left\{a_{(1)},a_{(2)},a_{(3)},\cdots,a_{(K)} \right\}=\{p_{1},p_{2},\ldots,p_{K}\}=P \tag{17}\]  
\[S_{-}^{(a)}=\{a_{1},a_{2},a_{3},\cdots,a_{L}\}\stackrel{{ sort}}{{\to}}\left\{a_{(1)},a_{(2)},a_{(3)},\cdots,a_{(L)} \right\}=\{n_{1},n_{2},\ldots,n_{L}\}=N \tag{18}\]  
where only amplitudes (superscript (\(a\)) in \(S\)) are considered. Mathematical details describing only the rearrangement algorithm are omitted here for brevity.