<jupyter_start><jupyter_text>MUSIC<jupyter_code>import dsatools
from dsatools import operators
from dsatools import utilits as ut
import matplotlib.pyplot as plt
from dsatools._base._subspace import *

signal1 = dsatools.generator.harmonics(amplitude=[1],
                    f0=[1,2,3,3.1,2.04],
                    delta_f=[0.4],fs=10)
signal0 = dsatools.generator.harmonics(amplitude=[1],
                    f0=[1,2,3],
                    delta_f=[0.0],fs=10)

ut.probe(signal1); plt.show()
ut.probe(signal0); plt.show()

order = 15
x = signal1
noise_space = music(signal1, order, mode='full', lags=None)
psd = subspace2psd(noise_space )
plt.plot(psd); plt.show()

order = 3
x = signal0
noise_space = music(signal0, order, mode='full', lags=None)
freqs = subspace2freq(noise_space,order )
print(freqs)<jupyter_output><empty_output><jupyter_text>EV<jupyter_code>import dsatools
from dsatools import operators
from dsatools import utilits as ut
import matplotlib.pyplot as plt
from dsatools._base._subspace import *

signal1 = dsatools.generator.harmonics(amplitude=[1],
                    f0=[1,2,3,3.1,2.04],
                    delta_f=[0.4],fs=10)
signal0 = dsatools.generator.harmonics(amplitude=[1],
                    f0=[1,2,3],
                    delta_f=[0.0],fs=10)

ut.probe(signal1); plt.show()
ut.probe(signal0); plt.show()

order = 15
x = signal1
noise_space = ev(x, order, mode='full', lags=None)
psd = subspace2psd(noise_space )
plt.plot(psd); plt.show()

order = 3
x = signal0
noise_space = ev(x, order, mode='full', lags=None)
freqs = subspace2freq(noise_space,order )
print(freqs)<jupyter_output><empty_output><jupyter_text>Pisarenko<jupyter_code>import dsatools
from dsatools import operators
from dsatools import utilits as ut
import matplotlib.pyplot as plt
from dsatools._base._subspace import *

signal1 = dsatools.generator.harmonics(amplitude=[1],
                    f0=[1,2,3,3.1,2.04],
                    delta_f=[0.4],fs=10)
signal0 = dsatools.generator.harmonics(amplitude=[1],
                    f0=[1,2,3],
                    delta_f=[0.0],fs=10)

ut.probe(signal1); plt.show()
ut.probe(signal0); plt.show()

order = 190
x = signal1
noise_space = pisarenko(x, order, mode='full')
psd = subspace2psd(noise_space )
plt.plot(psd); plt.show()

order = 3
x = signal0
noise_space = pisarenko(x, order, mode='full')
freqs = subspace2freq(noise_space,order )
print(freqs)<jupyter_output><empty_output><jupyter_text>Pisarenko_cor<jupyter_code>import dsatools
from dsatools import operators
from dsatools import utilits as ut
import matplotlib.pyplot as plt
from dsatools._base._subspace import *

signal1 = dsatools.generator.harmonics(amplitude=[1],
                    f0=[1,2,3,3.1,2.04],
                    delta_f=[0.4],fs=10)
signal0 = dsatools.generator.harmonics(amplitude=[1],
                    f0=[1,2,3],
                    delta_f=[0.0],fs=10)

ut.probe(signal1); plt.show()
ut.probe(signal0); plt.show()

order = 190
x = signal1
noise_space = pisarenko_cor(x, order, mode='full')
psd = subspace2psd(noise_space )
plt.plot(psd); plt.show()

order = 3
x = signal0
noise_space = pisarenko_cor(x, order, mode='covar')
freqs = subspace2freq(noise_space,order )
print(freqs)<jupyter_output><empty_output><jupyter_text>minvariance<jupyter_code>import dsatools
from dsatools import operators
from dsatools import utilits as ut
import matplotlib.pyplot as plt
from dsatools._base._subspace import *

signal1 = dsatools.generator.harmonics(amplitude=[1],
                    f0=[1,2,3,3.1,2.04],
                    delta_f=[0.4],fs=10)
signal0 = dsatools.generator.harmonics(amplitude=[1],
                    f0=[1,2,3],
                    delta_f=[0.0],fs=10)

ut.probe(signal1); plt.show()
ut.probe(signal0); plt.show()

order = 190
x = signal1
noise_space = minvariance(x, order, mode='full')
psd = subspace2psd(noise_space )
plt.plot(psd); plt.show()

order = 3
x = signal0
noise_space = minvariance(x, order, mode='full')
freqs = subspace2freq(noise_space,order )
print(freqs)<jupyter_output><empty_output><jupyter_text>kernel_noisespace linear<jupyter_code>import dsatools
from dsatools import operators
from dsatools import utilits as ut
import matplotlib.pyplot as plt
from dsatools._base._subspace import *

signal1 = dsatools.generator.harmonics(amplitude=[1],
                    f0=[1,2,3,3.1,2.04],
                    delta_f=[0.4],fs=10)
signal0 = dsatools.generator.harmonics(amplitude=[1],
                    f0=[1,2,3],
                    delta_f=[0.0],fs=10)

ut.probe(signal1); plt.show()
ut.probe(signal0); plt.show()

order = 190
x = signal1
noise_space = kernel_noisespace(x, order, mode='full', kernel='linear',kpar=1, use_ev=False)
psd = subspace2psd(noise_space )
plt.plot(psd); plt.show()

order = 3
x = signal0
noise_space = kernel_noisespace(x, order, mode='full', kernel='linear',kpar=1, use_ev=False)
freqs = subspace2freq(noise_space,order )
print(freqs)<jupyter_output><empty_output><jupyter_text>kernel_noisespace rbf<jupyter_code>import dsatools
from dsatools import operators
from dsatools import utilits as ut
import matplotlib.pyplot as plt
from dsatools._base._subspace import *

signal1 = dsatools.generator.harmonics(amplitude=[1],
                    f0=[1,2,3,3.1,2.04],
                    delta_f=[0.4],fs=10)
signal0 = dsatools.generator.harmonics(amplitude=[1],
                    f0=[1,2,3],
                    delta_f=[0.0],fs=10)

ut.probe(signal1); plt.show()
ut.probe(signal0); plt.show()

order = 190
x = signal1
noise_space = kernel_noisespace(x, order, mode='full', kernel='rbf',kpar=0.0001, use_ev=False)
psd = subspace2psd(noise_space )
plt.plot(psd); plt.show()

order = 3
x = signal0
noise_space = kernel_noisespace(x, order, mode='full', kernel='rbf',kpar=0.0001, use_ev=False)
freqs = subspace2freq(noise_space,order )
print(freqs)<jupyter_output><empty_output><jupyter_text>kernel_signalspace<jupyter_code>import dsatools
from dsatools import operators
from dsatools import utilits as ut
import matplotlib.pyplot as plt
from dsatools._base._subspace import *

signal1 = dsatools.generator.harmonics(amplitude=[1],
                    f0=[1,2,3,3.1,2.04],
                    delta_f=[0.4],fs=10)
signal0 = dsatools.generator.harmonics(amplitude=[1],
                    f0=[1,2,3],
                    delta_f=[0.0],fs=10)

ut.probe(signal1); plt.show()
ut.probe(signal0); plt.show()

order = 190
x = signal1
noise_space = kernel_signalspace(x, order, mode='full', kernel='rbf',kpar=0.0001, use_ev=True)
psd = subspace2psd(noise_space )
plt.plot(psd); plt.show()

order = 3
x = signal0
noise_space = kernel_signalspace(x, order, mode='full', kernel='rbf',kpar=0.0001, use_ev=True)
freqs = subspace2freq(noise_space,order )
print(freqs)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1366789667896679, 'fraction_numerical': 0.04457564575645757, 'mean_word_length': 3.986019131714496, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '616822', 'license': 'MIT', 'n_tokens_mistral': 2676, 'n_tokens_neox': 2532, 'n_words': 443, 'path': 'examples/test_subspace.ipynb', 'repo_name': 'diarmaidocualain/dsatools', 'size': '6775'}