-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from martinvonk/dev
Update main to v0.0.6
- Loading branch information
Showing
18 changed files
with
1,322 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"attachments": {}, | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"**Package Structure**" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Python Packages" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import sys\n", | ||
"import inspect\n", | ||
"import pedon as pe" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Pedon Structure\n", | ||
"\n", | ||
"Pedon knows three classes;\n", | ||
"- Soil\n", | ||
"- SoilModel\n", | ||
"- SoilSample\n", | ||
"\n", | ||
"The Soil class encapsulates the SoilModel and SoilSample class. The soil class has the following attributes:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"{'name': str,\n", | ||
" 'model': pedon.soilmodel.SoilModel | None,\n", | ||
" 'sample': pedon.soil.SoilSample | None,\n", | ||
" 'source': str | None,\n", | ||
" 'description': str | None}" | ||
] | ||
}, | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"# main class\n", | ||
"# containing both SoilModel and SoilSample\n", | ||
"pe.Soil.__annotations__" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"The name of the soil, the soil type (e.g. sand or clay) are strings. The source is the origin of the soil, and description contains extra information. The SoilModel is the relation between the pressure head, hydraulic conducitivity and water content. Possible SoilModels are:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"['Brooks',\n", | ||
" 'Fredlund',\n", | ||
" 'Gardner',\n", | ||
" 'Genuchten',\n", | ||
" 'Panday',\n", | ||
" 'Protocol',\n", | ||
" 'SoilModel']" | ||
] | ||
}, | ||
"execution_count": 3, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"# classes for soil models\n", | ||
"soilmodels = [\n", | ||
" cls_name\n", | ||
" for cls_name, cls_obj in inspect.getmembers(sys.modules[\"pedon.soilmodel\"])\n", | ||
" if inspect.isclass(cls_obj)\n", | ||
"]\n", | ||
"soilmodels" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"The SoilSample atttribute can contain measurements of the sand percentage `sand_p`, silt percentage `silt_p`, bulkd density `rho` or measurements of the pressure head `h` and the resulting hydraulic conductivity `k` or water content `theta`. " | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 4, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"{'sand_p': float | None,\n", | ||
" 'silt_p': float | None,\n", | ||
" 'clay_p': float | None,\n", | ||
" 'rho': float | None,\n", | ||
" 'th33': float | None,\n", | ||
" 'th1500': float | None,\n", | ||
" 'om_p': float | None,\n", | ||
" 'm50': float | None,\n", | ||
" 'h': float | numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None,\n", | ||
" 'k': float | numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None,\n", | ||
" 'theta': float | numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] | None}" | ||
] | ||
}, | ||
"execution_count": 4, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"# class for sample measurements\n", | ||
"pe.SoilSample.__annotations__" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "pydon", | ||
"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.12" | ||
}, | ||
"orig_nbformat": 4 | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.