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
Currently, the axis attribute of uniform data axes can be changed (after initialization of the axis), though it should be defined by offset and scale only. Instead, it should be a protected attribute that can be changed only if offset and scale are changed, but not directly by user input. An example is that users not understanding the difference between DataAxis and UniformDataAxis, might actually change an axis to a non-uniform one just by providing the axis array without converting the axes type, which can lead to problems in a later analysis.
Describe the bug
Currently, the
axis
attribute of uniform data axes can be changed (after initialization of the axis), though it should be defined byoffset
andscale
only. Instead, it should be a protected attribute that can be changed only ifoffset
andscale
are changed, but not directly by user input. An example is that users not understanding the difference betweenDataAxis
andUniformDataAxis
, might actually change an axis to a non-uniform one just by providing theaxis
array without converting the axes type, which can lead to problems in a later analysis.Would be solved by #3031
To Reproduce
Steps to reproduce the behavior:
S.axes_manager
andS.axes_manager[0].axis
are now in contradiction to each other.Expected behavior
Throw an error when trying to manually change the
axis
vector for a uniform or functional data axis.Python environement:
The text was updated successfully, but these errors were encountered: