comparison icqsol_compose_shapes.py @ 11:c2ab4a89b06d draft

Uploaded
author greg
date Mon, 11 Jan 2016 09:34:50 -0500
parents 01ce1844eacb
children
comparison
equal deleted inserted replaced
10:1cc95decb3b7 11:c2ab4a89b06d
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 import argparse 2 import argparse
3 import shutil 3 import shutil
4 4
5 import icqsol_utils 5 import icqsol_utils
6 from icqsol.shapes.icqShapeManager import ShapeManager
7 6
8 # Parse Command Line. 7 # Parse Command Line.
9 parser = argparse.ArgumentParser() 8 parser = argparse.ArgumentParser()
10 parser.add_argument('--expression', dest='expression', help='Composition expression') 9 parser.add_argument('--expression', dest='expression', help='Composition expression')
11 parser.add_argument('--shape_dataset', dest='shape_datasets', action='append', nargs=4, help='Shape datasets selected from history') 10 parser.add_argument('--shape_dataset', dest='shape_datasets', action='append', nargs=4, help='Shape datasets selected from history')
14 13
15 args = parser.parse_args() 14 args = parser.parse_args()
16 15
17 tmp_dir = icqsol_utils.get_temp_dir() 16 tmp_dir = icqsol_utils.get_temp_dir()
18 shape_tuples = [] 17 shape_tuples = []
19 shape_mgr = ShapeManager() 18 shape_mgr = icqsol_utils.get_shape_manager()
20 19
21 # Load the shapes. 20 # Load the shapes.
22 for (expression_var, dataset_path, galaxy_ext, vtk_dataset_type) in args.shape_datasets: 21 for (expression_var, dataset_path, galaxy_ext, vtk_dataset_type) in args.shape_datasets:
23 # Define the file format and type. 22 # Define the file format and type.
24 format, file_type = icqsol_utils.get_format_and_type(galaxy_ext) 23 format, file_type = icqsol_utils.get_format_and_type(galaxy_ext)