# Orange file import method for raw binaries

I tried to add a binary import method to class FileFormat(metaclass=FileFormatMeta) in io.py, but gave up trying to adapt a copy of the CSV method since so much is specific to CSV issues and the comments are sparse...

Basically, given an Ncols x Mrows raw file of known type and meta data, one should be able to supply the shape, sample rate etc as defaults, and then one "only" needs to satisfy the parameters for Table.from_numpy(). It is the creation of Orange-specific objects that have me stuck, and mainly the domain object:

def data_table_from_bin(cls, data, headers=None):
...
domain = Domain(attrs, clses, metas)

table = Table.from_numpy(domain, X, Y, M, W)
return table


Has anyone else tried this, or have suggestions?

from Orange.data import Domain, Table, ContinuousVariable, DiscreteVariable