diff --git a/pyaedt/modules/PostProcessor.py b/pyaedt/modules/PostProcessor.py index 6e1b0eab8f6..5e1820b49ff 100644 --- a/pyaedt/modules/PostProcessor.py +++ b/pyaedt/modules/PostProcessor.py @@ -5407,7 +5407,11 @@ def get_field_summary_data(self, setup=None, variation=None, intrinsics="", pand if pandas_output: if pd is None: raise ImportError("pandas package is needed.") - return pd.DataFrame.from_dict(out_dict) + df = pd.DataFrame.from_dict(out_dict) + for col in ["Min", "Max", "Mean", "Stdev", "Total"]: + if col in df.columns: + df[col] = df[col].astype(float) + return df return out_dict @pyaedt_function_handler(filename="output_file", design_variation="variations", setup_name="setup") diff --git a/pyaedt/modules/solutions.py b/pyaedt/modules/solutions.py index b1022423974..1b443ba2ae5 100644 --- a/pyaedt/modules/solutions.py +++ b/pyaedt/modules/solutions.py @@ -3261,7 +3261,19 @@ def change_plot_scale(self, minimum_value, maximum_value, is_log=False, is_db=Fa return True @pyaedt_function_handler() - def export_image(self, full_path=None, width=1920, height=1080, orientation="isometric", display_wireframe=True): + def export_image( + self, + full_path=None, + width=1920, + height=1080, + orientation="isometric", + display_wireframe=True, + selections=None, + show_region=True, + show_axis=True, + show_grid=True, + show_ruler=True, + ): """Export the active plot to an image file. .. note:: @@ -3279,7 +3291,22 @@ def export_image(self, full_path=None, width=1920, height=1080, orientation="iso ``top``, ``bottom``, ``right``, ``left``, ``front``, ``back``, and any custom orientation. display_wireframe : bool, optional - Set to ``True`` if the objects has to be put in wireframe mode. + Whether the objects has to be put in wireframe mode. Default is ``True``. + selections : str or List[str], optional + Objects to fit for the zoom on the exported image. + Default is None in which case all the objects in the design will be shown. + One important note is that, if the fieldplot extension is larger than the + selection extension, the fieldplot extension will be the one considered + for the zoom of the exported image. + show_region : bool, optional + Whether to include the air region in the exported image. Default is ``True``. + show_grid : bool, optional + Whether to display the background grid in the exported image. + Default is ``True``. + show_axis : bool, optional + Whether to display the axis triad in the exported image. Default is ``True``. + show_ruler : bool, optional + Whether to display the ruler in the exported image. Default is ``True``. Returns ------- @@ -3304,6 +3331,11 @@ def export_image(self, full_path=None, width=1920, height=1080, orientation="iso width=width, height=height, display_wireframe=display_wireframe, + selections=selections, + show_region=show_region, + show_axis=show_axis, + show_grid=show_grid, + show_ruler=show_ruler, ) full_path = check_and_download_file(full_path) if status: