integrate-module 0.2.15__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.
- integrate_module-0.2.15/LICENSE +21 -0
- integrate_module-0.2.15/PKG-INFO +157 -0
- integrate_module-0.2.15/README.md +128 -0
- integrate_module-0.2.15/integrate/__init__.py +79 -0
- integrate_module-0.2.15/integrate/integrate.py +2511 -0
- integrate_module-0.2.15/integrate/integrate_io.py +2539 -0
- integrate_module-0.2.15/integrate/integrate_obsolete.py +246 -0
- integrate_module-0.2.15/integrate/integrate_old.py +2800 -0
- integrate_module-0.2.15/integrate/integrate_plot.py +1988 -0
- integrate_module-0.2.15/integrate/integrate_plot_old.py +1420 -0
- integrate_module-0.2.15/integrate/integrate_rejection.py +1254 -0
- integrate_module-0.2.15/integrate/integrate_rejection_cli.py +203 -0
- integrate_module-0.2.15/integrate/integrate_timing_cli.py +706 -0
- integrate_module-0.2.15/integrate_module.egg-info/PKG-INFO +157 -0
- integrate_module-0.2.15/integrate_module.egg-info/SOURCES.txt +19 -0
- integrate_module-0.2.15/integrate_module.egg-info/dependency_links.txt +1 -0
- integrate_module-0.2.15/integrate_module.egg-info/entry_points.txt +3 -0
- integrate_module-0.2.15/integrate_module.egg-info/requires.txt +20 -0
- integrate_module-0.2.15/integrate_module.egg-info/top_level.txt +1 -0
- integrate_module-0.2.15/pyproject.toml +45 -0
- integrate_module-0.2.15/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023-2025 Thomas Mejer Hansen and INTEGRATE Working Group
|
|
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,157 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: integrate_module
|
|
3
|
+
Version: 0.2.15
|
|
4
|
+
Summary: Localized probabilistic data integration
|
|
5
|
+
Author-email: Thomas Mejer Hansen <tmeha@geo.au.dk>
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: inversion,electromagnetic,geophysics,geology,prior,tarantola
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: numpy
|
|
13
|
+
Requires-Dist: matplotlib
|
|
14
|
+
Requires-Dist: h5py
|
|
15
|
+
Requires-Dist: scipy
|
|
16
|
+
Requires-Dist: psutil
|
|
17
|
+
Requires-Dist: tqdm
|
|
18
|
+
Requires-Dist: requests
|
|
19
|
+
Requires-Dist: ga-aem-forward-win; platform_system == "Windows"
|
|
20
|
+
Provides-Extra: dev
|
|
21
|
+
Requires-Dist: pytest; extra == "dev"
|
|
22
|
+
Requires-Dist: black; extra == "dev"
|
|
23
|
+
Provides-Extra: all
|
|
24
|
+
Requires-Dist: jupyter>=1.0.0; extra == "all"
|
|
25
|
+
Requires-Dist: jupytext; extra == "all"
|
|
26
|
+
Requires-Dist: pandas; extra == "all"
|
|
27
|
+
Requires-Dist: pyvista; extra == "all"
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+
# INTEGRATE Python Module
|
|
31
|
+
|
|
32
|
+
[](https://badge.fury.io/py/integrate_module)
|
|
33
|
+
[](https://test.pypi.org/project/integrate-module/)
|
|
34
|
+
[](https://cultpenguin.github.io/integrate_module/)
|
|
35
|
+
[](https://opensource.org/licenses/MIT)
|
|
36
|
+
[](https://www.python.org/downloads/)
|
|
37
|
+
|
|
38
|
+
This repository holds the INTEGRATE Python module
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
Assuming you allready have python 3.10 installed
|
|
44
|
+
|
|
45
|
+
pip install -i https://test.pypi.org/simple/ integrate_module
|
|
46
|
+
|
|
47
|
+
On Windows this will also install the python wrapper for the ga-aem (1D EM forward modeling - GPL v2 code) --> [ga-aem-forward-win](https://pypi.org/project/ga-aem-forward-win/)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### PIP (from pypi)
|
|
51
|
+
|
|
52
|
+
# Install python3 venv
|
|
53
|
+
sudo apt install python3-venv
|
|
54
|
+
|
|
55
|
+
# Create virtual environment
|
|
56
|
+
python3 -m venv ~/integrate
|
|
57
|
+
source ~/integrate/bin/activate
|
|
58
|
+
pip install --upgrade pip
|
|
59
|
+
|
|
60
|
+
# Install integrate module
|
|
61
|
+
pip install -i https://test.pypi.org/simple/ integrate_module
|
|
62
|
+
|
|
63
|
+
### PIP (from source)
|
|
64
|
+
|
|
65
|
+
# Install python3 venv
|
|
66
|
+
sudo apt install python3-venv
|
|
67
|
+
|
|
68
|
+
# Create virtual environment
|
|
69
|
+
python3 -m venv ~/integrate
|
|
70
|
+
source ~/integrate/bin/activate
|
|
71
|
+
pip install --upgrade pip
|
|
72
|
+
|
|
73
|
+
# Install integrate module
|
|
74
|
+
cd path/to/integrate module
|
|
75
|
+
pip install -e .
|
|
76
|
+
|
|
77
|
+
### Conda + PIP (from pypi)
|
|
78
|
+
|
|
79
|
+
Create a Conda environment (called integrate) and install the required modules, using
|
|
80
|
+
|
|
81
|
+
conda create --name integrate python=3.10 numpy pandas matplotlib scipy tqdm requests h5py psutil
|
|
82
|
+
conda activate integrate
|
|
83
|
+
pip install -i https://test.pypi.org/simple/ integrate_module
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### Conda + PIP (from source)
|
|
88
|
+
|
|
89
|
+
Create a Conda environment (called integrate) and install the required modules, using
|
|
90
|
+
|
|
91
|
+
conda create --name integrate python=3.10 numpy pandas matplotlib scipy tqdm requests h5py psutil
|
|
92
|
+
conda activate integrate
|
|
93
|
+
pip install -e .
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
## GA-AEM
|
|
97
|
+
|
|
98
|
+
In order to use GA-AEM for forward EM modeling, the 'gatdaem1d' Python module must be installed. Follow instructions at [https://github.com/GeoscienceAustralia/ga-aem](https://github.com/GeoscienceAustralia/ga-aem) or use the information below.
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### pypi paackage for windows
|
|
102
|
+
|
|
103
|
+
In Windows the [ga-aem-forward-win](https://pypi.org/project/ga-aem-forward-win/) package will be autoamtically installed that provides access to the GA-AEM forward code. It can be installed manually using
|
|
104
|
+
|
|
105
|
+
pip install ga-aem-forward-win
|
|
106
|
+
|
|
107
|
+
### Pre-Compiled Python module in Windows
|
|
108
|
+
|
|
109
|
+
Download pre-compiled version of GA-AEM for windows through the latest release from https://github.com/GeoscienceAustralia/ga-aem/releases as GA-AEM.zip
|
|
110
|
+
|
|
111
|
+
Download precompiled FFTW3 windows dlls from https://www.fftw.org/install/windows.html as fftw-3.3.5-dll64.zip
|
|
112
|
+
|
|
113
|
+
unzip GA-AEM.zip to get GA-AEM
|
|
114
|
+
|
|
115
|
+
unzip fftw-3.3.5-dll64.zip to get fftw-3.3.5-dll64
|
|
116
|
+
|
|
117
|
+
Copy fftw-3.3.5-dll64/*.dll to GA-AEM/python/gatdaem1d/
|
|
118
|
+
|
|
119
|
+
cp fftw-3.3.5-dll64/*.dll GA-AEM/python/gatdaem1d/
|
|
120
|
+
|
|
121
|
+
Install the python gatdaem1d module
|
|
122
|
+
|
|
123
|
+
cd GA-AEM/python/
|
|
124
|
+
pip install -e .
|
|
125
|
+
|
|
126
|
+
# test the installaion
|
|
127
|
+
cd examples
|
|
128
|
+
python skytem_example.py
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
### Compile ga-aem Python module in Ubuntu/Linux
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
A script that downloads and install GA-AEM is located in 'scripts/cmake_build_script_ubuntu_gatdaem1d.sh'. Be sure to use the appropriate Python environment and then run
|
|
136
|
+
|
|
137
|
+
sh scripts/cmake_build_script_ubuntu_gatdaem1d.sh
|
|
138
|
+
cd ga-aem/install-ubuntu/python
|
|
139
|
+
pip install .
|
|
140
|
+
|
|
141
|
+
### Compile ga-aem Python module in OSX/Homebrew
|
|
142
|
+
|
|
143
|
+
First install homebrew, then run
|
|
144
|
+
|
|
145
|
+
sh ./scripts/cmake_build_script_homebrew_gatdaem1d.sh
|
|
146
|
+
cd ga-aem/install-homebrew/python
|
|
147
|
+
pip install .
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
## Development
|
|
151
|
+
|
|
152
|
+
The main branch should be the most stable, and updates, less frequent, but with larger changes.
|
|
153
|
+
|
|
154
|
+
The develop branch contains the current development code and may be updated frequently, and some functions and examples may be broken.
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# INTEGRATE Python Module
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/py/integrate_module)
|
|
4
|
+
[](https://test.pypi.org/project/integrate-module/)
|
|
5
|
+
[](https://cultpenguin.github.io/integrate_module/)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://www.python.org/downloads/)
|
|
8
|
+
|
|
9
|
+
This repository holds the INTEGRATE Python module
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
Assuming you allready have python 3.10 installed
|
|
15
|
+
|
|
16
|
+
pip install -i https://test.pypi.org/simple/ integrate_module
|
|
17
|
+
|
|
18
|
+
On Windows this will also install the python wrapper for the ga-aem (1D EM forward modeling - GPL v2 code) --> [ga-aem-forward-win](https://pypi.org/project/ga-aem-forward-win/)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### PIP (from pypi)
|
|
22
|
+
|
|
23
|
+
# Install python3 venv
|
|
24
|
+
sudo apt install python3-venv
|
|
25
|
+
|
|
26
|
+
# Create virtual environment
|
|
27
|
+
python3 -m venv ~/integrate
|
|
28
|
+
source ~/integrate/bin/activate
|
|
29
|
+
pip install --upgrade pip
|
|
30
|
+
|
|
31
|
+
# Install integrate module
|
|
32
|
+
pip install -i https://test.pypi.org/simple/ integrate_module
|
|
33
|
+
|
|
34
|
+
### PIP (from source)
|
|
35
|
+
|
|
36
|
+
# Install python3 venv
|
|
37
|
+
sudo apt install python3-venv
|
|
38
|
+
|
|
39
|
+
# Create virtual environment
|
|
40
|
+
python3 -m venv ~/integrate
|
|
41
|
+
source ~/integrate/bin/activate
|
|
42
|
+
pip install --upgrade pip
|
|
43
|
+
|
|
44
|
+
# Install integrate module
|
|
45
|
+
cd path/to/integrate module
|
|
46
|
+
pip install -e .
|
|
47
|
+
|
|
48
|
+
### Conda + PIP (from pypi)
|
|
49
|
+
|
|
50
|
+
Create a Conda environment (called integrate) and install the required modules, using
|
|
51
|
+
|
|
52
|
+
conda create --name integrate python=3.10 numpy pandas matplotlib scipy tqdm requests h5py psutil
|
|
53
|
+
conda activate integrate
|
|
54
|
+
pip install -i https://test.pypi.org/simple/ integrate_module
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Conda + PIP (from source)
|
|
59
|
+
|
|
60
|
+
Create a Conda environment (called integrate) and install the required modules, using
|
|
61
|
+
|
|
62
|
+
conda create --name integrate python=3.10 numpy pandas matplotlib scipy tqdm requests h5py psutil
|
|
63
|
+
conda activate integrate
|
|
64
|
+
pip install -e .
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## GA-AEM
|
|
68
|
+
|
|
69
|
+
In order to use GA-AEM for forward EM modeling, the 'gatdaem1d' Python module must be installed. Follow instructions at [https://github.com/GeoscienceAustralia/ga-aem](https://github.com/GeoscienceAustralia/ga-aem) or use the information below.
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### pypi paackage for windows
|
|
73
|
+
|
|
74
|
+
In Windows the [ga-aem-forward-win](https://pypi.org/project/ga-aem-forward-win/) package will be autoamtically installed that provides access to the GA-AEM forward code. It can be installed manually using
|
|
75
|
+
|
|
76
|
+
pip install ga-aem-forward-win
|
|
77
|
+
|
|
78
|
+
### Pre-Compiled Python module in Windows
|
|
79
|
+
|
|
80
|
+
Download pre-compiled version of GA-AEM for windows through the latest release from https://github.com/GeoscienceAustralia/ga-aem/releases as GA-AEM.zip
|
|
81
|
+
|
|
82
|
+
Download precompiled FFTW3 windows dlls from https://www.fftw.org/install/windows.html as fftw-3.3.5-dll64.zip
|
|
83
|
+
|
|
84
|
+
unzip GA-AEM.zip to get GA-AEM
|
|
85
|
+
|
|
86
|
+
unzip fftw-3.3.5-dll64.zip to get fftw-3.3.5-dll64
|
|
87
|
+
|
|
88
|
+
Copy fftw-3.3.5-dll64/*.dll to GA-AEM/python/gatdaem1d/
|
|
89
|
+
|
|
90
|
+
cp fftw-3.3.5-dll64/*.dll GA-AEM/python/gatdaem1d/
|
|
91
|
+
|
|
92
|
+
Install the python gatdaem1d module
|
|
93
|
+
|
|
94
|
+
cd GA-AEM/python/
|
|
95
|
+
pip install -e .
|
|
96
|
+
|
|
97
|
+
# test the installaion
|
|
98
|
+
cd examples
|
|
99
|
+
python skytem_example.py
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
### Compile ga-aem Python module in Ubuntu/Linux
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
A script that downloads and install GA-AEM is located in 'scripts/cmake_build_script_ubuntu_gatdaem1d.sh'. Be sure to use the appropriate Python environment and then run
|
|
107
|
+
|
|
108
|
+
sh scripts/cmake_build_script_ubuntu_gatdaem1d.sh
|
|
109
|
+
cd ga-aem/install-ubuntu/python
|
|
110
|
+
pip install .
|
|
111
|
+
|
|
112
|
+
### Compile ga-aem Python module in OSX/Homebrew
|
|
113
|
+
|
|
114
|
+
First install homebrew, then run
|
|
115
|
+
|
|
116
|
+
sh ./scripts/cmake_build_script_homebrew_gatdaem1d.sh
|
|
117
|
+
cd ga-aem/install-homebrew/python
|
|
118
|
+
pip install .
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
## Development
|
|
122
|
+
|
|
123
|
+
The main branch should be the most stable, and updates, less frequent, but with larger changes.
|
|
124
|
+
|
|
125
|
+
The develop branch contains the current development code and may be updated frequently, and some functions and examples may be broken.
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Import rejection sampling functions from new module
|
|
2
|
+
from integrate.integrate_rejection import integrate_rejection
|
|
3
|
+
from integrate.integrate_rejection import integrate_rejection_range
|
|
4
|
+
from integrate.integrate_rejection import integrate_posterior_chunk
|
|
5
|
+
from integrate.integrate_rejection import integrate_posterior_main
|
|
6
|
+
from integrate.integrate_rejection import likelihood_gaussian_diagonal
|
|
7
|
+
from integrate.integrate_rejection import likelihood_gaussian_full
|
|
8
|
+
from integrate.integrate_rejection import likelihood_multinomial
|
|
9
|
+
from integrate.integrate_rejection import select_subset_for_inversion
|
|
10
|
+
from integrate.integrate_rejection import cleanup_shared_memory
|
|
11
|
+
from integrate.integrate_rejection import reconstruct_shared_arrays
|
|
12
|
+
from integrate.integrate_rejection import create_shared_memory
|
|
13
|
+
|
|
14
|
+
# Import other functions from main module
|
|
15
|
+
from integrate.integrate import integrate_update_prior_attributes
|
|
16
|
+
from integrate.integrate import integrate_posterior_stats
|
|
17
|
+
from integrate.integrate import logl_T_est
|
|
18
|
+
from integrate.integrate import lu_post_sample_logl
|
|
19
|
+
from integrate.integrate import prior_data
|
|
20
|
+
from integrate.integrate import prior_data_gaaem
|
|
21
|
+
from integrate.integrate import prior_data_identity
|
|
22
|
+
from integrate.integrate import forward_gaaem
|
|
23
|
+
from integrate.integrate import synthetic_case
|
|
24
|
+
from integrate.integrate import prior_model_layered
|
|
25
|
+
from integrate.integrate import prior_model_workbench
|
|
26
|
+
from integrate.integrate import prior_model_workbench_direct
|
|
27
|
+
from integrate.integrate import posterior_cumulative_thickness
|
|
28
|
+
#from integrate.integrate import integrate_rejection_multi
|
|
29
|
+
from integrate.integrate import use_parallel
|
|
30
|
+
from integrate.integrate import get_weight_from_position
|
|
31
|
+
from integrate.integrate import entropy
|
|
32
|
+
from integrate.integrate import class_id_to_idx
|
|
33
|
+
from integrate.integrate import is_notebook
|
|
34
|
+
from integrate.integrate import get_hypothesis_probability
|
|
35
|
+
from integrate.integrate import sample_posterior_multiple_hypotheses
|
|
36
|
+
|
|
37
|
+
from integrate.integrate_io import load_prior
|
|
38
|
+
from integrate.integrate_io import load_prior_data
|
|
39
|
+
from integrate.integrate_io import save_prior_data
|
|
40
|
+
from integrate.integrate_io import load_prior_model
|
|
41
|
+
from integrate.integrate_io import save_prior_model
|
|
42
|
+
from integrate.integrate_io import load_data
|
|
43
|
+
from integrate.integrate_io import get_geometry
|
|
44
|
+
from integrate.integrate_io import read_gex
|
|
45
|
+
from integrate.integrate_io import gex_to_stm
|
|
46
|
+
from integrate.integrate_io import get_gex_file_from_data
|
|
47
|
+
from integrate.integrate_io import write_stm_files
|
|
48
|
+
from integrate.integrate_io import post_to_csv
|
|
49
|
+
from integrate.integrate_io import copy_hdf5_file
|
|
50
|
+
from integrate.integrate_io import hdf5_scan
|
|
51
|
+
from integrate.integrate_io import get_case_data
|
|
52
|
+
from integrate.integrate_io import write_data_gaussian
|
|
53
|
+
from integrate.integrate_io import write_data_multinomial
|
|
54
|
+
from integrate.integrate_io import check_data
|
|
55
|
+
from integrate.integrate_io import merge_data
|
|
56
|
+
from integrate.integrate_io import merge_posterior
|
|
57
|
+
from integrate.integrate_io import read_usf
|
|
58
|
+
from integrate.integrate_io import read_usf_mul
|
|
59
|
+
from integrate.integrate_io import test_read_usf
|
|
60
|
+
|
|
61
|
+
from integrate.integrate_plot import plot_geometry
|
|
62
|
+
from integrate.integrate_plot import plot_profile
|
|
63
|
+
from integrate.integrate_plot import plot_profile_continuous
|
|
64
|
+
from integrate.integrate_plot import plot_profile_discrete
|
|
65
|
+
from integrate.integrate_plot import plot_cumulative_probability_profile
|
|
66
|
+
from integrate.integrate_plot import plot_T_EV
|
|
67
|
+
from integrate.integrate_plot import plot_data_xy
|
|
68
|
+
from integrate.integrate_plot import plot_data
|
|
69
|
+
from integrate.integrate_plot import plot_data_prior_post
|
|
70
|
+
from integrate.integrate_plot import plot_data_prior
|
|
71
|
+
from integrate.integrate_plot import plot_prior_stats
|
|
72
|
+
from integrate.integrate_plot import plot_feature_2d
|
|
73
|
+
from integrate.integrate_plot import plot_posterior_cumulative_thickness
|
|
74
|
+
from integrate.integrate_plot import get_clim_cmap
|
|
75
|
+
|
|
76
|
+
# REMOVE CLI IMPORTS - These cause circular dependencies
|
|
77
|
+
# from . import integrate_cli
|
|
78
|
+
# from . import integrate_timing
|
|
79
|
+
|