Skip to content

Commit b803593

Browse files
committed
some old updates
1 parent 4a5b5f2 commit b803593

14 files changed

Lines changed: 71 additions & 111 deletions

File tree

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/trace.pickle

-66.1 KB
Binary file not shown.

kessler/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
# This code is part of Kessler, a machine learning library for spacecraft collision avoidance.
22
#
33
# Copyright (c) 2020-
4-
# University of Oxford (Atilim Gunes Baydin <gunes@robots.ox.ac.uk>)
54
# Trillium Technologies
6-
# Giacomo Acciarini
5+
# University of Oxford
6+
# Giacomo Acciarini (giacomo.acciarini@gmail.com)
77
# and other contributors, see README in root of repository.
88
#
99
# GNU General Public License version 3. See LICENSE in root of repository.
1010

11-
1211
__version__ = '1.0.0'
1312

1413
from .util import seed

kessler/cdm.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
# This code is part of Kessler, a machine learning library for spacecraft collision avoidance.
22
#
33
# Copyright (c) 2020-
4-
# University of Oxford (Atilim Gunes Baydin <gunes@robots.ox.ac.uk>)
54
# Trillium Technologies
6-
# Giacomo Acciarini
5+
# University of Oxford
6+
# Giacomo Acciarini (giacomo.acciarini@gmail.com)
77
# and other contributors, see README in root of repository.
88
#
99
# GNU General Public License version 3. See LICENSE in root of repository.
1010

11-
1211
import numpy as np
1312
import warnings
1413
import datetime

kessler/data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# This code is part of Kessler, a machine learning library for spacecraft collision avoidance.
22
#
33
# Copyright (c) 2020-
4-
# University of Oxford (Atilim Gunes Baydin <gunes@robots.ox.ac.uk>)
54
# Trillium Technologies
6-
# Giacomo Acciarini
5+
# University of Oxford
6+
# Giacomo Acciarini (giacomo.acciarini@gmail.com)
77
# and other contributors, see README in root of repository.
88
#
99
# GNU General Public License version 3. See LICENSE in root of repository.

kessler/event.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
# This code is part of Kessler, a machine learning library for spacecraft collision avoidance.
22
#
33
# Copyright (c) 2020-
4-
# University of Oxford (Atilim Gunes Baydin <gunes@robots.ox.ac.uk>)
54
# Trillium Technologies
6-
# Giacomo Acciarini
5+
# University of Oxford
6+
# Giacomo Acciarini (giacomo.acciarini@gmail.com)
77
# and other contributors, see README in root of repository.
88
#
99
# GNU General Public License version 3. See LICENSE in root of repository.
1010

11-
1211
import pandas as pd
1312
import numpy as np
1413
import matplotlib as mpl

kessler/model.py

Lines changed: 13 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# This code is part of Kessler, a machine learning library for spacecraft collision avoidance.
2+
#
3+
# Copyright (c) 2020-
4+
# Trillium Technologies
5+
# University of Oxford
6+
# Giacomo Acciarini (giacomo.acciarini@gmail.com)
7+
# and other contributors, see README in root of repository.
8+
#
9+
# GNU General Public License version 3. See LICENSE in root of repository.
10+
111
import dsgp4
212
import numpy as np
313
import uuid
@@ -8,10 +18,6 @@
818
from . import GNSS, Radar, ConjunctionDataMessage, util
919
from dsgp4 import TLE
1020

11-
from torch.distributions import constraints
12-
from torch.distributions.distribution import Distribution
13-
from torch.distributions.utils import broadcast_all
14-
1521
from pyro.distributions import MixtureSameFamily, Categorical, Uniform, Normal, Bernoulli
1622

1723
def find_conjunction(tr0,
@@ -45,74 +51,6 @@ def find_conjunction(tr0,
4551
d_conj = squared_norm[i_conj].sqrt()
4652
return i_min, d_min, i_conj, d_conj
4753

48-
49-
class TruncatedNormal(Distribution):
50-
"""
51-
Truncated Normal distribution with specified lower and upper bounds.
52-
This class inherits from the Pyro Distribution class and implements
53-
the log probability and sampling methods for a truncated normal distribution.
54-
55-
Args:
56-
loc (``torch.Tensor``): The mean of the normal distribution.
57-
scale (``torch.Tensor``): The standard deviation of the normal distribution.
58-
low (``torch.Tensor``, optional): The lower bound for truncation. Default is None.
59-
high (``torch.Tensor``, optional): The upper bound for truncation. Default is None.
60-
validate_args (bool, optional): Whether to validate the arguments. Default is None.
61-
62-
Attributes:
63-
loc (``torch.Tensor``): The mean of the normal distribution.
64-
scale (``torch.Tensor``): The standard deviation of the normal distribution.
65-
low (``torch.Tensor``): The lower bound for truncation.
66-
high (``torch.Tensor``): The upper bound for truncation.
67-
base_dist (``Normal``): The base normal distribution.
68-
69-
Methods:
70-
log_prob(value): Computes the log probability of the given value.
71-
sample(sample_shape): Samples from the truncated normal distribution.
72-
"""
73-
arg_constraints = {
74-
'loc': constraints.real, # loc can be any real number
75-
'scale': constraints.positive, # scale must be positive
76-
'low': constraints.real, # low can be any real number
77-
'high': constraints.real # high can be any real number
78-
}
79-
80-
def __init__(self, loc, scale, low=None, high=None, validate_args=None):
81-
# Convert inputs to tensors and handle None values
82-
self.loc, self.scale, self.low, self.high = broadcast_all(
83-
torch.as_tensor(loc), torch.as_tensor(scale),
84-
torch.as_tensor(low) if low is not None else None,
85-
torch.as_tensor(high) if high is not None else None
86-
)
87-
# Validate bounds (low < high)
88-
if self.low is not None and self.high is not None:
89-
if (self.low >= self.high).any():
90-
raise ValueError("Invalid bounds: low must be less than high.")
91-
# Create a base Normal distribution
92-
self.base_dist = Normal(loc, scale)
93-
super().__init__(batch_shape=self.loc.shape, validate_args=validate_args)
94-
95-
def log_prob(self, value):
96-
# Calculate log probability for the normal distribution
97-
log_prob = self.base_dist.log_prob(value)
98-
# Adjust for truncation at the low bound (if any)
99-
if self.low is not None:
100-
log_prob -= torch.log(torch.clamp(self.base_dist.cdf(self.low), min=1e-10))
101-
# Adjust for truncation at the high bound (if any)
102-
if self.high is not None:
103-
log_prob -= torch.log(torch.clamp(1 - self.base_dist.cdf(self.high), min=1e-10))
104-
105-
return log_prob
106-
107-
def sample(self, sample_shape=torch.Size()):
108-
shape = self._extended_shape(sample_shape)
109-
rand = torch.rand(shape, dtype=self.loc.dtype, device=self.loc.device)
110-
if self.low is not None:
111-
rand = rand * (1 - self.base_dist.cdf(self.low)) + self.base_dist.cdf(self.low)
112-
if self.high is not None:
113-
rand = rand * self.base_dist.cdf(self.high)
114-
return self.base_dist.icdf(rand)
115-
11654
def default_prior():
11755
"""
11856
This function returns a dictionary of TLE elements priors.
@@ -145,7 +83,7 @@ def default_prior():
14583
mixture_distribution=Categorical(probs=torch.tensor([
14684
0.12375596165657043, 0.05202080309391022, 0.21220888197422028,
14785
0.0373813770711422, 0.01674230769276619, 0.5578906536102295])),
148-
component_distribution=TruncatedNormal(
86+
component_distribution=util.TruncatedNormal(
14987
low=0.0, high=0.004, loc=torch.tensor([
15088
0.0010028142482042313, 0.00017592836171388626, 0.0010926761478185654,
15189
0.0003353552892804146, 0.0007777251303195953, 0.001032940074801445]),
@@ -162,7 +100,7 @@ def default_prior():
162100
mixture_distribution=Categorical(probs=torch.tensor([
163101
0.5433819890022278, 0.04530993849039078, 0.08378008753061295,
164102
0.02705608867108822, 0.03350389748811722, 0.2669680118560791])),
165-
component_distribution=TruncatedNormal(
103+
component_distribution=util.TruncatedNormal(
166104
low=0.0, high=0.8999999761581421, loc=torch.tensor([
167105
0.0028987403493374586, 0.6150050163269043, 0.05085373669862747,
168106
0.3420163094997406, 0.7167646288871765, 0.013545362278819084]),
@@ -178,7 +116,7 @@ def default_prior():
178116
0.028676774352788925, 0.06484941393136978, 0.13786117732524872, 0.0010146398562937975,
179117
0.047179922461509705, 0.01607278548181057, 0.020023610442876816, 0.06644929945468903,
180118
0.4442509114742279])),
181-
component_distribution=TruncatedNormal(
119+
component_distribution=util.TruncatedNormal(
182120
low=0.0, high=torch.pi, loc=torch.tensor([
183121
0.09954200685024261, 1.4393062591552734, 1.736578106880188, 1.0963480472564697,
184122
0.48166394233703613, 0.9063634872436523, 1.275956392288208, 2.5208728313446045,

kessler/nn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# This code is part of Kessler, a machine learning library for spacecraft collision avoidance.
22
#
33
# Copyright (c) 2020-
4-
# University of Oxford (Atilim Gunes Baydin <gunes@robots.ox.ac.uk>)
54
# Trillium Technologies
6-
# Giacomo Acciarini
5+
# University of Oxford
6+
# Giacomo Acciarini (giacomo.acciarini@gmail.com)
77
# and other contributors, see README in root of repository.
88
#
99
# GNU General Public License version 3. See LICENSE in root of repository.

kessler/observation_model.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# This code is part of Kessler, a machine learning library for spacecraft collision avoidance.
2+
#
3+
# Copyright (c) 2020-
4+
# Trillium Technologies
5+
# University of Oxford
6+
# Giacomo Acciarini (giacomo.acciarini@gmail.com)
7+
# and other contributors, see README in root of repository.
8+
#
9+
# GNU General Public License version 3. See LICENSE in root of repository.
10+
111
import numpy as np
212

313

setup.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ def read_package_variable(key):
2626
setup(
2727
name='kessler',
2828
version=read_package_variable('__version__'),
29-
description='Simulation-based inference and machine learning for space collision assessment and avoidance.',
30-
author='ESA FDL Europe Constellations Team',
31-
# author_email='',
29+
description='Machine learning and simulation-based inference and machine learning for space collision assessment and avoidance.',
30+
long_description=open('README.md').read(),
31+
author='Giacomo Acciarini',
32+
author_email='giacomo.acciarini@gmail.com',
3233
packages=find_packages(),
3334
install_requires=['pyro', 'numpy', 'matplotlib', 'torch>=1.5.1', 'dsgp4', 'skyfield>=1.26', 'pandas'],
3435
extras_require={'dev': ['pytest', 'coverage', 'pytest-xdist']},
35-
# url='https://github.com/kessler/kessler',
36+
url='https://kesslerlib.github.io/kessler/',
3637
classifiers=['License :: OSI Approved :: BSD License', 'Programming Language :: Python :: 3'],
3738
license='BSD'
38-
# keywords='',
39+
keywords='Spacecraft Collision Avoidance Kessler Machine Learning Artificial Intelligence Probabilistic Programming',
3940
)

0 commit comments

Comments
 (0)