Exoplanet Life Probability Calculator
Project description
LifeFinder
Exoplanet Life Probability Calculator
Estimate life potential for exoplanets with neural networks and astrophysical data.
LifeFinder is a Python package and tool to estimate the probability of life on exoplanets using astrophysical parameters and machine learning. It includes a built-in neural network model trained to predict a habitability probability based on stellar and planetary features.
Installation
You can install LifeFinder via pip:
pip install lifefinder
Or clone the repository and use Docker for containerized environment:
git clone https://github.com/afnx/lifefinder.git
docker compose up -d
Usage
Before starting to use LifeFinder, configure necessary parameters such as default artifact locations, model settings etc:
lifefinder configure
Once configured, you could start training models:
lifefinder train
LifeFinder downloads the latest exoplanet data from the NASA Exoplanet Archive, cleans it, and trains the neural network model.
To retrain an existing model with different hyperparameters, just add the --retrain flag:
lifefinder train --retrain
For a full list of commands and options, run:
lifefinder --help
How It Works
LifeFinder does NOT use a classical ground truth for habitability. Instead, it generates a soft, continuous "habitability zone index" (HZ index) for model training, based on the stellar insolation flux received by a planet.
How HZ Index is Computed
- pl_insol: Stellar insolation flux (in Earth units, S⊕).
- Earth = 1.0 S⊕.
- sigma: Controls how quickly the index decays as you move away from Earth's flux.
- Default: 0.5 (roughly the half-width of the conservative habitable zone).
Formula:
import numpy as np
def hz_index(pl_insol, sigma=0.5):
return np.exp(-0.5 * ((pl_insol - 1.0) / sigma) ** 2)
- Planets near Earth's flux (pl_insol ≈ 1.0) have HZ index ≈ 1.0.
- Planets far from Earth's flux get HZ index ≈ 0.0.
- This creates a smooth, interpretable target for machine learning.
Machine Learning Model
LifeFinder uses a neural network regressor built with PyTorch.
- Inputs: Astrophysical features (e.g., stellar flux, planet radius, orbital period, etc.)
- Output: Planet habitability (continuous, 0.0–1.0)
- Architecture: Feedforward neural network with:
- Multiple dense layers
- Nonlinear activation functions (e.g., ReLU, sigmoid)
- Regularization (dropout, L2, etc.)
- Training: Supervised learning using the generated HZ index as the ground truth.
Disclaimer
The outputs and predictions provided by LifeFinder do not represent the actual habitability of any exoplanet, nor do they guarantee the presence or absence of life. The model is designed to estimate a probability of habitability based on available astrophysical data and machine learning techniques. The accuracy and reliability of the results depend strongly on the quality, quantity, and completeness of the input data, as well as the modeling approaches used.
Do not rely solely on LifeFinder's output for scientific conclusions, mission decisions, or any application where actual confirmation of exoplanet habitability is required. The results should always be interpreted as probabilistic estimates and be used in combination with other scientific methods and expert analysis.
Contributing
We welcome your contributions!
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
References
- Kopparapu et al., 2013, ApJ, "Habitable Zones Around Main-Sequence Stars: New Estimates"
- NASA Exoplanet Archive
License
This project is licensed under the Business Source License 1.1 - see the LICENSE file for details.
Authors
- Ali Fuat Numanoglu - Initial work - @afnx
Support
- 🐛 Report Issues
- 📧 Contact Me
- ⭐ If this project helped you, please give it a star!
Made with ❤️ by Ali Fuat Numanoglu
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lifefinder-0.0.2.tar.gz.
File metadata
- Download URL: lifefinder-0.0.2.tar.gz
- Upload date:
- Size: 35.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b371abbc34fd524ee23fabaa9ef8fcd5ddac5b59d91f366ee5c04f72336381ab
|
|
| MD5 |
85f2ad95e0936ee2f79aac69762a52b4
|
|
| BLAKE2b-256 |
0a93ccb865780a4e2443f30af17d94aaad222c3f4b30a9508368a1fd37347ba5
|
Provenance
The following attestation bundles were made for lifefinder-0.0.2.tar.gz:
Publisher:
publish-to-pypi.yml on afnx/lifefinder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lifefinder-0.0.2.tar.gz -
Subject digest:
b371abbc34fd524ee23fabaa9ef8fcd5ddac5b59d91f366ee5c04f72336381ab - Sigstore transparency entry: 585015007
- Sigstore integration time:
-
Permalink:
afnx/lifefinder@1c2d5324a5c5b7c03dd128904758150f86ad534d -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/afnx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@1c2d5324a5c5b7c03dd128904758150f86ad534d -
Trigger Event:
release
-
Statement type:
File details
Details for the file lifefinder-0.0.2-py3-none-any.whl.
File metadata
- Download URL: lifefinder-0.0.2-py3-none-any.whl
- Upload date:
- Size: 34.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
384e4e43dd2c3d31d79729d8bb48ffc92f6a75b86f33f443dbd3200dfc0df4a4
|
|
| MD5 |
8615ac8e47f5ae50ec14b576350d0778
|
|
| BLAKE2b-256 |
06c10811bedf757e0cf9098da8ad0abfb75aca341c9534b99ffecb23f677b4f7
|
Provenance
The following attestation bundles were made for lifefinder-0.0.2-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on afnx/lifefinder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lifefinder-0.0.2-py3-none-any.whl -
Subject digest:
384e4e43dd2c3d31d79729d8bb48ffc92f6a75b86f33f443dbd3200dfc0df4a4 - Sigstore transparency entry: 585015011
- Sigstore integration time:
-
Permalink:
afnx/lifefinder@1c2d5324a5c5b7c03dd128904758150f86ad534d -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/afnx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@1c2d5324a5c5b7c03dd128904758150f86ad534d -
Trigger Event:
release
-
Statement type: