"""Pipeline to convert EDF to ASCII.""" import logging from almirah import index from almirah import Layout from almirah import Specification from almirah.utils.convert import convert logging.basicConfig(filename="logs/convert_eyetrack_to_asc.log", level=logging.DEBUG) logging.getLogger().addHandler(logging.StreamHandler()) SRC = "" DST = "" source_spec = Specification.create_from_file("configs/specifications/sourcedata.yaml") src_lay = Layout(root=SRC, specification_name="sourcedata") bids_spec = Specification.create_from_file("configs/specifications/bids.yaml") dst_lay = Layout(root=DST, specification_name="bids") src_lay.index(f"{SRC}/eyetrack") index.commit() files = src_lay.query(sourcetype="eyetrack", extension=".edf") convert(files, "ASCII", dst_lay)