code: def _bb_intensity(self, Teff, photon_weighted=False):
          
  
          if photon_weighted:
              pb = lambda w: w*self._planck(w, Teff)*self.ptf(w)
              return integrate.quad(pb, self.wl[0], self.wl[-1])[0]/self.ptf_photon_area
          else:
              pb = lambda w: self._planck(w, Teff)*self.ptf(w)
              return integrate.quad(pb, self.wl[0], self.wl[-1])[0]/self.ptf_area
docs: Computes mean passband intensity using blackbody atmosphere:
  
          I_pb^E = \int_\lambda I(\lambda) P(\lambda) d\lambda / \int_\lambda P(\lambda) d\lambda
          I_pb^P = \int_\lambda \lambda I(\lambda) P(\lambda) d\lambda / \int_\lambda \lambda P(\lambda) d\lambda
  
          Superscripts E and P stand for energy and photon, respectively.
  
          @Teff: effective temperature in K
          @photon_weighted: photon/energy switch
  
          Returns: mean passband intensity using blackbody atmosphere.