MCPcopy Create free account
hub / github.com/daft-dev/daft / test_deconvolution

Function test_deconvolution

test/test_examples.py:48–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46
47@image_comparison(baseline_images=["deconvolution"], extensions=["png"])
48def test_deconvolution():
49 scale = 1.6
50 pgm = daft.PGM()
51
52 # Add Nodes
53 pgm.add_node("beta dP", r"$\beta_{p}$", 1, 1, scale)
54 pgm.add_node("pwf_cr", r"$\Delta p_{cr}$", 2.25, 1, scale)
55
56 pgm.add_node("beta qD", r"$\beta_{q}$", 1, 0, scale)
57 pgm.add_node("q_cp", r"$q_{cp}$", 2.25, 0.0, scale)
58
59 pgm.add_node(
60 "pwf_prime_obs",
61 r"$\frac{d}{dt}\,\Delta p$",
62 2.25,
63 -1,
64 scale,
65 alternate=True,
66 )
67 pgm.add_node(
68 "q_prime_obs", r"$\frac{d}{dt}\,q$", 2.25, 2, scale, alternate=True
69 )
70
71 pgm.add_node(
72 "pwf_conv",
73 r"$\Delta p$",
74 3.5,
75 1.5,
76 scale,
77 alternate=True,
78 plot_params={"ec": "red"},
79 )
80
81 pgm.add_node(
82 "q_conv",
83 r"$q$",
84 3.5,
85 -0.5,
86 scale,
87 alternate=True,
88 plot_params={"ec": "blue"},
89 )
90
91 pgm.add_node(
92 "t_conv",
93 r"$t$",
94 3.5,
95 0.5,
96 scale,
97 alternate=True,
98 plot_params={"ec": "orange"},
99 )
100
101 # Add Plates
102 pgm.add_plate(
103 [1.625 - 0.05, -1.5 - 0.025, 1.25, 2], rect_params={"ec": "blue"}
104 )
105 pgm.add_plate([1.625, -0.5, 1.25, 2], rect_params={"ec": "orange"})

Callers

nothing calls this directly

Calls 5

add_nodeMethod · 0.95
add_plateMethod · 0.95
add_edgeMethod · 0.95
add_textMethod · 0.95
renderMethod · 0.95

Tested by

no test coverage detected