-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0081f1
commit 51e2ad0
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import os, sys | ||
import specutils | ||
import numpy as np | ||
|
||
import pylab as pl | ||
|
||
# Read in and then print out a MIDAS spectra file. | ||
# Only works with python 2.7 and specutils <= 0.2 | ||
|
||
s = specutils.io.read_fits.read_fits_spectrum1d(sys.argv[1]) | ||
flux = s.data | ||
xarr = np.arange(len(flux)) | ||
warr = s._wcs(xarr) | ||
for i in range(len(flux)): | ||
print warr[i], flux[i] | ||
|