You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function can execute with input data that are either in Torch or numpy. However,
49
50
50
51
.. warning::
51
-
This function depends on SciPy for evaluating the hypergeometric function, meaning a GPU tensor will be returned to the CPU for a single evaluation and then converted back to a GPU tensor. This incurs a substantial loss of performance.
52
+
This function depends on SciPy for evaluating the hypergeometric function, meaning a GPU tensor will be returned
53
+
to the CPU for a single evaluation and then converted back to a GPU tensor. This incurs a substantial loss of
via an exponential function, which is a reasonable approximation since the resulting :math:`\tau` is nearly linear on a log-log plot. The resulting approximation is the function
82
+
via an exponential function, which is a reasonable approximation since the resulting :math:`\tau` is nearly linear
83
+
on a log-log plot. The resulting approximation is the function
80
84
81
85
.. math::
82
86
\exp \left( \alpha kL + \beta \right)
83
87
84
-
where :math:`\alpha, \beta` are obtained from a linear regression on the hypergeometric function on the domain of interest. In particular, using this function requires that a linear regression has already been performed on the basis of the above function depending on the hypergeometric function, which is an operation performed once on the CPU. The rest of this subroutine is on the GPU and unlike the full hypergeometric approximation, will not incur any slow-down of the rest of the spectra fitting.
88
+
where :math:`\alpha, \beta` are obtained from a linear regression on the hypergeometric function on the domain of
89
+
interest. In particular, using this function requires that a linear regression has already been performed on the
90
+
basis of the above function depending on the hypergeometric function, which is an operation performed once on the
91
+
CPU. The rest of this subroutine is on the GPU and unlike the full hypergeometric approximation, will not incur
"""Returns a full plot of all loss terms for a specific training log generated by TensorBoard. This is an auxiliary method and should only be used for quick visualization of the training process, the suggested method for visualizing this information is through the TensorBoard API.
123
+
"""Returns a full plot of all loss terms for a specific training log generated by TensorBoard. This is an auxiliary
124
+
method and should only be used for quick visualization of the training process, the suggested method for visualizing
"""Creates a 3D grid (meshgrid) from given spacing between grid points and desired shape (which should match the shape of the generated wind field, for example).
"""Creates a 3D grid (meshgrid) from given spacing between grid points and desired shape (which should match the
14
+
shape of the generated wind field, for example).
16
15
17
16
Parameters
18
17
----------
19
18
spacing : tuple[float, float, float]
20
-
Spacing array that determines the spacing of points to be used in each dimension of the 3D field. Typically, of the form grid_dimensions (a 3x1 vector representing the dimensions of the domain) divided by the grid_levels, which determine the resolution of the wind field in each respective dimension.
19
+
Spacing array that determines the spacing of points to be used in each dimension of the 3D field. Typically, of
20
+
the form grid_dimensions (a 3x1 vector representing the dimensions of the domain) divided by the grid_levels,
21
+
which determine the resolution of the wind field in each respective dimension.
21
22
shape : tuple[int, int, int]
22
23
Number of points in each dimension.
23
24
24
25
Returns
25
26
-------
26
27
np.ndarray
27
-
np.meshgrid object consisting of points at the provided spacing and with the specified counts in each dimension. This is 'ij' indexed (not Cartesian!).
28
+
np.meshgrid object consisting of points at the provided spacing and with the specified counts in each dimension.
29
+
This is 'ij' indexed (not Cartesian!).
28
30
"""
29
31
x=np.array([spacing[0] *nforninrange(shape[0])])
30
32
y=np.array([spacing[1] *nforninrange(shape[1])])
@@ -58,18 +60,22 @@ def plot_velocity_components(
58
60
surface_count=25,
59
61
reshape=True,
60
62
) ->go.Figure:
61
-
"""Plots x, y, z components of given wind field over provided spacing. Note that the same spacing is used for all 3 velocity components.
63
+
"""Plots x, y, z components of given wind field over provided spacing. Note that the same spacing is used for all 3
64
+
velocity components.
62
65
63
66
Parameters
64
67
----------
65
68
spacing : tuple[float, float, float]
66
-
Spacing array that determines the spacing of points to be used in each dimension of the 3D field. Typically, of the form grid_dimensions (a 3x1 vector representing the dimensions of the domain) divided by the grid_levels, which determine the resolution of the wind field in each respective dimension.
69
+
Spacing array that determines the spacing of points to be used in each dimension of the 3D field. Typically, of
70
+
the form grid_dimensions (a 3x1 vector representing the dimensions of the domain) divided by the grid_levels,
71
+
which determine the resolution of the wind field in each respective dimension.
67
72
wind_field : np.ndarray
68
73
3D wind field, typically of shape (Nx, Ny, Nz, 3) (not C-layout, to be reshaped).
69
74
surface_count : int, optional
70
75
Number of surfaces to be used for each velocity component, by default 25
71
76
reshape : bool, optional
72
-
Whether to re-format the given wind field into C-order, typically the desirable choice to match the order of entries of the wind field and the provided spacing, by default True
77
+
Whether to re-format the given wind field into C-order, typically the desirable choice to match the order of
78
+
entries of the wind field and the provided spacing, by default True
"""Produces a 3D plot of the wind velocity magnitude in a specified domain. This returns a Plotly figure for use of downstream visualization.
176
+
"""Produces a 3D plot of the wind velocity magnitude in a specified domain. This returns a Plotly figure for use of
177
+
downstream visualization.
171
178
172
179
Parameters
173
180
----------
174
181
spacing : tuple[float, float, float]
175
-
Spacing array that determines the spacing of points to be used in each dimension of the 3D field. Typically, of the form grid_dimensions (a 3x1 vector representing the dimensions of the domain) divided by the grid_levels, which determine the resolution of the wind field in each respective dimension.
182
+
Spacing array that determines the spacing of points to be used in each dimension of the 3D field. Typically, of
183
+
the form grid_dimensions (a 3x1 vector representing the dimensions of the domain) divided by the grid_levels,
184
+
which determine the resolution of the wind field in each respective dimension.
176
185
wind_field : np.ndarray
177
-
3D wind field, typically of shape (Nx, Ny, Nz, 3) (not C-layout, to be reshaped).
186
+
3D wind field, typically of shape (Nx, Ny, Nz, 3) (not C-layout, to be reshaped).
178
187
surf_count : int, optional
179
188
Number of surfaces to be used, by default 75
180
189
reshape : bool, optional
181
-
Whether to re-format the given wind field into C-order, typically the desirable choice to match the order of entries of the wind field and the provided spacing, by default True
190
+
Whether to re-format the given wind field into C-order, typically the desirable choice to match the order of
191
+
entries of the wind field and the provided spacing, by default True
182
192
transparent : bool, optional
183
-
Whether to set the background of the plot to a transparent background, which renders the same on different backgrounds on which this ``Figure`` could be embedded.
193
+
Whether to set the background of the plot to a transparent background, which renders the same on different
194
+
backgrounds on which this ``Figure`` could be embedded.
0 commit comments