Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ jobs:
- name: Install
run: |
python -m pip install --upgrade pip
pip install matplotlib
pip install jupyter
pip install numpy
pip install dsgp4
pip install pyprob
pip install skyfield
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
pip install .[dev]
pip install sphinx
Expand Down
22 changes: 8 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,19 @@

-----------------------------------------
[![Build Status](https://github.com/kesslerlib/kessler/workflows/build/badge.svg)](https://github.com/kesslerlib/kessler/actions)
[![Documentation Status](https://readthedocs.org/projects/kessler/badge/?version=latest)](https://kessler.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/kesslerlib/kessler/branch/master/graph/badge.svg?token=EQ9CLXD909)](https://codecov.io/gh/kesslerlib/kessler)

Kessler is a Python package for simulation-based inference and machine learning for space collision avoidance and assessment. It is named in honor of NASA scientist [Donald J. Kessler](https://en.wikipedia.org/wiki/Donald_J._Kessler) known for his studies regarding [space debris](https://en.wikipedia.org/wiki/Space_debris) and proposing the [Kessler syndrome](https://en.wikipedia.org/wiki/Kessler_syndrome).

Developed by the [FDL Europe](https://fdleurope.org/) Constellations team in collaboration with [European Space Operations Centre (ESOC)](http://www.esa.int/esoc) of the [European Space Agency (ESA)](http://www.esa.int).
Initially developed by the [FDL Europe](https://fdleurope.org/) Constellations team in collaboration with [European Space Operations Centre (ESOC)](http://www.esa.int/esoc) of the [European Space Agency (ESA)](http://www.esa.int).

## Documentation and roadmap

To get started, follow the [documentation](https://kesslerlib.github.io/kessler/) examples.

## Authors

* Giacomo Acciarini, University of Surrey
* Francesco Pinto, University of Oxford
* Francesca Letizia, European Space Agency
* Chris Bridges, University of Surrey
* Atılım Güneş Baydin, University of Oxford

Kessler was initially developed by the Constellations team at the Frontier Development Lab (FDL) Europe 2020, a public–private partnership between the European Space Agency (ESA), Trillium Technologies, and University of Oxford.
Kessler was initiated by the Constellations team at the Frontier Development Lab (FDL) Europe 2020, a public–private partnership between the European Space Agency (ESA), Trillium Technologies, and University of Oxford. The main developer is [Giacomo Acciarini](https://www.esa.int/gsp/ACT/team/giacomo_acciarini/).

Constellations team members: Giacomo Acciarini, Francesco Pinto, Sascha Metz, Sarah Boufelja, Sylvester Kaczmarek, Klaus Merz, José A. Martinez-Heras, Francesca Letizia, Christopher Bridges, Atılım Güneş Baydin

Expand All @@ -51,7 +44,8 @@ Kessler is distributed under the GNU General Public License version 3. Get in to

## More info and how to cite

If you would like to learn more about or cite the techniques Kessler uses, please see the following papers:
If you use `kessler`, we would be grateful if you could star the repository and/or cite our work.
If you would like to learn more about or cite the techniques `kessler` uses, please see the following papers:

* Giacomo Acciarini, Nicola Baresi, Christopher Bridges, Leonard Felicetti, Stephen Hobbs, Atılım Güneş Baydin. 2023. [“Observation Strategies and Megaconstellations Impact on Current LEO Population.”](https://conference.sdo.esoc.esa.int/proceedings/neosst2/paper/88) In 2nd NEO and Debris Detection Conference.
```
Expand All @@ -63,7 +57,7 @@ If you would like to learn more about or cite the techniques Kessler uses, pleas
}
```
* Giacomo Acciarini, Francesco Pinto, Francesca Letizia, José A. Martinez-Heras, Klaus Merz, Christopher Bridges, and Atılım Güneş Baydin. 2021. [“Kessler: a Machine Learning Library for Spacecraft Collision Avoidance.”](https://conference.sdo.esoc.esa.int/proceedings/sdc8/paper/226) In 8th European Conference on Space Debris.
```
```bibtex
@inproceedings{acciarini-2020-kessler,
title = {Kessler: a Machine Learning Library for Spacecraft Collision Avoidance},
author = {Acciarini, Giacomo and Pinto, Francesco and Letizia, Francesca and Martinez-Heras, José A. and Merz, Klaus and Bridges, Christopher and Baydin, Atılım Güneş},
Expand All @@ -72,7 +66,7 @@ If you would like to learn more about or cite the techniques Kessler uses, pleas
}
```
* Francesco Pinto, Giacomo Acciarini, Sascha Metz, Sarah Boufelja, Sylvester Kaczmarek, Klaus Merz, José A. Martinez-Heras, Francesca Letizia, Christopher Bridges, and Atılım Güneş Baydin. 2020. “Towards Automated Satellite Conjunction Management with Bayesian Deep Learning.” In AI for Earth Sciences Workshop at NeurIPS 2020, Vancouver, Canada. [arXiv:2012.12450](https://arxiv.org/abs/2012.12450)
```
```bibtex
@inproceedings{pinto-2020-automated,
title = {Towards Automated Satellite Conjunction Management with Bayesian Deep Learning},
author = {Pinto, Francesco and Acciarini, Giacomo and Metz, Sascha and Boufelja, Sarah and Kaczmarek, Sylvester and Merz, Klaus and Martinez-Heras, José A. and Letizia, Francesca and Bridges, Christopher and Baydin, Atılım Güneş},
Expand All @@ -81,7 +75,7 @@ If you would like to learn more about or cite the techniques Kessler uses, pleas
}
```
* Giacomo Acciarini, Francesco Pinto, Sascha Metz, Sarah Boufelja, Sylvester Kaczmarek, Klaus Merz, José A. Martinez-Heras, Francesca Letizia, Christopher Bridges, and Atılım Güneş Baydin. 2020. “Spacecraft Collision Risk Assessment with Probabilistic Programming.” In Third Workshop on Machine Learning and the Physical Sciences (NeurIPS 2020), Vancouver, Canada. [arXiv:2012.10260](https://arxiv.org/abs/2012.10260)
```
```bibtex
@inproceedings{acciarini-2020-spacecraft,
title = {Spacecraft Collision Risk Assessment with Probabilistic Programming},
author = {Acciarini, Giacomo and Pinto, Francesco and Metz, Sascha and Boufelja, Sarah and Kaczmarek, Sylvester and Merz, Klaus and Martinez-Heras, José A. and Letizia, Francesca and Bridges, Christopher and Baydin, Atılım Güneş},
Expand All @@ -92,7 +86,7 @@ If you would like to learn more about or cite the techniques Kessler uses, pleas

## Installation

To install kessler, do the following:
To install `kessler` locally, you can do the following:

```
git clone https://github.com/kesslerlib/kessler.git
Expand Down
111 changes: 9 additions & 102 deletions docs/notebooks/basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@
"\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import kessler"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -45,7 +36,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -62,92 +53,25 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Loading CDMS (with extension .cdm.kvn.txt) from directory: /Users/giacomoacciarini/cdm_data/cdms_kvn/\n",
"Loaded 39 CDMs grouped into 4 events\n"
"Loading CDMS (with extension .kvn) from directory: synthetic_cdms/\n",
"Loaded 14 CDMs grouped into 2 events\n"
]
}
],
"source": [
"path_to_cdms_folder='cdm_data/cdms_kvn/'\n",
"path_to_cdms_folder='synthetic_cdms/'\n",
"\n",
"events=EventDataset(path_to_cdms_folder)\n",
"events=EventDataset(path_to_cdms_folder,cdm_extension='.kvn')\n",
"#A message appears confirming that the loading has happened, with the number of CDMs and events."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Loading CDMs from pandas ``DataFrame`` object\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"In this tutorial, we show how to load CDMs from pandas ``DataFrame`` object.\n",
"\n",
"First we perform the relevant imports:\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"import kessler\n",
"import pandas as pd\n",
"from kessler import EventDataset\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Then, we create the ``EventDataset`` object, after having uploaded the pandas dataframe and created the ``DataFrame`` object:"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Dataframe with 2 rows and 231 columns\n",
"Dropping columns with NaNs\n",
"Dataframe with 2 rows and 104 columns\n",
"Grouping by event_id\n",
"Grouped into 1 event(s)\n",
"Converting DataFrame to EventDataset\n",
"Time spent | Time remain.| Progress | Events | Events/sec\n",
"0d:00:00:00 | 0d:00:00:00 | #################### | 1/1 | 404.06 \n",
"\n",
"EventDataset(Events:1, number of CDMs per event: 2 (min), 2 (max), 2.00 (mean))\n"
]
}
],
"source": [
"file_name='cdm_data/cdms_csv/sample.csv'\n",
"df=pd.read_csv(file_name)\n",
"events=EventDataset.from_pandas(df)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -173,27 +97,10 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Cannot import dbm.gnu: No module named '_gdbm'\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/giacomoacciarini/miniconda3/envs/fdl/lib/python3.7/site-packages/pyprob/util.py:327: UserWarning: Empirical distributions on disk may perform slow because GNU DBM is not available. Please install and configure gdbm library for Python for better speed.\n",
" warnings.warn('Empirical distributions on disk may perform slow because GNU DBM is not available. Please install and configure gdbm library for Python for better speed.')\n"
]
}
],
"outputs": [],
"source": [
"import kessler\n",
"from kessler.data import kelvins_to_event_dataset"
]
},
Expand Down Expand Up @@ -230,7 +137,7 @@
}
],
"source": [
"file_name='cdm_data/kelvins_data/test_data.csv'\n",
"file_name='kelvins_data/test_data.csv'\n",
"events=kelvins_to_event_dataset(file_name, drop_features=['c_rcs_estimate', 't_rcs_estimate'], num_events=1000)\n",
"#The output will show the number of CDMs and events loaded, as they progress.\n"
]
Expand Down
43 changes: 17 additions & 26 deletions docs/notebooks/cdms_analysis_and_plotting.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/notebooks/kelvins_dataset.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"outputs": [],
"source": [
"import kessler\n",
"from kessler import EventDataset\n",
"from kessler.nn import LSTMPredictor\n",
"from kessler.data import kelvins_to_event_dataset\n",
"import pandas as pd\n",
Expand All @@ -28,13 +27,14 @@
{
"cell_type": "code",
"execution_count": null,
"id": "322e9b06",
"metadata": {},
"outputs": [],
"source": [
"#As an example, we first show the case in which the data comes from the Kelvins competition.\n",
"#For this, we built a specific converter that takes care of the conversion from Kelvins format\n",
"#to standard CDM format (the data can be downloaded at https://kelvins.esa.int/collision-avoidance-challenge/data/):\n",
"file_name = '/home/gunes/data/kelvins/train_data/train_data.csv'\n",
"file_name='kelvins_data/train_data.csv'\n",
"events = kelvins_to_event_dataset(file_name, drop_features=['c_rcs_estimate', 't_rcs_estimate'], num_events=1000) #we use only 200 events"
]
},
Expand Down
80 changes: 46 additions & 34 deletions docs/notebooks/plotting.ipynb

Large diffs are not rendered by default.

Loading