Skip to content

Commit

Permalink
dmax for single measurement
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan committed Dec 11, 2022
1 parent b31310b commit e687f2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grain_size_distribution/grain_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def __init__(self, network, measurements, reach_ids, da_field, max_size=3, minim
self.dmax_params = np.polyfit(slopevals, maxvals, 1)
self.dmax_ratio = np.average([maxvals[i]/maxd84s[i] for i in range(len(maxvals))])
else:
self.dmax_params = [atts['dmax']/atts['dmax'] for _, atts in self.reach_stats.items()]
self.dmax_params = [atts['dmax']/atts['d84'] for _, atts in self.reach_stats.items()]
self.dmax_ratio = self.dmax_params[0]

self.find_crit_depth()
Expand Down Expand Up @@ -357,7 +357,7 @@ def estimate_grain_size(self):
if len(self.dmax_params) > 1:
dmax = self.dn.loc[i, 'Slope']*self.dmax_params[0] + self.dmax_params[1]
else:
dmax = d84 * self.dmax_params[0]
dmax = d84 * self.dmax_ratio
if dmax < d84:
dmax = d84 * self.dmax_ratio
if dmax > self.max_size:
Expand Down

0 comments on commit e687f2b

Please sign in to comment.