@@ -26,34 +26,36 @@ A video providing a brief introduction of the model and the code in this reposit
## Try it on EBRAINS
Want to start using or simply run the model? Click the button below. Make sure you check and follow our [User instructions](https://github.com/didi-hou/multi-area-model/tree/didihou#user-instructions) below if you plan to make changes to the repository and want to save the changes you made or you simply need step-by-step instructions.<br>
Want to start using or simply run the model? Click the button below.
**PLease note**: make sure you check and follow our [User instructions](https://github.com/didi-hou/multi-area-model/tree/didihou#user-instructions) especially if you plan to make changes and save the changes you made, or if you simply need step-by-step instructions.<br>
<ahref="https://lab.ebrains.eu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2FINM-6%2Fmulti-area-model&branch=master&urlpath=lab%2Ftree%2Fmulti-area-model%2Fmulti-area-model.ipynb&branch=master"><imgsrc="https://nest-simulator.org/TryItOnEBRAINS.png"alt="Try it on EBRAINS"width="260"/></a>
The Jupyter Notebook `multi-area-model.ipynb` illustrates the simulation workflow with a down-scaled version of the multi-area model. This notebook can be explored and executed online in the Jupyter Lab provided by EBRAINS without the need to install any software yourself.
1.Prerequisites: an [EBRAINS](https://www.ebrains.eu/) account. If you don’t have it yet, register at [register page](https://iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/registrations?response_type=code&client_id=xwiki&redirect_uri=https://wiki.ebrains.eu). Please note: registering an EBRAINS account requires an institutional email.
2.If you plan to only run the model, instead of save changes you made, go to Try it on EBRAINS; Shold you want to adjust the parameters, thereafter save the changes you made, go to Create your ownrepostoryandsaveyourchanges.
Prerequisites: an [EBRAINS](https://www.ebrains.eu/) account. If you don’t have it yet, register at [register page](https://iam.ebrains.eu/auth/realms/hbp/protocol/openid-connect/registrations?response_type=code&client_id=xwiki&redirect_uri=https://wiki.ebrains.eu). Please note: registering an EBRAINS account requires an institutional email.
If you plan to only run the model, instead of making and saving changes you made, go to [Try it on EBRAINS](https://github.com/didi-hou/MAM2EBRAINS#try-it-on-ebrains-1); Shold you want to adjust the parameters, thereafter save the changes you made, go to [Fork the repostory and save your changes](https://github.com/didi-hou/MAM2EBRAINS#create-your-own-repostory-and-save-your-changes).
#### Try it on EBRAINS
1. Click the button [Try it on EBRAINS](https://lab.ebrains.eu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2FINM-6%2Fmulti-area-model&branch=master&urlpath=lab%2Ftree%2Fmulti-area-model%2Fmulti-area-model.ipynb&branch=master). If any error happens during the following process, please close the browser tab and restart the [User instruction](https://lab.ebrains.eu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2FINM-6%2Fmulti-area-model&branch=master&urlpath=lab%2Ftree%2Fmulti-area-model%2Fmulti-area-model.ipynb&branch=master) process again.
2. On the `Lab Execution Site` page: select a computing center from the given list.<br>
6. If you’re using EBRAINS for the first time, click `Sign in with GenericOAuth2` to sign in on EBRAINS. To do this, you need an EBRAINS account.
7. Once signed in, on the `Server Options` page, choose `Official EBRAINS Docker image 23.06 for Collaboratory.Lab (recommended)`, and click `start`.
8. Once you succeeded, you’re now at a Jupyter Notebook named `multi-area-model.ipynb`.
9. Click the field that displays `Python 3 (ipykernel)` in the upper right corner and switch the `kernel` that has dependencies to run our model. Choose`EBRAINS-23.02`.
10. Congratulations! Now you can adjust the parameters and run the model. Enjoy!<br> To run the model, click the `Run` on the title bar and choose `Run All Cells`. It takes several minutes until you get all results.
11.**Please note**: every time you click the `Try it on EBRAINS` button, the repository is loaded into your home directory on Ebrains Lab and it overrides your old repository with the same name, thus don’t click `Try it on EBRAINS` button if you already have a repository in your home directory and don’t want to lose your changes. If you indeed want to load a new repository, at the same time want to keep yourchanges, or your old repository file is broken, simply rename your old repository and click the `Try it on EBRAINS` button.
2. On the `Lab Execution Site` page: select a computing center from the given list.
3. If you’re using EBRAINS for the first time, click `Sign in with GenericOAuth2` to sign in on EBRAINS. To do this, you need an EBRAINS account.
4. Once signed in, on the `Server Options` page, choose `Official EBRAINS Docker image 23.06 for Collaboratory.Lab (recommended)`, and click `start`.
5. Once you succeeded, you’re now at a Jupyter Notebook named `multi-area-model.ipynb`.
6. Click the field that displays `Python 3 (ipykernel)` in the upper right corner and switch the `kernel` to`EBRAINS-23.02`.
7. Congratulations! Now you can run the model. Enjoy!<br> To run the model, click the `Run` on the title bar and choose `Run All Cells`. It takes several minutes until you get all results.
**Please note**: every time you click the `Try it on EBRAINS` button, the repository is loaded into your home directory on Ebrains Lab and it overrides your old repository with the same name. Therefore, make sure you follow the [Fork the repostory and save your changes](https://github.com/didi-hou/MAM2EBRAINS#create-your-own-repostory-and-save-your-changes) if you makes changes and want to save them.
#### Create your own repostory and save your changes
1. Create a fork of this repository. Copy the address of your fork by clicking on `Code`, `HTTPS`, and then the copy icon.
#### Fork the repostory and save your changes
With limited resources, EBRAINS Lab regularly deletes and cleans data loaded on the server. This means the repository on the EBRAINS Lab will be deleted automatically after a period of time. To save changes you made, make sure you fork the repository to your own GitHub, then clone it to the EBRAINS Lab, and do git commits and push changes.
1. Go to our Multi-area model(https://github.com/INM-6/multi-area-model) under INM-6, create a fork by clicking the `Fork`. In the `Owner` field, choose your username and click `Create fork`. Copy the address of your fork by clicking on `Code`, `HTTPS`, and then the copy icon.
2. Go to [Ebrains Lab](https://lab.de.ebrains.eu), log in, and select a computing center from the given list.
3. In the Jupyter Lab, click on the `Git` icon on the left toolbar, click `Clone a Repository` and paste the address of your fork.
4. Now your forked repository of multi-area model is loaded on the server. Enter the folder `multi-area-model` and open the notebook `multi-area-model.ipynb`.
5. Click the field that displays `Python 3 (ipykernel)` in the upper right corner and switch the `kernel` to `EBRAINS-23.02`.
6. Run the notebook! To run the model, click the `Run` on the title bar and choose `Run All Cells`. It takes several minutes until you get all results.
7. You can modify the exposed parameters before you run the model, if you want to save the changes you made, click the Git icon on the most left toolbar, do git commits, and push your changes to your own fork so as to save your work.
7. You can modify the exposed parameters before running the model. If you want to save the changes you made, click the `Git` icon on the most left toolbar, do git commits and push. To commit, on `Changed` bar, click the `+` icon, and filled a comment in the `Summary (Control+Enter to commit)` at lower left corner and click `COOMMIT`. To push, click the `Push commited changes` icon at upper left which is looks like cloud, you may be asked to enter your username and passwords, enter and click `Push`.
8. If you would like to contribute to our model or bring your ideas to us, you’re most welcomed to contact us. It’s currently not possible to directly make changes to the original repository, since it is connected to our publications.