NASA Logo, National Aeronautics and Space Administration

Getting Started With The sscws Python Library

Introduction

The following information is intended to help someone begin using the sscws Python library to access information from the Satellite Situation Center in a Python program. This information will focus on only a few different Python environments but may also be helpful in the numerous other Python environments that are not explicitly covered. The environments described here include the following:

Basic Virtual Environment

This section contains information on getting start with the sscws library in a Python 3.3 or higher venv lightweight virtual environment.

Linux/macOS

Notes: On a Linux/Mac computer, copy and paste the following into a shell window.


You should see the output from the sscws_iss_example.py example and a window with a 3D plot of the ISS orbit. You can modify sscws_iss_example.py yourself or write your own code that uses the sscws library to access SSC data.

When you no longer want the example code and environment, do the following in the shell window



Microsoft Windows

On a Microsoft computer with python from the Microsoft App Store or https://www.python.org/ installed, copy and paste the following into a Command Prompt window.



When you no longer want the example code and environment, do the following in the Command Prompt window





Jupyter Notebook

This section contains information on getting start with the sscws library in a Python Jupyter notebook environment. The following will give you run/modify access to the example notebooks shown here.

Linux/macOS

On a Linux/Mac computer, copy and paste the following into a shell window.


This may take some time to complete. Once it does, you should see the jupyter notebook dashboard in your browser with the SSC example notebook files. Select one of the SSC examples in the notebook to run/edit. It should look similar to this page except that it will be editable. Select the Cell/Run All menu item to execute the entire notebook. You can modify any of the example notebooks or write your own.

When you no longer want the example code and environment, Quit the notebook and do the following in the shell window



Microsoft Windows

On a Microsoft computer with python from the Microsoft App Store or https://www.python.org/ installed, copy and paste the following into a Command Prompt window.



This may take some time to complete. Once it does, you should see the jupyter notebook dashboard notebook dashboard in your browser with the SSC example notebook files. Select one of the SSC examples in the notebook to run/edit. It should look similar to this page except that it will be editable. Select the Cell/Run All menu item to execute the entire notebook.

When you no longer want the example code and environment, Quit the notebook and do the following in the Command Prompt window





Thonny IDE

This section contains information on using the sscws library in a Thonny Integrated Development Environment (IDE). Thonny is the Python IDE that is included in recent versions of the Raspberry Pi OS. It is also available for installation on Microsoft Windows, Apple macOS, and other Linux distributions. On a computer with Thonny installed, merely click here to download the sscws example code from this page. Depending upon the configuration of your computer, Thonny will automatically start with the example code or you may be asked which application should handle the file. If asked, select Thonny as the application to open the file with. Before attempting to run the code, do the following:
  1. From the Tools menu, select Manage packages....
  2. Enter sscws in the search PyPi box as show here

    sscws search results in manage packages window
  3. Select the Install button to install the sscws package and its dependencies.
Now you can close the Manage packages window and select the Run button. That should result in the following

execution of sscws example code



Anaconda

This section contains information on getting start with the sscws library in an Anaconda environment. Anaconda is a distribution of the Python and R programming languages for scientific computing.

Simple Example

Use the following procedure to run the simple sscws example.
  1. Open the Anaconda Navigator
  2. Select Environments from the options on the left.
  3. Select Create at the bottom of the list of environments.
  4. Enter a name such as ssc and select create.
  5. Select the ssc environment and select the triangle at the right side of the environment. Anaconda Navigator
  6. Select Open Terminal from the menu.
  7. In the anaconda terminal window, copy and past the following:


    When you no longer want the example code and environment, do the following in the anaconda terminal window window

Jupyter Notebook Examples

Use the following procedure to run the sscwsJupyter notebook examples.
  1. Open the Anaconda Navigator
  2. Select Environments from the options on the left.
  3. Select Create at the bottom of the list of environments.
  4. Enter a name such as ssc and select create.
  5. Select the ssc environment and select the triangle at the right side of the environment. Anaconda Navigator
  6. Select Open Terminal from the menu.
  7. In the anaconda terminal window, copy and past the following:


    When you no longer want the example code and environment, do the following in the anaconda terminal window window

Questions/Comments

Questions or comments concerning these Web services should be sent to SSC Feedback.

NASA Logo - nasa.gov