# Path: thrifty/setting_parsers.py
# _FLOAT_REGEX = r'[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][-+]?\d+)?'
# _RANGE_REGEX = r'\s*-\s*'
# _FREQ_MAG_REGEX = r'[kKmM]?'
# _HERTZ_REGEX = r'[hH][zZ]'
# _FREQ_RANGE_PATTERN = re.compile(r'^({0})(?:{1}({0}))?\s*({2})({3})?$'.format(
#     _FLOAT_REGEX, _RANGE_REGEX, _FREQ_MAG_REGEX, _HERTZ_REGEX), re.IGNORECASE)
# _THRESHOLD_SYMBOL = r'constant|c|snr|s|stddev|d|'
# _THRESHOLD_TERM = r'^\s*(?=\S)(?:({0})\s*\*?\s*)?({1})\s*$'.format(
#     _FLOAT_REGEX, _THRESHOLD_SYMBOL)
# _SI_PREFIXES = {
#     'y': 1e-24,  # yocto
#     'z': 1e-21,  # zepto
#     'a': 1e-18,  # atto
#     'f': 1e-15,  # femto
#     'p': 1e-12,  # pico
#     'n': 1e-9,   # nano
#     'u': 1e-6,   # micro
#     'm': 1e-3,   # mili
#     'c': 1e-2,   # centi
#     'd': 1e-1,   # deci
#     'k': 1e3,    # kilo
#     'M': 1e6,    # mega
#     'G': 1e9,    # giga
#     'T': 1e12,   # tera
#     'P': 1e15,   # peta
#     'E': 1e18,   # exa
#     'Z': 1e21,   # zetta
#     'Y': 1e24,   # yotta
# }
# def metric_float(string):
# def freq_range(string):
# def normalize_freq_range(range_, bin_freq):
# def threshold(string):


import logging
from collections import namedtuple
from thrifty import setting_parsers
"""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals




# Setting definition
Definition = namedtuple('SettingDefinition', 'args parser default description')

DEFINITIONS = {
    'sample_rate': Definition(
        ['--sample-rate', '-s'],
        setting_parsers.metric_float,
        '2.4M',
        "Sample rate (sps)"
    ),

    'chip_rate': Definition(
        ['--chip-rate', '-p'],
        setting_parsers.metric_float,
        '0.999707M',
        "Rate at which the code is being transmitted (bps)"
    ),

    'tuner_freq': Definition(
        ['--freq', '-f'],

# Path: thrifty/setting_parsers.py
# _FLOAT_REGEX = r'[-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][-+]?\d+)?'
# _RANGE_REGEX = r'\s*-\s*'
# _FREQ_MAG_REGEX = r'[kKmM]?'
# _HERTZ_REGEX = r'[hH][zZ]'
# _FREQ_RANGE_PATTERN = re.compile(r'^({0})(?:{1}({0}))?\s*({2})({3})?$'.format(
#     _FLOAT_REGEX, _RANGE_REGEX, _FREQ_MAG_REGEX, _HERTZ_REGEX), re.IGNORECASE)
# _THRESHOLD_SYMBOL = r'constant|c|snr|s|stddev|d|'
# _THRESHOLD_TERM = r'^\s*(?=\S)(?:({0})\s*\*?\s*)?({1})\s*$'.format(
#     _FLOAT_REGEX, _THRESHOLD_SYMBOL)
# _SI_PREFIXES = {
#     'y': 1e-24,  # yocto
#     'z': 1e-21,  # zepto
#     'a': 1e-18,  # atto
#     'f': 1e-15,  # femto
#     'p': 1e-12,  # pico
#     'n': 1e-9,   # nano
#     'u': 1e-6,   # micro
#     'm': 1e-3,   # mili
#     'c': 1e-2,   # centi
#     'd': 1e-1,   # deci
#     'k': 1e3,    # kilo
#     'M': 1e6,    # mega
#     'G': 1e9,    # giga
#     'T': 1e12,   # tera
#     'P': 1e15,   # peta
#     'E': 1e18,   # exa
#     'Z': 1e21,   # zetta
#     'Y': 1e24,   # yotta
# }
# def metric_float(string):
# def freq_range(string):
# def normalize_freq_range(range_, bin_freq):
# def threshold(string):


# Path: thrifty/settings.py
import logging
from collections import namedtuple
from thrifty import setting_parsers

"""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals




# Setting definition
Definition = namedtuple('SettingDefinition', 'args parser default description')

DEFINITIONS = {
    'sample_rate': Definition(
        ['--sample-rate', '-s'],
        setting_parsers.metric_float,
        '2.4M',
        "Sample rate (sps)"
    ),

    'chip_rate': Definition(
        ['--chip-rate', '-p'],
        setting_parsers.metric_float,
        '0.999707M',
        "Rate at which the code is being transmitted (bps)"
    ),

    'tuner_freq': Definition(
        ['--freq', '-f'],

        setting_parsers.metric_float,