-
Notifications
You must be signed in to change notification settings - Fork 256
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
Ref/tdem testing #620
Ref/tdem testing #620
Changes from 49 commits
d71d013
35f204b
68dc071
604b07f
fc7b423
3ade675
606b503
1e5d502
ca291a1
1a99ecb
bcc048f
08e89b4
8a74a56
43513dd
7683e8e
b83926c
4e4eed2
d23da2d
8537633
8332c9c
8734b83
f4cb8e3
bcab316
9f6f2b5
55d0d92
8a85240
f43709e
c55475a
791239d
3ee08a7
d75a9b9
11b4fe3
aecce04
d0ec1af
f9f9a31
d86d1a8
b5afbf4
d7d5210
61d7490
16c0395
cf48e80
e2c0e0b
e231b6d
6e587a0
a012d84
e4ac2ae
4087241
bdb4f2a
4890374
dc4ac6c
60f0f29
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -392,7 +392,7 @@ def run(plotIt=True, saveFig=False, cleanup=True): | |
|
||
ax0.semilogx(sigma_re, z, 'k', lw=2, label="RESOLVE") | ||
ax0.semilogx(sigma_sky, z, 'b', lw=2, label="SkyTEM") | ||
ax0.set_ylim(-100, 0) | ||
ax0.set_ylim(-50, 0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is the range we used in the paper |
||
# ax0.set_xlim(5e-4, 1e2) | ||
ax0.grid(True) | ||
ax0.set_ylabel("Depth (m)") | ||
|
@@ -459,6 +459,12 @@ def run(plotIt=True, saveFig=False, cleanup=True): | |
plt.show() | ||
|
||
if cleanup: | ||
print( os.path.split(directory)[:-1]) | ||
os.remove( | ||
os.path.sep.join( | ||
directory.split()[:-1] + ["._bookpurnong_inversion"] | ||
) | ||
) | ||
os.remove(downloads) | ||
shutil.rmtree(directory) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
""" | ||
import os | ||
import shutil | ||
import tarfile | ||
import SimPEG.PF as PF | ||
from SimPEG import Maps, Regularization, Optimization, DataMisfit,\ | ||
InvProblem, Directives, Inversion | ||
|
@@ -24,15 +25,16 @@ | |
def run(plotIt=True, cleanAfterRun=True): | ||
|
||
# Start by downloading files from the remote repository | ||
url = "https://storage.googleapis.com/simpeg/Chile_GRAV_4_Miller/" | ||
cloudfiles = [ | ||
'LdM_grav_obs.grv', 'LdM_mesh.mesh', | ||
'LdM_topo.topo', 'LdM_input_file.inp' | ||
] | ||
# directory where the downloaded files are | ||
|
||
# Download to Downloads/SimPEGtemp | ||
basePath = os.path.expanduser('~/Downloads/simpegtemp') | ||
download([url+f for f in cloudfiles], folder=basePath, overwrite=True) | ||
url = "https://storage.googleapis.com/simpeg/Chile_GRAV_4_Miller/Chile_GRAV_4_Miller.tar.gz" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @fourndo are you good with this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i'm good with that. |
||
downloads = download(url, overwrite=True) | ||
basePath = downloads.split(".")[0] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have also downloaded to the current directory (a folder called Chile_GRAV_4_Miller will be created). This makes it easier to work with different systems and to keep track of the files (esp on travis) |
||
|
||
# unzip the tarfile | ||
tar = tarfile.open(downloads, "r") | ||
tar.extractall() | ||
tar.close() | ||
|
||
input_file = basePath + os.path.sep + 'LdM_input_file.inp' | ||
# %% User input | ||
|
@@ -133,6 +135,7 @@ def run(plotIt=True, cleanAfterRun=True): | |
mrec = inv.run(mstart) | ||
|
||
if cleanAfterRun: | ||
os.remove(downloads) | ||
shutil.rmtree(basePath) | ||
|
||
# %% | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,7 +130,8 @@ def test_misfit(self): | |
self.survey.dpred(m), lambda mx: self.p.Jvec(self.m0, mx) | ||
], | ||
self.m0, | ||
plotIt=False | ||
plotIt=False, | ||
num=3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sgkang: I fixed the number of iterations this runs. If we let it go too far it fails b/c we hit machine precision. |
||
) | ||
self.assertTrue(passed) | ||
|
||
|
@@ -149,7 +150,8 @@ def test_dataObj(self): | |
passed = Tests.checkDerivative( | ||
lambda m: [self.dmis(m), self.dmis.deriv(m)], | ||
self.m0, | ||
plotIt=False | ||
plotIt=False, | ||
num=3 | ||
) | ||
self.assertTrue(passed) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @fourndo!