Skip to main content

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

  1. Clone the repo:

    git clone https://github.com/ashleyrbemis/synth_spectra.git
    cd synth_spectra
    
  2. Set up the environment: This project uses Conda. Make sure your codeastro environment is active and has the necessary packages.

    conda activate codeastro
    conda install numpy scipy matplotlib
    
  3. Installation:

    pip install -e .
    
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

synth_spectra-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synth_spectra-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

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

Hashes for synth_spectra-0.1.0.tar.gz
Algorithm Hash digest
SHA256 19b44f1ffbec468517c0a2c5e077180e5011b0d74b411ee232c84e5cdcf956ba
MD5 9a917ae4dab7c7b3b59cd7b67b2121d2
BLAKE2b-256 3aa58ab7788eae790d379e8630159d44a935ffee0e20304dd69f45658ed901dc

See more details on using hashes here.

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

Hashes for synth_spectra-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38bbf0cd014c22bcd9405266fe9c8dbb049d8a7e427deab5d445b3d407cec8ee
MD5 a795b35f637b7abeed511862aae40ceb
BLAKE2b-256 c8965dcb12e5bc8af0947ad26f0418040741a2b101a3937e1b1dec17e94cb8f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page