Skip to content
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

Update mat5.c to support uncompressed MAT file generated by SWAN #149

Merged
merged 1 commit into from
Aug 28, 2020
Merged

Update mat5.c to support uncompressed MAT file generated by SWAN #149

merged 1 commit into from
Aug 28, 2020

Conversation

dpzimmer
Copy link
Contributor

Slight modification to Mat_VarReadNextInfo5() to allow MAT_T_INT32 in addition to MAT_T_UINT32 to indicate processing of array_flags.

This formatting was encountered processing older .mat files created by older versions of the swan model (https://www.tudelft.nl/en/ceg/about-faculty/departments/hydraulic-engineering/sections/environmental-fluid-mechanics/research/swan/).

I have no idea if this violates the file format specification, but Matlab and libmat.lib both read such files without complaint.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.6%) to 83.177% when pulling 6621324 on dpzimmer:support-older-format-output-by-swan-model into 812b98a on tbeu:master.

@coveralls
Copy link

coveralls commented Aug 26, 2020

Coverage Status

Coverage increased (+0.6%) to 83.176% when pulling 46e27aa on dpzimmer:support-older-format-output-by-swan-model into 812b98a on tbeu:master.

@tbeu
Copy link
Owner

tbeu commented Aug 26, 2020

Thanks for your contribution.

That particular check occurs six times in mat5.c and I guess, it needs to be fixed everywhere consistently.

Do you have an example file that you could share. Thanks.

@dpzimmer
Copy link
Contributor Author

dpzimmer commented Aug 26, 2020

Thanks for your contribution.

That particular check occurs six times in mat5.c and I guess, it needs to be fixed everywhere consistently.

Do you have an example file that you could share. Thanks.

example attached;

swan.zip

@dpzimmer dpzimmer closed this Aug 26, 2020
@dpzimmer dpzimmer reopened this Aug 26, 2020
MATLAB reads them, so matio should also.
@tbeu tbeu changed the title Update mat5.c Update mat5.c to support uncompressed MAT file generated by SWAN Aug 28, 2020
@tbeu
Copy link
Owner

tbeu commented Aug 28, 2020

Thanks for the MAT file.

I also checked the sources of SWAN and it is exactly that one relevant line that needs to be adapted.

@tbeu tbeu merged commit 85cdafb into tbeu:master Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants