Esempio n. 1
0
def create_figure(source, target):
    s, meta = h5load(source)
    s = Signal(s, meta['fs'])
    ax = s.plot_spectrogram(clim=CLIM, ylim=YLIM, title='')
    fig = ax.get_figure()
    fig.tight_layout()
    fig.savefig(target, dpi=600)
Esempio n. 2
0
def create_figure(source, target):
    s, meta = h5load(source)
    s = Signal(s, meta['fs'])
    ax = s.plot_spectrogram(ylim=YLIM, clim=CLIM, title='')
    fig = ax.get_figure()
    #fig.subplots_adjust(bottom=0.2, left=0.2)
    fig.tight_layout()
    fig.savefig(target, dpi=600)
Esempio n. 3
0
def load_signal(path):
    """Load signal.

    :returns: `(signal, method, kernelsize, basename)`

    """
    s, meta = h5load(path)
    s = Signal(s, meta['fs'])
    s.method = meta['method']
    s.kernelsize = meta['kernelsize']
    s.basename = os.path.splitext(os.path.basename(path))[0]
    return s
Esempio n. 4
0
def create_figure(source, target, plotargs=None):
    if plotargs is None:
        plotargs = {}
    s, meta = h5load(source)
    s = Signal(s, meta['fs'])
    ax = s.plot_spectrogram(clim=CLIM,
                            xlim=XLIM,
                            ylim=YLIM,
                            title='',
                            **plotargs)
    fig = ax.get_figure()
    #fig.subplots_adjust(bottom=0.2, left=0.2)
    fig.tight_layout()
    fig.savefig(target, dpi=600)
Esempio n. 5
0
def create_audio(source, target):

    s, meta = h5load(source)
    s = Signal(s, meta['fs'])
    s.normalize().to_wav(target)