Skip to content

Produces MAT file from WFDB format #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 23, 2020
Merged

Produces MAT file from WFDB format #241

merged 1 commit into from
Jun 23, 2020

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.

1 participant