This is a repository to hold the notebooks that will be used throughout the STELLAR Space Weather Workshop workshop
Each hands-on session is in its own directory - i.e. the day one hands on session is in day1_solar_sources
etc.
If you don't want to run these locally, or you are having issues with getting them started - all the notebooks in this repository can be run with binder. Click here to launch binder and then run the notebooks in your browser:
.
It may take a few minutes to load up the first time you launch it.
Here are the steps you'll need to run:
If you want to run these notebooks locally you can clone this reposity (or fork it and then clone it from your page). To do this run this command:
git clone https://github.com/TCDSolar/STELLAR_SSW_tutorials
If you have first forked it then you can run:
git clone https://github.com/<username>/STELLAR_SSW_tutorials
You can also download these notebooks by clicking on green code
button on the top right hand side, and then by clicking download zip.
We recommend creating a new conda environment and install the requried packages used in these notebooks. Here is a nice introduction to anaconda environments for those new to the concept, and here is a conda cheatsheet which may help too!
The python packages required to run these workshop notebooks are listed in the environment.yml
file in this repository. To create a new environment with these packages installed you can open a terminal and type:
conda env create -f environment.yml
This will then create a new conda environment called stellar_ssw
(this name is listed in the enviroment.yml
file).
You can then activate this environment by typing:
conda activate stellar_ssw
Note your prompt should change and now have stellar_sww
near the start. If you want to list all your conda environments you can type
conda info -e
. You should see base
which is your base enviroment, the stellar_ssw
one, and any others you have created!
If an update is made to the enviroment.yml
file then you will need to type
conda env update --file environment.yml --prune
This may be important after you have down a git pull
(see below 4.)
You can also install new packages in this environment by using conda install <package>
or by using pip! (pip install <package<
)
Once you have your environment activated (remember to first type conda activate stellar_ssw
) then in your local STELLAR_SSW repository type
jupyter notebook
This should then open the notebooks in your default browser!
If you are having any issues - just make sure first that you are in the stellar_ssw
environment before you start jupyter.
Happy coding!!
Throughout the workshop, these notebooks were updated and further notebooks were added. To make sure that your local repository reflects whats currently here you will need to run a git pull
. This will pull the most up-to-date version of this repository. Before you do this however, you will want to check which remote you have linked to this repository. To find out this you can type this in your local STELLAR_SSW repository:
git remote -v
and this will list the current remotes It might looks something like this
origin https://github.com/<username>/STELLAR_SSW_tutorials.git (fetch)
origin https://github.com/<username>/STELLAR_SSW_tutorials.git (push)
upstream https://github.com/TCDSolar/STELLAR_SSW_tutorials (fetch)
upstream https://github.com/TCDSolar/STELLAR_SSW_tutorials (push)
what you will want to do is pull the main branch from the one that is linked to https://github.com/TCDSolar/STELLAR_SSW_tutorials
- which in this example is upstream
. Hence to pull the latest version of this repository you would type:
git pull upstream main
and this will update your local files.
Otherwise if when you typed git remote -v
and it looks like
origin https://github.com/TCDSolar/STELLAR_SSW_tutorials (fetch)
origin https://github.com/TCDSolar/STELLAR_SSW_tutorials (push)
then you would type
git pull origin main
to update your local files.