Skip to content

Conversation

@Lucas-Mc
Copy link
Contributor

@Lucas-Mc Lucas-Mc commented Jun 20, 2020

Introduces the conversion of WFDB files to MAT format. All data was written to the .mat file using struct.pack() so no outside packages were introduced.

This implementation conserves the -f and -t options for setting a desired start and stop time respectively, though the units here are samples instead of seconds. The -h option can be used using help(wfdb.wfdb2mat). The -H option can not be implemented here at the moment since all high-resolution content is read first through the rdrecord function which must be changed to allow this. The -l option can be used with the -f and -t options in combination. The -s option is implemented by allowing the user to select their desired channels based on the integer value of the signal number. The -S option was not implemented here due to its limited potential use.

Furthermore, I added functionality to write the .hea file as well to accompany the generation of the MAT file so that it can be read again with rdrecord and complete the cycle!

@Lucas-Mc Lucas-Mc self-assigned this Jun 20, 2020
@Lucas-Mc
Copy link
Contributor Author

Something else cool to note is that a MAT file can now be created from an EDF or WAV file since rdrecord now allows reading of those formats into WFDB format!

@Lucas-Mc Lucas-Mc merged commit c698f03 into master Jun 23, 2020
@Lucas-Mc Lucas-Mc deleted the wfdb2mat branch June 23, 2020 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants