In [1]:
import numpy as np
import os
import pysynphot as s


/usr/local/lib/python2.7/dist-packages/pysynphot/locations.py:44: UserWarning: PYSYN_CDBS is undefined; functionality will be SEVERELY crippled.
  warnings.warn("PYSYN_CDBS is undefined; functionality will be SEVERELY "
/usr/local/lib/python2.7/dist-packages/pysynphot/locations.py:119: UserWarning: Extinction files should be moved to $PYSYN_CDBS/extinction for compatibility with future versions of pysynphot.
  warnings.warn('Extinction files should be moved to '
/usr/local/lib/python2.7/dist-packages/pysynphot/locations.py:155: UserWarning: Extinction files not found in grid/extinction
  warnings.warn('Extinction files not found in %s' % (extdir,))
/usr/local/lib/python2.7/dist-packages/pysynphot/locations.py:133: UserWarning: PYSYN_CDBS is undefined; cannot find mtab/*_tmg.fits file
  warnings.warn("PYSYN_CDBS is undefined; cannot find %s file" % template)
/usr/local/lib/python2.7/dist-packages/pysynphot/locations.py:133: UserWarning: PYSYN_CDBS is undefined; cannot find mtab/*_tmc.fits file
  warnings.warn("PYSYN_CDBS is undefined; cannot find %s file" % template)
/usr/local/lib/python2.7/dist-packages/pysynphot/locations.py:133: UserWarning: PYSYN_CDBS is undefined; cannot find mtab/*_tmt.fits file
  warnings.warn("PYSYN_CDBS is undefined; cannot find %s file" % template)

In [2]:
sdss_spectrum = '/home/mldantas/Dropbox/DoutoradoIAG/Challenge/Sanity_Check/Specs/0443.51873.152.7xt'
jplus_filter   = '/home/mldantas/Dropbox/DoutoradoIAG/Challenge/Filters/JPLUS_SDSS_filters/gSDSS_2cols.txt'

In [3]:
# Setting the T80 M1 effective area in cm^2 ------------------------------------------------------------------------
s.refs.PRIMARY_AREA = 4400

In [4]:
jplus_filter_bandpass = s.FileBandpass(jplus_filter)  
sdss_spectrum         = s.FileSpectrum(sdss_spectrum)
photometry            = s.Observation(sdss_spectrum, jplus_filter_bandpass, binset=np.arange(3000, 11000, 1), 
                                             force='extrap')
print photometry.countrate()
print photometry.efflam()
print photometry.effstim('abmag')


4.10091416843e+19
4887.4329977
-24.7310893127