More description coming as soon as I figure out what this is going to be. Update (5/22/2025): This project is not dead. It is lightly napping. I've been adding things off and on, and would love to add more. If people start pointing out mistakes in what I've written already, I think that would give me the impetus to pay more attention.
This book is intended to be actively interacted with, and so requires a bit of setup. You can avoid doing anything by accessing the book via either the jupyterlite website or mybinder (recommended), or you can go the hard route and install it locally. Regardless of which method you go with, you will be presented with a Jupyter-like interface, with a list of ipynb files in the left-hand pane (if you don't see the list of files, try toggling the file browser view by clicking the folder icon on the left of the screen). You can open any file, but starting with 01-Introduction.ipynb probably makes the most sense.
You can access a copy of the book running in JupyterLite (https://jupyterlite.readthedocs.io/en/stable/) by clicking the try lite badge at the top of this readme or navigating to: https://dsavransky.github.io/astrodynamicsbook. Note that this is pretty experimental and some things will very likely not work as well as they should.
- On multiple browsers tested, pages have failed to render until you scroll down a little bit.
- JupyterLite has persistent storage via your browser, meaning that any changes to the notebooks you make in one session will remain when loading the same notebook in the same browser on the same machine. If you would like to discard your changes, you will need to delete any cached site data. Refer to your browser's documentation for how to do so. On Chrome, you can most easily do this by clicking the site settings button next to the URL and selecting Cookies and site data>Manage on-device site data and then clicking the little trash icon. On Firefox, you can click the lock icon next to the URL and select Clear cookies and site data.
- Section headings will not automatically populate when you load a notebook. They will, however, populate if you select 'Run all cells' from the Run menu.
- Similarly, animations will not automatically render on loading. They will also work if you 'Run all cells' from the Run menu.
- Occassionally, LaTeX macros will not render properly in notebooks. There doesn't seem to be a consistent pattern to this, and it sometimes affects only a subset of markdown cells in a single notebook. If you click into the cell, modify the contents in any way (e.g., add a space somewhere) and then re-render the cell, the issue resovles.
Click the 'launch binder' badge at the top of this readme and wait a few minutes (it will take a while). Once JupyterLab launches, click on the file browser (top icon in the left-hand panel) and select a notebook (I'd recommend starting from 01-Introduction.ipynb). Pages will take a few seconds to fully render - if you see a bunch of garbage-looking code, just wait a bit and it will eventually turn into pretty equations.
Note that, unfortunately, mybinder has fairly limited capacity, meaning that sometimes, the book simply won't launch when going this route. Sometimes it works great, though. Kind of luck of the draw at this point.
The book is composed of a python backend and a Jupyter notebook frontend (the text). In order to work with the text on your own machine locally, you must first install the backend. It is recommended that you do this in a dedicated virtual environment. The instructions below assume that you have python (version 3.8 or higher) and pip installed and working on your machine. For help with that, start here: https://wiki.python.org/moin/BeginnersGuide/Download . We'll assume that python and pip are runnable as python and pip, respectively, but they might be called python3 and pip3 (or something else) on your particular system.
-
Download or clone this repository to your computer (https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)
-
Create a python virtual environment (we'll call ours
bookenvbut you can replace this with any name you like). In a terminal/command prompt/powershell/etc run:python -m venv /full/path/to/bookenv -
Activate the environment. On macOS/Linux (see https://docs.python.org/3/library/venv.html for Windows details):
source /full/path/to/bookenv/bin/activate -
In the same terminal with the active virtual environment, navigate to the cloned/downloaded repository. From the top level directory of the repository (the one that contains the file
setup.py) run:pip install .This will install the book backend as well as a bunch of requirements to the virtual environment (it may take a while to download/install everything - go for a walk or something).
-
Navigate to the
Notebookssubdirectory of the repo (should just becd Notebooksfrom where you were last) and then start JupyterLab by runningjupyter-lab -
From this point, everything is the same as via the Easy Way
-
To stop JupyterLab, type ctrl+c in the terminal where it is running and then hit ctrl+c again (or type
yat the prompt). To deactivate the virtual environment just typedeactivateat the prompt. Next time you want to run the book, you just activate the environment again, navigate to the Notebooks directory and runjupyter-lab
Warning There appears to be an issue (at least on macOS) where if you already have jupyter-lab installed in a system path, it will be executed initially instead of the one you install in your virtual environment. A simple fix is to simply deactivate and re-activate the virtual environment after you run the initial pip installation.
Feedback is highly encouraged and sought after. The best way to provide feedback is via the github Issue Tracker associated with this repository (https://github.com/dsavransky/astrodynamicsbook/issues)
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.