Introduction To Special Relativity And Space Science (By S.P. Singh)

CHAPTER NUMBER 9 : STARS AND THEIR CLASSIFICATION

EXAMPLE NUMBER 9.1 : (Page Number 332)

In [172]:
import math
   #Given that
m_i = 15    # initial magnitude of supernova
m_f = 2    # final magnitude of supernova
print "Standard formula used  \t M = m - 2.5log(L/L_0) "
del_m = m_i - m_f    # calculation of change in magnitude
brightness_ratio = 100**(del_m/5)     # calculation of increment in brightness ratio.
print "  In two days novas brightness is increased by ",math.ceil(brightness_ratio / 10000)*10000," times nearly"
 Standard formula used  	 M = m - 2.5log(L/L_0) 
  In two days novas brightness is increased by  10000.0  times nearly

EXAMPLE NUMBER 9.2a : (Page Number 333)

In [175]:
import math
   #Given that
b_ratio = 2    # ratio of light output in a period 
print "Standard formula used  \t M = m - 2.5log(L/L_0) "
del_m = 2.5 * math.log10(b_ratio)    # calulation of change in magnitude
print "  Change in magnitude is ",round(del_m,4) ," times"
Standard formula used  	 M = m - 2.5log(L/L_0) 
  Change in magnitude is  0.7526  times

EXAMPLE NUMBER 9.2b : (Page Number 333)

In [178]:
import math
   # given that
m_capella = 0.05    # magnitude of brightness of capella at 14 parsecs
m_sun = 4.8    # absolute magnitude of brightness of sun
d = 14    # distance of capella in parsecs
D = 10    # distance of capella considerd for observation
print "Standard formula used  \t M = m - 2.5log(L/L_0) "
M_capella = m_capella - 5*math.log10(d/D)    # calculation of absolute magnitude of brightness at distance of 10 parsecs
del_m = m_sun - M_capella    # difference between absolute magnitude of sun and capella
ratio = 10**(del_m/2.5) 
print "  Capella is  ",round(ratio,4)," times brighter than sun."
Standard formula used  	 M = m - 2.5log(L/L_0) 
  Capella is   79.4328  times brighter than sun.
In [ ]: