Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI functionallity and usage #93

Open
SebGue opened this issue Mar 10, 2022 · 8 comments
Open

GUI functionallity and usage #93

SebGue opened this issue Mar 10, 2022 · 8 comments

Comments

@SebGue
Copy link
Contributor

SebGue commented Mar 10, 2022

Hello @helene-t ,

do you have some documentation the SciDataTool GUI?
I tried to visualize e.g. phase fluxlinkage and their FFT but I was not able to do that. Or at least it seems to be not intuitive to me. Further the 'Filter' button seem to have no functionallity (at least for now).

Best regards, Sebastian

@helene-t
Copy link
Collaborator

Hello @SebGue ,

Unfortunately we did not have the time to write a documentation for the GUI yet.

To perform FFT, you should have the option "FFT" available in the combobox for the x-axis (instead of None). If you do not check "auto-refresh", you must not forget to click on "Refresh" to see the actualization on the graph.

The filter button is designed for string axes (with is_components=True). It opens a dialog with filtering options.

Do not hesitate to ask for further information.
Helene

@SebGue
Copy link
Contributor Author

SebGue commented Mar 14, 2022

Hello @helene-t ,

I think I finally understand at least some of the GUI (fig. I).
'Axes Selection' (blue section) is 'Plot Axes Selection'.
'Axes Operation' (red section) means 'Other Axes Operations'.

grafik
Figure I

Now if I select 'overlay/filter' for phase axes as 'Axes Operations', I get the expected result (fig. II). Nevertheless it would be more convenient if this was the default setting. At least for fluxlinkage this makes sense, but maybe for your needs 'rms' is the better choise?!

grafik
Figure II

Still I'm don't really know how to get a valid FFT of the 3 phases fluxlinkage. If I do a FFT with 'Phase=rms' I get a bin of a senseful magnitude but it is only one bin and there are no other frequency components (fig. III).

grafik
Figure III

If I select 'overlay/filter' instead, there is an error:

Traceback (most recent call last):
  File "C:\Program Files\Python38\lib\site-packages\SciDataTool\GUI\DDataPlotter\DDataPlotter.py", line 149, in auto_update
    self.update_plot()
  File "C:\Program Files\Python38\lib\site-packages\SciDataTool\GUI\DDataPlotter\DDataPlotter.py", line 488, in update_plot
    self.data.plot_2D_Data(
  File "C:\Program Files\Python38\lib\site-packages\SciDataTool\Methods\DataND\plot_2D_Data.py", line 493, in plot_2D_Data
    indices = [
  File "C:\Program Files\Python38\lib\site-packages\SciDataTool\Methods\DataND\plot_2D_Data.py", line 496, in <listcomp>
    if abs(y) > abs(thresh * np_max(Ydatas[0]))
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Further there is an issue if I select 'phase' axes for X:

Traceback (most recent call last):
  File "C:\Program Files\Python38\lib\site-packages\SciDataTool\GUI\DDataPlotter\DDataPlotter.py", line 149, in auto_update
    self.update_plot()
  File "C:\Program Files\Python38\lib\site-packages\SciDataTool\GUI\DDataPlotter\DDataPlotter.py", line 488, in update_plot
    self.data.plot_2D_Data(
  File "C:\Program Files\Python38\lib\site-packages\SciDataTool\Methods\DataND\plot_2D_Data.py", line 213, in plot_2D_Data
    result = d.get_along(
  File "C:\Program Files\Python38\lib\site-packages\SciDataTool\Methods\DataND\get_along.py", line 36, in get_along
    axes_list, transforms = self._comp_axes(axes_list)
  File "C:\Program Files\Python38\lib\site-packages\SciDataTool\Methods\DataND\_comp_axes.py", line 67, in _comp_axes
    axis_requested.get_axis(self.axes[axis_requested.index], is_real=self.is_real)
  File "C:\Program Files\Python38\lib\site-packages\SciDataTool\Methods\RequestedAxis\get_axis.py", line 46, in get_axis
    values = axis.get_values(unit=self.unit)
  File "C:\Program Files\Python38\lib\site-packages\SciDataTool\Methods\Data1D\get_values.py", line 122, in get_values
    values = convert(values, self.unit, unit)
  File "C:\Program Files\Python38\lib\site-packages\SciDataTool\Functions\conversions.py", line 256, in convert
    raise UnitError(
SciDataTool.Functions.UnitError: Units rad and  do not match

Thanks for you help in advance.
Sebastian

@helene-t
Copy link
Collaborator

Do you have is_overlay=True in your "phase" axis? It should help solve all the above issues.

@SebGue
Copy link
Contributor Author

SebGue commented Mar 14, 2022

Is this an axis attribute? The SciData Object I try to plot is the 'default' Pyleecan fluxlinkage (i.e. Out.Mag.Phi_wind_stator).

@helene-t
Copy link
Collaborator

Yes it is an attribute of Data1D. In the latest versions of Pyleecan and SciDataTool, it should be set correctly. You can also try to initialize the GUI with Phi_wind_stator.plot("time", "phase[]")

@SebGue
Copy link
Contributor Author

SebGue commented Mar 14, 2022

Thank you, setting the attribute helped. Nevertheless there is only one freqency. Is there a round off before plotting?

@SebGue
Copy link
Contributor Author

SebGue commented Mar 14, 2022

... btw auto refresh should refresh even at checking this option. Also the filter is disabled now. Is there an option to only analyze a single (string) axis value?
Regarding export, what's your default decimal seperator? Would you mind to enable at least the option for default 'comma'?

@helene-t
Copy link
Collaborator

There is a filter of low amplitude harmonics. You should maybe try the simple plot Phi_wind_stator.plot_2D_Data("freqs", "phase[0]") to check if the issue comes from the GUI or from the plot itself. You can use the plot_2D_Data options (x_max, is_auto_ticks, is_auto_range, etc) to check your data.

The filter should be available on your phase axis, through the "overlay" button.

Concerning exports, it is for now only available in csv format, therefore with "." decimal separator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants