# Path: ripyl/sigproc.py
# def min_rise_time(sample_rate):
#     '''Compute the minimum rise time for a sample rate
# 
#     This function is useful to determine the minimum rise time acceptable as parameters
#     to filter_waveform() and synth_wave(). You should use a scale factor to incease the rise
#     time at least slightly (e.g. rt * 1.01) to avoid raising a ValueError in those functions
#     due to floating point inaccuracies.
# 
#     sample_rate (number)
#         The sample rate to determine rise time from
# 
#     Returns a float for the minimum acceptable rise time.
#     '''
# 
#     return 0.35 * 2.0 / sample_rate
# 
# Path: ripyl/util/color.py
# def note(t): return t
# 
# def success(t): return t
# 
# def error(t): return t


import sys
import random
import ripyl
import ripyl.protocol.infrared as ir
import ripyl.sigproc as sigp
import ripyl.streaming as stream
import ripyl.util.eng as eng
    import matplotlib
    import ripyl.util.plot as rplot
    import ripyl.protocol.usb as usb
    import ripyl.protocol.spi as spi
    import ripyl.protocol.i2s as i2s
    import ripyl.protocol.i2c as i2c
    import ripyl.protocol.i2c as i2c
    import ripyl.protocol.lm73 as lm73
    import ripyl.protocol.uart as uart
    import ripyl.protocol.ps2 as ps2
    import ripyl.protocol.iso_k_line as kline
    import ripyl.protocol.infrared.rc5 as rc5
    import ripyl.protocol.infrared.rc6 as rc6
    import ripyl.protocol.infrared.nec as nec
    import ripyl.protocol.infrared.sirc as sirc
    import ripyl.protocol.can as can
    import ripyl.protocol.lin as lin
    import ripyl.protocol.ethernet as ether
    import ripyl.protocol.j1850 as j1850
    import ripyl.protocol.j1850 as j1850
from optparse import OptionParser
from collections import OrderedDict
from ripyl.sigproc import min_rise_time
from ripyl.util.color import note, success, error
        annotations = None if options.no_annotation else annotations
        plotter.plot(channels, annotations, title, label_format=plot_params['label_format'], show_names=options.show_names, \
            ylim=ylim, xlim=xlim)

        if sample_points is not None:
            # Each sample point is a pair with the first element being the start of the bit
            # and the second is the sample point
            #print('### plotting sample points', len(sample_points))
            sp_height = [2.0] * len(sample_points)
            sample_times = [sp[1] for sp in sample_points]
            plotter.axes[-1].plot(sample_times, sp_height, color='r', marker='o')

            sp_height = [1.7] * len(sample_points)
            sample_times = [sp[0] for sp in sample_points]
            plotter.axes[-1].plot(sample_times, sp_height, color='b', marker='o')


        if options.save_file is None:
            plotter.show()
        else:
            plotter.save_plot(options.save_file, options.figsize)

def report_results(decoded_recs, orig_messages, protocol_params, wave_params, decode_success, extract_func=None):

    # Report results
    print('\nProtocol parameters:')
    print('  Messages:')
    for msg in orig_messages:
        print(note('   {}'.format(msg)))
    for k, v in protocol_params.iteritems():

# Path: ripyl/sigproc.py
# def min_rise_time(sample_rate):
#     '''Compute the minimum rise time for a sample rate
# 
#     This function is useful to determine the minimum rise time acceptable as parameters
#     to filter_waveform() and synth_wave(). You should use a scale factor to incease the rise
#     time at least slightly (e.g. rt * 1.01) to avoid raising a ValueError in those functions
#     due to floating point inaccuracies.
# 
#     sample_rate (number)
#         The sample rate to determine rise time from
# 
#     Returns a float for the minimum acceptable rise time.
#     '''
# 
#     return 0.35 * 2.0 / sample_rate
# 
# Path: ripyl/util/color.py
# def note(t): return t
# 
# def success(t): return t
# 
# def error(t): return t


# Path: ripyl_demo.py
import sys
import random
import ripyl
import ripyl.protocol.infrared as ir
import ripyl.sigproc as sigp
import ripyl.streaming as stream
import ripyl.util.eng as eng
    import matplotlib
    import ripyl.util.plot as rplot
    import ripyl.protocol.usb as usb
    import ripyl.protocol.spi as spi
    import ripyl.protocol.i2s as i2s
    import ripyl.protocol.i2c as i2c
    import ripyl.protocol.i2c as i2c
    import ripyl.protocol.lm73 as lm73
    import ripyl.protocol.uart as uart
    import ripyl.protocol.ps2 as ps2
    import ripyl.protocol.iso_k_line as kline
    import ripyl.protocol.infrared.rc5 as rc5
    import ripyl.protocol.infrared.rc6 as rc6
    import ripyl.protocol.infrared.nec as nec
    import ripyl.protocol.infrared.sirc as sirc
    import ripyl.protocol.can as can
    import ripyl.protocol.lin as lin
    import ripyl.protocol.ethernet as ether
    import ripyl.protocol.j1850 as j1850
    import ripyl.protocol.j1850 as j1850
from optparse import OptionParser
from collections import OrderedDict
from ripyl.sigproc import min_rise_time
from ripyl.util.color import note, success, error

        annotations = None if options.no_annotation else annotations
        plotter.plot(channels, annotations, title, label_format=plot_params['label_format'], show_names=options.show_names, \
            ylim=ylim, xlim=xlim)

        if sample_points is not None:
            # Each sample point is a pair with the first element being the start of the bit
            # and the second is the sample point
            #print('### plotting sample points', len(sample_points))
            sp_height = [2.0] * len(sample_points)
            sample_times = [sp[1] for sp in sample_points]
            plotter.axes[-1].plot(sample_times, sp_height, color='r', marker='o')

            sp_height = [1.7] * len(sample_points)
            sample_times = [sp[0] for sp in sample_points]
            plotter.axes[-1].plot(sample_times, sp_height, color='b', marker='o')


        if options.save_file is None:
            plotter.show()
        else:
            plotter.save_plot(options.save_file, options.figsize)

def report_results(decoded_recs, orig_messages, protocol_params, wave_params, decode_success, extract_func=None):

    # Report results
    print('\nProtocol parameters:')
    print('  Messages:')
    for msg in orig_messages:
        print(note('   {}'.format(msg)))
    for k, v in protocol_params.iteritems():

        print(note('  {}: {}'.format(k, v)))