Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Python by (120 points)
import math

import matplotlib.pyplot as plt

import numpy as np

import scipy as sp

from scipy import special


%matplotlib inline


#variable decalration

ib_by_ith1=1.5                         #injection current1 > 1.2

ib_by_ith2=1.6                         #injection current2

ib_by_ith3=1.7                         #injection current3

f = 100.0*10**6                          #frequency (hz)


#calculation

RIN1 = ((ib_by_ith1-1)**-3)/f

RIN2 = ((ib_by_ith2-1)**-3)/f

RIN3 = ((ib_by_ith3-1)**-3)/f

RIN_dB1 = 20*math.log10(RIN1)             #noise to signal power ratio1(dB/Hz)

RIN_dB2 = 20*math.log10(RIN2)             #noise to signal power ratio2(dB/Hz)

RIN_dB3 = 20*math.log10(RIN3)             #noise to signal power ratio3(dB/Hz)


#result

print ("Index guided lasers lies between ",round(RIN_dB1,0),"dB/Hz",round(RIN_dB2,0),"dB/Hz",round(RIN_dB3,1),"dB/Hz")


#plot

f1=1.0*10**8                                   # several hundrede MHz

ib_by_ith = np.arange(0.0, 2.5, 0.1)

RIN12 = ((ib_by_ith-1.0)**-3)/f1

plt.plot(ib_by_ith,20*math.log10(RIN12))

ylabel('RIN(dB/Hz)')

xlabel('Ib/Ith')

title('Plot of relative intensity. The noise level=100MHz ')

plt.show()

Please log in or register to answer this question.

Browse Categories

...