Skip to content

Commit

Permalink
Merge pull request #5 from AFM-SPM/ns-rse/1-import-notebooks
Browse files Browse the repository at this point in the history
Explicitly loading packages in the notebooks themselves
  • Loading branch information
ns-rse authored Oct 11, 2023
2 parents d730e62 + a3f8a8d commit 7d6d605
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 11 deletions.
21 changes: 21 additions & 0 deletions content/00-Walkthrough-minicircle.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,27 @@
"## Getting Started\n"
]
},
{
"cell_type": "markdown",
"id": "386691b8-2247-4895-b9b5-4bade440b7d9",
"metadata": {},
"source": [
"## Install requirements\n",
"\n",
"A few libraries need manually loading before you can run this Notebook"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "367a5181-ab9e-45df-81b7-0ba00096d1d8",
"metadata": {},
"outputs": [],
"source": [
"%pip install pgfinder==0.0.3\n",
"%pip install ipywidgets matplotlib nupy"
]
},
{
"cell_type": "markdown",
"id": "9fe935a6-591d-45fb-a65b-83087e320842",
Expand Down
36 changes: 35 additions & 1 deletion content/02-Summary-statistics-and-plots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,47 @@
"\n"
]
},
{
"cell_type": "markdown",
"id": "799b696d-c8f1-4f3a-a79e-ad531304f3d9",
"metadata": {},
"source": [
"# Setup"
]
},
{
"cell_type": "markdown",
"id": "c54b6944-c942-4b4c-852b-1e425f559703",
"metadata": {},
"source": [
"## Install requirements\n",
"\n",
"A few libraries need isntalling before you can run this Notebook. This will take a short while as the packages are downloaded and installed."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9fe4ea7c-31b1-45e7-9f41-741834f8d947",
"metadata": {},
"outputs": [],
"source": [
"%pip install ipywidgets\n",
"%pip install matplotlib\n",
"%pip install pandas\n",
"%pip install seaborn\n",
"%pip install topostats"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "e9925511-9e30-4c69-86cf-531cda8fea10",
"metadata": {},
"source": [
"## Load Libraries"
"## Load Libraries\n",
"\n",
"The required libraries and modules are now `import`ed."
]
},
{
Expand Down
33 changes: 23 additions & 10 deletions content/03-Plotting-scans.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,30 @@
"source": [
"# Setup\n",
"\n",
"The first step required is to import some Python libraries to load and plot the data. You should run this Notebook\n",
"within a Conda/Virtual Environment into which you have installed TopoStats, ideally with the necessary Notebook\n",
"extensions. The following command will install TopoStats from [PyPI](https://pypi.org/project/topostats/) with the\n",
"requirements for running Notebooks.\n",
"\n",
"```python\n",
"pip install topostats[notebooks]\n",
"```\n",
"The first step required is to install some Python libraries required to load and plot the data."
]
},
{
"cell_type": "markdown",
"id": "817fb4bb-843a-4fe7-867b-737c752281b3",
"metadata": {},
"source": [
"## Install requirements\n",
"\n",
"You should have successfully processed images using `run_topostats` at least once, this will have saved processed scans\n",
"to disk that we will load."
"A few libraries need isntalling before you can run this Notebook. This will take a short while as the packages are downloaded and installed."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "02f3611a-d520-4ff7-a709-1f56569162ae",
"metadata": {},
"outputs": [],
"source": [
"%pip install ipywidgets\n",
"%pip install matplotlib\n",
"%pip install numpy\n",
"%pip install topostats"
]
},
{
Expand Down

0 comments on commit 7d6d605

Please sign in to comment.