backscatter_angle_zenith
ΒΆ
At the zenith, singular point can be found.
''' At the zenith, singular point can be found.
'''
import os
import sys
import logging
logging.basicConfig()
import datetime
import math
import matplotlib.pyplot as plt
import numpy as np
import scipy as sp
from irfpy.cena import backscatter_angle
def main():
sza = 0.
scza = 0.
# Prepare the phi values.
phis = np.arange(0., 360)
flist = np.zeros_like(phis)
# From backscatter function implemented by me in Schaufelberger 2011
for idx, phi in enumerate(phis):
f = backscatter_angle.fs(sza, phi, scza)
flist[idx] = f
print('--- zn ---')
print(backscatter_angle.z0(sza))
print(backscatter_angle.z1(sza))
print(backscatter_angle.z2(sza))
print(backscatter_angle.z3(sza))
print('--- fn at 0 ---')
print(backscatter_angle.f0(sza, 90., scza))
print(backscatter_angle.f1(sza, 90., scza))
print(backscatter_angle.f2(sza, 90., scza))
print(backscatter_angle.f3(sza, 90., scza))
# From calculation manually
phirad = phis * np.pi / 180.
fhand = 0.007366 * (0.03002 * np.cos(phirad * 2) + 0.96998) * ( 0.06422 * np.cos(phirad) + 0.93578)
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(phis, flist, '-')
ax.plot(phis, fhand, '-')
if __name__ == '__main__':
main()