Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
hagne committed Oct 3, 2023
1 parent ad07a8b commit 9335d21
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions atmPy/aerosols/physics/column_optical_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import xarray as _xr
import matplotlib.pyplot as _plt
import scipy as _sp
import pathlib as _pl
#import pathlib as _pl
import xarray as xr
import statsmodels.nonparametric.smoothers_lowess as smlowess

Expand Down Expand Up @@ -250,11 +250,11 @@ def calculate_deviation_from_angstrom(sfr, wl1=500, wl2=870):
# df.index.name = 'datetime'
# return df

@property
def AODinversion(self):
if isinstance(self._aodinv, type(None)):
self.derive_size_distribution()
return self._aodinv
# @property
# def AODinversion(self):
# if isinstance(self._aodinv, type(None)):
# self.derive_size_distribution()
# return self._aodinv


def invertAOD(self, width_of_aerosol_mode = (0.2, 0.25),
Expand Down Expand Up @@ -298,7 +298,7 @@ def invertAOD(self, width_of_aerosol_mode = (0.2, 0.25),
aoddata = self.aod.to_pandas()
count_down = aoddata.shape[0] #self.AOD.data.shape[0]
result_ds = None
self.tp_test1 = False
self.tp_test1 = False #if true only the very first fit is performed in a test case
if verbose:
print(f'Starting to make inversion for {count_down} cases.')
for e,(ts, test_dp) in enumerate(aoddata.iterrows()): #self.AOD.data.iterrows():
Expand Down Expand Up @@ -326,7 +326,8 @@ def invertAOD(self, width_of_aerosol_mode = (0.2, 0.25),
ds['size_distribution_parameters'] = df

if verbose:
print(test_dp)
# print(test_dp)
pass

# do not fit if not all aod values are given -> Values remain nan
if not test_dp.isna().any():
Expand Down

0 comments on commit 9335d21

Please sign in to comment.