Skip to content

Commit

Permalink
Merge pull request #66 from WEgeophysics/master
Browse files Browse the repository at this point in the history
add exception when reading Tipper data
  • Loading branch information
earthai-tech authored Jul 3, 2023
2 parents 8ed5658 + 9830677 commit fdccb9c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 124 deletions.
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
# _pycsamt_: A package for audio-frequency magnetotellurics

[![Documentation Status](https://readthedocs.org/projects/pycsamt/badge/?version=latest)](https://pycsamt.readthedocs.io/en/latest/?badge=latest) [![Build Status](https://travis-ci.com/WEgeophysics/pyCSAMT.svg?branch=master)](https://travis-ci.com/WEgeophysics/pyCSAMT) [![Requirements Status](https://requires.io/github/WEgeophysics/pycsamt/requirements.svg?branch=master)](https://requires.io/github/WEgeophysics/pycsamt/requirements/?branch=master)
[![Documentation Status](https://readthedocs.org/projects/pycsamt/badge/?version=latest)](https://pycsamt.readthedocs.io/en/latest/?badge=latest) [![Build Status](https://travis-ci.com/WEgeophysics/pyCSAMT.svg?branch=master)](https://travis-ci.com/WEgeophysics/pyCSAMT)
![GitHub](https://img.shields.io/github/license/WEgeophysics/pycsamt?color=blue&label=licence&logo=GNU&logoColor=red) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/WEgeophysics/pyCSAMT?color=orange) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5674430.svg)](https://doi.org/10.5281/zenodo.5674430)
[![PyPI version](https://badge.fury.io/py/pycsamt.svg)](https://badge.fury.io/py/pycsamt)
![GitHub repo size](https://img.shields.io/github/repo-size/WEgeophysics/pycsamt?color=0A4CEE&style=flat-square)

## Overview

* **Purpose**

Previously, the software was intended for controlled source audio-frequency magnetotelluric (CSAMT) data processing (hereinafter the suffix CSAMT) and mostly related
to the groundwater exploration. The recent development is focused on the audio-magnetotelluric(AMT) methods i.e the frequency above 1Hz. It encompasses the CSAMT, the natural source AMT (NSAMT) and later the radio AMT. Indeed, the AMT methods are used broadly in diverse of exploration problems such as mineral, hydrocarbon, groundwater resources, as well as the fault-zone mapping above the 1km depth.
to the groundwater exploration. The recent development is focused on the audio-magnetotelluric(AMT) methods. Indeed, the AMT methods are used broadly in diverse of exploration problems such as mineral, hydrocarbon, groundwater resources, as well as the fault-zone mapping above the 1km depth.
_pycsamt_ is designed to bring a piece of solution to the problems encountered by using AMT methods. It contains steps of AMT data processing and deals with [OCCAM2D](https://marineemlab.ucsd.edu/Projects/Occam/index.html) of [DeGroot-Hedlin and Constable, 1990](https://doi.org/10.1190/1.1442303) ,
the [MT2DInvMatlab](https://doi.org/10.1016/j.cageo.2008.10.010) of [Lee et al., 2009](https://doi.org/10.1016/j.cageo.2008.10.010) and [ModEM](https://sites.google.com/site/modularem/download) of [Kelbert et al., 2014](https://doi.org/10.1016/j.cageo.2014.01.010)
for the modeling purpose.

It also provides processing tools for filtering data and restoring amplitudes at weak frequency (tensor or or scalar values ) in the "dead-dand" especially for the NSAMT where the natural signals are not under our control and suffer from frequency ranges with little or no signal. Some implemented filters are the trimming moving-average (MA), the fixed dipole-length MA (both proposed by [Zonge International Engineering (Zonge, 2000)]( http://www.zonge.com/legacy/PDF_DatPro/Astatic.pdf )) and the adaptative MA based on idea of [Torres-verdìn and Bostick, 1992](https://doi.org/10.1190/1.2400625). These filters are mostly used for fast removing the static effect especially in electromagnetic-array profiling survey. Some others filters such as "simple" for outliers removal and "PCA" can also be applied upstream for a particular data where the interferences are very strong (e.g. intenses humman activities, power lines, ...). Moreover, the "Savitzky-Golay" filter is also added to remove high-frequency noise from data since it has the advantage of preserving the original shape and features of the signal better than other types of filtering approaches such as MA techniques (simple, exponential, cumulative, weight).

* **A specific WE sub-package**

Besides the processing features, the software implements a special water exploration (WE) sub-package (geology + drilling ) referred as `geodrill`, entirely dedicated to improve the groundwater exploration techniques. The aim is to reduce the numerous unsucessful drillings mostly occurred due to their wrong locations after AMT geophysical surveys. It consists to minimize the use of supplement methods to AMT which commonly increases the operating budgets to right locate the drilling thereby reducing the misinterpretation of modeling results(e.g., demarcating the appropriate fracture zones). More details can be found in the **Citations** section.
It also provides processing tools for filtering and processing data( the trimming moving-average (MA), the fixed dipole-length MA ([Zonge International Engineering (Zonge, 2000)]( http://www.zonge.com/legacy/PDF_DatPro/Astatic.pdf )), the adaptative MA ( [Torres-verdìn and Bostick, 1992](https://doi.org/10.1190/1.2400625)). These filters are mostly used for fast removing the static effect especially in electromagnetic-array profiling survey. Some others filters such as "simple" for outliers removal and "PCA" can also be applied upstream for a particular data where the interferences are very strong (e.g. intenses humman activities, power lines, ...). Moreover, the "Savitzky-Golay" filter is also added to remove high-frequency noise from data since it has the advantage of preserving the original shape and features of the signal better than other types of filtering approaches such as MA techniques (simple, exponential, cumulative, weight).

* **Note**

Expand All @@ -29,7 +24,6 @@
## Documentation

* [Installation Guide](https://pycsamt.readthedocs.io/en/latest/installation.html?highlight=installation)
* [Demo of PS technique](https://pycsamt.readthedocs.io/en/latest/demo.html?highlight=demo)
* [API Documentation](https://pycsamt.readthedocs.io/en/latest/)
* [Home Page](https://github.com/WEgeophysics/pyCSAMT/wiki)
* [User Guide](https://github.com/WEgeophysics/pyCSAMT/blob/develop/docs/pyCSAMT%20User%20Guide.pdf)
Expand Down Expand Up @@ -61,4 +55,4 @@ We use or link some third-party software (beside the usual tool stack: [Numba](h
1. Department of Geophysics, School of Info-physics and Geomatics Engineering, [Central South University](https://en.csu.edu.cn/), China.
2. Equipe de Recherche Géophysique Appliquée, Laboratoire de Geologie Ressources Minerales et Energetiques, UFR des Sciences de la Terre et des Ressources Minières, [Université Félix Houphouët-Boigny]( https://www.univ-fhb.edu.ci/index.php/ufr-strm/), Cote d'Ivoire.

* Developer: 1, 2- Kouadio Laurent, <etanoyau@gmail.com> / <lkk@csu.edu.cn>.
* Developer: 1, 2- Kouadio Laurent, <etanoyau@gmail.com> / <lkouao@csu.edu.cn>.
14 changes: 5 additions & 9 deletions paper.bib
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,14 @@ @article{Berdichevskyetal1998
year={1998},
pages={585–606}
}
@article{Carlsonetal2005,
title={Applications of controlled source and natural source audio-frequency magnetotellurics to groundwater exploration},
volume={1},
ISBN={9781622760664},
ISSN={15548015},
DOI={10.4133/1.2923511},
year={2005}, pages={440–450}
}
@article{deGrootetal1990,
title={{Occam’s inversion to generate smooth, two-dimensional models from magnetotelluric data}},
volume={55},
number={12},
journal={Geophysics},
author={DeGroot-Hedlin,C and Constable,S.},
year={1990},
DOI={10.1190/1.1442813},
pages={1613–1624}
}
@article{Goldaketal2015,
Expand Down Expand Up @@ -143,6 +136,7 @@ @article{Labsonetal1985
volume={50}, number={4},
journal={Geophysics},
author={Labson, V . F and Beckert, A and Morrisson, H.F and Conti, U},
DOI={10.1190/1.1441940},
year={1985}, pages={656–664}
}
@misc{Mykle1996,
Expand Down Expand Up @@ -225,13 +219,15 @@ @article{Wessel1998
volume={79},
journal={Eos Trans. Am. Geophys. Union},
author={Wessel,D.E. and Smith,W.H},
DOI={10.1029/98eo00426},
year={1998},
pages={579}
}
@article{Weaver2000,
@article{Weaveretal2000,
title={Characterization of the magnetotelluric tensor in terms of its invariants},
author={John T. Weaver and Aman K Agarwal and Frederick E. M. Lilley},
journal={Geophysical Journal International},
DOI={10.1046/j.1365-246x.2000.00089.x},
year={2000},
volume={141},
pages={321-336}
Expand Down
96 changes: 0 additions & 96 deletions paper.md

This file was deleted.

16 changes: 7 additions & 9 deletions pycsamt/modeling/occam2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,7 @@ def parse_block_data(self, datablocks=None):
return_counts= True)
sites.astype('int32')
freq.astype('int32')



# get mode and create model array
k_=None
m_= [int(s) for s in datum]
Expand All @@ -450,8 +449,8 @@ def parse_block_data(self, datablocks=None):
self.occam_dtype_ =k_
self.occam_dtype_value = values
break

cf =False

if self.occam_dtype_ =='log_te_tm':
self.te_appRho =np.zeros((len(freq), len(sites)))
self.te_phase = np.zeros((len(freq), len(sites)))
Expand All @@ -473,7 +472,11 @@ def parse_block_data(self, datablocks=None):
self.tm_phase = np.zeros((len(freq), len(sites)))
self.tm_error_appRho = np.zeros((len(freq), len(sites)))
self.tm_error_phase = np.zeros((len(freq), len(sites)))

else:
raise CSex.pyCSAMTError_occam2d(
"Three dimensional and Tipper are not implemented yet."
" Please use MTpy (https://github.com/MTgeophysics/mtpy.git)"
" or ModEM (http://www.coas.oregonstate.edu) instead.")
# create for each mode id datablocks

for kk, rowlines in enumerate(self.data):
Expand Down Expand Up @@ -928,9 +931,6 @@ def read_occam2d_modelfile(self, model_fn=None, mesh_fn=None , iter_fn=None):
print('** {0:<27} {1} {2}'.format('Occam Roughness params', '=',
self.model_roughness))




class Startup(object):
"""
Occam startup file Actually read startup file.
Expand Down Expand Up @@ -1561,8 +1561,6 @@ def truncate_response (data , station_data, station_names ):
getattr(self, 'resp_{0}_{1}'.format(
occ, fwo.lower())).shape))



class Mesh(object):
"""
Read Occam read mesh file
Expand Down

0 comments on commit fdccb9c

Please sign in to comment.