diff --git a/grain_size_tools/example_notebooks/start.ipynb b/grain_size_tools/example_notebooks/start.ipynb
index 98c578a..e31da33 100644
--- a/grain_size_tools/example_notebooks/start.ipynb
+++ b/grain_size_tools/example_notebooks/start.ipynb
@@ -8,16 +8,40 @@
"\n",
"> IMPORTANT NOTE: This Jupyter notebook example only applies to GrainSizeTools v3.0+ Please check your script version before using this notebook. You will be able to reproduce all the results shown in this tutorial using the dataset provided with the script, the ```file data_set.txt```\n",
"\n",
- "## Running the script\n",
+ "## Running the script in Jupyter lab/notebooks\n",
"\n",
"The first step is to execute the code to get all the functionalities. Jupyter lab (or Jupyter notebooks) allows you to run any code using the following code snippet: ``%run + the Python file to run``. In this case you must set the full filepath that indicates where the file ``GrainSizeTools_script.py`` is located in your system. If the script was executed correctly you will see that all GrainSizeTools (GST) modules have been loaded correctly and a welcome message as follows:"
]
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": 1,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "module plot imported\n",
+ "module averages imported\n",
+ "module stereology imported\n",
+ "module piezometers imported\n",
+ "module template imported\n",
+ "\n",
+ "======================================================================================\n",
+ "Welcome to GrainSizeTools script\n",
+ "======================================================================================\n",
+ "A free open-source cross-platform script to visualize and characterize grain size\n",
+ "population and estimate differential stress via paleopizometers.\n",
+ "\n",
+ "Version: v3.0RC0 (2020-04-23)\n",
+ "Documentation: https://marcoalopez.github.io/GrainSizeTools/\n",
+ "\n",
+ "Type get.functions_list() to get a list of the main methods\n",
+ "\n"
+ ]
+ }
+ ],
"source": [
"%run C:/Users/marco/Documents/GitHub/GrainSizeTools/grain_size_tools/GrainSizeTools_script.py"
]
@@ -26,12 +50,16 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "As indicated in the welcome message, we can get a list of the main methods at any time by typing in the console:"
+ "---\n",
+ "\n",
+ "## Get information on the GrainSizeTools methods\n",
+ "\n",
+ "First, to get a list of the main methods type"
]
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": 2,
"metadata": {},
"outputs": [
{
@@ -69,6 +97,78 @@
"get.functions_list()"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "The script is implemented around several modules. To access a method within a module you will have to type the name of the module and then, separated by a dot, the name of the method.For example to access the method ``qq_plot`` of the plot module you should write:\n",
+ "\n",
+ "```python\n",
+ "plot.qq_plot()\n",
+ "```\n",
+ "and the provide the required parameters within the parenthesis.\n",
+ "\n",
+ "To access the methods within a module, type the module name plus the dot and hit the tab key and a complete list of methods will pop up.\n",
+ "\n",
+ "### Get detailed information on methods\n",
+ "\n",
+ "You can get detailed information about any method or function of the script in different ways. The first is through the console using the character ? before the method"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "\u001b[1;31mSignature:\u001b[0m \u001b[0mconf_interval\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mconfidence\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0.95\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",
+ "Estimate the confidence interval using the t-distribution with n-1\n",
+ "degrees of freedom t(n-1). This is the way to go when sample size is\n",
+ "small (n < 30) and the standard deviation cannot be estimated accurately.\n",
+ "For large datasets, the t-distribution approaches the normal distribution.\n",
+ "\n",
+ "Parameters\n",
+ "----------\n",
+ "data : array-like\n",
+ " the dataset\n",
+ "\n",
+ "confidence : float between 0 and 1, optional\n",
+ " the confidence interval, default = 0.95\n",
+ "\n",
+ "Assumptions\n",
+ "-----------\n",
+ "the data follows a normal or symmetric distrubution (when sample size\n",
+ "is large)\n",
+ "\n",
+ "call_function(s)\n",
+ "----------------\n",
+ "Scipy's t.interval\n",
+ "\n",
+ "Returns\n",
+ "-------\n",
+ "the arithmetic mean, the error, and the limits of the confidence interval\n",
+ "\u001b[1;31mFile:\u001b[0m c:\\users\\marco\\documents\\github\\grainsizetools\\grain_size_tools\\grainsizetools_script.py\n",
+ "\u001b[1;31mType:\u001b[0m function\n"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "?conf_interval"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Another option in Jupyter's lab is to get the information interactively without having to call the help from the console. To do this, right-click on the mouse and select \"Show Context Help\" from the menu. Now, every time you write a method in the interactive console, all the information will automatically appear in the \"Contextual help\" window. In this case, you may prefer to rearrange the windows using drag and drop so that you can see the notebook and the contextual help in parallel."
+ ]
+ },
{
"cell_type": "markdown",
"metadata": {},
@@ -95,7 +195,7 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": 4,
"metadata": {},
"outputs": [
{
@@ -322,7 +422,7 @@
"[2661 rows x 11 columns]"
]
},
- "execution_count": 10,
+ "execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@@ -352,7 +452,7 @@
},
{
"cell_type": "code",
- "execution_count": 11,
+ "execution_count": 5,
"metadata": {},
"outputs": [
{
@@ -361,7 +461,7 @@
"pandas.core.frame.DataFrame"
]
},
- "execution_count": 11,
+ "execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@@ -398,7 +498,7 @@
"dataset = pd.read_csv(get_filepath(), sep='\\t')\n",
"```\n",
"\n",
- "Lastly, Pandas also allows to directly import tabular data from the clipboard (i.e. data copied using copy-paste commands). For example, after copying the table from a text/excel file or a website using: \n",
+ "Lastly, Pandas also allows to directly import tabular data from the clipboard (i.e. data copied using copy-paste commands). For example, after copying the table from a text file, excel spreadsheet or a website using: \n",
"\n",
"```python\n",
"dataset = pd.read_clipboard()\n",
@@ -412,7 +512,491 @@
"metadata": {},
"source": [
"## Basic tabular data (Pandas) manipulation\n",
- "\n"
+ "\n",
+ "Let's first see how the data set looks like. For this you can call the variable (as in the example before) or use the ``head()`` and ``tail()`` methods so that it only shows us the first (or last) rows of the data set"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "