AstroLib - Advanced Astrophysics Library
Overview
AstroLib is a high-performance Python library for astrophysical computations, focusing on void finding, neutrino physics, and N-body simulations. It's designed to work efficiently even on low-performance hardware through innovative algorithms and resource management.
Features
Core Components
- Void Finding: Advanced algorithms for void detection and analysis
- Neutrino Physics: Tools for neutrino mass estimation using void expansion
- N-Body Simulations: Optimized particle simulations
- Machine Learning Integration: ML-based analysis tools
Performance Optimizations
- Adaptive resource management
- Smart caching system
- Memory-efficient data structures
- Parallel processing capabilities
Installation
# Clone the repository
git clone https://github.com/yourusername/astrolib.git
cd astrolib
# Install dependencies
pip install -r requirements.txt
# Install the package
pip install -e .
Requirements
- Python >= 3.8
- NumPy >= 1.20.0
- SciPy >= 1.7.0
- Astropy >= 4.0
- Numba >= 0.55.0
- h5py >= 3.0.0
- matplotlib >= 3.4.0
- pandas >= 1.3.0
- scikit-learn >= 1.0.0
- psutil >= 5.8.0
Quick Start
from astrolib.optimized_voids import StreamingVoidFinder
from astrolib.optimized_nbody import OptimizedNBody, SimulationConfig
from astrolib.neutrino_ml import NeutrinoMassEstimator
# Initialize void finder with resource-aware settings
finder = StreamingVoidFinder(chunk_size=100000, n_workers=2)
# Find voids in streaming mode
for void in finder.find_voids_streaming(data_iterator, box_size=500.0):
print(f"Found void: radius = {void['radius']:.2f}")
# Set up N-body simulation
config = SimulationConfig(
dt=0.01,
softening=1e-4,
theta=0.5,
use_cache=True,
n_workers=2
)
simulator = OptimizedNBody(config)
# Run simulation
positions, velocities = simulator.simulate_chunk(
positions,
velocities,
masses,
steps=100
)
# Estimate neutrino mass
estimator = NeutrinoMassEstimator()
mass, uncertainty = estimator.predict(voids)
print(f"Estimated neutrino mass: {mass:.3f} ± {uncertainty:.3f} eV")
Documentation
Void Finding
The library implements multiple void finding algorithms:
- Watershed Void Finder
- ZOBOV (Zones Bordering On Voidness)
- ML-enhanced void detection
from astrolib.optimized_voids import StreamingVoidFinder
# Initialize finder
finder = StreamingVoidFinder()
# Find voids
voids = finder.find_voids_streaming(
data_iterator,
box_size=500.0
)
N-Body Simulations
Efficient N-body simulations with adaptive time stepping:
from astrolib.optimized_nbody import OptimizedNBody
# Configure simulation
simulator = OptimizedNBody()
# Run simulation
positions, velocities = simulator.simulate_chunk(
initial_positions,
initial_velocities,
masses
)
Neutrino Physics
Tools for neutrino mass estimation:
from astrolib.neutrino_ml import NeutrinoMassEstimator
# Initialize estimator
estimator = NeutrinoMassEstimator()
# Estimate mass
mass, uncertainty = estimator.predict(void_catalog)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Citation
If you use this library in your research, please cite:
@software{astrolib2025,
author = {Your Name},
title = {AstroLib: Advanced Astrophysics Library},
year = {2025},
url = {https://github.com/yourusername/astrolib}
}
Metadata
Release files for astro-void-finder 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| astro_void_finder-0.2.0.tar.gz | 22.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| astro_void_finder-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.4 kB
Release files / astro_void_finder-0.2.0.tar.gz
| Download URL | astro_void_finder-0.2.0.tar.gz |
|---|---|
| Size | 22.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eac01001c42eac4de7ed1fbd28d26856db2d6db0be735c62b397dd15e7f5e4be
|
|
BLAKE2b-256 checksum How to use checksums |
07990114c6c16c878b645c835ffd3ce222143a0d71153903beeb379aec54499e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Release files / astro_void_finder-0.2.0-py3-none-any.whl
| Download URL | astro_void_finder-0.2.0-py3-none-any.whl |
|---|---|
| Size | 26.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e1097ecafed1eb6c012a696a417fd1569b0748300fde73a481ce2ccd26c38550
|
|
BLAKE2b-256 checksum How to use checksums |
cdc57948ac95231477c17a1de178afb4e94f25688f1ca95e000dca19a357618d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Security for astro-void-finder 0.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.