Re: [Paraview] TimestepValues

2012-07-17 Thread Justin Rodriguez
Hi Sebastien,

The files were all time dependent data but some had a TimeRange but no
TimestepValues so I simply did:

TimestepValues = meshFine.TimestepValues
if len(TimestepValues) == 0:
  timerange = meshFine.GetProperty('TimeRange')
  steps = 100
  TimestepValues = [timerange[1]*i/steps + timerange[0] for i in
range(steps)]

which works well enough.  Hopefully this will help anyone else that runs
into the same issue.

Thank you again,
Justin
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] TimestepValues

2012-06-20 Thread Justin Rodriguez
Hi Sebastien,

meshFine.UpdatePropertyInformation() does not seem to have any effect on
the TimestepValues.  Is there anything else I may need with it?

Thank you,
Justin
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


[Paraview] TimestepValues

2012-06-19 Thread Justin Rodriguez
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.m.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"
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview