示例#1
0
 def test_band_zp_vs_Jy(self):
     bands = band.band_load_names()
     for bname in bands:
         b = band.band_by_name(bname)
         if b.is_zp and b.is_Jy:
             m_ab = Flux2MagAB(b.Jy * phys.jy_to_erg)
             self.assertAlmostEqual(m_ab, b.zp, msg="Band [%s] zp and Jy should be coincide each other. "
                                                    "zp=%f,  m_zp(Jy) = %f, Jy = %f"
                                                    % (b.name, b.zp, m_ab, b.Jy),
                                    delta=0.01)
示例#2
0
 def test_band_zp_vs_Jy(self):
     bands = band.band_load_names()
     for bname in bands:
         b = band.band_by_name(bname)
         if b.is_zp and b.is_Jy:
             m_ab = Flux2MagAB(b.Jy * phys.jy_to_erg)
             self.assertAlmostEqual(
                 m_ab,
                 b.zp,
                 msg="Band [%s] zp and Jy should be coincide each other. "
                 "zp=%f,  m_zp(Jy) = %f, Jy = %f" %
                 (b.Name, b.zp, m_ab, b.Jy),
                 delta=0.01)
示例#3
0
 def test_band_colors_name(self):
     bands = band.band_load_names()
     for bname in bands:
         self.assertTrue(bname in band.colors(),
                         "You have not color for band: %s" % bname)
示例#4
0
 def test_load_names(self):
     bands = band.band_load_names()
     self.assertTrue(
         len(bands) > 0, "You have to see more bands. Not %d" % len(bands))
示例#5
0
 def test_band_colors_name(self):
     bands = band.band_load_names()
     for bname in bands:
         self.assertTrue(bname in band.bands_colors(), "You have not color for band: %s" % bname)
示例#6
0
 def test_load_names(self):
     bands = band.band_load_names()
     self.assertTrue(len(bands) > 0, "You have to see more bands. Not %d" % len(bands))