Commit ba700154 authored by Fabian Kovac's avatar Fabian Kovac
Browse files

[f] added attenuations and extinction coefficients

parent 89803821
......@@ -543,6 +543,18 @@ def prep() -> None:
_log('Calculated difference levels PDIFF instantaneous values derivating of daily means of dry periods')
# calculate attenuation of transmitted and received signal strengths per transmission
df_link['ATTENUATION'] = df_link['REMOTERXLEVEL'] - df_link['TXLEVEL']
_log('Calculated attenuation per transmission')
# calculate extinction coefficients for links based on attenuation and lengths of the links based on beer-lambert law
# we can use the already computed Pinst values instead of the attenuation by simply multiplying the result with a constant of -1
# using PinstMean allows us to get the extinction coefficient (material properties) per link for dry periods (reference) of the day
# Coeff = -ln(10) * (Attenuation/PathLength) --> Coeff = ln(10) * (PinstMean/PathLength)
df_link['EXTINCTIONCOEFF'] = np.log(10) * (df_link['PINSTMEAN'] / df_link['LENGTH'])
_log('Calculated extinction coefficients based on beer-lambert law')
# rename and reorder columns to aid RAINLINK format
name_cols = {
'LINKID' : 'ID',
......@@ -554,6 +566,8 @@ def prep() -> None:
'PINSTMEAN' : 'PinstMean',
'PDIFF' : 'Pdiff',
'TXLEVEL' : 'TxLevel',
'ATTENUATION' : 'Attenuation',
'EXTINCTIONCOEFFICIENT' : 'ExtinctionCoeff',
'SPEED' : 'Speed',
'CURRRXBITRATE' : 'RxBitrate',
'CURRTXBITRATE' : 'TxBitrate',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment