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 conda 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.

Installing Anaconda

Install Anaconda on your system, see the Installation guide provided by the Anaconda documentation.

Installing Tudat(Py)

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:

conda --version

Then, ensure that conda is updated.

conda update conda

Download this environment.yaml (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!

Note

New to the command-line? The following commands may be useful to you:

Command effect

Unix (Linux & macOS)

Windows

Enter a directory using a path (relative or absolute)

cd <abs/rel path>

cd <abs/rel path>

Step back to the previous directory

cd ..

cd ..

List the contents of the current working directory

ls

dir

Warning

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:

  1. Create a new environment.

conda create --name tudat-space python=3.7
  1. Activate the environment.

conda activate tudat-space
  1. 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).

Note

  • If there are any other issues with the installation process, please submit an issue

on the tudatpy-feedstock. - If there are issues running tutorials please submit an issue on the tudatpy repository.

Setting Up a Development Environment

Note

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

  1. Activate your desired conda environment to be used by JupyterLab:

conda activate tudat-space
  1. Install JupyterLab on the desired environment:

conda install jupyterlab
  1. Launch JupyterLab with its entry-point:

jupyter-lab

OR

jupyter lab

Getting started with Jupyter Notebooks

Your default browser will now open a localhost page in your current directory, as given in the following figure:

../_images/jupyterlab_launch.png

Search and open your notebook. Once opened, you should see, for example, the following screen (Numerical Astrodynamics Assignment 1)

../_images/jupyterlab_notebook.png

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:

  1. Navigate to File > Settings > Project > Python Interpreter

  2. Drop down the menu for Python selection.

  3. Click Show all.

  4. Click + to add an intepreter not listed.

  5. Select Conda Environment on the left bar.

  6. Select Existing Environment and tell Pycharm where the environment python(.exe) is.

Note

The location of the python interpreter in your active conda environment is the output of the which python command.