(filename, skip_checksum=False)
return SigMFFile(metadata=metadata, data_file=data_fn, skip_checksum=skip_checksum)
Creates and returns a returns a SigMFFile instance with metadata loaded from the specified file.
    The filename may be that of either a sigmf-meta file, a sigmf-data file, or a sigmf archive.

    Parameters
    ----------
    filename: str
        Path for SigMF dataset with or without extension.
    skip_checksum: bool, default False
        When True will not read entire dataset to caculate hash.

    Returns
    -------
    object
        SigMFFile object with dataset & metadata.
Creates and returns a returns a SigMFFile instance with metadata loaded from the specified file.
    The filename may be that of either a sigmf-meta file, a sigmf-data file, or a sigmf archive.
Creates and returns a returns a SigMFFile instance with metadata loaded from the specified file . The filename may be that of either a sigmf - meta file a sigmf - data file or a sigmf archive .
def fromfile(filename, skip_checksum=False):
    '''
    Creates and returns a returns a SigMFFile instance with metadata loaded from the specified file.
    The filename may be that of either a sigmf-meta file, a sigmf-data file, or a sigmf archive.

    Parameters
    ----------
    filename: str
        Path for SigMF dataset with or without extension.
    skip_checksum: bool, default False
        When True will not read entire dataset to caculate hash.

    Returns
    -------
    object
        SigMFFile object with dataset & metadata.
    '''
    fns = get_sigmf_filenames(filename)
    meta_fn = fns['meta_fn']
    archive_fn = fns['archive_fn']

    if (filename.lower().endswith(SIGMF_ARCHIVE_EXT) or not path.isfile(meta_fn)) and path.isfile(archive_fn):
        return fromarchive(archive_fn)

    meta_fp = open(meta_fn, "rb")
    bytestream_reader = codecs.getreader("utf-8")
    mdfile_reader = bytestream_reader(meta_fp)
    metadata = json.load(mdfile_reader)
    meta_fp.close()

    data_fn = get_dataset_filename_from_metadata(meta_fn, metadata)
    return SigMFFile(metadata=metadata, data_file=data_fn, skip_checksum=skip_checksum)
def fromfile ( filename , skip_checksum = False ) : fns = get_sigmf_filenames ( filename ) meta_fn = fns [ 'meta_fn' ] archive_fn = fns [ 'archive_fn' ] if ( filename . lower ( ) . endswith ( SIGMF_ARCHIVE_EXT ) or not path . isfile ( meta_fn ) ) and path . isfile ( archive_fn ) : return fromarchive ( archive_fn ) meta_fp = open ( meta_fn , "rb" ) bytestream_reader = codecs . getreader ( "utf-8" ) mdfile_reader = bytestream_reader ( meta_fp ) metadata = json . load ( mdfile_reader ) meta_fp . close ( ) data_fn = get_dataset_filename_from_metadata ( meta_fn , metadata ) return SigMFFile ( metadata = metadata , data_file = data_fn , skip_checksum = skip_checksum )