A package to generate synthetic spectra for testing purposes.
Project description
Synthetic Spectra Generator
This is a simple tool for generating synthetic astronomical spectra. You can use it to create test data with multiple Gaussian components and control the amount of noise.
How It's Organized
config.py: Contains all the default spectra properties you might want to tweak, like the spectral range and noise levels.spectrum_utils.py: The core library with functions that do the actual work of building a spectrum.plotting.py: The main script you execute to see an example plot.
Getting Started
-
Clone the repo:
git clone https://github.com/ashleyrbemis/synth_spectra.git cd synth_spectra
-
Set up the environment: This project uses Conda. Make sure your
codeastroenvironment is active and has the necessary packages.conda activate codeastro conda install numpy scipy matplotlib
-
Installation:
pip install -e .
-
Run the code:
import synth_spectra import matplotlib.pyplot as plt spec = synth_spectra.generate_synthetic_spectrum() fig,ax = synth_spectra.plot_spectrum(spec) plt.show()
This will generate a sample spectrum and show you a plot.
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 synth_spectra-0.1.0.tar.gz.
File metadata
- Download URL: synth_spectra-0.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19b44f1ffbec468517c0a2c5e077180e5011b0d74b411ee232c84e5cdcf956ba
|
|
| MD5 |
9a917ae4dab7c7b3b59cd7b67b2121d2
|
|
| BLAKE2b-256 |
3aa58ab7788eae790d379e8630159d44a935ffee0e20304dd69f45658ed901dc
|
File details
Details for the file synth_spectra-0.1.0-py3-none-any.whl.
File metadata
- Download URL: synth_spectra-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38bbf0cd014c22bcd9405266fe9c8dbb049d8a7e427deab5d445b3d407cec8ee
|
|
| MD5 |
a795b35f637b7abeed511862aae40ceb
|
|
| BLAKE2b-256 |
c8965dcb12e5bc8af0947ad26f0418040741a2b101a3937e1b1dec17e94cb8f2
|