data = [(0.25,100.0),(0.15,80),(0.075,60),(0.0332,40),(0.0216,20),(0.01,10),(0.005,5),(0.001,0)]
gs1 = Grain_Size(data)

"""
Explanation: Example 1
The grain size class is initiated by providing a list of tuples.  Each tuple is in the format of (grain_size, percent_passing).  Grain size value should be in mm and percent passing expressed as fraction * 100 (e.g. 10% is 10 not 0.1). For example, [(5.0, 100), (0.5, 80), (0.2, 60)] would indicate 100 percent pass the 5 mm size, 80 percent pass 0.5 mm and, 60 percent pass 0.2 mm.
End of explanation
"""


gs1.plot()

"""
Explanation: The grain size curve can be plotted with the .plot function
End of explanation
"""


gs1.d50

"""
Explanation: The Grain_Size class has many attributes.  These inlcude:
data : data as provided as the data parameter
gravel_max : size provided as gravel_max parameter

hydro_min : size provided as hydro_min parameter

percents : a list of np.linspace(0,100,101).  Values of sizes from these
    percent values

sizes : list of sizes for every 1 percent cut-off from the fitted 
    grain size distribution curve

d10 : d10 grain size.

d20 : d10 grain size.

d30 : d10 grain size.

d40 : d10 grain size.

d50 : d50 grain size

d60 : d60 grain size

d70 : d70 grain size

d80 : d80 grain size

d90 : d90 grain size

cu : Uniformity coefficient.  d60/d10

cc : Coefficient of curvature. d30^2/(d10 * d60)
End of explanation
"""


gs1.hazen() #units are in cm/sec by default

"""
Explanation: The Grain_Size class also has several methods for extimating hydraulic conductivity based on the grain size distribution.  The most basic method is the hazen method.
End of explanation
"""


data2 = [(0.25,100.0),(0.15,80),(0.075,60),(0.0332,40),(0.0216,20),(0.01,10),(0.005,6),(0.001,1)]
gs2 = Grain_Size(data2)
gs2.plot()

print gs2.hazen()
print gs2.kc()
print gs2.barr_k()

"""
Explanation: Example 2
End of explanation
"""


data3 = [(0.25,100.0),(0.15,80),(0.075,60),(0.0332,40),(0.0216,20),(0.01,10),(0.005,6)]
gs3 = Grain_Size(data3, hydro_min=0.004)
gs3.plot()
print gs3.hazen()
print gs3.kc()
print gs3.barr_k()

 (gs3.barr_k()-gs2.barr_k())*864  # converting to m/day

"""
Explanation: Example 3
End of explanation
"""


