diff --git a/test_plasmapy.ipynb b/test_plasmapy.ipynb new file mode 100644 index 0000000..49bf68a --- /dev/null +++ b/test_plasmapy.ipynb @@ -0,0 +1,91 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "ea6c93d3", + "metadata": {}, + "source": [ + "# Testing the PlasmaPy Installation" + ] + }, + { + "cell_type": "markdown", + "id": "addbcd4e", + "metadata": {}, + "source": [ + "To run this notebook in its entirety, select \"Cell > Run All\" in the toolbar\n", + "\n", + "To run a single cell, select the cell and press \"ctrl+Enter\" or press the \"Run\" button in the toolbar.\n", + "\n", + "To run a subset of the cells, look at the options under \"Cell\" in the toolbar menu." + ] + }, + { + "cell_type": "markdown", + "id": "3c936b1a", + "metadata": {}, + "source": [ + "To test the PlasmaPy is installed correctly, we will calculate the gyrofrequency of a proton in a magnetic field using a function imported from the PlasmaPy formulary." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "fe0d92e8", + "metadata": {}, + "outputs": [], + "source": [ + "import astropy.units as u\n", + "from plasmapy.formulary.parameters import gyrofrequency" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "472c04d7", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Gyrofrequency: 9.58e+08 rad / s\n" + ] + } + ], + "source": [ + "wci = gyrofrequency(10*u.T, 'H+')\n", + "print(f\"Gyrofrequency: {wci:.2e}\")" + ] + }, + { + "cell_type": "markdown", + "id": "31c1e943", + "metadata": {}, + "source": [ + "If this code executes without errors, your PlasmaPy installation is working!" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.10" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}