def read(path='~/.sxs/catalog', download_if_not_found=True):
    """Read a local copy of the SXS catalog from Zenodo

    Parameters
    ==========
    path: str, optional [defaults to '~/.sxs/catalog']
        Absolute or relative path to JSON file containing the complete catalog.  If the path does
        not end with '.json', it is assumed to be a directory containing a 'private_catalog.json',
        'public_catalog.json', or 'catalog.json' file.
    download_if_not_found: bool, optional [defaults to True]
        If the above path does not contain any of the recognized files, the public version will
        be downloaded from https://data.black-holes.org/catalog.json.

    Returns
    =======
    catalog: dict
       This is the dictionary corresponding to the contents of the JSON file.  Note that, as
       described in `sxs.zenodo.catalog.catalog_file_description`, the top level contains just
       four keys: 'catalog_file_description', 'modified', 'records', and 'simulations'.  You may
       want to follow this function call with something like
           records, simulations = catalog['records'], catalog['simulations']

    """
    from os.path import expanduser, join, exists, dirname
    import json
    from ..utilities import download
    path = expanduser(path)
    if not path.endswith('.json'):
        new_path = join(path, 'private_catalog.json')
        if not exists(new_path):
            new_path = join(path, 'public_catalog.json')
        if not exists(new_path):
            new_path = join(path, 'catalog.json')
        path = new_path
    if not exists(path):
        msg = "Could not find catalog file in '{0}'.".format(dirname(path))
        if download_if_not_found:
            print(msg + '  Downloading to that directory now.')
            download('https://data.black-holes.org/catalog.json', path)
        else:
            raise ValueError(msg)
    with open(path, 'r') as f:
        catalog = json.load(f)
    return catalog
