diff --git a/PROJECTS.rst b/PROJECTS.rst
index 87ef17fb..3345eca7 100644
--- a/PROJECTS.rst
+++ b/PROJECTS.rst
@@ -1,4 +1,5 @@
- Electromagnetics (`simpegEM `_)
+- Magnetotellurics (`simpegMT `_)
- Electromagnetics 1D (`simpegEM1D `_)
- Direct Current Resistivity (`simpegDC `_)
- Potential Fields (`simpegPF `_)
diff --git a/Tutorials/Linear.py b/SimPEG/Examples/Linear.py
similarity index 94%
rename from Tutorials/Linear.py
rename to SimPEG/Examples/Linear.py
index 6fcfd17c..d56cc3e7 100644
--- a/Tutorials/Linear.py
+++ b/SimPEG/Examples/Linear.py
@@ -23,7 +23,7 @@ class LinearProblem(Problem.BaseProblem):
return self.G.T.dot(v)
-def example(N):
+def run(N):
mesh = Mesh.TensorMesh([N])
nk = 20
@@ -46,14 +46,6 @@ def example(N):
prob = LinearProblem(mesh, G)
survey = prob.createSyntheticSurvey(mtrue, std=0.01)
- return prob, survey, mesh
-
-
-if __name__ == '__main__':
-
- import matplotlib.pyplot as plt
-
- prob, survey, mesh = example(100)
M = prob.mesh
reg = Regularization.Tikhonov(mesh)
@@ -67,6 +59,7 @@ if __name__ == '__main__':
mrec = inv.run(m0)
+ import matplotlib.pyplot as plt
plt.figure(1)
for i in range(prob.G.shape[0]):
plt.plot(prob.G[i,:])
@@ -75,4 +68,4 @@ if __name__ == '__main__':
plt.plot(M.vectorCCx, survey.mtrue, 'b-')
plt.plot(M.vectorCCx, mrec, 'r-')
- plt.show()
+ return prob, survey, mesh
diff --git a/SimPEG/Examples/__init__.py b/SimPEG/Examples/__init__.py
new file mode 100644
index 00000000..2c5d0eac
--- /dev/null
+++ b/SimPEG/Examples/__init__.py
@@ -0,0 +1 @@
+import Linear
diff --git a/SimPEG/Tests/test_basemesh.py b/SimPEG/Tests/test_basemesh.py
index d482505e..788314d4 100644
--- a/SimPEG/Tests/test_basemesh.py
+++ b/SimPEG/Tests/test_basemesh.py
@@ -13,6 +13,7 @@ class TestBaseMesh(unittest.TestCase):
self.assertTrue(self.mesh.dim, 3)
def test_mesh_nc(self):
+ self.assertTrue(self.mesh.nC == 36)
self.assertTrue(np.all(self.mesh.vnC == [6, 2, 3]))
def test_mesh_nc_xyz(self):
diff --git a/SimPEG/Tests/test_example_linear.py b/SimPEG/Tests/test_example_linear.py
new file mode 100644
index 00000000..6b271939
--- /dev/null
+++ b/SimPEG/Tests/test_example_linear.py
@@ -0,0 +1,13 @@
+import unittest
+import sys
+from SimPEG.Examples import Linear
+import numpy as np
+
+class TestLinear(unittest.TestCase):
+
+ def test_running(self):
+ Linear.run(100)
+ self.assertTrue(True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/SimPEG/setup.py b/SimPEG/setup.py
deleted file mode 100644
index 5afc57a4..00000000
--- a/SimPEG/setup.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import os
-print 'Compiling TriSolve.'
-os.system('f2py -c Utils/TriSolve.f -m TriSolve')
-print 'TriSolve Compiled! yay.'
-print 'Moving TriSolve into Utils.'
-os.system('mv TriSolve.so Utils/TriSolve.so')
-print 'Thats it. Well Done Computer.'
-
diff --git a/setup.py b/setup.py
index 8c5e03ca..43eff060 100644
--- a/setup.py
+++ b/setup.py
@@ -5,10 +5,6 @@ SimPEG is a python package for simulation and gradient based
parameter estimation in the context of geophysical applications.
"""
-# import ez_setup
-# ez_setup.use_setuptools()
-# from setuptools import setup, find_packages
-
from distutils.core import setup
from setuptools import find_packages
from Cython.Build import cythonize
@@ -35,7 +31,7 @@ setup(
version = "0.1dev",
packages = find_packages(),
install_requires = ['numpy>=1.7',
- 'scipy>=0.12',
+ 'scipy>=0.13',
'matplotlib>=1.3',
],
author = "Rowan Cockett",