def get_olfa_config(config_filename=''):
    '\n    Find and parse olfactometer configuration JSON.\n\n    :param config_filename: string with path to configuration.\n    :return: returns a tuple with (config_fn, config_dict)\n    :rtype: tuple\n    '
    if (not config_filename):
        logging.info('No olfa config file specified, looking for default in OLFA_CONFIG os variable')
        config_filename = os.environ.get('OLFA_CONFIG')
        if (not config_filename):
            config_filename = CONFIG_FILENAME_DEFAULT
            logging.info(('No OLFA_CONFIG os variable, trying with legacy default ' + CONFIG_FILENAME_DEFAULT))
    if os.path.exists(config_filename):
        with open(config_filename) as f:
            config = json.load(f)
    else:
        raise Exception('No olfactometer configuration file found at {0}'.format(config_filename))
    return (config_filename, config)
Find and parse olfactometer configuration JSON.

:param config_filename: string with path to configuration.
:return: returns a tuple with (config_fn, config_dict)
:rtype: tuple
def get_olfa_config(config_filename=):
    '\n    Find and parse olfactometer configuration JSON.\n\n    :param config_filename: string with path to configuration.\n    :return: returns a tuple with (config_fn, config_dict)\n    :rtype: tuple\n    '
    if (not config_filename):
        logging.info('No olfa config file specified, looking for default in OLFA_CONFIG os variable')
        config_filename = os.environ.get('OLFA_CONFIG')
        if (not config_filename):
            config_filename = CONFIG_FILENAME_DEFAULT
            logging.info(('No OLFA_CONFIG os variable, trying with legacy default ' + CONFIG_FILENAME_DEFAULT))
    if os.path.exists(config_filename):
        with open(config_filename) as f:
            config = json.load(f)
    else:
        raise Exception('No olfactometer configuration file found at {0}'.format(config_filename))
    return (config_filename, config)