def DumpCoProcessingScript(export_rendering, simulation_input_map, screenshot_info, rescale_data_range, enable_live_viz, live_viz_frequency, cinema_tracks, array_selection, filename=None): """Returns a string with the generated CoProcessing script based on the options specified. First three arguments are same as those expected by cpstate.DumpPipeline() function. rescale_data_range :- boolean set to true if the LUTs must be scaled on each timestep enable_live_viz :- boolean set to true if the generated script should handle live-visualization. live_viz_frequency :- integer specifying how often should the coprocessor send the live data cinema_tracks :- cinema offline visualizer parameters array_selection :- selected value arrays for cinema filename :- if specified, the script is written to the file. """ pipeline_script = cpstate.DumpPipeline(\ export_rendering, simulation_input_map, screenshot_info, cinema_tracks, array_selection) script = __output_contents % (pipeline_script, enable_live_viz, live_viz_frequency, rescale_data_range) if filename: outFile = open(filename, "w") outFile.write(script) outFile.close() return script
def DumpCoProcessingScript(export_rendering, simulation_input_map, screenshot_info, rescale_data_range, enable_live_viz, filename=None): """Returns a string with the generated CoProcessing script based on the options specified. First three arguments are same as those expected by cpstate.DumpPipeline() function. rescale_data_range :- boolean set to true if the LUTs must be scaled on each timestep enable_live_viz :- boolean set to true if the generated script should handle live-visualization. filename :- if specified, the script is written to the file. """ pipeline_script = cpstate.DumpPipeline(\ export_rendering, simulation_input_map, screenshot_info) script = __output_contents % (pipeline_script, enable_live_viz, rescale_data_range) if filename: outFile = open(filename, "w") outFile.write(script) outFile.close() return script
def DumpCoProcessingScript(export_rendering, simulation_input_map, screenshot_info, padding_amount, rescale_data_range, enable_live_viz, live_viz_frequency, cinema_tracks, array_selection, filename=None): """Returns a string with the generated CoProcessing script based on the options specified. First three arguments are same as those expected by cpstate.DumpPipeline() function. :param padding_amount: integer (0-10) to set image output filename padding :param rescale_data_range: boolean set to true if the LUTs must be scaled on each timestep :param enable_live_viz: boolean set to true if the generated script should handle live-visualization. :param live_viz_frequency: integer specifying how often should the coprocessor send the live data :param cinema_tracks: cinema offline visualizer parameters :param array_selection: selected value arrays for cinema :param filename: if specified, the script is written to the file. """ from paraview.servermanager import vtkSMProxyManager version_str = vtkSMProxyManager.GetParaViewSourceVersion() timeStepToStartOutputAt = 0 forceOutputAtFirstCall = False pipeline_script = cpstate.DumpPipeline(\ export_rendering, simulation_input_map, screenshot_info, cinema_tracks, array_selection) script = __output_contents % (version_str, timeStepToStartOutputAt, forceOutputAtFirstCall, padding_amount, rescale_data_range, pipeline_script, enable_live_viz, live_viz_frequency) if filename: outFile = open(filename, "w") outFile.write(script) outFile.close() return script
def DumpCoProcessingScript(export_rendering, simulation_input_map, screenshot_info, padding_amount, rescale_data_range, enable_live_viz, live_viz_frequency, cinema_tracks, cinema_arrays, filename=None, write_start=0, make_cinema_table=False, image_root_directory="", data_root_directory="", request_specific_arrays=False, force_first_output=False): """Returns a string with the generated CoProcessing script based on the options specified. First three arguments are same as those expected by cpstate.DumpPipeline() function. :param write_start: integer (0-) how many cycles catalyst should wait before executing :param padding_amount: integer (0-10) to set image output filename padding :param rescale_data_range: boolean set to true if the LUTs must be scaled on each timestep :param enable_live_viz: boolean set to true if the generated script should handle live-visualization. :param live_viz_frequency: integer specifying how often should the coprocessor send the live data :param cinema_tracks: cinema offline visualizer parameters :param cinema_arrays: selected value arrays for cinema :param make_cinema_table: boolean set to true to request a cinema D index file. :param filename: if specified, the script is written to the file. :param image_root_directory: if specified, the script will export image extracts underneath this directory. :param data_root_directory: if specified, the script will export data extracts underneath this directory. :param request_specific_arrays: boolean set to true to ask for individual arrays :param force_first_output: boolean set to true to write the first timestep regardless of write_start. """ from paraview.servermanager import vtkSMProxyManager version_str = vtkSMProxyManager.GetParaViewSourceVersion() pipeline_script = cpstate.DumpPipeline(\ export_rendering, simulation_input_map, screenshot_info, cinema_tracks,\ cinema_arrays, enable_live_viz, live_viz_frequency) script = __output_contents % ( write_start, force_first_output, padding_amount, rescale_data_range, request_specific_arrays, image_root_directory, data_root_directory, make_cinema_table, version_str, pipeline_script, enable_live_viz, live_viz_frequency) if filename: outFile = open(filename, "w") outFile.write(script) outFile.close() return script