This module is made to provide a set of tools and helper classes for data exploration for Web deployment.
paraview.data_exploration.
AnalysisManager
(work_dir, title, description, **kwargs)[source]¶Bases: object
This class provide mechanism to keep track of a full data analysis and exploration so the generated analysis can be processed and viewed on the web.
begin_work
(key)[source]¶Record the time that a given work is taking. If begin/end_work is called multiple time, a count will be kept but the time will just sum itself.
If 2 begin_work with the same key, the second one will override the first one.
end_work
(key)[source]¶Record the time that a given work is taking. If begin/end_work is called multiple time, a count will be kept but the time will just sum itself.
If 2 end_work with the same key, the second one will be ignore as no begin_work will be done before.
get_file_name_generator
(key)[source]¶Retreive an analysis FileNameGenerator based on the key of a registered analysis.
paraview.data_exploration.
CompositeImageExporter
(file_name_generator, data_list, colorBy_list, luts, camera_handler, view_size, data_list_pipeline, axisVisibility=1, orientationVisibility=1, format='jpg')[source]¶Bases: object
Class use to dump an image stack for a given view position so it can be recomposed later on in the web. We assume the RGBZView plugin is loaded.
paraview.data_exploration.
ContourExplorer
(file_name_generator, data, contourBy, scalarRange=[0.0, 1.0], steps=10)[source]¶Bases: object
Class used to explore data. This Explorer won’t dump any images but can be used along with the ThreeSixtyImageStackExporter() like in the following example.
w = simple.Wavelet()
dataRange = [40.0, 270.0] arrayName = (‘POINT_DATA’, ‘RTData’) fileGenerator = FileNameGenerator(‘/tmp/iso’, ‘{time}_{contourBy}_{contourValue}_{theta}_{phi}.jpg’)
cExplorer = ContourExplorer(fileGenerator, w, arrayName, dataRange, 25) proxy = cExplorer.getContour() rep = simple.Show(proxy)
lut = simple.GetLookupTableForArray( “RTData”, 1, RGBPoints=[43.34006881713867, 0.23, 0.299, 0.754, 160.01158714294434, 0.865, 0.865, 0.865, 276.68310546875, 0.706, 0.016, 0.15] ) rep.LookupTable = lut rep.ColorArrayName = arrayName view = simple.Render()
time = 0.0 exp = ThreeSixtyImageStackExporter(fileGenerator, view, [0,0,0], 100, [0,0,1], [30, 45]) for progress in cExplorer:
exp.UpdatePipeline(time) print (progress)
paraview.data_exploration.
DataProber
(file_name_generator, data_to_probe, points_series, fields)[source]¶Bases: object
paraview.data_exploration.
FileNameGenerator
(working_dir, name_format)[source]¶Bases: object
This class provide some methods to help build a unique file name which map to a given simulation state.
paraview.data_exploration.
FixCameraHandler
(file_name_generator, view, focal_point, view_up, camera_position)[source]¶paraview.data_exploration.
ImageResampler
(file_name_generator, data_to_probe, sampling_dimesions, array_colors, nanColor=[0, 0, 0, 0], custom_probing_bounds=None)[source]¶Bases: object
Class used to explore data. This Explorer will resample the original dataset and produce a stack of images that correspond to XY slice along with numerical data so 2D chart can be use to plot along a line on X, Y or Z.
data_to_probe = simple.Wavelet()
fileGenerator = FileNameGenerator(‘/tmp/probe-slice’, ‘{time}/{field}/{slice}.{format}’) array_colors = {
“RTData”: simple.GetLookupTableForArray( “RTData”, 1, RGBPoints=[43.34006881713867, 0.23, 0.299, 0.754, 160.01158714294434, 0.865, 0.865, 0.865, 276.68310546875, 0.706, 0.016, 0.15] ),}
exp = ImageResampler(fileGenerator, data_to_probe, [21,21,21], array_colors) exp.UpdatePipeline()
paraview.data_exploration.
LineProber
(file_name_generator, data_to_probe, points_series, number_of_points)[source]¶Bases: object
paraview.data_exploration.
SliceExplorer
(file_name_generator, view, data, colorByArray, steps=10, normal=[0.0, 0.0, 1.0], viewup=[0.0, 1.0, 0.0], bound_range=[0.0, 1.0], parallelScaleRatio=1.5)[source]¶Bases: object
Class use to dump image stack of a data exploration. This data exploration is slicing the input data along an axis and save each slice as a new image keeping the view normal using parallel projection to disable the projection scaling.
paraview.data_exploration.
ThreeSixtyCameraHandler
(file_name_generator, view, phis, thetas, center, axis, distance)[source]¶paraview.data_exploration.
ThreeSixtyImageStackExporter
(file_name_generator, view_proxy, focal_point=[0.0, 0.0, 0.0], distance=100.0, rotation_axis=[0, 0, 1], angular_steps=[10, 15])[source]¶Bases: object
Class use to dump image stack of geometry exploration. This exporter will use the provided view to create a 360 view of the visible data.
paraview.data_exploration.
TimeSerieDataProber
(file_name_generator, data_to_probe, point_series, fields, time_to_write)[source]¶Bases: object