Mambolab Toolbox
The Mambolab Toolbox is a Matlab based toolbox used by our group to analyze M/EEG data. It heavily uses fieldtrip function to perform basic preprocessing and other analyses. We included functions for estimating functional connectivity using several coupling indices.
Contribution Guidelines
In the past years, we have moved from pipelines made of homemade MATLAB routines to a more frequent use of a mixture of FieldTrip routines with homemade scripts. Given that we adopted a coding style similar to FieldTrip guidelines, you can find them here.
Functions
In brief our functions are should always behave like this:
[outputargs] = ml_functionname(cfg, inputargs)
Data
We use BIDS guidelines to organize our data on folders, in order to use open-source and free readers for our data format.
Internally, the data is a MATLAB structure in a specific format, as explained in FieldTrip data section.
Development workflow
Contributions to the software are made using git
and Github.
Our repository can be accessed here.
The workflow is common to the most of open-source software:
- Fork the repository to your personal account, by clicking fork in the main repo page.
- Clone your personal repository to your computer.
git clone https://github.com/USER/mambolab
This command clones the
mambolab
repo in the current directory. - Create a new branch with a name that has a meaningful name (e.g.
fix-iplv-formula-bug
ornf-added-mpsi-algorithm
, notnew-branch
)git checkout -b nf-added-hmm-algorithm
- Make your bug fix or add your new feature (and tests ) and commit to your computer repo.
## added file mt_hmm.m git add mt_hmm.m git commit -m "NF: Added HMM algorithm for state detection
The
commit
add a message to the edits which must be explicative of the new feature (NF stands for New Feature). - Push your branch to your personal repository.
git push origin nf-added-hmm-algorithm
- Open a Pull Request (PR) on the main repository. This can be made in your Github personal page by clicking
Open Pull Request
- Core developers review and test the PR (and suggest some changes, eventually).
- The branch is merged on the main repo branch.
- Clean up your repo.
git branch -D nf-added-hmm-algorithm git push origin :nf-added-hmm-algorithm
You can find further information on FieldTrip.