fluxplot 0.1.0__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 (65) hide show
  1. fluxplot/__init__.py +115 -0
  2. fluxplot/_fieldmap.py +97 -0
  3. fluxplot/_mesh_reduce.py +54 -0
  4. fluxplot/_scene3d_size.py +95 -0
  5. fluxplot/_viewer/THIRD-PARTY.txt +23 -0
  6. fluxplot/_viewer/flux-model3d-viewer.min.js +4221 -0
  7. fluxplot/_viewer/stamp.json +4 -0
  8. fluxplot/api.py +1196 -0
  9. fluxplot/autotag.py +164 -0
  10. fluxplot/base.mplstyle +0 -0
  11. fluxplot/brackets.py +242 -0
  12. fluxplot/canonical_json.py +23 -0
  13. fluxplot/capture.py +150 -0
  14. fluxplot/colorcheck.py +285 -0
  15. fluxplot/colors.py +727 -0
  16. fluxplot/colorscale.py +477 -0
  17. fluxplot/data.py +178 -0
  18. fluxplot/definitions/colormaps.json +1639 -0
  19. fluxplot/definitions/flexoki.tokens.json +2571 -0
  20. fluxplot/definitions/palettes.json +2547 -0
  21. fluxplot/descriptors.py +87 -0
  22. fluxplot/fields.py +611 -0
  23. fluxplot/fits.py +240 -0
  24. fluxplot/glb.py +84 -0
  25. fluxplot/ids.py +173 -0
  26. fluxplot/images.py +362 -0
  27. fluxplot/integrity.py +27 -0
  28. fluxplot/manifest.py +788 -0
  29. fluxplot/mesh3d.py +376 -0
  30. fluxplot/panels.py +284 -0
  31. fluxplot/postprocess.py +638 -0
  32. fluxplot/presets.py +66 -0
  33. fluxplot/provenance.py +177 -0
  34. fluxplot/raster.py +295 -0
  35. fluxplot/recipe.py +178 -0
  36. fluxplot/render.py +66 -0
  37. fluxplot/roles.py +147 -0
  38. fluxplot/scene3d.py +386 -0
  39. fluxplot/scene3d_manifest.py +112 -0
  40. fluxplot/scene3d_viewer.py +633 -0
  41. fluxplot/schemas/.gitkeep +0 -0
  42. fluxplot/schemas/manifest.schema.json +2479 -0
  43. fluxplot/schemas/recipe.schema.json +179 -0
  44. fluxplot/schemas/scene3d.schema.json +461 -0
  45. fluxplot/seaborn_adapters.py +323 -0
  46. fluxplot/signature_fluxplots/__init__.py +18 -0
  47. fluxplot/signature_fluxplots/_colour.py +412 -0
  48. fluxplot/signature_fluxplots/fluxbox.py +433 -0
  49. fluxplot/signature_fluxplots/glowbar.py +769 -0
  50. fluxplot/signature_fluxplots/hexmatrix.py +927 -0
  51. fluxplot/stats/__init__.py +63 -0
  52. fluxplot/stats/_common.py +196 -0
  53. fluxplot/stats/multi_group.py +443 -0
  54. fluxplot/stats/paired.py +209 -0
  55. fluxplot/stats/two_group.py +149 -0
  56. fluxplot/style.py +469 -0
  57. fluxplot/surface.py +487 -0
  58. fluxplot/surface3d.py +197 -0
  59. fluxplot/tagger.py +561 -0
  60. fluxplot/version.py +19 -0
  61. fluxplot-0.1.0.dist-info/METADATA +1199 -0
  62. fluxplot-0.1.0.dist-info/RECORD +65 -0
  63. fluxplot-0.1.0.dist-info/WHEEL +4 -0
  64. fluxplot-0.1.0.dist-info/licenses/LICENSE +21 -0
  65. fluxplot-0.1.0.dist-info/licenses/THIRD_PARTY_NOTICES.md +472 -0
@@ -0,0 +1,179 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://flux.dev/schemas/fluxplot-recipe-0.3.2.json",
4
+ "title": "FluxPlot recipe",
5
+ "type": "object",
6
+ "required": [
7
+ "spec",
8
+ "schemaVersion",
9
+ "plot",
10
+ "outputs",
11
+ "inputs"
12
+ ],
13
+ "properties": {
14
+ "spec": {
15
+ "const": "fluxplot/recipe"
16
+ },
17
+ "schemaVersion": {
18
+ "type": "string"
19
+ },
20
+ "plot": {
21
+ "type": "string"
22
+ },
23
+ "outputs": {
24
+ "type": "object",
25
+ "properties": {
26
+ "svg": {
27
+ "type": "string"
28
+ },
29
+ "glb": {
30
+ "type": "string"
31
+ },
32
+ "manifest": {
33
+ "type": "string"
34
+ }
35
+ }
36
+ },
37
+ "generatedAt": {
38
+ "type": [
39
+ "string",
40
+ "null"
41
+ ]
42
+ },
43
+ "script": {
44
+ "type": [
45
+ "object",
46
+ "null"
47
+ ],
48
+ "properties": {
49
+ "path": {
50
+ "type": "string"
51
+ }
52
+ }
53
+ },
54
+ "params": {
55
+ "type": "object"
56
+ },
57
+ "command": {
58
+ "type": "string"
59
+ },
60
+ "args": {
61
+ "type": "array",
62
+ "items": {
63
+ "type": "string"
64
+ }
65
+ },
66
+ "cwd": {
67
+ "type": "string"
68
+ },
69
+ "output": {
70
+ "type": "string"
71
+ },
72
+ "provenance": {
73
+ "type": "object",
74
+ "description": "How the producing script was determined, plus the interpreter, platform, package versions, script hash and Git state.",
75
+ "required": [
76
+ "scriptDiscovery"
77
+ ],
78
+ "properties": {
79
+ "scriptDiscovery": {
80
+ "enum": [
81
+ "automatic",
82
+ "explicit",
83
+ "notebook",
84
+ "unavailable",
85
+ "suppressed"
86
+ ]
87
+ },
88
+ "scriptSha256": {
89
+ "type": "string"
90
+ },
91
+ "python": {
92
+ "type": "string"
93
+ },
94
+ "platform": {
95
+ "type": "string"
96
+ },
97
+ "packages": {
98
+ "type": "object",
99
+ "additionalProperties": {
100
+ "type": "string"
101
+ }
102
+ },
103
+ "git": {
104
+ "type": "object",
105
+ "required": [
106
+ "commit"
107
+ ],
108
+ "properties": {
109
+ "commit": {
110
+ "type": "string"
111
+ },
112
+ "dirty": {
113
+ "type": "boolean"
114
+ }
115
+ }
116
+ }
117
+ }
118
+ },
119
+ "inputs": {
120
+ "type": "array",
121
+ "items": {
122
+ "type": "object",
123
+ "required": [
124
+ "path"
125
+ ],
126
+ "properties": {
127
+ "role": {
128
+ "type": "string"
129
+ },
130
+ "path": {
131
+ "type": [
132
+ "string",
133
+ "null"
134
+ ]
135
+ },
136
+ "sha256": {
137
+ "type": [
138
+ "string",
139
+ "null"
140
+ ]
141
+ },
142
+ "bytes": {
143
+ "type": "integer"
144
+ }
145
+ }
146
+ }
147
+ },
148
+ "env": {
149
+ "type": [
150
+ "object",
151
+ "null"
152
+ ]
153
+ },
154
+ "notebook": {
155
+ "type": "object",
156
+ "description": "The notebook (and cell) that produced the plot when no script did: recorded for provenance, not rerunnable.",
157
+ "required": [
158
+ "path"
159
+ ],
160
+ "properties": {
161
+ "path": {
162
+ "type": "string"
163
+ },
164
+ "cell": {
165
+ "type": [
166
+ "string",
167
+ "null"
168
+ ]
169
+ },
170
+ "sha256": {
171
+ "type": [
172
+ "string",
173
+ "null"
174
+ ]
175
+ }
176
+ }
177
+ }
178
+ }
179
+ }
@@ -0,0 +1,461 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://flux.dev/schemas/fluxplot-scene3d-0.1.0.json",
4
+ "title": "FluxPlot scene3d 0.1.0",
5
+ "type": "object",
6
+ "properties": {
7
+ "spec": {
8
+ "const": "fluxplot/scene3d"
9
+ },
10
+ "schemaVersion": {
11
+ "const": "0.1.0"
12
+ },
13
+ "plotType": {
14
+ "const": "scene3d"
15
+ },
16
+ "glb": {
17
+ "type": "string",
18
+ "pattern": "^[^/\\\\\\x00]+\\.glb$"
19
+ },
20
+ "glbSha256": {
21
+ "type": "string",
22
+ "pattern": "^[a-f0-9]{64}$"
23
+ },
24
+ "size": {
25
+ "type": "object",
26
+ "properties": {
27
+ "width": {
28
+ "type": "number",
29
+ "exclusiveMinimum": 0
30
+ },
31
+ "height": {
32
+ "type": "number",
33
+ "exclusiveMinimum": 0
34
+ },
35
+ "unit": {
36
+ "const": "in"
37
+ }
38
+ },
39
+ "required": [
40
+ "width",
41
+ "height",
42
+ "unit"
43
+ ],
44
+ "additionalProperties": false
45
+ },
46
+ "units": {
47
+ "type": "string"
48
+ },
49
+ "toWorld": {
50
+ "type": "array",
51
+ "items": {
52
+ "type": "number"
53
+ },
54
+ "minItems": 16,
55
+ "maxItems": 16
56
+ },
57
+ "bounds": {
58
+ "$ref": "#/definitions/bounds"
59
+ },
60
+ "view": {
61
+ "type": "object",
62
+ "properties": {
63
+ "azimuth": {
64
+ "type": "number"
65
+ },
66
+ "elevation": {
67
+ "type": "number",
68
+ "minimum": -90,
69
+ "maximum": 90
70
+ },
71
+ "roll": {
72
+ "type": "number"
73
+ },
74
+ "zoom": {
75
+ "type": "number",
76
+ "minimum": 0.02,
77
+ "maximum": 50
78
+ },
79
+ "panX": {
80
+ "type": "number"
81
+ },
82
+ "panY": {
83
+ "type": "number"
84
+ },
85
+ "projection": {
86
+ "enum": [
87
+ "orthographic",
88
+ "perspective"
89
+ ]
90
+ },
91
+ "fov": {
92
+ "type": "number",
93
+ "minimum": 5,
94
+ "maximum": 120
95
+ },
96
+ "states": {
97
+ "type": "object",
98
+ "additionalProperties": {
99
+ "type": "number"
100
+ }
101
+ }
102
+ },
103
+ "additionalProperties": false
104
+ },
105
+ "lighting": {
106
+ "enum": [
107
+ "studio",
108
+ "unlit"
109
+ ]
110
+ },
111
+ "style": {
112
+ "type": "object",
113
+ "properties": {
114
+ "font": {
115
+ "type": "string"
116
+ },
117
+ "fontSizePt": {
118
+ "type": "number",
119
+ "exclusiveMinimum": 0
120
+ },
121
+ "titleSizePt": {
122
+ "type": "number",
123
+ "exclusiveMinimum": 0
124
+ },
125
+ "ink": {
126
+ "$ref": "#/definitions/color"
127
+ },
128
+ "muted": {
129
+ "$ref": "#/definitions/color"
130
+ },
131
+ "lineWidthPt": {
132
+ "type": "number",
133
+ "minimum": 0
134
+ }
135
+ },
136
+ "additionalProperties": false
137
+ },
138
+ "parts": {
139
+ "type": "array",
140
+ "items": {
141
+ "$ref": "#/definitions/part"
142
+ }
143
+ },
144
+ "axes": {
145
+ "type": "object",
146
+ "properties": {
147
+ "kind": {
148
+ "enum": [
149
+ "none",
150
+ "box",
151
+ "triad"
152
+ ]
153
+ },
154
+ "x": {
155
+ "$ref": "#/definitions/axis"
156
+ },
157
+ "y": {
158
+ "$ref": "#/definitions/axis"
159
+ },
160
+ "z": {
161
+ "$ref": "#/definitions/axis"
162
+ },
163
+ "grid": {
164
+ "type": "boolean"
165
+ }
166
+ },
167
+ "additionalProperties": false
168
+ },
169
+ "layout": {
170
+ "type": "object",
171
+ "properties": {
172
+ "colorbar": {
173
+ "enum": [
174
+ "right",
175
+ "none"
176
+ ]
177
+ },
178
+ "legend": {
179
+ "enum": [
180
+ "right",
181
+ "none"
182
+ ]
183
+ },
184
+ "title": {
185
+ "enum": [
186
+ "top",
187
+ "none"
188
+ ]
189
+ }
190
+ },
191
+ "additionalProperties": false
192
+ },
193
+ "morphGroup": {
194
+ "type": "string"
195
+ },
196
+ "states": {
197
+ "type": "array",
198
+ "items": {
199
+ "$ref": "#/definitions/state"
200
+ }
201
+ },
202
+ "sequence": {
203
+ "type": "boolean"
204
+ },
205
+ "order": {
206
+ "type": "array",
207
+ "items": {
208
+ "$ref": "#/definitions/id"
209
+ }
210
+ },
211
+ "build": {
212
+ "type": "object",
213
+ "properties": {
214
+ "generator": {
215
+ "type": "string"
216
+ },
217
+ "provenance": {
218
+ "type": "object"
219
+ }
220
+ },
221
+ "additionalProperties": false
222
+ }
223
+ },
224
+ "required": [
225
+ "spec",
226
+ "schemaVersion",
227
+ "glb"
228
+ ],
229
+ "additionalProperties": false,
230
+ "definitions": {
231
+ "id": {
232
+ "type": "string",
233
+ "pattern": "^[a-z0-9-]+(?:\\.[a-z0-9-]+)*$"
234
+ },
235
+ "color": {
236
+ "type": "string",
237
+ "pattern": "^#[0-9a-fA-F]{6}(?:[0-9a-fA-F]{2})?$"
238
+ },
239
+ "pair": {
240
+ "type": "array",
241
+ "items": {
242
+ "type": "number"
243
+ },
244
+ "minItems": 2,
245
+ "maxItems": 2
246
+ },
247
+ "vec3": {
248
+ "type": "array",
249
+ "items": {
250
+ "type": "number"
251
+ },
252
+ "minItems": 3,
253
+ "maxItems": 3
254
+ },
255
+ "bounds": {
256
+ "type": "object",
257
+ "properties": {
258
+ "min": {
259
+ "$ref": "#/definitions/vec3"
260
+ },
261
+ "max": {
262
+ "$ref": "#/definitions/vec3"
263
+ }
264
+ },
265
+ "required": [
266
+ "min",
267
+ "max"
268
+ ],
269
+ "additionalProperties": false
270
+ },
271
+ "state": {
272
+ "type": "object",
273
+ "properties": {
274
+ "name": {
275
+ "type": "string",
276
+ "minLength": 1
277
+ },
278
+ "label": {
279
+ "type": "string"
280
+ }
281
+ },
282
+ "required": [
283
+ "name"
284
+ ],
285
+ "additionalProperties": false
286
+ },
287
+ "axis": {
288
+ "type": "object",
289
+ "properties": {
290
+ "lim": {
291
+ "$ref": "#/definitions/pair"
292
+ },
293
+ "ticks": {
294
+ "type": "array",
295
+ "items": {
296
+ "type": "number"
297
+ }
298
+ },
299
+ "tickLabels": {
300
+ "type": "array",
301
+ "items": {
302
+ "type": "string"
303
+ }
304
+ },
305
+ "label": {
306
+ "type": "string"
307
+ }
308
+ },
309
+ "additionalProperties": false
310
+ },
311
+ "cmap": {
312
+ "type": "object",
313
+ "properties": {
314
+ "name": {
315
+ "type": "string",
316
+ "minLength": 1
317
+ },
318
+ "stops": {
319
+ "type": "array",
320
+ "minItems": 2,
321
+ "items": {
322
+ "type": "array",
323
+ "items": [
324
+ {
325
+ "type": "number",
326
+ "minimum": 0,
327
+ "maximum": 1
328
+ },
329
+ {
330
+ "$ref": "#/definitions/color"
331
+ }
332
+ ],
333
+ "minItems": 2,
334
+ "maxItems": 2
335
+ }
336
+ }
337
+ },
338
+ "required": [
339
+ "name",
340
+ "stops"
341
+ ],
342
+ "additionalProperties": false
343
+ },
344
+ "field": {
345
+ "type": "object",
346
+ "properties": {
347
+ "cmap": {
348
+ "$ref": "#/definitions/cmap"
349
+ },
350
+ "range": {
351
+ "$ref": "#/definitions/pair"
352
+ },
353
+ "rule": {
354
+ "type": "object",
355
+ "properties": {
356
+ "percentile": {
357
+ "type": "array",
358
+ "items": {
359
+ "type": "number",
360
+ "minimum": 0,
361
+ "maximum": 100
362
+ },
363
+ "minItems": 2,
364
+ "maxItems": 2
365
+ }
366
+ },
367
+ "additionalProperties": false
368
+ },
369
+ "label": {
370
+ "type": "string"
371
+ },
372
+ "ticks": {
373
+ "type": "array",
374
+ "items": {
375
+ "type": "number"
376
+ }
377
+ },
378
+ "missingColor": {
379
+ "$ref": "#/definitions/color"
380
+ }
381
+ },
382
+ "required": [
383
+ "cmap",
384
+ "range"
385
+ ],
386
+ "additionalProperties": false
387
+ },
388
+ "part": {
389
+ "type": "object",
390
+ "properties": {
391
+ "id": {
392
+ "$ref": "#/definitions/id"
393
+ },
394
+ "role": {
395
+ "type": "string",
396
+ "minLength": 1
397
+ },
398
+ "series": {
399
+ "type": "string"
400
+ },
401
+ "label": {
402
+ "type": "string"
403
+ },
404
+ "parent": {
405
+ "$ref": "#/definitions/id"
406
+ },
407
+ "kind": {
408
+ "enum": [
409
+ "mesh",
410
+ "field",
411
+ "missing",
412
+ "furniture"
413
+ ]
414
+ },
415
+ "node": {
416
+ "type": "string",
417
+ "minLength": 1
418
+ },
419
+ "color": {
420
+ "$ref": "#/definitions/color"
421
+ },
422
+ "opacity": {
423
+ "type": "number",
424
+ "minimum": 0,
425
+ "maximum": 1
426
+ },
427
+ "hidden": {
428
+ "type": "boolean"
429
+ },
430
+ "field": {
431
+ "oneOf": [
432
+ {
433
+ "$ref": "#/definitions/field"
434
+ },
435
+ {
436
+ "$ref": "#/definitions/id"
437
+ }
438
+ ]
439
+ },
440
+ "text": {
441
+ "type": "string"
442
+ },
443
+ "length": {
444
+ "type": "number",
445
+ "exclusiveMinimum": 0
446
+ },
447
+ "entries": {
448
+ "type": "array",
449
+ "items": {
450
+ "$ref": "#/definitions/id"
451
+ }
452
+ }
453
+ },
454
+ "required": [
455
+ "id",
456
+ "role"
457
+ ],
458
+ "additionalProperties": false
459
+ }
460
+ }
461
+ }