Skip to content

Commit

Permalink
update to custom parser to account for remote electrodes
Browse files Browse the repository at this point in the history
  • Loading branch information
saneiyan committed Aug 31, 2021
1 parent 2fb1a5f commit 0ec6144
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/resipy/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,12 @@ def syscalParser(fname):#, spacing=None):
# NOTE: remote electrode identification is done in R2.setElec()
# but we notice that setting same number for remote (-99999) makes
# the pseudo-section of remote electrode survey nicer...
remoteFlags = np.array([-9999999, -999999, -99999,-9999,-999,
9999999, 999999, 99999, 9999, 999])
iremote = np.in1d(val, remoteFlags)
elec[iremote, 0] = -99999
remoteFlags_p1 = np.array([-9999999, -999999, -99999,-9999,-999])
remoteFlags_p2 = np.array([9999999, 999999, 99999, 9999, 999])
iremote_p1 = np.in1d(val, remoteFlags_p1)
elec[iremote_p1, 0] = -99999
iremote_p2 = np.in1d(val, remoteFlags_p2)
elec[iremote_p2, 0] = 99999

if np.all(df['dev'].values == 0) and 'Dev. M' in df.columns: # Prosys III has to Dev. lists, assuming Dev. Rho (%) == 0 and Dev. M != 0 when IP data is collected.
df['dev'] = df['Dev. M'].values
Expand Down
6 changes: 6 additions & 0 deletions src/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2236,6 +2236,12 @@ def parserFunc(fname):
zval = np.zeros_like(val)
yval = np.zeros_like(val) # 2D so Y values are all zeros
elec = np.c_[val, yval, zval]
remoteFlags_p1 = np.array([-9999999, -999999, -99999,-9999,-999])
remoteFlags_p2 = np.array([9999999, 999999, 99999, 9999, 999])
iremote_p1 = np.in1d(val, remoteFlags_p1)
elec[iremote_p1, 0] = -99999
iremote_p2 = np.in1d(val, remoteFlags_p2)
elec[iremote_p2, 0] = 99999

##### Old way

Expand Down

0 comments on commit 0ec6144

Please sign in to comment.