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

Implement MATLAB generator and analysis tools #79

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

naegelejd
Copy link
Contributor

@naegelejd naegelejd commented Dec 13, 2024

Changes in this pull request

  • PETSIRD MATLAB SDK will now be generated alongside Python and C++
  • Generator and Analysis tools ported from Python to MATLAB (petsird_generator.m and petsird_analysis.m)
  • matlab/build-toolbox.sh script will build a portable MATLAB toolbox containing the tools

Testing performed

From the top-level of the repository, the following script exercises the MATLAB tools, the output of which can be visually compared to the output of the Python tools.

#!/usr/bin/env bash

matlab -batch "addpath('matlab/toolbox/'); petsird_generator('testdata.matlab.petsird');"
python python/petsird_generator.py > testdata.python.petsird

matlab -batch "addpath('matlab/toolbox/'); petsird_analysis('testdata.matlab.petsird');" > matlab2matlab.analysis
matlab -batch "addpath('matlab/toolbox/'); petsird_analysis('testdata.python.petsird');" > python2matlab.analysis

cat testdata.python.petsird | python python/petsird_analysis.py > python2python.analysis
cat testdata.matlab.petsird | python python/petsird_analysis.py > matlab2python.analysis

Related issues

Closes #78

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have added docstrings/doxygen in line with the guidance in the developer guide
  • The code builds and runs on my machine

Contribution Notes

Please read and adhere to the contribution guidelines.

Please tick the following:

  • The content of this Pull Request (the Contribution) is intentionally submitted for inclusion in the ETSI software (the Work) under the terms and conditions of the Apache-2.0 License.

@KrisThielemans
Copy link
Contributor

Looks like our pre-commit config is not specific enough, and it reformatted all .m files in crazy ways. I suggest you drop the last commit, fix the pre-commit-config.yaml and push again.

At present, we don't add generated files to this repo. Still for discussion, but feel free to leave them in now for ease-of-use for whoever (@rgwells2023?) wants to try this out.

@naegelejd
Copy link
Contributor Author

I don't think it's necessary to commit the generated MATLAB files either. Anyone can regenerate them in the devcontainer, then they can be copied elsewhere and used directly in MATLAB.

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.

Implement MATLAB tools
2 participants