Skip to content

Commit fc2c7e7

Browse files
authored
Merge pull request #9 from kesslerlib/pyro
from pyprob to pyro probprog engine
2 parents c283ace + f2189be commit fc2c7e7

23 files changed

Lines changed: 1716 additions & 1897 deletions

.github/workflows/build.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ jobs:
2626
- name: Install
2727
run: |
2828
python -m pip install --upgrade pip
29-
pip install matplotlib
30-
pip install jupyter
31-
pip install numpy
32-
pip install dsgp4
33-
pip install pyprob
34-
pip install skyfield
3529
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
3630
pip install .[dev]
3731
pip install sphinx

README.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,19 @@
2222

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

2827
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).
2928

30-
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).
29+
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).
3130

3231
## Documentation and roadmap
3332

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

3635
## Authors
3736

38-
* Giacomo Acciarini, University of Surrey
39-
* Francesco Pinto, University of Oxford
40-
* Francesca Letizia, European Space Agency
41-
* Chris Bridges, University of Surrey
42-
* Atılım Güneş Baydin, University of Oxford
43-
44-
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.
37+
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/).
4538

4639
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
4740

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

5245
## More info and how to cite
5346

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

5650
* 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.
5751
```
@@ -63,7 +57,7 @@ If you would like to learn more about or cite the techniques Kessler uses, pleas
6357
}
6458
```
6559
* 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.
66-
```
60+
```bibtex
6761
@inproceedings{acciarini-2020-kessler,
6862
title = {Kessler: a Machine Learning Library for Spacecraft Collision Avoidance},
6963
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ş},
@@ -72,7 +66,7 @@ If you would like to learn more about or cite the techniques Kessler uses, pleas
7266
}
7367
```
7468
* 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)
75-
```
69+
```bibtex
7670
@inproceedings{pinto-2020-automated,
7771
title = {Towards Automated Satellite Conjunction Management with Bayesian Deep Learning},
7872
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ş},
@@ -81,7 +75,7 @@ If you would like to learn more about or cite the techniques Kessler uses, pleas
8175
}
8276
```
8377
* 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)
84-
```
78+
```bibtex
8579
@inproceedings{acciarini-2020-spacecraft,
8680
title = {Spacecraft Collision Risk Assessment with Probabilistic Programming},
8781
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ş},
@@ -92,7 +86,7 @@ If you would like to learn more about or cite the techniques Kessler uses, pleas
9286

9387
## Installation
9488

95-
To install kessler, do the following:
89+
To install `kessler` locally, you can do the following:
9690

9791
```
9892
git clone https://github.com/kesslerlib/kessler.git

docs/notebooks/basics.ipynb

Lines changed: 9 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@
88
"\n"
99
]
1010
},
11-
{
12-
"cell_type": "code",
13-
"execution_count": 1,
14-
"metadata": {},
15-
"outputs": [],
16-
"source": [
17-
"import kessler"
18-
]
19-
},
2011
{
2112
"cell_type": "markdown",
2213
"metadata": {},
@@ -45,7 +36,7 @@
4536
},
4637
{
4738
"cell_type": "code",
48-
"execution_count": 2,
39+
"execution_count": 1,
4940
"metadata": {},
5041
"outputs": [],
5142
"source": [
@@ -62,92 +53,25 @@
6253
},
6354
{
6455
"cell_type": "code",
65-
"execution_count": 4,
56+
"execution_count": 2,
6657
"metadata": {},
6758
"outputs": [
6859
{
6960
"name": "stdout",
7061
"output_type": "stream",
7162
"text": [
72-
"Loading CDMS (with extension .cdm.kvn.txt) from directory: /Users/giacomoacciarini/cdm_data/cdms_kvn/\n",
73-
"Loaded 39 CDMs grouped into 4 events\n"
63+
"Loading CDMS (with extension .kvn) from directory: synthetic_cdms/\n",
64+
"Loaded 14 CDMs grouped into 2 events\n"
7465
]
7566
}
7667
],
7768
"source": [
78-
"path_to_cdms_folder='cdm_data/cdms_kvn/'\n",
69+
"path_to_cdms_folder='synthetic_cdms/'\n",
7970
"\n",
80-
"events=EventDataset(path_to_cdms_folder)\n",
71+
"events=EventDataset(path_to_cdms_folder,cdm_extension='.kvn')\n",
8172
"#A message appears confirming that the loading has happened, with the number of CDMs and events."
8273
]
8374
},
84-
{
85-
"cell_type": "markdown",
86-
"metadata": {},
87-
"source": [
88-
"## Loading CDMs from pandas ``DataFrame`` object\n",
89-
"\n",
90-
"\n",
91-
"\n"
92-
]
93-
},
94-
{
95-
"cell_type": "markdown",
96-
"metadata": {},
97-
"source": [
98-
"\n",
99-
"In this tutorial, we show how to load CDMs from pandas ``DataFrame`` object.\n",
100-
"\n",
101-
"First we perform the relevant imports:\n",
102-
" "
103-
]
104-
},
105-
{
106-
"cell_type": "code",
107-
"execution_count": 5,
108-
"metadata": {},
109-
"outputs": [],
110-
"source": [
111-
"import kessler\n",
112-
"import pandas as pd\n",
113-
"from kessler import EventDataset\n"
114-
]
115-
},
116-
{
117-
"cell_type": "markdown",
118-
"metadata": {},
119-
"source": [
120-
"Then, we create the ``EventDataset`` object, after having uploaded the pandas dataframe and created the ``DataFrame`` object:"
121-
]
122-
},
123-
{
124-
"cell_type": "code",
125-
"execution_count": 7,
126-
"metadata": {},
127-
"outputs": [
128-
{
129-
"name": "stdout",
130-
"output_type": "stream",
131-
"text": [
132-
"Dataframe with 2 rows and 231 columns\n",
133-
"Dropping columns with NaNs\n",
134-
"Dataframe with 2 rows and 104 columns\n",
135-
"Grouping by event_id\n",
136-
"Grouped into 1 event(s)\n",
137-
"Converting DataFrame to EventDataset\n",
138-
"Time spent | Time remain.| Progress | Events | Events/sec\n",
139-
"0d:00:00:00 | 0d:00:00:00 | #################### | 1/1 | 404.06 \n",
140-
"\n",
141-
"EventDataset(Events:1, number of CDMs per event: 2 (min), 2 (max), 2.00 (mean))\n"
142-
]
143-
}
144-
],
145-
"source": [
146-
"file_name='cdm_data/cdms_csv/sample.csv'\n",
147-
"df=pd.read_csv(file_name)\n",
148-
"events=EventDataset.from_pandas(df)"
149-
]
150-
},
15175
{
15276
"cell_type": "markdown",
15377
"metadata": {},
@@ -173,27 +97,10 @@
17397
},
17498
{
17599
"cell_type": "code",
176-
"execution_count": 8,
100+
"execution_count": 3,
177101
"metadata": {},
178-
"outputs": [
179-
{
180-
"name": "stdout",
181-
"output_type": "stream",
182-
"text": [
183-
"Cannot import dbm.gnu: No module named '_gdbm'\n"
184-
]
185-
},
186-
{
187-
"name": "stderr",
188-
"output_type": "stream",
189-
"text": [
190-
"/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",
191-
" 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"
192-
]
193-
}
194-
],
102+
"outputs": [],
195103
"source": [
196-
"import kessler\n",
197104
"from kessler.data import kelvins_to_event_dataset"
198105
]
199106
},
@@ -230,7 +137,7 @@
230137
}
231138
],
232139
"source": [
233-
"file_name='cdm_data/kelvins_data/test_data.csv'\n",
140+
"file_name='kelvins_data/test_data.csv'\n",
234141
"events=kelvins_to_event_dataset(file_name, drop_features=['c_rcs_estimate', 't_rcs_estimate'], num_events=1000)\n",
235142
"#The output will show the number of CDMs and events loaded, as they progress.\n"
236143
]

docs/notebooks/cdms_analysis_and_plotting.ipynb

Lines changed: 17 additions & 26 deletions
Large diffs are not rendered by default.

docs/notebooks/kelvins_dataset.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"outputs": [],
88
"source": [
99
"import kessler\n",
10-
"from kessler import EventDataset\n",
1110
"from kessler.nn import LSTMPredictor\n",
1211
"from kessler.data import kelvins_to_event_dataset\n",
1312
"import pandas as pd\n",
@@ -28,13 +27,14 @@
2827
{
2928
"cell_type": "code",
3029
"execution_count": null,
30+
"id": "322e9b06",
3131
"metadata": {},
3232
"outputs": [],
3333
"source": [
3434
"#As an example, we first show the case in which the data comes from the Kelvins competition.\n",
3535
"#For this, we built a specific converter that takes care of the conversion from Kelvins format\n",
3636
"#to standard CDM format (the data can be downloaded at https://kelvins.esa.int/collision-avoidance-challenge/data/):\n",
37-
"file_name = '/home/gunes/data/kelvins/train_data/train_data.csv'\n",
37+
"file_name='kelvins_data/train_data.csv'\n",
3838
"events = kelvins_to_event_dataset(file_name, drop_features=['c_rcs_estimate', 't_rcs_estimate'], num_events=1000) #we use only 200 events"
3939
]
4040
},

docs/notebooks/plotting.ipynb

Lines changed: 46 additions & 34 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)