Skip to main content

Creates sample galaxy spectra in the GHz/THz range

Project description

GalSpec package

This package is intended to quickly and easily generate a galaxy spectrum with a blackbody continuum emission and CO and CII emission lines. Code by Tom Bakx, packaging by Stefanie Brackenhoff

Functionalities & Usage

  • A spectrum can be generated using the spectrum() function.

It takes the following inputs: luminosity in units of log(L_fir [L_sol]) redshift z fLow, fHigh minimum and maximum frequency that will be in the spectrum in units of GHz numFreqBins amount of linearly spaced frequency bins at which the spectrum should be evaluated linewidth width of spectral lines in units of km/s

And creates as output: freqArray array frequencies in units of GHz spectrum array of the flux densities in the spectrum in units of Jy

  • The spectrum can quickly be plotted using the plotspectrum() function This function takes the outputs of spectrum() as an input and creates a plot with axis labels

Example

luminosity = 13.7
z = 4.43
fLow = 332 #GHz
fHigh = 377 #GHz
numFreqBins = 1500
linewidth = 600
gal_freq, gal_flux =spectrum(luminosity, z, fLow, fHigh, numFreqBins, linewidth)

plotspectrum(gal_freq, gal_flux)

Example

Installation

pip install galspec

Required packages

  • Numpy
  • astropy
  • matplotlib

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

galspec-0.0.3.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

galspec-0.0.3-py3-none-any.whl (7.2 kB view hashes)

Uploaded Python 3

Supported by

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