[Paraview] TimestepValues
Justin Rodriguez
jrr45 at cornell.edu
Wed Jun 20 02:56:19 EDT 2012
Hi Everyone,
I am trying to get the TimestepValues from the SLACDataReader to eventually
get the time range/temporal bounds of the data. My code is below but
everything I have tried has given an empty array for TimestepValues. Is
there something I need to do first before TimestepValues is updated? Does
anyone have any suggestions for me on the best method to do this?
Thank you for your help in advance,
Justin
try: paraview.simple
except: from paraview.simple import *
################################################################################
meshFilenameFine = 'small_gap_6.0.ncdf'
modeFilenames = ['omega3p_results_6.0/omega3p.l0.m0000.1.4957339e+09.mod']
################################################################################
# prevent goofy camera behavior
paraview.simple._DisableFirstRenderCameraReset()
################################################################################
# initial setup
# load mesh/modes
meshFine =
SLACDataReader(MeshFileName=meshFilenameFine)
meshFine.ModeFileName = modeFilenames
meshFine.ReadInternalVolume = 1
meshFine.ReadMidpoints = 0
# generate colormap lookup table
efieldLUT = GetLookupTableForArray( "efield", 3, RGBPoints = [0.0, 0.0,
0.0, 1.0,
1.0, 1.0, 0.0,
0.0],
VectorMode='Magnitude',
ColorSpace='HSV',
ScalarRangeInitialized=1.0 )
################################################################################
SetActiveSource(meshFine)
view = GetRenderView()
print meshFine.TimestepValues[0]
print "fails on the previous line"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120620/f7b925f1/attachment.htm>
More information about the ParaView
mailing list