-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reading Modem data #21
Comments
@CedricPatzer Could you provide an example of the header where it fails? Also, are you using from mtpy import MTData
md = MTData()
md.from_modem(modem_data_filename) |
Hello I am having a similar issue as @CedricPatzer. I have tested with two ModEM files, one file of my own and one that I downloaded from the old repo of mtpy (https://github.com/MTgeophysics/mtpy/blob/develop/examples/data/ModEM_files/ModEM_Data.dat). My version of MTpy is 2.0.6 import mtpy
from mtpy import MTData
datafile = 'datos3.dat'
#datafile = 'ModEM_Data.dat'
md = MTData()
md.from_modem(datafile) With my modem file (datos3.dat) I get the following error
and with ModEM_Data.dat I get
|
reading of modem data file causes index error
md.read_data_file(fname)
File ~\Anaconda3\envs\mtpy-v2\lib\site-packages\mtpy\modeling\modem\data.py:1094 in read_data_file
n_periods, n_stations = self._read_header(
File ~\Anaconda3\envs\mtpy-v2\lib\site-packages\mtpy\modeling\modem\data.py:891 in _read_header
self._parse_header_line(head_line, inv_mode)
File ~\Anaconda3\envs\mtpy-v2\lib\site-packages\mtpy\modeling\modem\data.py:930 in _parse_header_line
value = item_list[1].replace("%", "").split()[0]
IndexError: list index out of range
Current Behavior
The first line of all of our ModeEM data files looks like this:
# ModEM impedance responses for Description:
item_list will contain ['description', ''] for each of our files and than fail
Your Environment
The text was updated successfully, but these errors were encountered: