Skip to content
Snippets Groups Projects
Commit 7a22b71d authored by Edoardo Pasetto's avatar Edoardo Pasetto
Browse files

Delete library.py

parent 28ac52a9
No related branches found
No related tags found
No related merge requests found
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 23 11:01:39 2022
@author: Utente
"""
import numpy as np
import sympy as sp
import utility
wl_array=[412.5,442.5,490,510,560,620,665,681.25]
bw_500=0.00288
b1_bw=0.5
b1_bph=0.002
b1_bsed=0.02
ased_440=0.042
sx=0.011
sy=0.014
aw_table={}
aw_table[wl_array[0]]=0.00452
aw_table[wl_array[1]]=0.00696
aw_table[wl_array[2]]=0.0150
aw_table[wl_array[3]]=0.0325
aw_table[wl_array[4]]=0.0619
aw_table[wl_array[5]]=0.2755
aw_table[wl_array[6]]=0.429
aw_table[wl_array[7]]=0.00696
aw_table[wl_array[1]]=0.4715
AB_table={}
AB_table[wl_array[0]]=(0.0323,0.286)
AB_table[wl_array[1]]=(0.0398,0.339)
AB_table[wl_array[2]]=(0.0274,0.361)
AB_table[wl_array[3]]=(0.0180,0.260)
AB_table[wl_array[4]]=(0.0062,0.016)
AB_table[wl_array[5]]=(0.0065,0.064)
AB_table[wl_array[6]]=(0.0144,0.131)
AB_table[wl_array[7]]=(0.0166,0.148)
def get_absorbtion(C,X,Y,wl):
aw=aw_table[wl]
A=AB_table[wl][0]
B=AB_table[wl][1]
aphy=utility.get_aphy(A, B, C)
ased=utility.get_ased(X, wl)
ayel=utility.get_ayel(Y, wl)
return aw,aphy,ased,ayel
def get_backscattering(C,X,Y,wl):
bbw=utility.get_bbw(wl)
bbph=utility.get_bbph(C, wl)
bbsed=utility.get_bbsed(X, wl)
return bbw, bbph, bbsed
def get_reflectance_wl(aw,aphy,ased,ayel,bbw,bbph,bbsed):
a=aw+aphy+ased+ayel
b=bbw+bbph+bbsed
par=b/(a+b)
reflectance=par*0.33
return reflectance
def get_reflectance_vector(wl_array,C,X,Y):
R_vector=np.zeros((len(wl_array),))
for i,wl in enumerate(wl_array):
aw,aphy,ased,ayel=get_absorbtion(C, X, Y, wl)
bbw,bbph,bbsed=get_backscattering(C, X, Y, wl)
ref=get_reflectance_wl(aw, aphy, ased, ayel, bbw, bbph, bbsed)
R_vector[i]=ref
#print('value of index: {}'.format(i))
return R_vector
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment