ishiikurisu/edf

Append multiple EDF in to one

Robindfuller opened this issue · 9 comments

Do you have a method for appending data from one EDF to another to produce a single EDF?

Sorry for taking so long to answer! No, I haven't implemented this yet, but I might do soon. The problem I see here is that we may run into frequency issues since the recordings in those files might be in different sampling rates, so appending data is not as direct as it might seem. I will think a little bit on this and I will generate a function for that.

Thanks. In my particular use case, the edf files come from the same recorder. At some point during the recording the device has split the data in to multiple files for any number of reasons. So the sample rate will the the same. However there might be a time gap between the files, maybe even just a few seconds.

This week, I implemented a function called edf.Append(x, y Edf) (*Edf, error), which concatenates data records on two EDF files. It still is on primitive state, and known bugs include not updating EDF+ annotations yet, but it might suffice some of your procedures. If you could test this function for me more thoroughly, it would be amazing!

The command line program edfappend on the EDF tools from the Neurosciences laboratory from University of Brasilia already implements a CLI for this function:

go build github.com/lab-neuro-comp/EDF-tools/app/edfappend
./edfappend fileA.edf fileB.df result.edf

I can't wait to try this. Thank you!

@Robindfuller, have you already tested this? If so, please provide feedback!

I see... I will close this issue by now, ok? Any news, just comment here so we can reopen this issue if needed. Meanwhile, I hope you enjoy your new project :)

Finally got round to trying this:

go build github.com/lab-neuro-comp/EDF-tools/app/edfappend
./edfappend fileA.edf fileB.df result.edf

It worked as expected. Thanks.

@Robindfuller thanks! that's good to know!