tdmrsdm 2025.7.1.dev1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,161 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ dataset/
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ #Pipfile.lock
97
+
98
+ # poetry
99
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
103
+ #poetry.lock
104
+
105
+ # pdm
106
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
107
+ #pdm.lock
108
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
109
+ # in version control.
110
+ # https://pdm.fming.dev/#use-with-ide
111
+ .pdm.toml
112
+
113
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
114
+ __pypackages__/
115
+
116
+ # Celery stuff
117
+ celerybeat-schedule
118
+ celerybeat.pid
119
+
120
+ # SageMath parsed files
121
+ *.sage.py
122
+
123
+ # Environments
124
+ .env
125
+ .venv
126
+ env/
127
+ venv/
128
+ ENV/
129
+ env.bak/
130
+ venv.bak/
131
+
132
+ # Spyder project settings
133
+ .spyderproject
134
+ .spyproject
135
+
136
+ # Rope project settings
137
+ .ropeproject
138
+
139
+ # mkdocs documentation
140
+ /site
141
+
142
+ # mypy
143
+ .mypy_cache/
144
+ .dmypy.json
145
+ dmypy.json
146
+
147
+ # Pyre type checker
148
+ .pyre/
149
+
150
+ # pytype static type analyzer
151
+ .pytype/
152
+
153
+ # Cython debug symbols
154
+ cython_debug/
155
+
156
+ # PyCharm
157
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
158
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
159
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
160
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
161
+ #.idea/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Morteza Khazaei
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,100 @@
1
+ Metadata-Version: 2.4
2
+ Name: tdmrsdm
3
+ Version: 2025.7.1.dev1
4
+ Summary: A Temperature-Dependent Multi-Relaxation Spectroscopic Dielectric Model (TD-MRSDM).
5
+ Author-email: Morteza Khazaei <morteza.khazaei@usherbrooke.ca>
6
+ License: MIT License
7
+ Project-URL: Homepage, https://github.com/Morteza-Khazaei/TD-MRSDM
8
+ Project-URL: Repository, https://github.com/Morteza-Khazaei/TD-MRSDM
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.7
11
+ Classifier: Programming Language :: Python :: 3.8
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Requires-Python: >=3.7
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: matplotlib
19
+ Requires-Dist: seaborn
20
+ Requires-Dist: numpy
21
+ Dynamic: license-file
22
+
23
+ # TD-MRSDM
24
+
25
+ [![Python Version](https://img.shields.io/badge/python-3.7%20|%203.8%20|%203.9-blue.svg)](https://www.python.org/downloads/)
26
+
27
+
28
+ This Python package, based on the paper titled [Spectroscopic Multirelaxation Dielectric Model of Thawed and Frozen Arctic Soils Considering the Dependence on Temperature and Organic Matter Content](https://doi.org/10.1134/S0001433819090305), provides an implementation of the temperature-dependent multi-relaxation spectroscopic dielectric model described in the paper. The model is designed for characterizing the dielectric properties of organic soil at frequencies ranging from 0.05 to 15 GHz under various temperature conditions.
29
+
30
+ <p float="center">
31
+ <img src="figures/TD-MRSDM.png" width="800">
32
+ </p>
33
+
34
+ ## Installation
35
+
36
+ To use **TD-MRSDM**, you need to install it first. You can install it using `pip`:
37
+
38
+ ```bash
39
+ pip install tdmrsdm
40
+ ```
41
+
42
+ ## Usage
43
+
44
+ Here's a simple example of how to use the smwlst package to compute LST:
45
+
46
+ ```python
47
+ import numpy as np
48
+ import matplotlib.pyplot as plt
49
+ import seaborn as sns
50
+ from tdmrsdm import TDMRSDM
51
+
52
+
53
+ # Define temperature and MgCl2 concentration ranges
54
+ ssts = np.arange(-30, 26, 1) # From -30 to 25 degrees Celsius
55
+ mvs = np.arange(0, 0.86, 0.01) # From 0 to 0.85
56
+
57
+ # Create empty lists to store results
58
+ epsr_values = []
59
+ epsi_values = []
60
+ moisture_values = []
61
+
62
+
63
+ # Loop through soil moisture content
64
+ for mv in mvs:
65
+ for sst in ssts:
66
+ mrsdm = TDMRSDM(freq_GHz=1.41, sst=sst, som=25, sbd=0.95, ssm=mv)
67
+ eps = mrsdm.run()
68
+ epsr, epsi = eps.real, eps.imag
69
+ epsr_values.append(epsr[0]) # Access the first element because epsr is an array
70
+ epsi_values.append(epsi[0]) # Access the first element because epsi is an array
71
+ moisture_values.append(mv)
72
+
73
+
74
+ # Create the plot using seaborn
75
+ plt.figure(figsize=(10, 6))
76
+ sns.lineplot(x=moisture_values, y=epsr_values, label='Real Soil DC')
77
+ sns.lineplot(x=moisture_values, y=epsi_values, label='Imaginary Soil DC')
78
+
79
+ plt.xlabel('Soil Moisture (g/g)')
80
+ plt.ylabel('Soil DC')
81
+ plt.title('Real and Imaginary Soil DC as a Function of Soil Moisture')
82
+ plt.legend()
83
+ plt.grid(True)
84
+ plt.show()
85
+
86
+ ```
87
+ <p float="center">
88
+ <img src="figures/soil_dc_vs_ssm.png" width="800">
89
+ </p>
90
+
91
+ >[!WARNING]
92
+ >**Copyright Notice:** This code is part of a PhD research program and is not licensed for public use or distribution yet! All rights are reserved by the author [**Morteza Khazaei**]. Unauthorized use, reproduction, or distribution of this code is prohibited without prior written permission from the author. For inquiries or collaboration, please contact [morteza.khazaei@usherbrooke.ca](morteza.khazaei@usherbrooke.ca).
93
+
94
+ ## Authors
95
+
96
+ - [Morteza Khazaei - [morteza.khazaei@usherbrooke.ca]](https://github.com/Morteza-Khazaei)
97
+
98
+ ## References
99
+
100
+ - [Mironov, V., & Savin, I. (2015). A temperature-dependent multi-relaxation spectroscopic dielectric model for thawed and frozen organic soil at 0.05–15 GHz. Physics and Chemistry of the Earth, Parts A/B/C, 83, 57-64.](https://doi.org/10.1016/j.pce.2015.02.011)
@@ -0,0 +1,78 @@
1
+ # TD-MRSDM
2
+
3
+ [![Python Version](https://img.shields.io/badge/python-3.7%20|%203.8%20|%203.9-blue.svg)](https://www.python.org/downloads/)
4
+
5
+
6
+ This Python package, based on the paper titled [Spectroscopic Multirelaxation Dielectric Model of Thawed and Frozen Arctic Soils Considering the Dependence on Temperature and Organic Matter Content](https://doi.org/10.1134/S0001433819090305), provides an implementation of the temperature-dependent multi-relaxation spectroscopic dielectric model described in the paper. The model is designed for characterizing the dielectric properties of organic soil at frequencies ranging from 0.05 to 15 GHz under various temperature conditions.
7
+
8
+ <p float="center">
9
+ <img src="figures/TD-MRSDM.png" width="800">
10
+ </p>
11
+
12
+ ## Installation
13
+
14
+ To use **TD-MRSDM**, you need to install it first. You can install it using `pip`:
15
+
16
+ ```bash
17
+ pip install tdmrsdm
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ Here's a simple example of how to use the smwlst package to compute LST:
23
+
24
+ ```python
25
+ import numpy as np
26
+ import matplotlib.pyplot as plt
27
+ import seaborn as sns
28
+ from tdmrsdm import TDMRSDM
29
+
30
+
31
+ # Define temperature and MgCl2 concentration ranges
32
+ ssts = np.arange(-30, 26, 1) # From -30 to 25 degrees Celsius
33
+ mvs = np.arange(0, 0.86, 0.01) # From 0 to 0.85
34
+
35
+ # Create empty lists to store results
36
+ epsr_values = []
37
+ epsi_values = []
38
+ moisture_values = []
39
+
40
+
41
+ # Loop through soil moisture content
42
+ for mv in mvs:
43
+ for sst in ssts:
44
+ mrsdm = TDMRSDM(freq_GHz=1.41, sst=sst, som=25, sbd=0.95, ssm=mv)
45
+ eps = mrsdm.run()
46
+ epsr, epsi = eps.real, eps.imag
47
+ epsr_values.append(epsr[0]) # Access the first element because epsr is an array
48
+ epsi_values.append(epsi[0]) # Access the first element because epsi is an array
49
+ moisture_values.append(mv)
50
+
51
+
52
+ # Create the plot using seaborn
53
+ plt.figure(figsize=(10, 6))
54
+ sns.lineplot(x=moisture_values, y=epsr_values, label='Real Soil DC')
55
+ sns.lineplot(x=moisture_values, y=epsi_values, label='Imaginary Soil DC')
56
+
57
+ plt.xlabel('Soil Moisture (g/g)')
58
+ plt.ylabel('Soil DC')
59
+ plt.title('Real and Imaginary Soil DC as a Function of Soil Moisture')
60
+ plt.legend()
61
+ plt.grid(True)
62
+ plt.show()
63
+
64
+ ```
65
+ <p float="center">
66
+ <img src="figures/soil_dc_vs_ssm.png" width="800">
67
+ </p>
68
+
69
+ >[!WARNING]
70
+ >**Copyright Notice:** This code is part of a PhD research program and is not licensed for public use or distribution yet! All rights are reserved by the author [**Morteza Khazaei**]. Unauthorized use, reproduction, or distribution of this code is prohibited without prior written permission from the author. For inquiries or collaboration, please contact [morteza.khazaei@usherbrooke.ca](morteza.khazaei@usherbrooke.ca).
71
+
72
+ ## Authors
73
+
74
+ - [Morteza Khazaei - [morteza.khazaei@usherbrooke.ca]](https://github.com/Morteza-Khazaei)
75
+
76
+ ## References
77
+
78
+ - [Mironov, V., & Savin, I. (2015). A temperature-dependent multi-relaxation spectroscopic dielectric model for thawed and frozen organic soil at 0.05–15 GHz. Physics and Chemistry of the Earth, Parts A/B/C, 83, 57-64.](https://doi.org/10.1016/j.pce.2015.02.011)
@@ -0,0 +1,47 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "setuptools-scm>=8.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "tdmrsdm"
7
+ description = "A Temperature-Dependent Multi-Relaxation Spectroscopic Dielectric Model (TD-MRSDM)."
8
+ readme = "README.md"
9
+ authors = [
10
+ { name = "Morteza Khazaei", email = "morteza.khazaei@usherbrooke.ca" },
11
+ ]
12
+ license = { text = "MIT License" }
13
+ requires-python = ">=3.7"
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.7",
17
+ "Programming Language :: Python :: 3.8",
18
+ "Programming Language :: Python :: 3.9",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: OS Independent",
21
+ ]
22
+ dependencies = [
23
+ "matplotlib",
24
+ "seaborn",
25
+ "numpy",
26
+
27
+ ]
28
+ dynamic = ["version"]
29
+
30
+ [project.urls]
31
+ "Homepage" = "https://github.com/Morteza-Khazaei/TD-MRSDM"
32
+ "Repository" = "https://github.com/Morteza-Khazaei/TD-MRSDM"
33
+
34
+ [tool.setuptools]
35
+ package-dir = { "" = "src" }
36
+ include-package-data = true
37
+
38
+ [tool.setuptools_scm]
39
+ version_scheme = "python-simplified-semver"
40
+ local_scheme = "no-local-version"
41
+
42
+ [tool.setuptools.packages.find]
43
+ where = ["src"]
44
+ exclude = ["dataset"]
45
+
46
+ [tool.setuptools.package-data]
47
+ tdmrsdm = ["constants/*.json"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,4 @@
1
+ from setuptools import setup
2
+
3
+ if __name__ == "__main__":
4
+ setup()
File without changes
@@ -0,0 +1,154 @@
1
+ {
2
+ "TD-MRSDM-constants": {
3
+ "water-phase": {
4
+ "bound-water": {
5
+ "relaxation-time": {
6
+ "low-frequency": {
7
+ "t_lte_-1C": {
8
+ "e0p": 86,
9
+ "bv0p": -1.22E-4,
10
+ "tse0p": -25,
11
+ "dHp/R": 362,
12
+ "dSp/R": -9.93
13
+ },
14
+ "t_gte_0C": {
15
+ "e0p": 110,
16
+ "bv0p": -1.1E-4,
17
+ "tse0p": 25,
18
+ "dHp/R": 662,
19
+ "dSp/R": -8.82
20
+ }
21
+ },
22
+ "mid-frequency": {
23
+ "t_lte_-1C": {
24
+ "e0p": 13,
25
+ "bv0p": -3.95E-3,
26
+ "tse0p": -25,
27
+ "dHp/R": 617,
28
+ "dSp/R": -4.81
29
+ },
30
+ "t_gte_0C": {
31
+ "e0p": 30,
32
+ "bv0p": -1.82E-3,
33
+ "tse0p": 25,
34
+ "dHp/R": 493,
35
+ "dSp/R": -5.65
36
+ }
37
+ },
38
+ "high-frequency": {
39
+ "t_lte_-1C": {
40
+ "e0p": 8,
41
+ "bv0p": -1.14E-3,
42
+ "tse0p": -25,
43
+ "dHp/R": 671,
44
+ "dSp/R": -2.5
45
+ },
46
+ "t_gte_0C": {
47
+ "e0p": 13,
48
+ "bv0p": -3.83E-3,
49
+ "tse0p": 25,
50
+ "dHp/R": 366,
51
+ "dSp/R": -3.79
52
+ }
53
+ }
54
+ },
55
+ "electrical-conductivity": {
56
+ "temperature-range": {
57
+ "t_lte_-1C": {
58
+ "sigma(tsp)": 5E-3,
59
+ "betap": 0,
60
+ "tsp": -25
61
+ },
62
+ "t_gte_0C": {
63
+ "sigma(tsp)": 5E-3,
64
+ "betap": 0,
65
+ "tsp": 25
66
+ }
67
+ }}
68
+ },
69
+ "transient-water": {
70
+ "relaxation-time": {
71
+ "low-frequency": {
72
+ "t_lte_-1C": {
73
+ "e0p": 75,
74
+ "bv0p": -5.02E-4,
75
+ "tse0p": -25,
76
+ "dHp/R": 2837,
77
+ "dSp/R": 3.45
78
+ },
79
+ "t_gte_0C": {
80
+ "e0p": 97,
81
+ "bv0p": 7.48E-5,
82
+ "tse0p": 25,
83
+ "dHp/R": 2133,
84
+ "dSp/R": 0.74
85
+ }
86
+ },
87
+ "high-frequency": {
88
+ "t_lte_-1C": {
89
+ "e0p": 22,
90
+ "bv0p": -2.89E-3,
91
+ "tse0p": -25,
92
+ "dHp/R": 2870,
93
+ "dSp/R": 5.88
94
+ },
95
+ "t_gte_0C": {
96
+ "e0p": 58,
97
+ "bv0p": -1.93E-4,
98
+ "tse0p": 25,
99
+ "dHp/R": 1849,
100
+ "dSp/R": 1.81
101
+ }
102
+ }
103
+ },
104
+ "electrical-conductivity": {
105
+ "temperature-range": {
106
+ "t_lte_-1C": {
107
+ "sigma(tsp)": 0.01,
108
+ "betap": 0,
109
+ "tsp": -25
110
+ },
111
+ "t_gte_0C": {
112
+ "sigma(tsp)": 0.01,
113
+ "betap": 0,
114
+ "tsp": 25
115
+ }
116
+ }}
117
+ },
118
+ "ice-unbound-water": {
119
+ "relaxation-time": {
120
+ "low-frequency": {
121
+ "t_lte_-1C": {
122
+ "e0p": 6,
123
+ "bv0p": -11.3E-3,
124
+ "tse0p": -25,
125
+ "dHp/R": 3484,
126
+ "dSp/R": 7.78
127
+ }
128
+ },
129
+ "high-frequency": {
130
+ "t_gte_0C": {
131
+ "e0p": 85,
132
+ "bv0p": 1.53E-4,
133
+ "tse0p": 25,
134
+ "dHp/R": 2319,
135
+ "dSp/R": 3.72
136
+ }
137
+ }
138
+ },
139
+ "electrical-conductivity": {
140
+ "temperature-range": {
141
+ "t_lte_-1C": {
142
+ "sigma(tsp)": 0.008,
143
+ "betap": 1.15E-3,
144
+ "tsp": -25
145
+ },
146
+ "t_gte_0C": {
147
+ "sigma(tsp)": 0.26,
148
+ "betap": 3.3E-3,
149
+ "tsp": 25
150
+ }
151
+ }}
152
+ }
153
+ }}
154
+ }