Skip to content
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

Merged
merged 51 commits into from
Jun 28, 2017
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d71d013
use setup class to define and store fields to speed up testing
lheagy Jun 23, 2017
35f204b
cleanup of the raw waveform tests as well
lheagy Jun 24, 2017
68dc071
remove fdem inversion example in favor of the published one
lheagy Jun 24, 2017
604b07f
check if the model has truly been updated before clearing matrices
lheagy Jun 24, 2017
fc7b423
early exit if the model is change['value']
lheagy Jun 24, 2017
3ade675
clean up logic for model observer
lheagy Jun 24, 2017
606b503
limit the number of steps taken in the sensitivity test for DC
lheagy Jun 24, 2017
1e5d502
update logic so it is more transparent when we are early exiting and …
lheagy Jun 25, 2017
ca291a1
extend timing slightly for docs build
lheagy Jun 25, 2017
1a99ecb
reverse the travis wait addition
lheagy Jun 25, 2017
bcc048f
try using travis wait only on docs
lheagy Jun 25, 2017
08e89b4
remove test_TDEM_MltiSrcDerivAdjoint and instead test multiple source…
lheagy Jun 25, 2017
8a74a56
download laguna del maule data as a .tar.gz
lheagy Jun 25, 2017
43513dd
remove printing comments around active cells
lheagy Jun 25, 2017
7683e8e
restore commented-out tdem test
lheagy Jun 25, 2017
b83926c
shrink the size of the mesh being used in the TDEM tests
lheagy Jun 25, 2017
4e4eed2
upload half the examples via travis
lheagy Jun 26, 2017
d23da2d
comment out celia figure for now
lheagy Jun 26, 2017
8537633
print pwd contents, travis
lheagy Jun 26, 2017
8332c9c
upload examples directory as well
lheagy Jun 26, 2017
8734b83
simplify download locations
lheagy Jun 26, 2017
f4cb8e3
path updates
lheagy Jun 26, 2017
bcab316
more path updates
lheagy Jun 26, 2017
9f6f2b5
restore all examples
lheagy Jun 26, 2017
55d0d92
more travis cleanup
lheagy Jun 26, 2017
8a85240
remove unintended commit of examples test
lheagy Jun 26, 2017
f43709e
remove notebook
lheagy Jun 26, 2017
c55475a
make examples directory
lheagy Jun 26, 2017
791239d
travis typo in path to where examples are
lheagy Jun 26, 2017
3ee08a7
remove the zip file as well in grad laguna example
lheagy Jun 26, 2017
d75a9b9
be verbose in unpacking of google files
lheagy Jun 26, 2017
11b4fe3
temp remove some examples so travis re-uploads docs and examples
lheagy Jun 26, 2017
aecce04
bring back em examples for upload
lheagy Jun 26, 2017
d0ec1af
add dc back
lheagy Jun 26, 2017
f9f9a31
tmp remove maps, grav
lheagy Jun 26, 2017
d86d1a8
just build docs, don't nosetest
lheagy Jun 26, 2017
b5afbf4
upload artifacts created on travis for half of the examples
lheagy Jun 26, 2017
d7d5210
simplify unpacking of docs archives
lheagy Jun 26, 2017
61d7490
cd to the right place
lheagy Jun 26, 2017
16c0395
add back examples, use make html-noplot
lheagy Jun 26, 2017
cf48e80
more pathing cleanups
lheagy Jun 26, 2017
e2c0e0b
try make html
lheagy Jun 26, 2017
e231b6d
restore all tests, restore use of nitpick on 2.7
lheagy Jun 26, 2017
6e587a0
remove aux bookpurnong files
lheagy Jun 26, 2017
a012d84
restore python 3 tests
lheagy Jun 26, 2017
e4ac2ae
use noplot for python 3 test
lheagy Jun 26, 2017
4087241
Merge pull request #621 from simpeg/tmp/upload-half-examples
lheagy Jun 26, 2017
bdb4f2a
update ylim to be consistent with publication, remove auxilary file c…
lheagy Jun 26, 2017
4890374
Change default interpolation to "nearest" to avoid logical error with…
fourndo Jun 27, 2017
dc4ac6c
add documentation to surface2ind_topo
thast Jun 27, 2017
60f0f29
add documentation surface2ind_topo
thast Jun 27, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ before_install:
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=/home/travis/anaconda/bin:/home/travis/miniconda/bin:$PATH
- conda update --yes conda
- echo $PWD
- ls $PWD
- echo $TRAVIS_BUILD_DIR
- ls $TRAVIS_BUILD_DIR

install:
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then
Expand Down
10 changes: 9 additions & 1 deletion SimPEG/Problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,15 @@ def unpair(self):
deleteTheseOnModelUpdate = []

@properties.observer('model')
def _on_model_update(self, value):
def _on_model_update(self, change):
if change['previous'] is change['value']:
return
if (
isinstance(change['previous'], np.ndarray) and
isinstance(change['value'], np.ndarray) and
np.allclose(change['previous'], change['value'])
):
return
for prop in self.deleteTheseOnModelUpdate:
if hasattr(self, prop):
delattr(self, prop)
Expand Down
20 changes: 11 additions & 9 deletions examples/04-grav/plot_laguna_del_maule_inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
]

# Download to Downloads/SimPEGtemp
basePath = os.path.expanduser('~/Downloads/simpegtemp')
download([url+f for f in cloudfiles], folder=basePath, overwrite=True)
# directory where the downloaded files are

url = "https://storage.googleapis.com/simpeg/Chile_GRAV_4_Miller/Chile_GRAV_4_Miller.tar.gz"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fourndo, @craigm, I have zipped up the files into a .tar.gz (the originals are still in the same place, but downloading a .tar.gz is much faster than 4 independent files)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fourndo are you good with this?

Copy link
Contributor

Choose a reason for hiding this comment

The 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]
Copy link
Member Author

Choose a reason for hiding this comment

The 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
Expand Down
116 changes: 0 additions & 116 deletions examples/07-fdem/plot_inversion_1D.py

This file was deleted.

6 changes: 4 additions & 2 deletions tests/em/static/test_DC_jvecjtvecadj.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member Author

Choose a reason for hiding this comment

The 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)

Expand All @@ -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)

Expand Down