Skip to main content

LEOSatpy

PyPI PyPI - Python Version GitHub release (latest SemVer including pre-releases) GitHub last commit GitHub Documentation Status Zenodo

LEOSatpy (Low Earth Orbit satellite python) is an end-to-end pipeline to process and analyse satellite trail observations from various telescopes.

The pipeline is written in Python 3 and provides the following functionalities:

Module Function
reduceSatObs Full reduction of raw-FITS images including bias, dark, and flat reduction.
calibrateSatObs WCS calibration, i.e. plate solving, using GAIA DR3 positions, obtained via the Astroquery tool.
analyseSatObs Satellite trail(s) detection and aperture photometry using comparison stars from the GSC v2.4.3 catalog.

The full documentation for LEOSatpy can be found here.

LEOSatpy is distributed under the GNU General Public License v3. See the LICENSE file for the precise terms and conditions.

Currently supported telescopes:

If you want your telescope added to the list, please contact Jeremy Tregloan-Reed.

How to use LEOSatpy

The LEOSatpy pipeline is written for use with Python >=3.9. To avoid unnecessary interference with the Python installed on the system, it is recommended to create a new Python environment to run LEOSatpy, using for example conda.

A new conda environment can be created and activated with:

  $ conda create -n leosatpy_env python=3.9
  $ conda activate leosatpy_env

Installation

LEOSatpy is available on PyPI, and can be installed using pip:

  $ (leosatpy_env) pip install leosatpy

Alternatively, the latest release of LEOSatpy is also available from the GitHub repository.

  1. Clone the repository using git:

      $ (leosatpy_env) git clone https://github.com/CLEOsat-group/leosatpy.git
    
  2. Download the zip file from the GitHub repository:
    Navigate to the main page of the repository. Click on the "Code" button, then click "Download ZIP".

Once cloned or downloaded and extracted, LEOSatpy can be installed from anywhere by typing:

  $ (leosatpy_env) pip install -e PATH/TO/CLONED/GITHUB

or by navigating to the downloaded folder:

  $ (leosatpy_env) cd PATH/TO/CLONED/GITHUB

and using the following command in the terminal:

  $ (leosatpy_env) python setup.py install

The successful installation of LEOSatpy can be tested by trying to access the help or the version of LEOSatpy via:

  $ (leosatpy_env) reduceSatObs --help

  $ (leosatpy_env) reduceSatObs --version

If no error messages are shown, LEOSatpy is most likely installed correctly.

Running LEOSatpy

Prerequisites

1. Configuration

LEOSatpy comes with a configuration file, called leosatpy_config.ini, containing an extensive list of parameter that can be adjusted to modify the behaviour of LEOSatpy.

Upon the first execution, a copy of the leosatpy configuration file is placed in the /home/user directory. Please modify the file as required and re-run the program.

By default, information and results for each dataset are stored in a .csv file located in the /home/user directory. The location and name of this file can be changed by modifying the following lines in the leosatpy_config.ini:

WORKING_DIR_PATH = '~'
RESULT_TABLE_NAME = 'results_leosatpy.csv'

2. Folder structure

Although there is some degree of freedom in the nomenclature and structuring of the folder, it is highly recommended to adopt the following folder layout:

.
└── Telescope-Identifier <- free naming
    ├── YYYY-MM-DD <- recommended format
    │   ├── bias
    │   ├── flats
    │   ├── darks
    │   └── science_data <- free naming
    │       └── raw <- optional, but recommended
    ├── YYYY-MM-DD
    └── YYYY-MM-DD

The only requirement with regard to the name of the main folder is that the folder name should contain the date of observation either in the format: YYYY-MM-DD, or YYYYMMDD.

The program will select the search path for the calibration data based on the obs date from the science data header and the names of folder in the given path. Possible formats are, e.g., 20221110, 2022-11-20, tel_20221011_satxy, 2022-11-26_satxy_obs1, etc.

It is also recommended to separate the raw calibration files, i.e., bias, darks, and flats from the science observation files and place them into separate folder, named accordingly /bias, /darks, /flats, and science/raw, respectively.

Once all programs have been executed, the final folder structure should look like this:

.
└── Telescope-Identifier
    ├── YYYY-MM-DD
    │   ├── bias
    │   ├── flats
    │   ├── darks
    │   ├── master_calibs
    │   └── science_data (e.g., STARLINK)
    │       ├── auxiliary
    │       ├── calibrated
    │       ├── catalogs
    │       ├── figures
    │       │   └── Sat-ID (e.g., STARLINK-3568)
    │       ├── raw
    │       ├── reduced
    │       └── tle_predictions
    ├── YYYY-MM-DD
    └── YYYY-MM-DD

LEOSatpy is now ready for use.

Reduction

The reduction of all raw FITS-files in a folder can be performed via the following line:

  $ (leosatpy_env) reduceSatObs PATH/TO/DATA

LEOSatpy also accepts relative paths and multiple inputs, for example:

  $ (leosatpy_env) reduceSatObs ../Telescope-Identifier/YYYY-MM-DD/

or

  $ (leosatpy_env) reduceSatObs PATH/TO/DATA/NIGHT_1 PATH/TO/DATA/NIGHT_2

To reduce all data from a telescope at once with:

  $ (leosatpy_env) reduceSatObs PATH/TO/TELESCOPE/DATA

The usage of partial and multiple inputs as shown above also works for the other programs in the package.

Astrometric calibration

To apply the astrometric calibration type:

  $ (leosatpy_env) calibrateSatObs PATH/TO/DATA

Satellite trail detection and analysis

To run the satellite detection and analysis on all files in the input type:

  $ (leosatpy_env) analyseSatObs PATH/TO/DATA

Citing LEOSatpy

When publishing data processed and analysed with LEOSatpy, please cite:

Adam et al. (2025) (in preparation). "Estimating the impact to astronomy from the Oneweb satellite constellation using multicolour observations". https://doi.org/10.5281/zenodo.8012131
Software pipeline available at https://github.com/CLEOsat-group/leosatpy.

Acknowledgements

Alongside the packages listed in the requirements.txt, this project uses workflows and code adopted from the following packages:

The authors of these packages and code are gratefully acknowledged.

Special thanks go out to the following people for their ideas and contributions to the development of the LEOSat Python package:

The project would not have been possible without the help of everyone who contributed.

Feedback, questions, comments?

LEOSatpy is under active development and help with the development of new functionalities and fixing bugs is very much appreciated. In case you would like to contribute, feel free to fork the GitHub repository and to create a pull request.

If you encounter a bug or problem, please submit a new issue on the GitHub repository providing as much detail as possible (error message, operating system, Python version, etc.).

If you have further feedback, questions or comments you can also send an e-mail to Jeremy Tregloan-Reed, or Christian Adam.

Author

Christian Adam, Centro de Investigación, Tecnología, Educación y Vinculación Astronómica (CITEVA), Universidad de Antofagasta, Antofagasta, Chile

Metadata

Release files for leosatpy 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for leosatpy 0.5.1
File Size Uploaded Provenance
leosatpy-0.5.1.tar.gz 230.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for leosatpy 0.5.1
File Interpreter ABI Platform
leosatpy-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 449.3 kB

Release files / leosatpy-0.5.1.tar.gz

Download URL leosatpy-0.5.1.tar.gz
Size 230.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1a6f48953010e08e282f34219ffbfb5698a48122337fc7ab8677166cefc0b6bc
BLAKE2b-256 checksum
How to use checksums
ad6371ae2e0879df5f7c7904f66f30629a88b4c1677901823ce3eb81c4e5be25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / leosatpy-0.5.1-py3-none-any.whl

Download URL leosatpy-0.5.1-py3-none-any.whl
Size 219.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d326f2d84c2981a4c5501ab19c52d7c5d3f5ca2b77dc27d0f9deb566817a2ea5
BLAKE2b-256 checksum
How to use checksums
fd13806e6e284f9b697345cca150dfc98d3a2b27953ad8c788fae4cee4870abc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Security for leosatpy 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for leosatpy-0.5.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page