In [1]:
%%file output/custom.css
body {
    font-size: 160%;
    font-family: Lato, Ariel, sans-serif !important;
}

div.slides {
    margin-top: -7%;
}

.left {
    width: 49%;
    float: left;
}

.right {
    width: 49%;
    float: right;
}

.centre {
    text-align: center;
}

h1 {
    text-align: center;
}

h2 {
    text-align: center;
}

div.prompt {
    display: none;
}

div.highlight {
    font-size: 85%; /* This Seems to give an approximate 80char line at 1024 */
}

div.output_html {
    font-size: 85%;
}

div.output_subarea {
    max-width: 100% !important;
}

div.output_png {
    text-align: center;
}

li {
    padding-top: 1em !important;
}

ul.logos {
    margin: 0px;
    padding: 0px;
    width: 100%;
}

ul.logos li {
    list-style: none;
    height:150px;

}

.output_stderr {
    display: none;
}

div.output_area .rendered_html img, div.output_area .rendered_html table {
    margin-left: auto;
    margin-right: auto;
}

.data-table {
    border-collapse: collapse;
}

.border-bottom {
    border-bottom: 1px solid #000;
}

.align-center {
    text-align: center;
}

.reveal i {
    font-size: inherit !important;
    font-style: italic !important;
}

.cite2c-dialog .twitter-typeahead {
    margin: 8px;
    width: 90%;
}

.cite2c-dialog .tt-input {
    width: 100%;
}

.cite2c-dialog .tt-dropdown-menu {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.cite2c-dialog .tt-suggestion {
    padding: 4px;
}
.cite2c-dialog .tt-suggestion.tt-cursor {
    background-color: #eee;
}

.csl-entry {
    padding: 0.4em 0 !important;
}

.rendered_html blockquote {
    font-family: serif;
    font-size: 150%;
    line-height: 130%;
    margin: 5px auto;
    width: 90%;
    text-align: center;
}


Overwriting output/custom.css

In [2]:
import sys

sys.path.append('./python/')

from mayavi import mlab
from mayavi.tools.sources import vector_field, scalar_field
mlab.options.offscreen = True

import numpy as np

import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
import astropy.units as u
import sunpy.map

import yt
import pysac.yt

%matplotlib inline

font_size = 20
pgf_with_latex = {
    "font.size": font_size,
    "axes.labelsize": font_size,  # LaTeX default is 10pt font.
    "legend.fontsize":font_size + 5,
    "xtick.labelsize": font_size,
    "ytick.labelsize": font_size,
    "ytick.labelsize": font_size,
    "savefig.transparent": True,
    "animation.html": "html5"
    }

matplotlib.rcParams.update(pgf_with_latex)


WARNING:traits.has_traits:DEPRECATED: traits.has_traits.wrapped_class, 'the 'implements' class advisor has been deprecated. Use the 'provides' class decorator.

Simulations of Magnetohydrodynamic Waves Driven by Photospheric Motions

Stuart J. Mumford

Supervisor: Robertus Erdélyi

Solar Physics & Space Plasma Research Centre (SP2RC), School of Mathematics and Statistics, The University of Sheffield

Context: Atmospheric Heating


How is the solar atmosphere heated?

How is the energy transported from the top of the convection zone / photosphere upwards?

How is the Energy Deposited?

Problem: MHD Wave Generation


"The challenge remains to understand how, and where, these waves are generated and dissipated in the solar atmosphere, [...]" - (McIntosh et al. 2011)
(White, Verwichte, and Foullon 2012)

The Photosphere as a Source for MHD Waves


In [3]:
x_range, y_range = [-300, 300]*u.arcsec, [-250, 250]*u.arcsec

plt.ioff()
fig = plt.figure(dpi=50, figsize=(11,8))
mm = sunpy.map.Map('/home/stuart/VivaData/gband_data/Gband_cospatial_cotemporal_00000.fits').submap(x_range, y_range)
mm = mm.submap([-440,440]*u.arcsec, [-440,440]*u.arcsec)
mm.plot_settings['cmap'] = 'gray'
mm.plot_settings['title'] = ''
im = mm.plot()
fig.savefig('./images/gband-plot.png', transparent=True)

The dynamic photosphere with embedded magnetic field provides many potential ways of driving MHD waves.

  • 'Buffeting' from convective motions
  • Global oscillations e.g. (Ulrich 1970; Leighton, Noyes, and Simon 1962).
  • Spiralling in downdrafts e.g. (Wedemeyer-Böhm et al. 2012; Bonet et al. 2010; Bonet et al. 2008)
(Bonet et al. 2008)

Numerical Simulations of the lower solar atmosphere

The Code

The code used is the Sheffield Advanced Code (SAC) (Shelyag, Fedun, and Erdélyi 2008).

SAC is based on the Versatile Advection Code (VAC) (Tóth 1996).

SAC simulates perturbations on a static background, using a CD4 solver with hyper-diffusion and hyper-viscosity terms to stabalise the solution.

This makes it well-suited to solving wave perturbations on top of a highly stratified background such as the solar atmosphere.

The Model

To simulate wave excitation in the photosphere a numerical model of the solar atmosphere is needed.

Hydrostatic background from the VAL III model C (Vernazza, Avrett, and Loeser 1981):


In [4]:
import pysac.mhs_atmosphere as atm

#Read in the VAL3C model
empirical_data = atm.hs_atmosphere.read_VAL3c_MTW(MTW_file=False)


# Create a Z array at the interpolated resolution and interpolate.
ZZ = u.Quantity(np.linspace(empirical_data['Z'][0], empirical_data['Z'][-1], 128), unit=empirical_data['Z'].unit)
table = atm.hs_atmosphere.interpolate_atmosphere(empirical_data, ZZ, s=0)


# Create a figure and make space for the axes.
fig, ax = plt.subplots(gridspec_kw={'right':0.77, 'left':0.16, 'bottom':0.13}, figsize=(13,8))

# Shortcut all the Mm conversion.
Z = empirical_data['Z'].to(u.Mm)

lrho, = ax.plot(Z, empirical_data['rho'].quantity.si, 'x', color='blue')
lrho_i, = ax.plot(ZZ.to(u.Mm), table['rho'].quantity.si, color='blue')

ax2 = ax.twinx()
lp, = ax2.plot(Z, empirical_data['p'].to(u.Pa), 'x', color='green')
lp_i, = ax2.plot(ZZ.to(u.Mm), table['p'].to(u.Pa), color='green')


ax3 = ax.twinx()
ax3.spines["right"].set_position(("axes", 1.2))
lt, = ax3.plot(Z, empirical_data['T'].to(u.K), 'x', color='red')
lt_i, = ax3.plot(ZZ.to(u.Mm), table['T'].to(u.K), color='red')


# Set primary axes properties and labels
ax.semilogy()
ax.set_ylabel(r"Density [{}]".format(lrho._yorig.unit._repr_latex_()))
ax.set_xlabel(r"Height [{}]".format(lrho._xorig.unit._repr_latex_()))
ax.set_xlim(Z[0].value-0.1, Z[-1].value+0.1)


# Pressure Axis
ax2.semilogy()
ax2.set_ylabel(r"Pressure [{}]".format(lp._yorig.unit._repr_latex_()))


# Temp axis
ax3.set_ylabel(r"Temperature [{}]".format(lt._yorig.unit._repr_latex_()))

ax.set_xlim([-0.02,1.62])
ax3.set_ylim([3500,7500])
# Set the colours for the ticks and the labels.
ax.tick_params(axis='y', colors=lrho.get_color())
ax2.tick_params(axis='y', colors=lp.get_color())
ax3.tick_params(axis='y', colors=lt.get_color())

ax.yaxis.label.set_color(lrho.get_color())
ax2.yaxis.label.set_color(lp.get_color())
ax3.yaxis.label.set_color(lt.get_color())
fig


Out[4]:

In [5]:
from pysac.mhs_atmosphere.parameters.model_pars import mfe_setup as model_pars
import pysac.mhs_atmosphere as atm

# Cheeky Reset to Photosphere
model_pars['xyz'][4] = 0*u.Mm
#==============================================================================
# Build the MFE flux tube model using pysac
#==============================================================================
# model setup
scales, physical_constants = atm.units_const.get_parameters()
option_pars = atm.options.set_options(model_pars, False, l_gdf=True)
coords = atm.model_pars.get_coords(model_pars['Nxyz'], u.Quantity(model_pars['xyz']))

#interpolate the hs 1D profiles from empirical data source[s]
empirical_data = atm.hs_atmosphere.read_VAL3c_MTW(mu=physical_constants['mu'])
table = atm.hs_atmosphere.interpolate_atmosphere(empirical_data, coords['Zext'])
table['rho'] += table['rho'].min()*3.6

# calculate 1d hydrostatic balance from empirical density profile
# the hs pressure balance is enhanced by pressure equivalent to the
# residual mean coronal magnetic pressure contribution once the magnetic
# field has been applied
magp_meanz = np.ones(len(coords['Z'])) * u.one
magp_meanz *= model_pars['pBplus']**2/(2*physical_constants['mu0'])

# Make the vertical profile 3D
pressure_z, rho_z, Rgas_z = atm.hs_atmosphere.vertical_profile(coords['Z'], table, magp_meanz,
                                                               physical_constants, coords['dz'])

# Generate 3D coordinate arrays
x, y, z = u.Quantity(np.mgrid[coords['xmin']:coords['xmax']:1j*model_pars['Nxyz'][0],
                              coords['ymin']:coords['ymax']:1j*model_pars['Nxyz'][1],
                              coords['zmin']:coords['zmax']:1j*model_pars['Nxyz'][2]], unit=coords['xmin'].unit)

# Get default MFE flux tube parameters out of pysac
xi, yi, Si = atm.flux_tubes.get_flux_tubes(model_pars, coords, option_pars)

# Generate the 3D magnetic field
allmag = atm.flux_tubes.construct_magnetic_field(x, y, z, xi[0], yi[0], Si[0], model_pars, option_pars,
                                                 physical_constants, scales)
pressure_m, rho_m, Bx, By ,Bz, Btensx, Btensy = allmag

# local proc 3D mhs arrays
pressure, rho = atm.mhs_3D.mhs_3D_profile(z, pressure_z, rho_z, pressure_m, rho_m)
magp = (Bx**2 + By**2 + Bz**2) / (2.*physical_constants['mu0'])
energy = atm.mhs_3D.get_internal_energy(pressure, magp, physical_constants)

#### YT STUFF ####

magnetic_field_x = lambda field, data: data['mag_field_x']
yt.add_field(("gas","magnetic_field_x"), function=magnetic_field_x, units=yt.units.T.units)
magnetic_field_y = lambda field, data: data['mag_field_y']
yt.add_field(("gas","magnetic_field_y"), function=magnetic_field_y, units=yt.units.T.units)
magnetic_field_z = lambda field, data: data['mag_field_z']
yt.add_field(("gas","magnetic_field_z"), function=magnetic_field_z, units=yt.units.T.units)

# Add derived Fields
def magnetic_field_strength(field, data):
    return np.sqrt(data["mag_field_x"]**2 + data["mag_field_y"]**2 + data["mag_field_z"]**2)
yt.add_field(("gas","magnetic_field_strength"), function=magnetic_field_strength, units=yt.units.T.units)

#def alfven_speed(field, data):
#    return np.sqrt(2.*data['magnetic_pressure']/data['density'])
#yt.add_field(("gas","alfven_speed"), function=alfven_speed, units=(yt.units.m/yt.units.s).units)

bbox = u.Quantity([u.Quantity([coords['xmin'], coords['xmax']]),
                   u.Quantity([coords['ymin'], coords['ymax']]),
                   u.Quantity([coords['zmin'], coords['zmax']])]).to(u.m).value

# Now build a yt DataSet with the generated data:
data = {'mag_field_x':yt.YTQuantity.from_astropy(Bx.decompose()),
        'mag_field_y':yt.YTQuantity.from_astropy(By.decompose()),
        'mag_field_z':yt.YTQuantity.from_astropy(Bz.decompose()),
        'pressure': yt.YTQuantity.from_astropy(pressure.decompose()),
        'magnetic_pressure': yt.YTQuantity.from_astropy(magp.decompose()),
        'density': yt.YTQuantity.from_astropy(rho.decompose())}

ds = yt.load_uniform_grid(data, x.shape, length_unit='m', magnetic_unit='T',
                          mass_unit='kg', periodicity=[False]*3, bbox=bbox)


/home/stuart/GitHub/SWAT/pysac/pysac/mhs_atmosphere/mhs_model/flux_tubes.py:312: Warning: pbbal.max() = -0.111891563752 kg / (m s2)
  warnings.warn("pbbal.max() = {}".format(pbbal.max().decompose()), Warning)
yt : [INFO     ] 2015-12-04 14:48:45,830 Parameters: current_time              = 0.0
yt : [INFO     ] 2015-12-04 14:48:45,831 Parameters: domain_dimensions         = [129 129 128]
yt : [INFO     ] 2015-12-04 14:48:45,832 Parameters: domain_left_edge          = [-1000000. -1000000.        0.]
yt : [INFO     ] 2015-12-04 14:48:45,834 Parameters: domain_right_edge         = [ 1000000.   1000000.   1587786.3]
yt : [INFO     ] 2015-12-04 14:48:45,835 Parameters: cosmological_simulation   = 0.0

The Magnetic Flux Tube

The magnetic field model mimics a Magnetic Bright Point (MBP) and follows (Gent, Fedun, Mumford and Erdélyi 2013) and is constructed as a self-similar (Schlüter and Temesváry 1958; Low 1980), cylindrically symmetric, expanding field.


In [6]:
slc = yt.SlicePlot(ds, 'x', 'density', origin='lower-center-domain', axes_unit='Mm')
slc.set_figure_size(9)
slc.set_cmap('all', 'viridis')
slc.set_font_size(20)
slc.set_zlim('all', 0, 2.5e-4)


seed_points = np.zeros([11,2]) + 1.52
seed_points[:,0] = np.linspace(-0.99, 0.95, seed_points.shape[0], endpoint=True)
slc.annotate_streamlines('mag_field_y', 'mag_field_z', field_color='magnetic_field_strength',
plot_args={'start_points':seed_points, 'density':15, 'cmap':'Blues', 'linewidth':2,
'norm': matplotlib.colors.LogNorm(*ds.all_data().quantities.extrema("magnetic_field_strength"))})
#force render
slc.save('/tmp/test.png')
#use the raw Figure for transparent bg
slc.plots['density'].figure


yt : [INFO     ] 2015-12-04 14:48:45,929 Loading field plugins.
yt : [INFO     ] 2015-12-04 14:48:45,931 Loaded angular_momentum (8 new fields)
yt : [INFO     ] 2015-12-04 14:48:45,932 Loaded astro (15 new fields)
yt : [INFO     ] 2015-12-04 14:48:45,932 Loaded cosmology (22 new fields)
yt : [INFO     ] 2015-12-04 14:48:45,934 Loaded fluid (63 new fields)
yt : [INFO     ] 2015-12-04 14:48:45,935 Loaded fluid_vector (95 new fields)
yt : [INFO     ] 2015-12-04 14:48:45,936 Loaded geometric (111 new fields)
yt : [INFO     ] 2015-12-04 14:48:45,937 Loaded local (115 new fields)
yt : [INFO     ] 2015-12-04 14:48:45,937 Loaded magnetic_field (121 new fields)
yt : [INFO     ] 2015-12-04 14:48:45,938 Loaded my_plugins (121 new fields)
yt : [INFO     ] 2015-12-04 14:48:45,939 Loaded species (123 new fields)
yt : [INFO     ] 2015-12-04 14:48:46,276 xlim = -1000000.000000 1000000.000000
yt : [INFO     ] 2015-12-04 14:48:46,276 ylim = 0.000000 1587786.300000
yt : [INFO     ] 2015-12-04 14:48:46,279 xlim = -1000000.000000 1000000.000000
yt : [INFO     ] 2015-12-04 14:48:46,280 ylim = 0.000000 1587786.300000
yt : [INFO     ] 2015-12-04 14:48:46,290 Making a fixed resolution buffer of (('gas', 'density')) 800 by 800
yt : [WARNING  ] 2015-12-04 14:48:46,343 Plot image for field ('gas', 'density') has both positive and negative values. Min = -0.000032, Max = 0.000267.
yt : [WARNING  ] 2015-12-04 14:48:46,344 Switching to symlog colorbar scaling unless linear scaling is specified later
yt : [INFO     ] 2015-12-04 14:48:47,927 Saving plot /tmp/test.png
Out[6]:

Driving Waves in the Simulation Domain

$$ \vec{V}(x,y,z,t) = \vec{F}(x,y,z) \ e^{-\left(\frac{x^2}{\Delta x^2} + \frac{y^2}{\Delta y^2} + \frac{z^2}{\Delta z^2}\right)} \sin \left(2\pi \frac{t}{P}\right) $$

Identifying Waves from Broadband Drivers

Photospheric drivers excite multiple wave modes simulatenously.

How to quantify the relative strengths of the different modes from different drivers?


Assume uniform media:

  • Locally decompose perturbations into Fast, Slow and Alfvén modes.
  • Compare the percentage wave energy in each mode.

In [7]:
#Define tvtk notebook viewer
from IPython.core.display import Image
import subprocess
def mlab_view(scene, azimuth=153, elevation=62, distance=400, focalpoint=np.array([  25.,   63.,  60.]), aa=16):
    scene.anti_aliasing_frames = aa
    mlab.view(azimuth=azimuth, elevation=elevation, distance=distance, focalpoint=focalpoint)
    scene.save('offscreen.png', size=(750, 750))
    subprocess.call(["convert", "offscreen.png", "-transparent", "white", "offscreen.png"])
    return Image(filename='offscreen.png')

Relationship between Mode and Velocity Perturbation

In a high-$\beta$ plasma, and assuming parallel propagation ($k_\parallel >> k_\perp$) the three MHD wave modes of a uniform plasma pertub different components of velocity:


Slow Mode:
$$ \frac{|v_\parallel|}{|v_\perp|+|v_\parallel|} = \frac{1}{\frac{k_\parallel}{k_\perp}+1}\\ \ \\ |v_\parallel| >> |v_\perp| $$
Alfven Mode:
$$ |v| = |v_\phi| $$
Fast Mode:
$$ \frac{|v_\parallel|}{|v_\perp|+|v_\parallel|} = \frac{1}{\frac{k_\perp}{k_\parallel}+1}\\ \ \\ |v_\parallel| << |v_\perp| $$

Decomposing Velocity Pertubations


In [8]:
ds = pysac.yt.SACGDFDataset('/home/stuart/VivaData/Slog_p240-0_A10_B005_00001.gdf')


yt : [WARNING  ] 2015-12-04 14:48:49,348 'field_units' was overridden by 'dataset_units/density_bg'
yt : [WARNING  ] 2015-12-04 14:48:49,350 'field_units' was overridden by 'dataset_units/density_pert'
yt : [WARNING  ] 2015-12-04 14:48:49,354 'field_units' was overridden by 'dataset_units/internal_energy_bg'
yt : [WARNING  ] 2015-12-04 14:48:49,356 'field_units' was overridden by 'dataset_units/internal_energy_pert'
yt : [WARNING  ] 2015-12-04 14:48:49,360 'field_units' was overridden by 'dataset_units/mag_field_x_bg'
yt : [WARNING  ] 2015-12-04 14:48:49,362 'field_units' was overridden by 'dataset_units/mag_field_x_pert'
yt : [WARNING  ] 2015-12-04 14:48:49,364 'field_units' was overridden by 'dataset_units/mag_field_y_bg'
yt : [WARNING  ] 2015-12-04 14:48:49,366 'field_units' was overridden by 'dataset_units/mag_field_y_pert'
yt : [WARNING  ] 2015-12-04 14:48:49,368 'field_units' was overridden by 'dataset_units/mag_field_z_bg'
yt : [WARNING  ] 2015-12-04 14:48:49,370 'field_units' was overridden by 'dataset_units/mag_field_z_pert'
yt : [WARNING  ] 2015-12-04 14:48:49,377 'field_units' was overridden by 'dataset_units/velocity_x'
yt : [WARNING  ] 2015-12-04 14:48:49,379 'field_units' was overridden by 'dataset_units/velocity_y'
yt : [WARNING  ] 2015-12-04 14:48:49,381 'field_units' was overridden by 'dataset_units/velocity_z'
yt : [INFO     ] 2015-12-04 14:48:49,420 Parameters: current_time              = 1.00339395144
yt : [INFO     ] 2015-12-04 14:48:49,421 Parameters: domain_dimensions         = [128 128 128]
yt : [INFO     ] 2015-12-04 14:48:49,423 Parameters: domain_left_edge          = [  781250.    781250.   3664122.1]
yt : [INFO     ] 2015-12-04 14:48:49,424 Parameters: domain_right_edge         = [  1.99218750e+08   1.99218750e+08   1.58778630e+08]
yt : [INFO     ] 2015-12-04 14:48:49,426 Parameters: cosmological_simulation   = 0.0

In [9]:
from tvtk.api import tvtk

#pysac imports
import pysac.yt
import pysac.analysis.tube3D.tvtk_tube_functions as ttf
import pysac.plot.mayavi_plotting_functions as mpf
from pysac.plot.mayavi_seed_streamlines import SeedStreamline
from pysac.plot.divergingcolourmaps import get_mayavi_colourmap
from pysac.analysis.tube3D.process_utils import get_yt_mlab

### Load in and Config ###

# loaded above
ds = pysac.yt.SACGDFDataset('/home/stuart/VivaData/Slog_p240-0_A10_B005_00001.gdf')
tube_r = 60

#if running this creates a persistant window just get it out of the way!
mlab.options.offscreen = True
fig = mlab.figure(bgcolor=(1, 1, 1))

cg = ds.index.grids[0]

#Slices
cube_slice = np.s_[:,:,:-5]
x_slice = np.s_[:,:,:,:-5]

#Define the size of the domain
xmax, ymax, zmax = np.array(cg['density'].to_ndarray()[cube_slice].shape) - 1
domain = {'xmax':xmax, 'ymax':ymax, 'zmax':zmax}

bfield, vfield = get_yt_mlab(ds, cube_slice, flux=False)

#Create a scalar field of the magntiude of the vector field
bmag = mlab.pipeline.extract_vector_norm(bfield, name="Field line Normals")


yt : [INFO     ] 2015-12-04 14:48:49,672 Loading field plugins.
yt : [INFO     ] 2015-12-04 14:48:49,673 Loaded angular_momentum (8 new fields)
yt : [INFO     ] 2015-12-04 14:48:49,674 Loaded astro (15 new fields)
yt : [INFO     ] 2015-12-04 14:48:49,675 Loaded cosmology (22 new fields)
yt : [INFO     ] 2015-12-04 14:48:49,678 Loaded fluid (63 new fields)
yt : [INFO     ] 2015-12-04 14:48:49,680 Loaded fluid_vector (95 new fields)
yt : [INFO     ] 2015-12-04 14:48:49,682 Loaded geometric (111 new fields)
yt : [INFO     ] 2015-12-04 14:48:49,683 Loaded local (115 new fields)
yt : [INFO     ] 2015-12-04 14:48:49,685 Loaded magnetic_field (120 new fields)
yt : [INFO     ] 2015-12-04 14:48:49,687 Loaded my_plugins (120 new fields)
yt : [INFO     ] 2015-12-04 14:48:49,688 Loaded species (122 new fields)

In [10]:
xc = domain['xmax']/2
yc = domain['ymax']/2
ti = 0
n = 100

surf_seeds = []
for theta in np.linspace(0, 2 * np.pi, n, endpoint=False):
    surf_seeds.append([tube_r * np.cos(theta + 0.5 * ti) + xc,
    tube_r * np.sin(theta + 0.5 * ti) + yc, domain['zmax']])

seeds = np.array(surf_seeds)
#Add axes:
axes, outline = mpf.add_axes(np.array(zip(ds.domain_left_edge,ds.domain_right_edge)).flatten()/1e8)

#Add seed points to plot:
seed_points = mlab.points3d(seeds[:,0], seeds[:,1], seeds[:,2],
color=(0.231, 0.298, 0.752), scale_mode='none',
scale_factor=1.5)

mlab_view(fig.scene)


/opt/miniconda/envs/thesis/lib/python2.7/site-packages/mayavi/tools/camera.py:288: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if focalpoint is not None and not focalpoint == 'auto':
Out[10]:

In [11]:
field_lines = SeedStreamline(seed_points = np.array(seeds))
bmag.add_child(field_lines)
field_lines.actor.mapper.scalar_visibility = False
field_lines.actor.property.color = (0,0,0)
field_lines.actor.property.line_width = 1.5

mlab_view(fig.scene)


Out[11]:

In [12]:
pd_seeds = ttf.make_circle_seeds(100, 60, **domain)
fieldlines, surface = ttf.create_flux_surface(bfield.outputs[0], pd_seeds)
surface.output.lines = None
flux_surface = mlab.pipeline.surface(surface.output)
flux_surface.actor.mapper.scalar_visibility = False
flux_surface.actor.property.color = (0.8,0.8,0.8)
#flux_surface.actor.property.line_width = 0

mlab_view(fig.scene)


Out[12]:

In [13]:
axes.visible = False
outline.visible = False
flux_surface.actor.property.edge_visibility = True
mlab_view(fig.scene, azimuth = 90, elevation = 75, distance=80, focalpoint=[63, 120, 110], aa=20)


Out[13]: