Skip to content

Commit

Permalink
major_reorganization
Browse files Browse the repository at this point in the history
Reorganization of the repository structure in anticipation of the release of the new version of the script (expected in late 2023 or early 2024).
  • Loading branch information
marcoalopez committed Nov 14, 2023
1 parent 320a8f7 commit 552ab6f
Show file tree
Hide file tree
Showing 8 changed files with 377 additions and 342 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,6 @@ grain_size_tools/.ipynb_checkpoints/notebook_example-checkpoint.ipynb
grain_size_tools/.ipynb_checkpoints/notebook_example-checkpoint.ipynb
grain_size_tools/example_notebooks/2step_plot.png
grain_size_tools/example_notebooks/saltykov_plot.png
templates/.jupyter/desktop-workspaces/default-37a8.jupyterlab-workspace
DOCS/test_distribution.png
DOCS/.jupyter/desktop-workspaces/default-37a8.jupyterlab-workspace
265 changes: 0 additions & 265 deletions DOCS/JN_example.ipynb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"A free open-source cross-platform script to visualize and characterize grain size\n",
"population and estimate differential stress via paleopizometers.\n",
"\n",
"Version: 2023.11.xx\n",
"Version: v3.0.2 (2020-12-30)\n",
"Documentation: https://marcoalopez.github.io/GrainSizeTools/\n",
"\n",
"Type get.functions_list() to get a list of the main methods\n",
Expand Down Expand Up @@ -517,7 +517,7 @@
"============================================================================\n",
"Shapiro-Wilk test warnings:\n",
"Data is not normally distributed!\n",
"Normality test: 0.89, 0.00 (test statistic, p-value)\n",
"Normality test: 0.92, 0.00 (test statistic, p-value)\n",
"============================================================================\n"
]
}
Expand Down Expand Up @@ -583,7 +583,7 @@
"Data is not normally distributed!\n",
"Normality test: 0.95, 0.00 (test statistic, p-value)\n",
"Data is not lognormally distributed!\n",
"Lognormality test: 0.99, 0.02 (test statistic, p-value)\n",
"Lognormality test: 0.98, 0.01 (test statistic, p-value)\n",
"============================================================================\n"
]
}
Expand Down Expand Up @@ -685,75 +685,77 @@
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1;31mSignature:\u001b[0m\n",
"\u001b[0mplot\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdistribution\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m\n",
"\u001b[0m \u001b[0mdata\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
"\u001b[0m \u001b[0mplot\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'hist'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'kde'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
"\u001b[0m \u001b[0mavg\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'amean'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'gmean'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'median'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'mode'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
"\u001b[0m \u001b[0mbinsize\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'auto'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
"\u001b[0m \u001b[0mbandwidth\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'silverman'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
"\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mfig_kw\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mDocstring:\u001b[0m\n",
"Return a plot with the ditribution of (apparent or actual) grain sizes\n",
"in a dataset.\n",
"\n",
"Parameters\n",
"----------\n",
"data : array_like\n",
" the size of the grains\n",
"\n",
"plot : string, tuple or list; optional\n",
" the type of plot, either histogram ('hist'), kernel density estimate\n",
" ('kde') or both ('hist', 'kde'). Default is both.\n",
"\n",
"avg : string, tuple or list; optional\n",
" the central tendency measures o show, either the arithmetic ('amean')\n",
" or geometric ('gmean') means, the median ('median'), and/or the\n",
" KDE-based mode ('mode'). Default all averages.\n",
"\n",
"binsize : string or positive scalar; optional\n",
" If 'auto', it defines the plug-in method to calculate the bin size.\n",
" When integer or float, it directly specifies the bin size.\n",
" Default: the 'auto' method.\n",
"\n",
" | Available plug-in methods:\n",
" | 'auto' (fd if sample_size > 1000 or Sturges otherwise)\n",
" | 'doane' (Doane's rule)\n",
" | 'fd' (Freedman-Diaconis rule)\n",
" | 'rice' (Rice's rule)\n",
" | 'scott' (Scott rule)\n",
" | 'sqrt' (square-root rule)\n",
" | 'sturges' (Sturge's rule)\n",
"\n",
"bandwidth : string {'silverman' or 'scott'} or positive scalar; optional\n",
" the method to estimate the bandwidth or a scalar directly defining the\n",
" bandwidth. It uses the Silverman plug-in method by default.\n",
"\n",
"**fig_kw :\n",
" additional keyword arguments to control the size (figsize) and\n",
" resolution (dpi) of the plot. Default figsize is (6.4, 4.8).\n",
" Default resolution is 100 dpi.\n",
"\n",
"Call functions\n",
"--------------\n",
"- gaussian_kde (from Scipy stats)\n",
"\n",
"Examples\n",
"--------\n",
">>> distribution(data['diameters'])\n",
">>> distribution(data['diameters'], figsize=(6.4, 4.8))\n",
"\n",
"Returns\n",
"-------\n",
"A plot showing the distribution of (apparent) grain sizes and\n",
"the location of the averages defined.\n",
"\u001b[1;31mFile:\u001b[0m c:\\users\\marco\\documents\\github\\grainsizetools\\grain_size_tools\\plot.py\n",
"\u001b[1;31mType:\u001b[0m function"
]
"data": {
"text/plain": [
"\u001b[1;31mSignature:\u001b[0m\n",
"\u001b[0mplot\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdistribution\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m\n",
"\u001b[0m \u001b[0mdata\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
"\u001b[0m \u001b[0mplot\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'hist'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'kde'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
"\u001b[0m \u001b[0mavg\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'amean'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'gmean'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'median'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'mode'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
"\u001b[0m \u001b[0mbinsize\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'auto'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
"\u001b[0m \u001b[0mbandwidth\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'silverman'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
"\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mfig_kw\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\n",
"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mDocstring:\u001b[0m\n",
"Return a plot with the ditribution of (apparent or actual) grain sizes\n",
"in a dataset.\n",
"\n",
"Parameters\n",
"----------\n",
"data : array_like\n",
" the size of the grains\n",
"\n",
"plot : string, tuple or list; optional\n",
" the type of plot, either histogram ('hist'), kernel density estimate\n",
" ('kde') or both ('hist', 'kde'). Default is both.\n",
"\n",
"avg : string, tuple or list; optional\n",
" the central tendency measures o show, either the arithmetic ('amean')\n",
" or geometric ('gmean') means, the median ('median'), and/or the\n",
" KDE-based mode ('mode'). Default all averages.\n",
"\n",
"binsize : string or positive scalar; optional\n",
" If 'auto', it defines the plug-in method to calculate the bin size.\n",
" When integer or float, it directly specifies the bin size.\n",
" Default: the 'auto' method.\n",
"\n",
" | Available plug-in methods:\n",
" | 'auto' (fd if sample_size > 1000 or Sturges otherwise)\n",
" | 'doane' (Doane's rule)\n",
" | 'fd' (Freedman-Diaconis rule)\n",
" | 'rice' (Rice's rule)\n",
" | 'scott' (Scott rule)\n",
" | 'sqrt' (square-root rule)\n",
" | 'sturges' (Sturge's rule)\n",
"\n",
"bandwidth : string {'silverman' or 'scott'} or positive scalar; optional\n",
" the method to estimate the bandwidth or a scalar directly defining the\n",
" bandwidth. It uses the Silverman plug-in method by default.\n",
"\n",
"**fig_kw :\n",
" additional keyword arguments to control the size (figsize) and\n",
" resolution (dpi) of the plot. Default figsize is (6.4, 4.8).\n",
" Default resolution is 100 dpi.\n",
"\n",
"Call functions\n",
"--------------\n",
"- gaussian_kde (from Scipy stats)\n",
"\n",
"Examples\n",
"--------\n",
">>> distribution(data['diameters'])\n",
">>> distribution(data['diameters'], figsize=(6.4, 4.8))\n",
"\n",
"Returns\n",
"-------\n",
"A plot showing the distribution of (apparent) grain sizes and\n",
"the location of the averages defined.\n",
"\u001b[1;31mFile:\u001b[0m c:\\users\\marco\\documents\\github\\grainsizetools\\grain_size_tools\\plot.py\n",
"\u001b[1;31mType:\u001b[0m function"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
Expand All @@ -780,7 +782,7 @@
"text": [
"=======================================\n",
"Shapiro-Wilk test (lognormal):\n",
"0.99, 0.01 (test statistic, p-value)\n",
"0.98, 0.00 (test statistic, p-value)\n",
"It doesnt look like a lognormal distribution (p-value < 0.05)\n",
"(╯°□°)╯︵ ┻━┻\n",
"=======================================\n"
Expand Down Expand Up @@ -952,13 +954,15 @@
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Notebook tested in 2023-11-13 using:\n",
"Notebook tested in 2023-11-14 using:\n",
"Python 3.10.13 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:24:38) [MSC v.1916 64 bit (AMD64)]\n",
"Numpy 1.26.0\n",
"Matplotlib 3.8.0\n"
Expand All @@ -980,7 +984,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "main",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -998,5 +1002,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
43 changes: 43 additions & 0 deletions DOCS/paleopiezometry_module.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "10bf9962-b18d-47a5-80d4-b66348dd8956",
"metadata": {},
"source": [
"# The paleopiezometry module\n",
"\n",
"TODO"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "93287c25-1187-44c0-985d-3f293cf99762",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
45 changes: 45 additions & 0 deletions DOCS/stereology_module.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "7f085718-4204-45b0-a268-6d4df51d81ef",
"metadata": {
"tags": []
},
"source": [
"# The Stereology module\n",
"\n",
"TODO"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "315f5820-a286-4277-a4a5-e1a24f6940d6",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
43 changes: 43 additions & 0 deletions templates/grain_size_analysis.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "f45741ac-0aa1-44c0-917f-b0d3ee2990fd",
"metadata": {},
"source": [
"# Grain Size Analysis Template\n",
"\n",
"**Goal**: TODO"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f6d4b773-f3cd-4cb5-8b63-027062c090c6",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit 552ab6f

Please sign in to comment.