A commandline tool that generates files in the European Data Format (16-bit and 24-bit (BDF)), containing a signal with sine, square, ramp, triangular or noise waveform.
Samplefrequency, signalfrequency, dutycycle, amplitude, phase and number of signals can be freely chosen.
git clone https://gitlab.com/Teuniz/edf-test-generator-console.git cd edf-test-generator-console make
Usage: edfgenerator [OPTION]... options: --type=edf|bdf default: edf --len=file duration in seconds default: 30 --rate=samplerate in Hertz default: 500 (integer only) --freq=signal frequency in Hertz default: 10 (may be a real number e.g. 333.17) --wave=sine | square | ramp | triangle | white-noise | pink-noise default: sine --dcycle=dutycycle: 0.1-100% default: 50 --phase=phase: 0-360degr. default: 0 --physmax=physical maximum default: 1200 (may be a real number e.g. 1199.99) --physmin=physical minimum default: -1200 (may be a real number e.g. -1199.99) --amp=peak amplitude default: 1000 (may be a real number e.g. 999.99) --unit=physical dimension default: uV --digmax=digital maximum default: 32767 (EDF) or 8388607 (BDF) (integer only) --digmin=digital minimum default: -32768 (EDF) or -8388608 (BDF) (integer only) --offset=physical dc-offset default: 0 --datrecs=number of datarecords that will be written into the file, has precedence over --len. --datrec-duration=duration of a datarecord in seconds default: 1 (may be a real number e.g. 0.25) effective samplerate and signal frequency will be inversely proportional to the datarecord duration --signals=number of signals default: 1 in case of multiple signals, signal parameters must be separated by a comma e.g.: --rate=1000,800,133 --merge merge all signals into one trace, requires equal samplerate and equal physical max/min and equal digital max/min and equal physical dimension (units) for all signals --help Note: decimal separator (if any) must be a dot, do not use a comma as a decimal separator examples: edfgenerator --type=bdf --len=60 --rate=44000 --freq=1000 --wave=square --dcycle=15 --unit=V --offset=500 --physmax=5000 edfgenerator --type=edf --len=30 --signals=5 --rate=1000,800,500,975,999 --freq=5,13,7,1,1 --wave=sine,square,ramp,pink-noise,white-noise --dcycle=50,25,75,50,50 --unit=uV,uV,uV,uV,uV --physmax=3000,3000,3000,3000,3000 --physmin=-3000,-3000,-3000,-3000,-3000 --datrec-duration=0.5 merge 3 sine waves into one trace: edfgenerator --type=edf --len=30 --signals=3 --rate=1000,1000,1000 --freq=5,15,25 --wave=sine,sine,sine --unit=uV,uV,uV --amp=200,66.667,40 --physmax=3000,3000,3000 --physmin=-3000,-3000,-3000 --merge
edfgenerator --type=edf --len=10 --rate=1000 --freq=1 --wave=sine
EDF file, 10 seconds recording length, 1KHz samplerate, sine wave of 1Hz
edfgenerator --type=edf --len=30 --rate=113 --freq=3.2 --wave=square --dcycle=50 --physmax=3200 --physmin=-3200 --amp=100 --unit=uV
EDF file, 30 seconds recording length, 113Hz samplerate, square wave of 3.2Hz, duty cycle 50%,
3200 physical maximum, -3200 physical minimum, 100uV peak amplitude
edfgenerator --type=bdf --len=10 --rate=1000 --freq=1.5 --wave=ramp --dcycle=10.5 --physmax=1000 --physmin=-1000 --amp=300 --unit=mV --digmax=1048575 --digmin=-1048576
BDF file, 10 seconds recording length, 1KHz samplerate, ramp wave of 1.5Hz, duty cycle 10.5%,
1000 physical maximum, -1000 physical minimum, 300mV peak amplitude, 1048575 digital maximum, -1048576 digital minimum
edfgenerator --type=bdf --len=20 --rate=512 --freq=3.7 --wave=triangle --dcycle=100 --physmax=1000 --physmin=-1000 --amp=300 --unit=uV
BDF file, 20 seconds recording length, 512Hz samplerate, triangular wave of 3.7Hz, duty cycle 100%,
1000 physical maximum, -1000 physical minimum, 300uV peak amplitude
edfgenerator --type=bdf --len=20 --rate=512 --freq=3.7 --wave=triangle --dcycle=10 --physmax=1000 --physmin=-1000 --amp=300 --unit=uV
BDF file, 20 seconds recording length, 512Hz samplerate, triangular wave of 3.7Hz, duty cycle 10%,
1000 physical maximum, -1000 physical minimum, 300uV peak amplitude
Feedback to: teuniz@protonmail.com
A very convenient open-source programming library for C/C++ programmers who want to implement EDF(+) and/or BDF(+):