sedimentanalyst.analyzer package

Submodules

sedimentanalyst.analyzer.config module

This module contains all the imported packages (dependencies) and user inputs for running the classes StatisticalAnalyzer and StaticPlotter.

sedimentanalyst.analyzer.config.get_input()

sedimentanalyst.analyzer.main module

Main script to exemplify the use of Sediment Analyst

Authors: Beatriz Negreiros and Federica Scolari

sedimentanalyst.analyzer.main.main()

sedimentanalyst.analyzer.static_plotter module

Module designated for the class StaticPlotter

Author : Federica Scolari

class sedimentanalyst.analyzer.static_plotter.StaticPlotter(analyzer)

Bases: object

A class for creating the static plots of the cumulative grain size distribution curves

analyzer

StatisticalAnalyzer object containing all the computed sample statistics. For more information check the Class StatisticalAnalyzer

Type

StatisticalAnalyzer

cum_df

DataFrame containing the Grain Sizes [mm] and the corresponding Cumulative Percentage [%]

cum_plotter(output)

Plots the cumulative grain size distribution curve for each sample

cum_plotter(output)

Method to output the cumulative grain size distribution curve and save it as an image.

Parameters

output (str) – Name of the image containing the outputs

Returns

None

sedimentanalyst.analyzer.statistical_analyzer module

Module designated for class StatisticalAnalyzer

Author : Beatriz Negreiros

class sedimentanalyst.analyzer.statistical_analyzer.StatisticalAnalyzer(sieving_df=None, metadata=None)

Bases: object

A class for computing statistical sedimentological parameters using sieving datasets (class weights and grain size).

original_df

dataframe containing in the first column the grain sizes diameters (in mm) and in the second column the fraction mass that passes through the corresponding diameter.

Type

df

cumulative_df

dataframe containing in the first column the grain sizes diameters (in mm) and in the second column the cumulative percentages (% in mass, in grams) that passes through the corresponding grain size diameters.

Type

df

statistics_df

dataframe containing all the statistics of the sample, which includes: d10, d16, d25, d30, d50, d60, d75, d84, d90, Mean Grain Site dm [mm], Geometrical mean grain size dg [mm], Sorting Index, Fredle Index, Grain Size standard deviation, skewness, kurtosis, coefficient of uniformity Cu, curvature coefficient Cc.

Type

df

porosity_conductivity_df

dataframe containing the porosity estimators (estimated from the grain size analysis) according to different literature, as well as the corresponding hydraulic conductivity estimator for each of the porosity values according to the Kozeny Carman Equation.

Type

df

samplename

sample name

Type

str

coords

x and y coordinates, in this order

Type

tuple

porosity

porosity values set up by the user, possibly via alternative measurements, such as with photogramic approaches.

Type

float

sf_porosity

sphericity index. For rounded sediments it equals 6.10

Type

float

compute_cumulative_df(df)

computes cumulative_df dataframe

compute_statistics_df(df)

computes statistics_df dataframe

compute_porosity_conductivity_df(df)

computes porosity_conductivity_df dataframe

Note

See more on the determination of riverbed porosity from Freezecore samples via a Structure from Motion approach at Seitz 2020.

compute_cumulative_df()

Compute two new columns in the grain size dataframe, which are + Percentage Fraction [%] and + Cumulative Percentage [%]

compute_porosity_conductivity_df()

Compute porosity predictors and corresponding hydraulic conductivities (for each estimated porosity value)

compute_statistics_df()

Fills a dataframe (self.statistics_df) with all relevant statistics by calling smaller private methods

print_excel(file_name='statistics.xlsx')

Print all attribute dataframes into excel sheet output is saved into local folder “outputs”

Parameters

file_name (str) – Path to save the file

sedimentanalyst.analyzer.utils module

Module containing auxiliary functions to handle the StatisticalAnalyzer class and for running main.py

Author: Beatriz Negreiros and Federica Scolari

sedimentanalyst.analyzer.utils.append_global(obj=None, df=None)

A function to append all information stemming from the class Statistical Analyzer into one dataframe for further filtering and analyses

Parameters
Returns

appended dataframe with statistics of sample file

Return type

df

sedimentanalyst.analyzer.utils.extract_df(dic=<built-in function input>, file=None)

Function to extract parsed datafiles and tabularize it into dataframe.

Parameters
  • dic (dict) – global input parameters that can be altered in the config.py file

  • file (str) – path name of the file containing a sieving sample

Returns

dataframe containing grain sizes and class weights (parsed according to the config.py) list: list of sample’s information as following: [samplename, sampledate, (lat, long), porosity,

sf_porosity], parsed accoridng to the config.py.

Return type

df

sedimentanalyst.analyzer.utils.find_files(folder=None)

Lists the files in the folder indicated

Parameters

folder (str) – path of the folder to scan (to look for .xlxs files)

Returns

list of strings from addresses of all files inside the folder

Return type

list

Module contents