Analysis

pysac.analysis Module

General routines for the analysis of HD and MHD simulations run with SAC

Functions

get_wave_flux(f, pk) Calculate the wave energy flux from a SACData instance and the kinetic pressure
get_wave_flux_yt(ds[, B_to_SI, V_to_SI, ...]) Calculate the wave energy flux from a yt dataset.

pysac.analysis.tube3D.tvtk_tube_functions Module

This submodule provides routines to generate and analyse “Flux Surfaces” as described in (Mumford et. al. 2014). Flux Surfaces are created by the tracing of a closed loop of fieldlines, from which a surface is reconstructed by creating polygons between the pesudo parallel streamlines.

Functions

move_seeds(seeds, vfield, dt) Move a list of seeds based on a velocity field.
make_circle_seeds(n, r, **domain) Generate an array of n seeds evenly spaced in a circle at radius r.
create_flux_surface(bfield, surf_seeds) Create a flux surface from an array of seeds and a tvtk vector field.
update_flux_surface(surf_seeds, ...) Update the flux surface streamlines and surface.
make_poly_norms(poly_data) Extract the normal vectors from a PolyData instance (A surface).
norms_sanity_check(poly_norms) Check that the normals are pointing radially outwards.
get_surface_vectors(poly_norms, surf_bfield) Calculate the vector normal, vertically parallel and Azimuthally around
interpolate_scalars(image_data, poly_data) Interpolate a imagedata scalars to a set points in polydata
interpolate_vectors(image_data, poly_data) Interpolate a imagedata vectors to a set points in polydata
update_interpolated_vectors(poly_data, ...)
update_interpolated_scalars(poly_data, ...)
get_surface_velocity_comp(...)
get_the_line(bfield, surf_seeds, n) Generate the vertical line on the surface
update_the_line(the_line, surf_seeds, seed, ...) Updates the TD line at each time step, while making sure the length is fixed
get_surface_indexes(surf_poly, the_line)
write_step(file_name, surface, normals, ...) Write out the surface vectors and velocity compnents.
write_flux(file_name, surface, ...)
write_wave_flux(file_name, surface_poly, ...)
read_step(filename) Read back in a saved surface file
get_data(poly_out, name)

Classes

PolyDataWriter(filename, polydata) This class allows you to write tvtk polydata objects to a file, with as many or as few associated PointData arrays as you wish.

Class Inheritance Diagram

Inheritance diagram of pysac.analysis.tube3D.tvtk_tube_functions.PolyDataWriter

pysac.analysis.tube3D.process_utils Module

This module contains routines to convert from SACData and yt DataSets into tvtk fields via mayavi.

Functions

get_sacdata_mlab(f, cube_slice[, flux]) Reads in useful variables from a hdf5 file to vtk data structures
get_yt_mlab(ds, cube_slice[, flux]) Reads in useful variables from yt to vtk data structures, converts into SI units before return.
process_next_step_yt(ds, cube_slice, bfield, ...) Update all mayavi sources using a yt dataset, in SI units.
process_next_step_sacdata(f, cube_slice, ...) Update all mayavi sources using a SACData instance
yt_to_mlab_vector(ds, xkey, ykey, zkey[, ...]) Convert three yt keys to a mlab vector field :Parameters: ds : yt dataset The dataset to get the data from.