SciDataTool is an open-source Python package for scientific data handling. The objective is to provide a user-friendly, unified, flexible module to postprocess any kind of signal. It is meant to be used by researchers, R&D engineers and teachers in any scientific area. This package allows to efficiently store data fields in the time/space or in the frequency domain, to easily perform Fourier Transforms, to extract slices, to convert units, to compare several fields, etc. It therefore leads to simplified plot commands.
Apache License 2.0
26
stars
21
forks
source link
[CO] Improve error message when calling impossible plot #110
While working on a validation case for pyleecan I had the following issue:
This PR https://github.com/Eomys/pyleecan/pull/529 introduces a new test "test_Bore_sym" in Tests/Validation/Magnetics/test_FEMM_periodicity.py where I compute the flux with/without angular sym. In both cases I set Nt_tot=1 and then I call (out of a copy/paste from another test with Nt_tot>1):
I guess the error is that I'm calling a plot on an axis with a size one. If I increase Nt_tot=4, there is no error. So I think it is just a matter of adding a check and a clearer error message (the requested plot doesn't make sense).
From the same copy paste, I also had:
I'm requesting time[1] which doesn't exist, so we could also provide a dedicated error message for this case.
Hello all,
While working on a validation case for pyleecan I had the following issue: This PR https://github.com/Eomys/pyleecan/pull/529 introduces a new test "test_Bore_sym" in Tests/Validation/Magnetics/test_FEMM_periodicity.py where I compute the flux with/without angular sym. In both cases I set Nt_tot=1 and then I call (out of a copy/paste from another test with Nt_tot>1):
and I get the following error:
I guess the error is that I'm calling a plot on an axis with a size one. If I increase Nt_tot=4, there is no error. So I think it is just a matter of adding a check and a clearer error message (the requested plot doesn't make sense).
From the same copy paste, I also had: I'm requesting time[1] which doesn't exist, so we could also provide a dedicated error message for this case.
Best regards, Pierre