How to use the pysynphot.FileSpectrum function in pysynphot

To help you get started, we’ve selected a few pysynphot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github iancze / Starfish / vega.py View on Github external
import numpy as np
import pysynphot as S
import matplotlib.pyplot as plt
from echelle_io import rechelletxt
from matplotlib.ticker import FormatStrFormatter as FSF
from scipy.interpolate import interp1d
from model import shift_vz
import asciitable


vega = S.FileSpectrum("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/calspec/alpha_lyr_stis_005.fits")
#feige = S.FileSpectrum("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/calspec/feige34_stis_001.fits")

#plt.plot(vega.wave,vega.flux)
#plt.plot(feige34.wave,feige34.flux)
#plt.xlim(3800,10000)
#plt.show()

#vega_efile = rechelletxt("TRES_spectra/Vega/Vega_2012-04-02_12h50m48s_cb.norm.crop.spec") #has structure len = 51,
# for each order: [wl,fl]
##vega_sfile = []
#for i in vega_efile:
#    i[1] = i[1]/3.0
#print("Flux normed Vega")
#
#feige_efile = rechelletxt("TRES_spectra/Feige34/Feige34_2012-04-29_03h42m55s_cb.norm.crop.spec")
#for i in feige_efile:

pysynphot

Python Synthetic Photometry Utilities

BSD-3-Clause
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis