Skip to content

Commit

Permalink
Fix docstring issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys committed Nov 23, 2023
1 parent 22ce04d commit d571dea
Showing 1 changed file with 31 additions and 22 deletions.
53 changes: 31 additions & 22 deletions pyaedt/modules/solutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1083,8 +1083,10 @@ class FfdSolutionData(object):
----------
eep_files : list or str
List of element pattern files for each frequency.
If the input is string, assumes it is a single frequency.
frequencies : list, str, int, or float
List of frequencies.
If the input is not a list, assumes it is a single frequency.
Examples
--------
Expand Down Expand Up @@ -1524,8 +1526,8 @@ def plot_farfield_contour(
----------
farfield_quantity : str, optional
Far field quantity to plot. The default is ``"RealizedGain"``.
Available functions are: ``"RealizedGain"``, ``"RealizedGain_Theta"``, ``"RealizedGain_Phi"``, ``"rETotal"``,
``"rETheta"``, and ``"rEPhi"``.
Available functions are: ``"RealizedGain"``, ``"RealizedGain_Theta"``, ``"RealizedGain_Phi"``,
``"rETotal"``, ``"rETheta"``, and ``"rEPhi"``.
phi_scan : float, int, optional
Phi scan angle in degrees. The default is ``0``.
theta_scan : float, int, optional
Expand All @@ -1534,7 +1536,8 @@ def plot_farfield_contour(
Plot title. The default is ``"RectangularPlot"``.
format_quantity : str, optional
Conversion data function.
Available functions are: ``"dB10"``, ``"dB20"``, ``"abs"``, ``"real"``, ``"imag"``, ``"norm"``, ``"ang"``, and ``"and_deg"``.
Available functions are: ``"dB10"``, ``"dB20"``, ``"abs"``, ``"real"``, ``"imag"``, ``"norm"``, ``"ang"``,
and ``"and_deg"``.
export_image_path : str, optional
Full path for the image file. The default is ``None``, in which case the file is not exported.
levels : int, optional
Expand Down Expand Up @@ -1618,13 +1621,14 @@ def plot_2d_cut(
Parameters
----------
farfield_quantity : str, optional
Quantity to plot. Default `"RealizedGain"`.
Available functions are: `"RealizedGain"`, `"RealizedGain_Theta"`, "`RealizedGain_Phi"`, `"rETotal"`,
`"rETheta"`, `"rEPhi"`.
Quantity to plot. The default is ``"RealizedGain"``.
Available functions are: ``"RealizedGain"``, ``"RealizedGain_Theta"``, ``"RealizedGain_Phi"``,
``"rETotal"``, ``"rETheta"``, and ``"rEPhi"``.
primary_sweep : str, optional.
X axis variable. The default is ``"phi"``. Options are ``"phi"`` and ``"theta"``.
secondary_sweep_value : float, list, string, optional
List of cuts on the secondary sweep to plot. The default is ``0``, Options are ``"all"``, a single value float, or a list of float values.
List of cuts on the secondary sweep to plot. The default is ``0``. Options are
`"all"`, a single value float, or a list of float values.
phi_scan : float, int, optional
Phi scan angle in degrees. The default is ``0``.
theta_scan : float, int, optional
Expand All @@ -1633,11 +1637,13 @@ def plot_2d_cut(
Plot title. The default is ``"RectangularPlot"``.
format_quantity : str, optional
Conversion data function.
Available functions are: `"dB10"`, `"dB20"`, "`abs"`, `"real"`, `"imag"`, `"norm"`, `"ang"`, `"and_deg"`.
Available functions are: ``"dB10"``, ``"dB20"``, ``"abs"``, ``"real"``, ``"imag"``,
``"norm"``, ``"ang"``, and ``"deg"``.
export_image_path : str, optional
Full path to image file. Default is None to not export.
Full path for the image file. The default is ``None``, in which case an image in not exported.
show : bool, optional
Whether to show the plot. The default is ``True``. If ``False``, the Matplotlib instance of the plot is shown.
Whether to show the plot. The default is ``True``.
If ``False``, the Matplotlib instance of the plot is shown.
is_polar : bool, optional
Whether this plot is a polar plot. The default is ``True``.
Expand Down Expand Up @@ -1767,8 +1773,8 @@ def polar_plot_3d(
----------
farfield_quantity : str, optional
Far field quantity to plot. The default is ``"RealizedGain"``.
Available functions are: ``"RealizedGain"``, ``"RealizedGain_Theta"``, ``"RealizedGain_Phi"``, ``"rETotal"``,
``"rETheta"``, and ``"rEPhi"``.
Available functions are: ``"RealizedGain"``, ``"RealizedGain_Theta"``, ``"RealizedGain_Phi"``,
``"rETotal"``, ``"rETheta"``, and ``"rEPhi"``.
phi_scan : float, int, optional
Phi scan angle in degree. Default `0`.
theta_scan : float, int, optional
Expand Down Expand Up @@ -1863,15 +1869,16 @@ def polar_plot_3d_pyvista(
----------
farfield_quantity : str, optional
Quantity to plot. The default is ``"RealizedGain"``.
Available functions are: ``"RealizedGain"``, ``"RealizedGain_Theta"``, ``"RealizedGain_Phi"``, ``"rETotal"``,
``"rETheta"``, and ``"rEPhi"``..
Available functions are: ``"RealizedGain"``, ``"RealizedGain_Theta"``, ``"RealizedGain_Phi"``,
``"rETotal"``, ``"rETheta"``, and ``"rEPhi"``.
format_quantity : str, optional
Conversion data function.
Available functions are: ``"dB10"``, ``"dB20"``, ``"abs"``, ``"real"``, ``"imag"``, ``"norm"``, ``"ang"``, and ``"and_deg"``.
Available functions are: ``"dB10"``, ``"dB20"``, ``"abs"``, ``"real"``, ``"imag"``, ``"norm"``, ``"ang"``,
and ``"and_deg"``.
export_image_path : str, optional
Full path for the image file. The default is ``None``, in which case a file is not exported.
rotation : list, optional
It can be a list of numpy list of origin of plot.
Far field rotation matrix. The matrix contains three vectors, around x, y, and z axes.
The default is ``[[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]]``.
show : bool, optional
Whether to show the plot. The default is ``True``.
Expand Down Expand Up @@ -1935,7 +1942,6 @@ def polar_plot_3d_pyvista(

self.mesh = self.get_far_field_mesh(qty_str=farfield_quantity, quantity_format=format_quantity)

# plot everything together
rotation_euler = self._rotation_to_euler_angles(rotation) * 180 / np.pi

if not export_image_path and not show:
Expand Down Expand Up @@ -2135,11 +2141,12 @@ def get_far_field_mesh(self, farfield_quantity="RealizedGain", format_quantity="
----------
farfield_quantity : str, optional
Far field quantity to plot. The default is ``"RealizedGain"``.
Available functions are: ``"RealizedGain"``, ``"RealizedGain_Theta"``, ``"RealizedGain_Phi"``, ``"rETotal"``,
``"rETheta"``, and ``"rEPhi"``.
Available functions are: ``"RealizedGain"``, ``"RealizedGain_Theta"``, ``"RealizedGain_Phi"``,
``"rETotal"``, ``"rETheta"``, and ``"rEPhi"``.
format_quantity : str, optional
Conversion data function.
Available functions are: ``"dB10"``, ``"dB20"``, ``"abs"``, ``"real"``, ``"imag"``, ``"norm"``, ``"ang"``, and ``"and_deg"``.
Available functions are: ``"dB10"``, ``"dB20"``, ``"abs"``, ``"real"``, ``"imag"``, ``"norm"``, ``"ang"``,
and ``"and_deg"``.
Returns
-------
Expand Down Expand Up @@ -2399,7 +2406,8 @@ class FfdSolutionDataExporter(FfdSolutionData):
setup_name : str
Name of the setup. Make sure to build a setup string in the form of ``"SetupName : SetupSweep"``.
frequencies : list
Frequency list to export. String with units is valid and float in Hertz.
Frequency list to export. List of strings with units is valid or list of float in Hertz units.
For example, ``["9GHz", 9e9]``.
variations : dict, optional
Dictionary of all families including the primary sweep. The default value is ``None``.
overwrite : bool, optional
Expand Down Expand Up @@ -2567,7 +2575,8 @@ class UpdateBeamForm:
Quantity to plot. The default is ``"RealizedGain"``.
quantity_format : str, optional
Conversion data function.
Available functions are: ``"dB10"``, ``"dB20"``, ``"abs"``, ``"real"``, ``"imag"``, ``"norm"``, ``"ang"``, and ``"and_deg"``.
Available functions are: ``"dB10"``, ``"dB20"``, ``"abs"``, ``"real"``, ``"imag"``, ``"norm"``, ``"ang"``,
and ``"and_deg"``.
"""

def __init__(self, ff, farfield_quantity, quantity_format):
Expand Down

0 comments on commit d571dea

Please sign in to comment.