Esempio n. 1
0
@author: stuart
"""
import voxread
import copy
from mayavi import mlab
from tvtk.api import tvtk
import numpy as np
#import cProfile

#den_file = "/home/stuart/GitHub/pyHeliosphere/Test Data/2008_06_06_03-STELab_IPS_CR2070_n.vox"
#vel_file = "/home/stuart/GitHub/pyHeliosphere/Test Data/2008_06_06_03-STELab_IPS_CR2070_v.vox"

den_file = "/home/stuart/Downloads/nv3h2099_9054_00001_n.vox"
vel_file = "/home/stuart/Downloads/nv3h2099_9054_00001_v.vox"

density_vox = voxread.voxread(den_file,memmap=False)
density_vox.info()
density = density_vox.volumes[0]
#density.calibrate()

#velocity_vox = voxread.voxread(vel_file)
#velocity_vox.info()
#velocity = velocity_vox.volumes[0]
##velocity.calibrate()
#velocity = velocity.volume
#Extract the Earth Coordinates for plotting
hdr = density_vox.volumes[0].header[8]
ep_x, ep_y, ep_z = map(float,hdr[2:-2].split()[2:])

#==============================================================================
# Begin Plotting
Esempio n. 2
0
 def _voxfile_changed(self):
     self.vox = voxread(self.voxfile)
     self.vox_info = self.vox.info()
     self.vox_volumes = self.vox.volumes
     self.vox_header = self.vox.header
from voxread import voxread
from enthought.mayavi import mlab
import enthought.mayavi.modules.api as mapi

tim = voxread('../2008_06_06_03-STELab_IPS_CR2070_n.vox')

minitim = mlab.pipeline.scalar_field(tim.volumes[0].volume)

TimmyTim = mlab.pipeline.contour(minitim)
TimTheDog = mlab.pipeline.surface(TimmyTim, opacity=0.5)
mlab.pipeline.add_module_manager(TimmyTim)
mlab.show()
Esempio n. 4
0
 def _voxfile_changed(self):
     """On change of voxfile do things!"""
     self.vox = voxread(self.voxfile)
     self.vox_info = self.vox.info()
     self.vox_volumes = self.vox.volumes
     self.vox_header = self.vox.header