Пример #1
0
 def test_plot_instant_freq(self):
     vis = Visualisation()
     t = np.arange(20)
     with self.assertRaises(AttributeError):
         vis.plot_instant_freq(t)
print("Performing decomposition... ")

emd = EMD()
emd.emd(senial_indep_2500_muestras, max_imf=5)

emd_dis = EMD()
emd_dis.emd(senial_indep_2500_muestras_dislexia, max_imf=5)

imfs, res = emd.get_imfs_and_residue()
imfs_dis, res_dis = emd_dis.get_imfs_and_residue()

vis = Visualisation()

print("Sujeto Normal")
vis.plot_imfs(imfs=imfs, residue=res, t=time, include_residue=False)
vis.plot_instant_freq(time, imfs=imfs)
vis.show()

print("Sujeto Dislexia")
vis.plot_imfs(imfs=imfs_dis,
              residue=res_dis,
              t=time_dislex,
              include_residue=False)
vis.plot_instant_freq(time_dislex, imfs=imfs_dis)
vis.show()

# Una vez extraída la señal hago la media:

ut = senial_indep_2500_muestras.mean()  #media

#----dislexia----#