-
Notifications
You must be signed in to change notification settings - Fork 0
install
Here you will find instructions to download and use Deck.
Log-in with your FMRIB credentials to GitLab (if you are in the analysis group, you have an account by default).
Make sure you add your SSH key to your account settings (Top-right icon > Profile Settings > SSH Keys). This is so GitLab recognizes your computer when you try to download the code, or indeed for any other remote action from your computer. Note that you should have one key per machine (and not per account); so if you want to use Deck on the Jalapeno cluster, you will need to add a the key from your jalapeno acount as well.
Once your account is set up, open a terminal and go to the folder where you would like to download the sources, e.g. ~/Documents/MATLAB
.
You do not need to create a folder specifically to download the sources right now, this folder will be created automatically:
git clone git@git.fmrib.ox.ac.uk:jhadida/deck.git <"folder_name"|default:"deck">
Note that you can also download the latest sources as a zip-file, in which case you simply need to uncompress it where you like. The downside is that you won't be able to easily update to the latest versions, or to contribute.
Deck is a Matlab package, which is the equivalent of a namespace or module in other languages. Packages are great to "hide" the functions behind a common prefix, and to organise them into submodules when there are a lot of them. This is useful mainly to avoid name collisions with Matlab's toolboxes or built-ins, and with other packages.
Tip: if you will be using Deck on a regular basis, you might want to include the following commands in your
startup.m
file.
In order to use Deck in Matlab:
- Add the folder which contains the directory
+dk
to the Matlab path. If you downloaded the sources to folder/path/to/deck
this can be done by typingaddpath('/path/to/deck');
from the Matlab console. Note that you should not usegenpath
in this command. - Once the source folder is on your Matlab path, simply type
dk_startup
. You should see a message saying:
[Deck] Starting up from folder "/path/to/deck".
You should now be able to call all of Deck's functions with a dot-syntax. As a simple test, try:
>> dk.println('Hello')
Hello
If you downloaded the sources using git, say to the folder /path/to/deck
, you can upgrade to the version version_name
directly from the command-line:
cd "/path/to/deck"
git fetch --all
git checkout tag/<version_name>
Alternatively, if you would like to download the latest release, you can do:
cd "/path/to/deck"
git fetch --all
git checkout latest
Please open an issue on the GitLab page for any bug that you may find.
Contributions are welcome from anyone, but you need to be added as a member to the project in order to push your contribution to the repository. Send me a message if you would like to contribute.