import math
from math import pi
#given
D=70.4
P=0.2
#Determination of index of co−operation
IOC_CCITT=D/P
IOC_IEEE=IOC_CCITT*(pi)
IOC_IEEE=round(IOC_IEEE,2)
print 'The index of co−operation is',IOC_IEEE
import math
from math import pi
D=68.4
P=0.26
rpm=120
n=1075
#Determination of no . of pixels scan
Npx=(pi)*(D/P)
Npx=round(Npx,0)
print 'The no . of pixels in scan line is',Npx,'pixels/line '
#Determination of scan rate
Rs=rpm/60
print 'The scan rate is',Rs,'lines/sec '
#Determination of pixel rate is
Rpx=Npx*Rs
Rpx=round(Rpx,0)
print 'The pixel rate is',Rpx,'pixels/sec'
f_max=Rpx/2
#Determination of document Tx time
td=n/(60*Rs)
print 'The document Transmission time is',td,'sec'
import math
a=(4/3) #aspect ratio
N=525 #no . of line periods per frame
Ns=40 #no . of suppressed lines
#Determination of no . of pixel periods in line period
Nv=N-Ns
print 'The no . of pixel periods in line period is',Nv,'lines'
#Determination of picture height and width
Nh=a*Nv
print 'The picture height is',Nh,'pixels'
Nl=(Nh/0.835)
Nl=round(Nl,1)
print 'The picture length is',Nl,'pixels'
import math
N=525.0
P=30.0
#Determination of horizontal and vertical synchhronization freq .
fh=N*P
print 'The horizontal frequency is',fh,'Hz'
fv=2*P
print 'The vertical frequency is',fv,'Hz'
#Determination of time reqd to scan one line
Th=((fh)**-1)*10**5
Th=round(Th,2)*10**-5
print 'The time required to scan one line is',Th,'sec'
import math
fh=15750
Nl=775
#Determination of video bandwidth
Bv=0.35*fh*Nl
Bv=round(Bv,1)
print 'the band width is',Bv,'Hz'
import math
from math import sqrt
a=4/3 #aspect ratio
D=48.26*10**-2 #CRT tube diagonal
Nh=647.0
H=sqrt((a**2)*(D**2)/(1+a**2))
#Determination of viewing angle & minimum distance
w=H/Nh
theta=Nh*(1/60.0) #As each pixel subtend 1 minute of arc
theta=round(theta,2)
print 'The viewing angle is',theta,'degrees'
X=H/(2*math.tan(theta/2))
X=round(X,2)
print 'The min.viewing dist is',X,'m'
import math
from math import sqrt
a=16/9
D=1.40
Nh=1840.0 #Assuming square pixel
H=sqrt((a**2)*(D**2)/(1+a**2))
#Determination of viewing angle
theta=Nh*(1/60.0)
theta=round(theta,2)
print 'The viewing angle is',theta,'degrees'
#Determination of viewing dist
X=H/(2*math.tan(theta/2));
X=round(X,2)
print 'The viewing dist is',X,'m'