How to use the pysynphot.FileBandpass 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 / synthphot.py View on Github external
ff = load_flux_full(5900,3.5)[ind]*2e-28
#redden spectrum
#red = ff/deredden(ww,1.5,mags=False)

sp = S.ArraySpectrum(wave=ww, flux=ff, waveunits='angstrom', fluxunits='flam', name='T5900K')

#sdss_u=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_u_005_syn.fits")
#sdss_g=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_g_005_syn.fits")
#sdss_r=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_r_005_syn.fits")
#sdss_i=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_i_005_syn.fits")
#sdss_z=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_z_005_syn.fits")

U=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_u_004_syn.fits")
B=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_b_004_syn.fits")
V=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_v_004_syn.fits")
R=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_r_004_syn.fits")
I=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_i_004_syn.fits")

#H = S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/bessell_h_004_syn.fits")
#J = S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/bessell_j_003_syn.fits")
#K = S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/bessell_k_003_syn.fits")

#obs = S.Observation(sp,sdss_u)
#print("Filter = {name}\tAB = {AB:.3f}\tVega = {Vega:.3f}".format(name="i",AB=obs.effstim("abmag"),Vega=obs.effstim("vegamag")))

pfilts = [U,B,V,R,I]

def calc_fluxes():
    return np.array([S.Observation(sp,i).effstim("flam") for i in pfilts])

#fluxes = calc_fluxes()
github iancze / Starfish / synthphot.py View on Github external
ff = load_flux_full(5900,3.5)[ind]*2e-28
#redden spectrum
#red = ff/deredden(ww,1.5,mags=False)

sp = S.ArraySpectrum(wave=ww, flux=ff, waveunits='angstrom', fluxunits='flam', name='T5900K')

#sdss_u=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_u_005_syn.fits")
#sdss_g=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_g_005_syn.fits")
#sdss_r=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_r_005_syn.fits")
#sdss_i=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_i_005_syn.fits")
#sdss_z=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_z_005_syn.fits")

U=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_u_004_syn.fits")
B=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_b_004_syn.fits")
V=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_v_004_syn.fits")
R=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_r_004_syn.fits")
I=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_i_004_syn.fits")

#H = S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/bessell_h_004_syn.fits")
#J = S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/bessell_j_003_syn.fits")
#K = S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/bessell_k_003_syn.fits")

#obs = S.Observation(sp,sdss_u)
#print("Filter = {name}\tAB = {AB:.3f}\tVega = {Vega:.3f}".format(name="i",AB=obs.effstim("abmag"),Vega=obs.effstim("vegamag")))

pfilts = [U,B,V,R,I]

def calc_fluxes():
    return np.array([S.Observation(sp,i).effstim("flam") for i in pfilts])
github iancze / Starfish / synthphot.py View on Github external
ff = load_flux_full(5900,3.5)[ind]*2e-28
#redden spectrum
#red = ff/deredden(ww,1.5,mags=False)

sp = S.ArraySpectrum(wave=ww, flux=ff, waveunits='angstrom', fluxunits='flam', name='T5900K')

#sdss_u=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_u_005_syn.fits")
#sdss_g=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_g_005_syn.fits")
#sdss_r=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_r_005_syn.fits")
#sdss_i=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_i_005_syn.fits")
#sdss_z=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_z_005_syn.fits")

U=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_u_004_syn.fits")
B=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_b_004_syn.fits")
V=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_v_004_syn.fits")
R=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_r_004_syn.fits")
I=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_i_004_syn.fits")

#H = S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/bessell_h_004_syn.fits")
#J = S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/bessell_j_003_syn.fits")
#K = S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/bessell_k_003_syn.fits")

#obs = S.Observation(sp,sdss_u)
#print("Filter = {name}\tAB = {AB:.3f}\tVega = {Vega:.3f}".format(name="i",AB=obs.effstim("abmag"),Vega=obs.effstim("vegamag")))

pfilts = [U,B,V,R,I]

def calc_fluxes():
    return np.array([S.Observation(sp,i).effstim("flam") for i in pfilts])

#fluxes = calc_fluxes()
github iancze / Starfish / synthphot.py View on Github external
#redden spectrum
#red = ff/deredden(ww,1.5,mags=False)

sp = S.ArraySpectrum(wave=ww, flux=ff, waveunits='angstrom', fluxunits='flam', name='T5900K')

#sdss_u=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_u_005_syn.fits")
#sdss_g=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_g_005_syn.fits")
#sdss_r=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_r_005_syn.fits")
#sdss_i=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_i_005_syn.fits")
#sdss_z=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_z_005_syn.fits")

U=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_u_004_syn.fits")
B=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_b_004_syn.fits")
V=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_v_004_syn.fits")
R=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_r_004_syn.fits")
I=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_i_004_syn.fits")

#H = S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/bessell_h_004_syn.fits")
#J = S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/bessell_j_003_syn.fits")
#K = S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/bessell_k_003_syn.fits")

#obs = S.Observation(sp,sdss_u)
#print("Filter = {name}\tAB = {AB:.3f}\tVega = {Vega:.3f}".format(name="i",AB=obs.effstim("abmag"),Vega=obs.effstim("vegamag")))

pfilts = [U,B,V,R,I]

def calc_fluxes():
    return np.array([S.Observation(sp,i).effstim("flam") for i in pfilts])

#fluxes = calc_fluxes()

def plot_SED():
github iancze / Starfish / synthphot.py View on Github external
ww = w_full[ind]


ff = load_flux_full(5900,3.5)[ind]*2e-28
#redden spectrum
#red = ff/deredden(ww,1.5,mags=False)

sp = S.ArraySpectrum(wave=ww, flux=ff, waveunits='angstrom', fluxunits='flam', name='T5900K')

#sdss_u=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_u_005_syn.fits")
#sdss_g=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_g_005_syn.fits")
#sdss_r=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_r_005_syn.fits")
#sdss_i=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_i_005_syn.fits")
#sdss_z=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/sdss_z_005_syn.fits")

U=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_u_004_syn.fits")
B=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_b_004_syn.fits")
V=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_v_004_syn.fits")
R=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_r_004_syn.fits")
I=S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/landolt_i_004_syn.fits")

#H = S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/bessell_h_004_syn.fits")
#J = S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/bessell_j_003_syn.fits")
#K = S.FileBandpass("/home/ian/.builds/stsci_python-2.12/pysynphot/cdbs/comp/nonhst/bessell_k_003_syn.fits")

#obs = S.Observation(sp,sdss_u)
#print("Filter = {name}\tAB = {AB:.3f}\tVega = {Vega:.3f}".format(name="i",AB=obs.effstim("abmag"),Vega=obs.effstim("vegamag")))

pfilts = [U,B,V,R,I]

def calc_fluxes():
    return np.array([S.Observation(sp,i).effstim("flam") for i in pfilts])

pysynphot

Python Synthetic Photometry Utilities

BSD-3-Clause
Latest version published 3 years ago

Package Health Score

52 / 100
Full package analysis