Skip to content

Latest commit

 

History

History
47 lines (39 loc) · 1.8 KB

readme.md

File metadata and controls

47 lines (39 loc) · 1.8 KB

fif2csv

This is a simple python script to save .fif-files as .csv-files. It takes several command line arguments to customize the formatting and delimiters. The first row contains the time points as given by the raw.times (on by default)

Due to the less efficient encoding, the output files can be up to ~8 times larger than the input files.

Requirements

Usage

Linux

usage: fif2csv.py [-h] [--delimiter DELIMITER] [--newline NEWLINE] [--output_type OUTPUT_TYPE] [--format--fmt FORMAT]
                  [--replace_type] [--no_times] [--transpose] [--no_header]
                  filenames [filenames ...]

Easily convert .fif-files to csv-files

positional arguments:
  filenames             Names of the files to convert

optional arguments:
  -h, --help            show this help message and exit
  --delimiter DELIMITER, -d DELIMITER
                        Delimiter used
  --newline NEWLINE, -n NEWLINE
                        Character used for new lines
  --output_type OUTPUT_TYPE, -ot OUTPUT_TYPE
  --format--fmt FORMAT  Format used in numpy's savetxt(fmt=...). Has to be a valid format string!
  --replace_type, -nap  Replace original file extension with [output_type]
  --no_times, -nt       If used as an argument, no header with the times in seconds is prepended
  --transpose, -t       Transpose the data such that time is in colums. Puts the time into rows by default
  --no_header, -nh      Store a header for each column (Time, Sensor name(s)). Only if transpose is not set

Windows

See Linux, but on Windows you might need to explicitly state which interpreter should be used:

python.exe fif2csv.py [-h] ... filenames [filenames ...]

Example usage

python.exe fif2csv.py recording.fif