Created
September 5, 2018 19:51
-
-
Save drdavella/05ca82047e2d2861c95d68ef102c8746 to your computer and use it in GitHub Desktop.
Quick demo of constructing a Spectrum1D object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from astropy import units as u | |
from astropy.modeling import models | |
from specutils import Spectrum1D | |
mean = 5 | |
frequencies = np.linspace(1, mean*2, 100) * u.GHz | |
g1 = models.Gaussian1D(amplitude=5*u.Jy, mean=mean*u.GHz, stddev=0.8*u.GHz) | |
spectrum = Spectrum1D(spectral_axis=frequencies, flux=g1(frequencies)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment