Skip to content

Commit 6eba8fc

Browse files
authored
Merge pull request #46 from MTgeophysics/simpeg
For now only 1D and 2D are "working" but need to include in next release.
2 parents 304bfbb + 2cafbc2 commit 6eba8fc

File tree

17 files changed

+2047
-76
lines changed

17 files changed

+2047
-76
lines changed

.github/workflows/testing_in_conda.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,26 @@ jobs:
2323
uses: s-weigand/setup-conda@v1
2424
with:
2525
update-conda: false
26+
conda-channels: conda-forge
2627
python-version: ${{ matrix.python-version }}
2728

2829
- name: Install Env
2930
shell: bash
3031
run: |
3132
python --version
32-
conda create -n mtpy-v2-test python=${{ matrix.python-version }}
33+
conda env create -f environment.yml
3334
source activate mtpy-v2-test
35+
pip install git+https://github.com/simpeg/pydiso.git
3436
conda install pytest
3537
conda install pytest-subtests
3638
conda install pytest-cov
3739
pip install git+https://github.com/kujaku11/mt_metadata.git@main
38-
pip install git+https://github.com/kujaku11/mth5.git@add_aurora_tools
39-
pip install git+https://github.com/MTgeophysics/mtpy_data.git@main
40+
pip install git+https://github.com/kujaku11/mth5.git@patches
4041
pip install git+https://github.com/simpeg/aurora@move_to_mth5
42+
git clone https://github.com/MTgeophysics/mtpy_data.git
43+
cd mtpy_data
44+
pip install -e .
45+
cd ..
4146
4247
- name: Install Our Package
4348
shell: bash

environment.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: mtpy-v2-test
2+
channels:
3+
- conda-forge
4+
- defaults
5+
dependencies:
6+
- matplotlib
7+
- numpy=1.26
8+
- git
9+
- pip
10+
- simpeg
11+
- dill
12+
- jupyterlab
13+
- ipywidgets
14+
- mkl-devel
15+
- pkg-config
16+
- cmake
17+
- cython
18+
- ninja

mtpy/core/mt.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def clone_empty(self):
9494
new_mt_obj.model_north = self.model_north
9595
new_mt_obj.model_elevation = self.model_elevation
9696
new_mt_obj._rotation_angle = self._rotation_angle
97+
new_mt_obj.profile_offset = self.profile_offset
9798

9899
return new_mt_obj
99100

@@ -958,9 +959,7 @@ def add_white_noise(self, value, inplace=True):
958959
] = self._transfer_function.transfer_function.real * (
959960
noise_real
960961
) + (
961-
1j
962-
* self._transfer_function.transfer_function.imag
963-
* noise_imag
962+
1j * self._transfer_function.transfer_function.imag * noise_imag
964963
)
965964

966965
self._transfer_function["transfer_function_error"] = (
@@ -974,16 +973,20 @@ def add_white_noise(self, value, inplace=True):
974973
] = self._transfer_function.transfer_function.real * (
975974
noise_real
976975
) + (
977-
1j
978-
* self._transfer_function.transfer_function.imag
979-
* noise_imag
976+
1j * self._transfer_function.transfer_function.imag * noise_imag
980977
)
981978

982979
self._transfer_function["transfer_function_error"] = (
983980
self._transfer_function.transfer_function_error + value
984981
)
985982
return new_mt_obj
986983

984+
def edit_curve(self, method="default", tolerance=0.05):
985+
"""
986+
try to remove bad points in a scientific way.
987+
988+
"""
989+
987990
def to_occam1d(self, data_filename=None, mode="det"):
988991
"""Write an Occam1DData data file.
989992
:param data_filename: Path to write file, if None returns Occam1DData

0 commit comments

Comments
 (0)