lnls-sirius / archiver-viewer

React based EPICS Archiver Viewer
4 stars 2 forks source link

axis to plot pvs #13

Closed fernandohds564 closed 3 years ago

fernandohds564 commented 6 years ago

Hi @gciotto!

Currently, the archiver-viewer plots PVs with the same unit in the same axis and PVs with different unit in different axes. However, it seems that when the PVs have no unit defined, it always plot them in different axes.

It would be nice to have a way to change this behavior. I think the ideal interface would allow us to choose the axis we want to plot a given PV, but this seems complex and may take some time to implement, right?. For that reason, I think the default behavior should be to plot PVs without unit in the same axis. What do you think?

Thanks, Fernando.

gciotto commented 6 years ago

Hello @fernandohds564,

I think the ideal interface would allow us to choose the axis we want to plot a given PV, but this seems complex and may take some time to implement, right?

Yes, I need to think how to provide the user a way to select between axes. This would not be so fast to implement, but can be done!

For that reason, I think the default behavior should be to plot PVs without unit in the same axis. What do you think?

When I thought about this problem, I took the decision of creating separated axes based on the range of the variables. For example, we could have an enumeration variable of the kind OnOff whose possible values are 0 or 1, and another one that represents temperature measures, varying in a big interval. If both of them were plotted on the same axis, changes in the first one would not be very perceptible.

To solve this problem, I was thinking in using the last part of the variable's name, which usually reflects what is its function. Going back to the example, variables that finished in OnOff would be plotted on the same axis and the others that finished in Temp, on another one.

fernandohds564 commented 6 years ago

I understand the problem, @gciotto. You are right, it is safer to plot them in different axes while the option of axis choice is not available.

Your last idea seems interesting as a temporary workaround! However, it is not clear to me how to define how many characters of the PV names you should consider in the comparison. For example, all Sirius PVs ends with: -SP, -RB, -Sel, -Sts, -Mon or -Cmd, which means these last characters should not be included. On the other hand the PVs from the Linac, defined by the Sinap guys, do not follow this convention yet. Maybe in the future we will adapt them to Sirius standards, but by then I think this workaround will have been replaced by the definitive solution.

Maybe It is better to leave it as it is right now, don't you think? If you agree I can close this issue (or I can leave it open as a reminder for the definitive implementation).

Thanks again!

gciotto commented 6 years ago

Your last idea seems interesting as a temporary workaround! However, it is not clear to me how to define how many characters of the PV names you should consider in the comparison. For example, all Sirius PVs ends with: -SP, -RB, -Sel, -Sts, -Mon or -Cmd, which means these last characters should not be included. On the other hand the PVs from the Linac, defined by the Sinap guys, do not follow this convention yet. Maybe in the future we will adapt them to Sirius standards, but by then I think this workaround will have been replaced by the definitive solution.

Thanks for the explanation, @fernandohds564. I think it's better to wait until we adapt everything to the same standard as you suggested.

Maybe It is better to leave it as it is right now, don't you think? If you agree I can close this issue (or I can leave it open as a reminder for the definitive implementation).

We can leave the issue open to remind me to change the code to allow axis selection and label it as an enhancement.