Skip to content

Commit

Permalink
Updating MT site io routines. The NIMS updates broke reading of non-N…
Browse files Browse the repository at this point in the history
…IMS site records, so this moves that code to a separate if-branch.
  • Loading branch information
greglucas committed Dec 3, 2019
1 parent 9d23f4a commit e736b3e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions bezpy/mt/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,21 @@ def read_xml(fname):
site.periods = np.array(site.data.index)
site.Z = np.vstack([site.data['z_zxx'], site.data['z_zxy'],
site.data['z_zyx'], site.data['z_zyy']])

site.runlist = get_text(xml_site, "RunList").split()
site.runinfo, site.nimsid, site.samplingrate = read_runinfo(root)

try:
site.Z_var = np.vstack([site.data['z.var_zxx'], site.data['z.var_zxy'],
site.data['z.var_zyx'], site.data['z.var_zyy']])
except KeyError:
# No variance in the data fields
site.Z_var = None

# NIMS stations have a RunList attribute in them
run_list = get_text(xml_site, "RunList")
if run_list is not None:
site.runlist = run_list.split()
site.runinfo, site.nimsid, site.samplingrate = read_runinfo(root)
site.nim_sys_rsp()

site.calc_resisitivity()
site.nim_sys_rsp()
return site


Expand Down

0 comments on commit e736b3e

Please sign in to comment.