def transit_spectrum(wvln,xabs,xscat,T,p0,r0,Mp,Rstar,Nlayers):
#compute the effective radius of a planet (in units of R_star) at the
#supplied wvln given xabs, the cross section of absorbers at those wvln [cm2];
#T, the temperature of the atmosphere (assumed isothermal)[K];
#p0, the pressure at the surface or cloud deck [bar];
#r0, the radius of the surface or cloud deck [km];
#Rstar, the radius of the star [km];
#Nlayers, the number of layers (spherical shells) to divide the atmosphere into