diff --git a/SimPEG/__init__.py b/SimPEG/__init__.py index 41f7c431..df7b8b33 100644 --- a/SimPEG/__init__.py +++ b/SimPEG/__init__.py @@ -2,7 +2,7 @@ import utils from utils import Solver import mesh import inverse -import visulize +import visualize import forward import regularization import examples diff --git a/SimPEG/visulize/__init__.py b/SimPEG/visualize/__init__.py similarity index 100% rename from SimPEG/visulize/__init__.py rename to SimPEG/visualize/__init__.py diff --git a/SimPEG/visulize/vtk/__init__.py b/SimPEG/visualize/vtk/__init__.py similarity index 100% rename from SimPEG/visulize/vtk/__init__.py rename to SimPEG/visualize/vtk/__init__.py diff --git a/SimPEG/visulize/vtk/vtkTools.py b/SimPEG/visualize/vtk/vtkTools.py similarity index 100% rename from SimPEG/visulize/vtk/vtkTools.py rename to SimPEG/visualize/vtk/vtkTools.py diff --git a/SimPEG/visulize/vtk/vtkView.py b/SimPEG/visualize/vtk/vtkView.py similarity index 90% rename from SimPEG/visulize/vtk/vtkView.py rename to SimPEG/visualize/vtk/vtkView.py index 2ce984df..6bf6dab5 100644 --- a/SimPEG/visulize/vtk/vtkView.py +++ b/SimPEG/visualize/vtk/vtkView.py @@ -1,6 +1,6 @@ import numpy as np, vtk import SimPEG as simpeg -#import SimPEG.visulize.vtk.vtkTools as vtkSP # Always get an error for this import +#import SimPEG.visualize.vtk.vtkTools as vtkSP # Always get an error for this import class vtkView(object): """ @@ -8,11 +8,11 @@ class vtkView(object): Inputs: :param mesh, SimPEG mesh. - :param propdict, dictionary of property models. + :param propdict, dictionary of property models. Can have these dictionary names: 'cell' - cell model; 'face' - face model; 'edge' - edge model The dictionary properties are given as dictionaries with: - {'NameOfThePropertyModel': np.array of the properties}. + {'NameOfThePropertyModel': np.array of the properties}. The property array has to be ordered in compliance with SimPEG standards. :: @@ -54,10 +54,10 @@ class vtkView(object): self._lut = None def _readPropertyDictionary(self,propdict): - """ + """ Reads the property and assigns to the object """ - import SimPEG.visulize.vtk.vtkTools as vtkSP + import SimPEG.visualize.vtk.vtkTools as vtkSP # Test the property dictionary if len(propdict) > 3: @@ -75,10 +75,10 @@ class vtkView(object): def Show(self): """ - Open the VTK figure window and show the mesh. + Open the VTK figure window and show the mesh. """ - #vtkSP = simpeg.visulize.vtk.vtkTools - import SimPEG.visulize.vtk.vtkTools as vtkSP + #vtkSP = simpeg.visualize.vtk.vtkTools + import SimPEG.visualize.vtk.vtkTools as vtkSP # Make a renderer self._ren = vtk.vtkRenderer() @@ -119,7 +119,7 @@ class vtkView(object): obj.GetPlane(intPlane) intActor.VisibilityOn() - self._widget.AddObserver("InteractionEvent",movePlane) + self._widget.AddObserver("InteractionEvent",movePlane) lut = vtk.vtkLookupTable() lut.SetNumberOfColors(256) lut.SetHueRange(0,0.66667) @@ -131,7 +131,7 @@ class vtkView(object): self._ren.SetBackground(.5,.5,.5) self._ren.AddActor(self._actor) - # Start the render Window + # Start the render Window vtkSP.startRenderWindow(self._iren) # Close the window when exited vtkSP.closeRenderWindow(self._iren) diff --git a/notebooks/3DRenderingWithvtkTools.ipynb b/notebooks/3DRenderingWithvtkTools.ipynb index b0daa408..1ad88317 100644 --- a/notebooks/3DRenderingWithvtkTools.ipynb +++ b/notebooks/3DRenderingWithvtkTools.ipynb @@ -43,7 +43,7 @@ "# Make a models that correspond to the cells, faces and edges.\n", "models = {'cell':{'Test':np.arange(0,mesh.nC),'AllOnce':np.ones(mesh.nC)},'face':{'Test':np.arange(0,np.sum(mesh.nF)),'AllOnce':np.ones(np.sum(mesh.nF))},'edge':{'Test':np.arange(0,np.sum(mesh.nE)),'AllOnce':np.ones(np.sum(mesh.nE))}}\n", "# Make the vtk viewer object.\n", - "vtkViewer = simpeg.visulize.vtk.vtkView(mesh,models) \n", + "vtkViewer = simpeg.visualize.vtk.vtkView(mesh,models) \n", " " ], "language": "python", @@ -67,4 +67,4 @@ "metadata": {} } ] -} \ No newline at end of file +}