allow showing scans with differnt motors#1227
Conversation
Screen.Recording.2026-06-26.000112.mp4 |
|
To clarify: Screen.Recording.2026-06-26.000439.mp4 |
|
Honestly, I fail to see what you are trying to correct. Are you aware of the feature allowing multiple plots of alternating "entries" when one of the entries did not feature the scanned motor? It requests a minimum amount of entries selected, because when having just 3 scans, for instance, it is not cumbersome to select those needed. If you replace the missing motor by another one based on the index of the first one, you are going to break more important things. From my understanding, what you show there it just requires to be in AUTO ADD mode. |
The feature allowing an incompatible selection to be applied on multiple entries ignoring the conflicting ones requires the same type of entry at start and end. The fact of ending the selection with a compatible or incompatible entry changes the behavior. It is intended behavior implemented to allow multiple selections of x.1 and x.2 scans because the x.2 was not containing the same datasets and it was cumbersome to alternate the selection by hand above a minimum of scans. For instance, if you start the selection with 1.1 and you end with 5.1 it will allow a multiple selection of scans even if incompatible (by ignoring the incompatible ones) while if you end with 5.2 it will complain. |
Actually before the error i showed in 2nd video did not pop-up. But at some moment it starts to. The logic of error is clear.
No i am not. Please let me know.
I partially agree. it was my first impression. But in this mode if smthg wrong is clicked user need to redo everything (to delete one is possible through legend but since it is not open by default - it is not clear and easy)
Sorry if i misunderstood. But if i am looking on older version of PyMca. The behavior was strange - i mentioned it above. (see next comment with video)
If |
|
This is old (5.9.5) behavior. 1 and 3 contains selected Screen.Recording.2026-06-26.103924.mp4 |
|
Just to clarify one thing: ...
if (cnt == 'x') and (path not in phynxFile):
scanned = NexusTools.getScannedPositioners(phynxFile, entry)
try:
_logger.warning("Motor is missing, trying to use same number of scanned positioners")
selectedIndex = selection[cnt][0]
path = scanned[selectedIndex]
except IndexError:
_logger.warning("Motor is missing, trying to use first scanned positioner")
path = scanned[0]
# get the data
data = phynxFile[path]
...if |
My point is that if you do that, the other functionality where one actually wanted to skip them will be lost. A functionality that BTW was requested by the spectroscopy beamlines (including ID26). Usually one wants to compare apples with apples and oranges with oranges. Trying to co-plot two things on different motors is basically non-sense. Nobody warrants the ranges will be compatible. It is preferable to totally avoid to select an X axis in that case to compare signals. It is perfectly acceptable that if the user wants to do such a thing selects to explicitly ADD things to the plot. AUTO REPLACE is the most used mode by ID26, not everywhere. |
Then current behavior is a bug? And the old behavior (which was similar but with no error) was also a bug not a feature? Should it be fixed then? Please have a look the second video. |
It was request by ID26.
Scans of same counter but different motors need to be plotted at the same time.
Scans are exactly the same except of motor name.
Actually it was already working but there was annoying pop-up error - but plotting was working for two scans.
This PR explicitly tries to use the same positioner (not by name but by counter number) or the first one - otherwise fails as before.