pytecplot 1.5.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. pytecplot-1.5.2.dist-info/LICENSE.html +77 -0
  2. pytecplot-1.5.2.dist-info/METADATA +508 -0
  3. pytecplot-1.5.2.dist-info/RECORD +97 -0
  4. pytecplot-1.5.2.dist-info/WHEEL +5 -0
  5. pytecplot-1.5.2.dist-info/top_level.txt +1 -0
  6. tecplot/__init__.py +94 -0
  7. tecplot/annotation/__init__.py +7 -0
  8. tecplot/annotation/annotation.py +223 -0
  9. tecplot/annotation/geometry.py +369 -0
  10. tecplot/annotation/georeference.py +33 -0
  11. tecplot/annotation/image.py +185 -0
  12. tecplot/annotation/iter.py +105 -0
  13. tecplot/annotation/polyline.py +381 -0
  14. tecplot/annotation/text.py +744 -0
  15. tecplot/constant.py +401 -0
  16. tecplot/data/__init__.py +34 -0
  17. tecplot/data/array.py +645 -0
  18. tecplot/data/create.py +1 -0
  19. tecplot/data/dataset.py +1809 -0
  20. tecplot/data/extract.py +544 -0
  21. tecplot/data/face_neighbors.py +494 -0
  22. tecplot/data/facemap.py +814 -0
  23. tecplot/data/load.py +2075 -0
  24. tecplot/data/nodemap.py +577 -0
  25. tecplot/data/operate.py +928 -0
  26. tecplot/data/query.py +334 -0
  27. tecplot/data/save.py +343 -0
  28. tecplot/data/variable.py +280 -0
  29. tecplot/data/zone.py +841 -0
  30. tecplot/exception.py +201 -0
  31. tecplot/export/__init__.py +13 -0
  32. tecplot/export/animation.py +521 -0
  33. tecplot/export/export_setup.py +318 -0
  34. tecplot/export/image.py +577 -0
  35. tecplot/export/print_setup.py +218 -0
  36. tecplot/export/time_animation.py +607 -0
  37. tecplot/extension/__init__.py +14 -0
  38. tecplot/extension/ipython.py +68 -0
  39. tecplot/layout/__init__.py +20 -0
  40. tecplot/layout/frame.py +1285 -0
  41. tecplot/layout/layout.py +488 -0
  42. tecplot/layout/page.py +541 -0
  43. tecplot/legend/__init__.py +4 -0
  44. tecplot/legend/contour_legend.py +516 -0
  45. tecplot/legend/legend.py +141 -0
  46. tecplot/legend/line_legend.py +66 -0
  47. tecplot/legend/rgb_coloring_legend.py +291 -0
  48. tecplot/legend/scatter_legend.py +136 -0
  49. tecplot/macro.py +339 -0
  50. tecplot/plot/__init__.py +62 -0
  51. tecplot/plot/axes.py +881 -0
  52. tecplot/plot/axis.py +1350 -0
  53. tecplot/plot/blanking.py +584 -0
  54. tecplot/plot/contour.py +1302 -0
  55. tecplot/plot/effects.py +162 -0
  56. tecplot/plot/fieldmap.py +2159 -0
  57. tecplot/plot/grid.py +758 -0
  58. tecplot/plot/isosurface.py +1167 -0
  59. tecplot/plot/labels.py +338 -0
  60. tecplot/plot/linemap.py +1905 -0
  61. tecplot/plot/linking.py +489 -0
  62. tecplot/plot/plot.py +1791 -0
  63. tecplot/plot/rgb_coloring.py +281 -0
  64. tecplot/plot/scatter.py +396 -0
  65. tecplot/plot/slice.py +1544 -0
  66. tecplot/plot/streamtrace.py +1949 -0
  67. tecplot/plot/symbol.py +567 -0
  68. tecplot/plot/ticks.py +666 -0
  69. tecplot/plot/title.py +380 -0
  70. tecplot/plot/vector.py +679 -0
  71. tecplot/plot/view.py +868 -0
  72. tecplot/session/__init__.py +112 -0
  73. tecplot/session/aux_data.py +276 -0
  74. tecplot/session/config.py +92 -0
  75. tecplot/session/session.py +425 -0
  76. tecplot/session/state_changed.py +225 -0
  77. tecplot/session/style.py +504 -0
  78. tecplot/tecutil/__init__.py +16 -0
  79. tecplot/tecutil/arglist.py +230 -0
  80. tecplot/tecutil/captured_output.py +177 -0
  81. tecplot/tecutil/constant.py +1312 -0
  82. tecplot/tecutil/index_set.py +118 -0
  83. tecplot/tecutil/lock.py +36 -0
  84. tecplot/tecutil/message_pb2.py +39 -0
  85. tecplot/tecutil/preamble.py +54 -0
  86. tecplot/tecutil/stringlist.py +114 -0
  87. tecplot/tecutil/sv.py +1662 -0
  88. tecplot/tecutil/tecutil.py +12402 -0
  89. tecplot/tecutil/tecutil_client.py +627 -0
  90. tecplot/tecutil/tecutil_connector.py +937 -0
  91. tecplot/tecutil/tecutil_rpc.py +6845 -0
  92. tecplot/tecutil/util.py +332 -0
  93. tecplot/text/__init__.py +3 -0
  94. tecplot/text/font.py +224 -0
  95. tecplot/text/label_format.py +374 -0
  96. tecplot/text/textbox.py +106 -0
  97. tecplot/version.py +41 -0
@@ -0,0 +1,318 @@
1
+ from builtins import int, str, super
2
+
3
+ import platform
4
+ import warnings
5
+
6
+ from ..tecutil import sv
7
+ from ..exception import *
8
+ from ..constant import *
9
+ from .. import session, tecutil, version
10
+
11
+
12
+ class EPSPreviewExportSetup(session.Style):
13
+ def __init__(self):
14
+ super().__init__(sv.EXPORTSETUP, sv.EPSPREVIEWIMAGE)
15
+
16
+ def reset(self):
17
+ self.type = EPSPreviewImage.TIFF
18
+ self.width = 128
19
+ self.height = 128
20
+ self.gray_scale_depth = 0
21
+
22
+ @property
23
+ def type(self):
24
+ return self._get_style(EPSPreviewImage, sv.IMAGETYPE)
25
+
26
+ @type.setter
27
+ def type(self, value):
28
+ if value is not None:
29
+ self._set_style(EPSPreviewImage(value), sv.IMAGETYPE)
30
+
31
+ @property
32
+ def width(self):
33
+ return self._get_style(int, sv.IMAGEWIDTH)
34
+
35
+ @width.setter
36
+ def width(self, value):
37
+ if value is not None:
38
+ self._set_style(int(value), sv.IMAGEWIDTH)
39
+
40
+ @property
41
+ def height(self):
42
+ return self._get_style(int, sv.IMAGEHEIGHT)
43
+
44
+ @height.setter
45
+ def height(self, value):
46
+ if value is not None:
47
+ self._set_style(int(value), sv.IMAGEHEIGHT)
48
+
49
+ @property
50
+ def gray_scale_depth(self):
51
+ return self._get_style(int, sv.GRAYSCALEDEPTH)
52
+
53
+ @gray_scale_depth.setter
54
+ def gray_scale_depth(self, value):
55
+ if value is not None:
56
+ value = int(value)
57
+ if __debug__:
58
+ value_choices = (0, 1, 4, 8)
59
+ if value not in value_choices:
60
+ raise TecplotLogicError(
61
+ 'Gray scale depth must be one of: ' +
62
+ ', '.join(str(x) for x in value_choices))
63
+ self._set_style(int(value), sv.GRAYSCALEDEPTH)
64
+
65
+
66
+ class ExportSetup(session.Style):
67
+ def __init__(self):
68
+ super().__init__(sv.EXPORTSETUP)
69
+
70
+ def reset(self):
71
+ # self.filename = None
72
+ # self.format = None
73
+ self.animation_speed = 10
74
+ self.convert_to_256_colors = False
75
+ self.gray_scale_depth = 8
76
+ self.jpeg_encoding = JPEGEncoding.Standard
77
+ self.multiple_color_tables = False
78
+ self.quality = 75
79
+ self.region = ExportRegion.AllFrames
80
+ self.render_type = PrintRenderType.Vector
81
+ self.supersample = 3
82
+ self.tiff_byte_order = TIFFByteOrder.Intel
83
+ self.width = 800
84
+ if version.sdk_version_info < (2021, 2):
85
+ if platform.system() == 'Windows':
86
+ self.avi_compression = AVICompression.ColorPreserving
87
+ else:
88
+ self.avi_compression = AVICompression.LinePreserving
89
+ else:
90
+ self.avi_format_options = '-vcodec mjpeg -q:v 5'
91
+
92
+ self.mpeg_format_options = '-c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p'
93
+ self.wmv_format_options = '-qscale 4'
94
+
95
+ self.flash_compression = FlashCompressionType.BestSpeed
96
+ self.flash_image_type = FlashImageType.Lossless
97
+
98
+ self.preview_image.reset()
99
+
100
+ @property
101
+ def preview_image(self):
102
+ return EPSPreviewExportSetup()
103
+
104
+ @property
105
+ def animation_speed(self):
106
+ return self._get_style(float, sv.ANIMATIONSPEED)
107
+
108
+ @animation_speed.setter
109
+ def animation_speed(self, value):
110
+ if value is not None:
111
+ self._set_style(float(value), sv.ANIMATIONSPEED)
112
+
113
+ @property
114
+ def avi_compression(self):
115
+ if version.sdk_version_info < (2021, 2):
116
+ return self._get_style(AVICompression, sv.AVICOMPRESSION)
117
+ else:
118
+ if __debug__:
119
+ msg = 'Compression option no longer supported for AVI'
120
+ msg += ' animations since ffmpeg is now used to assemble'
121
+ msg += ' AVI movies. Use the avi_format_options property'
122
+ msg += ' instead.'
123
+ warnings.warn(msg, TecplotDeprecationWarning)
124
+ return AVICompression.LinePreserving
125
+
126
+ @avi_compression.setter
127
+ def avi_compression(self, value):
128
+ if value is not None:
129
+ if version.sdk_version_info < (2021, 2):
130
+ self._set_style(AVICompression(value), sv.AVICOMPRESSION)
131
+ else:
132
+ if __debug__:
133
+ msg = 'Compression option no longer supported for AVI'
134
+ msg += ' animations since ffmpeg is now used to assemble'
135
+ msg += ' AVI movies. Use the avi_format_options property'
136
+ msg += ' instead.'
137
+ warnings.warn(msg, TecplotDeprecationWarning)
138
+
139
+ @property
140
+ def convert_to_256_colors(self):
141
+ return self._get_style(bool, sv.CONVERTTO256COLORS)
142
+
143
+ @convert_to_256_colors.setter
144
+ def convert_to_256_colors(self, value):
145
+ if value is not None:
146
+ self._set_style(bool(value), sv.CONVERTTO256COLORS)
147
+
148
+ @property
149
+ def filename(self):
150
+ return self._get_style(str, sv.EXPORTFNAME)
151
+
152
+ @filename.setter
153
+ def filename(self, value):
154
+ if value is not None:
155
+ self._set_style(str(tecutil.normalize_path(value)), sv.EXPORTFNAME)
156
+
157
+ @property
158
+ def flash_compression(self):
159
+ return self._get_style(FlashCompressionType, sv.FLASHCOMPRESSIONTYPE)
160
+
161
+ @flash_compression.setter
162
+ def flash_compression(self, value):
163
+ if value is not None:
164
+ self._set_style(FlashCompressionType(value),
165
+ sv.FLASHCOMPRESSIONTYPE)
166
+
167
+ @property
168
+ def flash_image_type(self):
169
+ return self._get_style(FlashImageType, sv.FLASHIMAGETYPE)
170
+
171
+ @flash_image_type.setter
172
+ def flash_image_type(self, value):
173
+ if value is not None:
174
+ self._set_style(FlashImageType(value), sv.FLASHIMAGETYPE)
175
+
176
+ @property
177
+ def format(self):
178
+ return self._get_style(ExportFormat, sv.EXPORTFORMAT)
179
+
180
+ @format.setter
181
+ def format(self, value):
182
+ self._set_style(ExportFormat(value), sv.EXPORTFORMAT)
183
+
184
+ @property
185
+ def gray_scale_depth(self):
186
+ return self._get_style(int, sv.GRAYSCALEDEPTH)
187
+
188
+ @gray_scale_depth.setter
189
+ def gray_scale_depth(self, value):
190
+ if value is not None:
191
+ value = int(value)
192
+ if __debug__:
193
+ value_choices = (0, 1, 4, 8)
194
+ if value not in value_choices:
195
+ raise TecplotLogicError(
196
+ 'Gray scale depth must be one of: ' +
197
+ ', '.join(str(x) for x in value_choices))
198
+ self._set_style(int(value), sv.GRAYSCALEDEPTH)
199
+
200
+ @property
201
+ def jpeg_encoding(self):
202
+ return self._get_style(JPEGEncoding, sv.JPEGENCODING)
203
+
204
+ @jpeg_encoding.setter
205
+ def jpeg_encoding(self, value):
206
+ if value is not None:
207
+ self._set_style(JPEGEncoding(value), sv.JPEGENCODING)
208
+
209
+ @property
210
+ def avi_format_options(self):
211
+ if __debug__:
212
+ if version.sdk_version_info < (2021, 2):
213
+ msg = 'AVI format options requires Tecplot 360' + \
214
+ ' version 2021 R2 or later.'
215
+ raise TecplotOutOfDateEngineError((2021, 2), msg)
216
+ return self._get_style(str, sv.AVIFORMATOPTIONS)
217
+
218
+ @avi_format_options.setter
219
+ def avi_format_options(self, value):
220
+ if __debug__:
221
+ if version.sdk_version_info < (2021, 2):
222
+ msg = 'AVI format options requires Tecplot 360' + \
223
+ ' version 2021 R2 or later.'
224
+ raise TecplotOutOfDateEngineError((2021, 2), msg)
225
+ if value is not None:
226
+ self._set_style(str(value), sv.AVIFORMATOPTIONS)
227
+
228
+ @property
229
+ def mpeg_format_options(self):
230
+ return self._get_style(str, sv.MPEGFORMATOPTIONS)
231
+
232
+ @mpeg_format_options.setter
233
+ def mpeg_format_options(self, value):
234
+ if value is not None:
235
+ self._set_style(str(value), sv.MPEGFORMATOPTIONS)
236
+
237
+ @property
238
+ def multiple_color_tables(self):
239
+ return self._get_style(bool, sv.USEMULTIPLECOLORTABLES)
240
+
241
+ @multiple_color_tables.setter
242
+ def multiple_color_tables(self, value):
243
+ if value is not None:
244
+ self._set_style(bool(value), sv.USEMULTIPLECOLORTABLES)
245
+
246
+ @property
247
+ def quality(self):
248
+ return self._get_style(float, sv.QUALITY)
249
+
250
+ @quality.setter
251
+ def quality(self, value):
252
+ if value is not None:
253
+ self._set_style(float(value), sv.QUALITY)
254
+ @property
255
+ def region(self):
256
+ return self._get_style(ExportRegion, sv.EXPORTREGION)
257
+
258
+ @region.setter
259
+ def region(self, value):
260
+ if value is not None:
261
+ self._set_style(ExportRegion(value), sv.EXPORTREGION)
262
+
263
+ @property
264
+ def render_type(self):
265
+ return self._get_style(PrintRenderType, sv.PRINTRENDERTYPE)
266
+
267
+ @render_type.setter
268
+ def render_type(self, value):
269
+ if value is not None:
270
+ self._set_style(PrintRenderType(value), sv.PRINTRENDERTYPE)
271
+
272
+ @property
273
+ def supersample(self):
274
+ if not self._get_style(bool, sv.USESUPERSAMPLEANTIALIASING):
275
+ return 1
276
+ else:
277
+ return self._get_style(int, sv.SUPERSAMPLEFACTOR)
278
+
279
+ @supersample.setter
280
+ def supersample(self, value):
281
+ if value is not None:
282
+ if __debug__:
283
+ if not (1 <= value <= 16):
284
+ msg = 'supersample must be between 1 and 16'
285
+ raise TecplotLogicError(msg)
286
+ if value < 2:
287
+ self._set_style(False, sv.USESUPERSAMPLEANTIALIASING)
288
+ else:
289
+ self._set_style(True, sv.USESUPERSAMPLEANTIALIASING)
290
+ self._set_style(int(value), sv.SUPERSAMPLEFACTOR)
291
+
292
+ @property
293
+ def tiff_byte_order(self):
294
+ return self._get_style(TIFFByteOrder, sv.TIFFBYTEORDER)
295
+
296
+ @tiff_byte_order.setter
297
+ def tiff_byte_order(self, value):
298
+ if value is not None:
299
+ self._set_style(TIFFByteOrder(value), sv.TIFFBYTEORDER)
300
+
301
+ @property
302
+ def width(self):
303
+ return self._get_style(int, sv.IMAGEWIDTH)
304
+
305
+ @width.setter
306
+ def width(self, value):
307
+ if value is not None:
308
+ self._set_style(int(value), sv.IMAGEWIDTH,
309
+ assignmodifier=AssignOp.Equals)
310
+
311
+ @property
312
+ def wmv_format_options(self):
313
+ return self._get_style(str, sv.WMVFORMATOPTIONS)
314
+
315
+ @wmv_format_options.setter
316
+ def wmv_format_options(self, value):
317
+ if value is not None:
318
+ self._set_style(str(value), sv.WMVFORMATOPTIONS)