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)
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)
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)
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))
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)
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))