smses.append(sdr.mse())
        hmses.append(hdr.mse())
        thsemismses.append(thsemisdr.mse())
        thf1mses.append(thf1dr.mse())
        thf2mses.append(thf2dr.mse())
        thf3mses.append(thf3dr.mse())

        ssms.append(sdr.smooth(ods[i]))
        hsms.append(hdr.smooth(ods[i]))
        thsemissms.append(thsemisdr.smooth(ods[i]))
        thf1sms.append(thf1dr.smooth(ods[i]))
        thf2sms.append(thf2dr.smooth(ods[i]))
        thf3sms.append(thf3dr.smooth(ods[i]))

        slrepvs.append(sdr.lrepv(ods[i], 100))
        hlrepvs.append(hdr.lrepv(ods[i], 100))
        thsemislrepvs.append(thsemisdr.lrepv(ods[i], 100))
        thf1lrepvs.append(thf1dr.lrepv(ods[i], 100))
        thf2lrepvs.append(thf2dr.lrepv(ods[i], 100))
        thf3lrepvs.append(thf3dr.lrepv(ods[i], 100))

    snrss = [ssnrs, hsnrs, thsemissnrs, thf1snrs, thf2snrs, thf3snrs]
    snrsn = [
        'ssnrs', 'hsnrs', 'thsemissnrs', 'thf1snrs', 'thf2snrs', 'thf3snrs'
    ]
    msess = [smses, hmses, thsemismses, thf1mses, thf2mses, thf3mses]
    msesn = [
        'smses', 'hmses', 'thsemismses', 'thf1mses', 'thf2mses', 'thf3mses'
    ]
Пример #2
0
    ssms = []
    hsms = []
    slrepvs = []
    hlrepvs = []
    tds = [s.createSin(50, 60, 0), s.createPulse(50, 60, 0), s.createSpikes(0)]
    for i in range(len(tds)):
        sdr = DenoiseRsult(tds[i], spds[i])
        hdr = DenoiseRsult(tds[i], hpds[i])
        ssnrs.append(sdr.snr())
        hsnrs.append(hdr.snr())
        smses.append(sdr.mse())
        hmses.append(hdr.mse())

        ssms.append(sdr.smooth(ods[i]))
        hsms.append(hdr.smooth(ods[i]))
        slrepvs.append(sdr.lrepv(ods[i], 32))
        hlrepvs.append(hdr.lrepv(ods[i], 32))
    print('ssnrs = {0}'.format(ssnrs))
    print('hsnrs = {0}'.format(hsnrs))
    print('smses = {0}'.format(smses))
    print('hmses = {0}'.format(hmses))
    print()
    print('ssms = {0}'.format(ssms))
    print('hsms= {0}'.format(hsms))
    print('slrepvs = {0}'.format(slrepvs))
    print('hlrepvs = {0}'.format(slrepvs))

    x = [x for x in range(1000)]
    plt.figure()
    plt.subplot(3, 2, 1)
    plt.plot(x, spds[0])