Files
simpeg/simpegDCIP/Dev/writeUBC_DC3Dobs.py
T
D Fournier b3ceccf303 Finish script to extract 2D model from 3D mesh and write DCIP files
Compare SimPEG vs DCIP2D vs DCIP3D on Mt Isa synthetic model
Invert Mt Isa synthetic 2D line. Dipole-Dipole sucks... need another setup/
2015-12-08 17:31:19 -08:00

36 lines
897 B
Python

def writeUBC_DC3Dobs(fileName,Tx,Rx,d,wd):
from SimPEG import np, mkvc
"""
Read UBC GIF DCIP 3D observation file and generate arrays for tx-rx location
Input:
:param fileName, path to the UBC GIF 3D obs file
Output:
:param rx, tx, d, wd
:return
Created on Mon December 7th, 2015
@author: dominiquef
"""
fid = open(fileName,'w')
fid.write('! GENERAL FORMAT\n')
for ii in range(len(Tx)):
tx = np.asarray(Tx[ii])
rx = np.asarray(Rx[ii])
nrx = rx.shape[0]
fid.write('\n')
fid.writelines("%e " % ii for ii in mkvc(tx))
fid.write('%i\n'% nrx)
np.savetxt(fid, np.c_[ rx ,np.asarray(d[ii]), np.asarray(wd[ii]) ], fmt='%e',delimiter=' ',newline='\n')
fid.close()