https://github.com/sub6resources/astro-sampler
Sample from distributions commonly used in astronomy
https://github.com/sub6resources/astro-sampler
Last synced: about 2 months ago
JSON representation
Sample from distributions commonly used in astronomy
- Host: GitHub
- URL: https://github.com/sub6resources/astro-sampler
- Owner: Sub6Resources
- License: other
- Created: 2024-05-14T15:22:18.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-16T15:51:46.000Z (about 2 years ago)
- Last Synced: 2025-09-30T03:10:08.905Z (10 months ago)
- Language: Python
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Astro Sampler
Sample from distributions commonly used in astronomy.
## Installation
```bash
pip install astrosampler
```
### Dependencies
- `numpy`
## Usage
```python
from astrosampler import SalpeterIMF
# Sample 1000 stellar masses from the Salpeter (1955) IMF
imf = SalpeterIMF(mass_range=(0.08, 100))
masses = imf.sample(1000)
```