Getting Started with Tudat(Py)¶
This page will guide you through the installation of Tudat(Py). The installation is supported exclusively through the use of the
package manager, such as
Anaconda. Additional installation procedures are not currently
supported by the team, although there are plans to add additional support in the future. If the current situation does not satisfy your
application then please make a feature request at the respective package at https://github.com/tudat-team or show
support for an existing request.
Install Anaconda on your system, see the Installation guide provided by the Anaconda documentation.
To install Tudat(Py), we recommend the use of a terminal (command line) interface. On Unix system (Linux and Mac),
conda should be integrated with the terminal, and you can open your terminal directly. On Windows, you can find a program called
Anaconda Prompt in the Windows search. The
Anaconda Prompt is equivalent to the terminal use of
conda on Unix. Some Unix commands are made available in this prompt, although most usage is equivalent to the Windows shell (see below for some useful terminal commands).
Open a terminal. Then, first verify that Conda is Installed via using the following command:
Then, ensure that
conda is updated.
conda update conda
yaml). In your terminal navigate to the directory containing this file, and use the following command (see below for tips on using the command line):
conda env create -f environment.yaml
Congratulations! You have now installed Tudat and TudatPy, and are ready to get started running your simulations and analyses!
New to the command-line? The following commands may be useful to you:
Unix (Linux & macOS)
Enter a directory using a path (relative or absolute)
Step back to the previous directory
List the contents of the current working directory
Are you a macOS user? You may encounter an issue while installing tudatpy via conda.
If you have issues installing via the
environment.yaml in the form of conflicts when installing, please inform us on tudatpy-feedstock (#2).
If this is the case, then you can attempt to install tudatpy with this alternative procedure:
Create a new environment.
conda create --name tudat-space python=3.7
Activate the environment.
conda activate tudat-space
Install tudatpy & matplotlib with a manual definition of channels.
conda install tudatpy matplotlib -c tudat-team -c conda-forge -c defaults
If this alternative fix did not work, please inform us on tudatpy-feedstock (#2).
Setting Up a Development Environment¶
Your choice of development environment will differ greatly depending on your intended development purpose. For students of Numerical Astrodynamics, Jupyter(Lab/Notebook) will be used for assignments, and for examples during lectures. PyCharm may be used for examples during lectures.
Setting up JupyterLab in a Conda Environment¶
Activate your desired conda environment to be used by JupyterLab:
conda activate tudat-space
Install JupyterLab on the desired environment:
conda install jupyterlab
Launch JupyterLab with its entry-point:
Getting started with Jupyter Notebooks¶
Your default browser will now open a localhost page in your current directory, as given in the following figure:
Search and open your notebook. Once opened, you should see, for example, the following screen (Numerical Astrodynamics Assignment 1)
The notebook consists of blocks. There are three types of blocks, two of which are important for us: Markdown and Code. Markdown blocks contain mostly text, while Code blocks contain and run python code.
Setting up PyCharm to use a Conda Environment¶
After installing PyCharm, use the following procedure to use your conda installation of Tudat:
Drop down the menu for Python selection.
+to add an intepreter not listed.
Conda Environmenton the left bar.
Existing Environmentand tell Pycharm where the environment
The location of the python interpreter in your active conda environment is the output of the
which python command.