import math
#given
Tn=5; #in micrometer
Vs=10**7; #in m/s
tr=Tn*10**-6/Vs;
print"Response time",tr/10**-12,"ps";
import math
#given
Pd=1.15; #in mW
TA=25; #in deg C
theta_JA=200; #in C/W for hermetric led
TJ=TA+theta_JA*Pd/10**3;
TF=8.01*10**12 *math.e**-(8111/(TJ+273));
print"Value of TJ is" ,round(TJ,4), "deg C";
print"Value of TF is" ,round(TF,4), "deg C";
BF=1.1*10**-3; #from table
QF=0.5; #from table
EF=1; #from table
RF=BF*TF*EF*QF*1/10**6;
print"Value of RF","{0:.3e}".format(RF);
print"Value of MTBF is ","{0:.3e}".format(1/RF),"hours";
import math
#given
R1=0.7;
R2=0.99;
ad=0.1;
Ld=1-R1*R2*math.e**-(2*ad);
print"Decay Loss ",round(Ld,4);
trt=40; #fs
tph=trt/Ld;
print"Photon lifetime ",round(tph,4),"fs";
BW=1/tph;
print"Bandwidth",round(BW*1000,4) ,"Thz"; #Answer in Thz