Introduction

The SIPT Python package is organized into 3 main modules:

  • Data Retrieval

    These functions allow you to download and manage satellite data from various sources.

    Python
    from sipt.retrieval import *
    
  • Data Processing

    These functions help you manipulate and process the retrieved satellite data, including tasks like cropping, reprojecting, combining bands, and applying masks.

    Python
    from sipt.processing import *
    
  • Data Fusion The fusion algorithms can be used to approximately calculate missing image information, change the temporal resolution and combine data from different cources. One application example is the replacement of clouds with artificially generated pixels.

    Python
    from sipt.fusion import *
    

Use Environments for Credentials¤

To securely manage sensitive credentials and configuration settings, the repository includes an example.env file. This file serves as a template for defining environment variables required by the application. Environment variables store information such as API tokens, usernames, and passwords in a separate, secure location, ensuring these values are not directly embedded in the code. Never commit login data to a GIT repository.!!

Steps to setup Environment Variables:

  1. Install dotenv pip install python-dotenv

  2. Locate the example.env file in the repository. Copy this file and rename the copy to user.env.

  3. Open user.env in a text editor and replace the placeholders with your credentials. For example:

    Text Only
    USGS_USER=<your-username>
    USGS_TOKEN=<your-token>
    EOSDIS_BEARER_TOKEN=<your-bearer-token>
    CDSE_USER=<your-cdse-username>
    CDSE_PASSWORD=<your-cdse-password>
    
    ⚠️ Important: Do not commit user.env or any other .env files containing sensitive information to version control. The repository is configured to ignore all .env files except for example.env to ensure sensitive data remains private.

  4. Use the Python dotenv library to load variables from the .env file into your application. Below is an example:

    Python
    from dotenv import load_dotenv
    import os
    
    # Load variables from the .env file
    load_dotenv("path/to/user.env")
    
    # Access the variables
    username = os.getenv('USGS_USER')
    token = os.getenv('USGS_TOKEN')
    
    print(f"Username: {username}, Token: {token}")