def get_raw_data_from_file(imageset, i):
    """Use cbflib_adaptbx directly to access the raw data array rather than
    through the imageset, in order to work for multi-panel detectors and other
    situations where the format class modifies the raw array"""
    from cbflib_adaptbx import uncompress
    import binascii
    file_name = imageset.get_image_identifier(i)
    with open(file_name, 'rb') as cbf:
        data = cbf.read()
    start_tag = binascii.unhexlify('0c1a04d5')
    data_offset = data.find(start_tag) + 4
    cbf_header = data[:data_offset - 4]
    fast = slow = length = 0
    for record in cbf_header.split('\n'):
        if 'X-Binary-Size-Fastest-Dimension' in record:
            fast = int(record.split()[-1])
        elif 'X-Binary-Size-Second-Dimension' in record:
            slow = int(record.split()[-1])
        elif 'X-Binary-Size:' in record:
            xbsize_record = record
            length = int(record.split()[-1])
    values = uncompress(packed=data[data_offset:data_offset + length], fast
        =fast, slow=slow)
    return values,
